Determine PATH_SEPARATOR and handle Windows PATH as well.
[gnulib.git] / ChangeLog
1 2007-07-01  Bruno Haible <bruno@clisp.org>
2
3         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
4         Windows PATH as well. Conservative double-quoting. Comments.
5
6 2007-07-01  Bruno Haible <bruno@clisp.org>
7             Eric Blake  <ebb9@byu.net>
8             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9
10         * gnulib-tool (self_abspathname): Fix algorithm to cope with
11         empty components in $PATH, denoting '.'.
12
13 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14
15         * gnulib-tool: Fix indentation.
16         (func_create_megatestdir): Likewise.
17         Report by Bruno Haible.
18
19 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
20
21         Sync from Automake.
22         * build-aux/gnupload: Fix shell portability issues with for loops.
23         Report by Karl Berry.
24
25 2007-06-29  Simon Josefsson  <simon@josefsson.org>
26
27         * build-aux/maint.mk (POURL): Use translationproject.org.
28
29 2007-06-27  Simon Josefsson  <simon@josefsson.org>
30             Bruno Haible  <bruno@clisp.org>
31
32         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
33         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
34         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
35         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
36         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
37
38 2007-06-27  Bruno Haible  <bruno@clisp.org>
39
40         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
41         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
42
43 2007-06-26  Karl Berry  <karl@gnu.org>
44
45         * MODULES.html.sh: remove xreadlink-with-size.
46
47 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
48
49         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
50         method that I hope also handles the double-include problem noted
51         by Bruno Haible in
52         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
53
54 2007-06-23  Bruno Haible  <bruno@clisp.org>
55
56         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
57         Don't let the 'mostlyclean' target fail if the last subdirectory could
58         not be removed.
59         Reported by Karl Berry.
60
61 2007-06-23  Bruno Haible  <bruno@clisp.org>
62
63         * gnulib-tool (echo): Add a speedier workaround for ksh.
64         * tests/test-echo.sh: Likewise.
65
66 2007-06-23  Bruno Haible  <bruno@clisp.org>
67
68         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
69         * tests/test-echo.sh: Likewise.
70
71 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
72
73         * gnulib-tool (IFS): Initialize early, so we don't set it to
74         empty later.
75         (self_abspathname): Rewrite algorithm to set it, reindent.
76         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
77         (func_create_megatestdir): Merge some sed scripts.
78
79 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
80
81         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
82         exposed by Sun Studio 11 cc on Solaris 8.
83
84 2007-06-22  Bruno Haible  <bruno@clisp.org>
85
86         * gnulib-tool (echo): Ensure the echo primitive does not interpret
87         backslashes.
88         * tests/test-echo.sh: New file.
89
90 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
91
92         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
93         simplify `sed_replace_build_aux' scripts, they are portable but
94         echoing them with `echo' is not.
95         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
96
97 2007-06-21  Karl Berry  <karl@gnu.org>
98
99         * config/srclist.txt: guess we can't handle the licenses via
100         srclist at the moment.
101
102 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
103
104         * MODULES.html.sh: Add include_next.
105         * modules/include_next: New file.
106
107 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
108
109         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
110         INCLUDE_NEXT.
111         (gl_CHECK_NEXT_HEADERS): New macro.
112         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
113         the obsolescent gl_ABSOLUTE_HEADER.
114         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
115         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
116         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
117         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
118         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
119         * m4/math_h.m4 (gl_MATH_H): Likewise.
120         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
121         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
122         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
123         * m4/stdint.m4 (gl_STDINT_H): Likewise.
124         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
125         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
126         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
127         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
128         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
129         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
130         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
131         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
132         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
133         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
134         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
135         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
136         * m4/inttypes.m4 (gl_INTTYPES_H): Define
137         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
138         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
139         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
140         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
141         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
142         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
143         * lib/float_.h: Likewise.
144         * lib/inttypes_.h: Likewise.
145         * lib/math_.h: Likewise.
146         * lib/search_.h: Likewise.
147         * lib/signal_.h: Likewise.
148         * lib/stdint_.h: Likewise.
149         * lib/stdio_.h: Likewise.
150         * lib/stdlib_.h: Likewise.
151         * lib/string_.h: Likewise.
152         * lib/sys_stat_.h: Likewise.
153         * lib/sys_time_.h: Likewise.
154         * lib/time_.h: Likewise.
155         * lib/unistd_.h: Likewise.
156         * lib/wchar_.h: Likewise.
157         * lib/wctype_.h: Likewise.
158         * lib/dirent_.h: Likewise.
159         * lib/iconv_.h: Likewise.
160         * lib/locale_.h: Likewise.
161         * lib/netinet_in_.h: Likewise.
162         * lib/sys_select_.h: Likewise.
163         * lib/sys_socket_.h: Likewise.
164         * lib/sysexits_.h: Likewise.
165         * modules/fcntl (Depends-on): Depend on include_next, not
166         absolute_header.
167         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
168         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
169         * modules/fchdir: Likewise.
170         * modules/float: Likewise.
171         * modules/iconv_open: Likewise.
172         * modules/inttypes: Likewise.
173         * modules/locale: Likewise.
174         * modules/math: Likewise.
175         * modules/netinet_in: Likewise.
176         * modules/search: Likewise.
177         * modules/signal: Likewise.
178         * modules/stdint: Likewise.
179         * modules/stdio: Likewise.
180         * modules/stdlib: Likewise.
181         * modules/string: Likewise.
182         * modules/sys_select: Likewise.
183         * modules/sys_socket: Likewise.
184         * modules/sys_stat: Likewise.
185         * modules/sys_time: Likewise.
186         * modules/sysexits: Likewise.
187         * modules/time: Likewise.
188         * modules/unistd: Likewise.
189         * modules/wchar: Likewise.
190         * modules/wctype: Likewise.
191         * modules/sys_stat: Change maintainer to "all".
192         * modules/unistd: Likewise.
193
194 2007-06-20  Karl Berry  <karl@gnu.org>
195
196         * config/srclist.txt: track www changes in license files.
197
198 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
199
200         * build-aux/bootstrap: Remove stray dot.
201         Make sure build_aux settings are honored when linking
202         gnulib_extra_files.
203
204 2007-06-19  Eric Blake  <ebb9@byu.net>
205
206         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
207         Allow compilation on cygwin.
208
209 2007-06-19  Jim Meyering  <jim@meyering.net>
210
211         xreadlink-with-size: Remove module.  No longer used.
212         Ex-callers now use xreadlink or mreadlink-with-size.
213         * modules/xreadlink-with-size: Remove module.
214         * lib/xreadlink-with-size.c: Remove file.
215         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
216         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
217         just before the function definition *is* accurate.
218
219         Eliminate one way canonicalize_filename_mode could exit.
220         * lib/canonicalize.c (canonicalize_filename_mode):
221         Use mreadlink_with_size, not xreadlink_with_size.
222
223 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
224
225         Detect porting problems to FreeBSD/arm, which has time_t wider than
226         long int.  Original problem reported for GNU diff by Xin Li in
227         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
228         * modules/getdate (Depends-on): Add intprops, verify.
229         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
230         is an integer type no wider than long int.
231
232 2007-06-18  Jim Meyering  <jim@meyering.net>
233
234         New module: mreadlink-with-size.
235         * MODULES.html.sh: Add mreadlink-with-size.
236         * modules/mreadlink-with-size: New module
237         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
238         not xreadlink-with-size.
239         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
240
241 2007-06-16  Bruno Haible  <bruno@clisp.org>
242
243         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
244         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
245         Reported by Gary V. Vaughan <gary@gnu.org>.
246
247 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
248
249         Revamp lchown so that it lives in unistd.h where it belongs.
250         * lib/lchown.h: Remove.
251         * lib/dirchownmod.c: Don't include lib/lchown.h.
252         * lib/fchownat.c: Likewise.
253         * lib/openat.c: Likewise.
254         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
255         does not follow symlinks.
256         (EOPNOTSUPP): Define if not defined.
257         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
258         is defined to 0.
259         (lchown): New decl.
260         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
261         Do not check for lchown decl.
262         Set REPLACE_LCHOWN.
263         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
264         REPLACE_LCHOWN.
265         * modules/chown: Make it clear it follows symlinks.
266         * modules/lchown: Make it clear it doesn't follow symlinks.
267         (Files): Remove lib/lchown.h
268         (Depends-on): Add unistd.
269         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
270         (Include): Include <unistd.h>, not "lchown.h".
271         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
272         REPLACE_LCHOWN.
273
274 2007-06-15  Jim Meyering  <jim@meyering.net>
275
276         Change license (GPL to LGPL) of fsusage and dependents.
277         * modules/fsusage (License): Change to LGPL.
278         * modules/full-read (License): Likewise.
279         * modules/full-write (License): Likewise.
280         * modules/safe-read (License): Likewise.
281         * modules/safe-write (License): Likewise.
282
283 2007-06-14  Ben Pfaff  <blp@gnu.org>
284
285         Missing part of allocsa -> malloca transition.
286         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
287         gl_MALLOCA.
288
289 2007-06-12  Bruno Haible  <bruno@clisp.org>
290
291         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
292         to ia64, x86_64, i386.
293         Reported by Eric Blake.
294
295 2007-06-12  Bruno Haible  <bruno@clisp.org>
296
297         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
298         cross-compiling to x86_64.
299
300 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
301
302         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
303         glitch reported by Ralf Wildenhues in
304         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
305
306         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
307         Vin Shelton.
308
309 2007-06-11  Bruno Haible  <bruno@clisp.org>
310
311         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
312         replacement string.
313         Reported by Eric Blake.
314
315 2007-06-10  Bruno Haible  <bruno@clisp.org>
316
317         Prepare vasnprintf code for use with Unicode strings.
318         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
319         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
320         TYPE_U32_STRING.
321         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
322         a_u32_string variants.
323         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
324         * lib/printf-args.c: Don't include config.h and the specification
325         header if PRINTF_FETCHARGS is already defined.
326         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
327         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
328         TYPE_U16_STRING, TYPE_U32_STRING.
329         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
330         u16_directive, u16_directives, u32_directive, u32_directives): New
331         types.
332         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
333         New declarations.
334         * lib/printf-parse.c: Don't include config.h and the specification
335         header if PRINTF_PARSE is already defined. Eliminate the set of
336         parameters for WIDE_CHAR_VERSION; the user of this file must provide
337         them now. Include c-ctype.h.
338         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
339         directive and CHAR_T_ONLY_ASCII.
340         * lib/vasnprintf.c: Don't include config.h and the specification header
341         if VASNPRINTF is already defined.
342         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
343         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
344         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
345         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
346         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
347         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
348         code accordingly.
349         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
350         pad_ourselves also in this case, with the 'c' and 's' directives, and
351         with a different notion of "width".
352         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
353
354 2007-06-10  Bruno Haible  <bruno@clisp.org>
355
356         * modules/unistr/u32-mbsnlen: New file.
357         * lib/unistr/u32-mbsnlen.c: New file.
358
359         * modules/unistr/u16-mbsnlen: New file.
360         * lib/unistr/u16-mbsnlen.c: New file.
361
362         * modules/unistr/u8-mbsnlen: New file.
363         * lib/unistr/u8-mbsnlen.c: New file.
364
365         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
366         declarations.
367
368 2007-06-10  Bruno Haible  <bruno@clisp.org>
369
370         * lib/string_.h (mbsnlen): New declaration.
371         * lib/mbsnlen.c: New file.
372         * m4/mbsnlen.m4: New file.
373         * modules/mbsnlen: New file.
374         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
375         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
376         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
377
378 2007-06-10  Bruno Haible  <bruno@clisp.org>
379
380         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
381
382 2007-06-10  Bruno Haible  <bruno@clisp.org>
383
384         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
385         * lib/mbuiter.h: Likewise.
386
387 2007-06-10  Bruno Haible  <bruno@clisp.org>
388
389         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
390         declaration.
391
392 2007-06-10  Karl Berry  <karl@gnu.org>
393
394         * config/srclist.txt: remove gettext entries, Bruno prefers
395         to update individually.
396
397 2007-06-10  Bruno Haible  <bruno@clisp.org>
398
399         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
400         'maxlen'. Ensure only length + width bytes are allocated, not
401         length + 1 + width.
402
403 2007-06-09  Bruno Haible  <bruno@clisp.org>
404
405         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
406         (CHAR_T): Remove macro.
407         (VASNPRINTF): Update.
408
409 2007-06-09  Bruno Haible  <bruno@clisp.org>
410
411         * MODULES.html.sh (Unicode string functions): Add the new modules.
412
413         * modules/uniconv/u32-conv-to-enc: New file.
414         * lib/uniconv/u32-conv-to-enc.c: New file.
415         * modules/uniconv/u32-conv-to-enc-tests: New file.
416         * tests/uniconv/test-u32-conv-to-enc.c: New file.
417
418         * modules/uniconv/u16-conv-to-enc: New file.
419         * lib/uniconv/u16-conv-to-enc.c: New file.
420         * lib/uniconv/u-conv-to-enc.h: New file.
421         * modules/uniconv/u16-conv-to-enc-tests: New file.
422         * tests/uniconv/test-u16-conv-to-enc.c: New file.
423
424         * modules/uniconv/u8-conv-to-enc: New file.
425         * lib/uniconv/u8-conv-to-enc.c: New file.
426         * modules/uniconv/u8-conv-to-enc-tests: New file.
427         * tests/uniconv/test-u8-conv-to-enc.c: New file.
428
429         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
430         u32_conv_to_encoding): New declarations.
431
432 2007-06-09  Bruno Haible  <bruno@clisp.org>
433
434         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
435
436 2007-06-09  Bruno Haible  <bruno@clisp.org>
437
438         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
439         * modules/malloca: Renamed from modules/allocsa, updated.
440         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
441         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
442         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
443         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
444         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
445         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
446         * modules/xmalloca: Renamed from modules/xallocsa, updated.
447         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
448         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
449         * modules/c-strcasestr (Depends-on): Update.
450         * lib/c-strcasestr.c: Update.
451         * modules/c-strstr (Depends-on): Update.
452         * lib/c-strstr.c: Update.
453         * modules/canonicalize-lgpl (Depends-on): Update.
454         * lib/canonicalize-lgpl.c: Update.
455         * modules/clean-temp (Depends-on): Update.
456         * lib/clean-temp.c: Update.
457         * modules/csharpcomp (Depends-on): Update.
458         * lib/csharpcomp.c: Update.
459         * modules/csharpexec (Depends-on): Update.
460         * lib/csharpexec.c: Update.
461         * modules/javacomp (Depends-on): Update.
462         * lib/javacomp.c: Update.
463         * modules/javaexec (Depends-on): Update.
464         * lib/javaexec.c: Update.
465         * modules/mbscasestr (Depends-on): Update.
466         * lib/mbscasestr.c: Update.
467         * modules/mbsstr (Depends-on): Update.
468         * lib/mbsstr.c: Update.
469         * modules/setenv (Depends-on): Update.
470         * lib/setenv.c: Update.
471         * modules/strcasestr (Depends-on): Update.
472         * lib/strcasestr.c: Update.
473         * modules/striconveha (Depends-on): Update.
474         * lib/striconveha.c: Update.
475         * modules/relocatable-prog-wrapper (Files): Update.
476         * lib/relocwrapper.c: Update.
477         * build-aux/install-reloc: Update.
478         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
479
480 2007-06-08  Bruno Haible  <bruno@clisp.org>
481
482         Port to uClibc.
483         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
484         * lib/fpurge.c (fpurge): Likewise.
485         * lib/freading.c (freading): Likewise.
486         * lib/fseeko.c (rpl_fseeko): Likewise.
487         * lib/fseterr.c (fseterr): Likewise.
488         * lib/fwriting.c (fwriting): Likewise.
489         * tests/test-fflush.c (main): Avoid a failure on uClibc.
490
491 2007-06-08  Bruno Haible  <bruno@clisp.org>
492
493         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
494         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
495         * modules/gettext (Files): Add m4/intlmacosx.m4.
496
497 2007-06-07  Bruno Haible  <bruno@clisp.org>
498
499         * modules/localename-tests: New file.
500         * tests/test-localename.c: New file.
501
502         New module 'localename'.
503         * lib/localename.h: New file.
504         * lib/localename.c: New file, from GNU gettext.
505         * m4/localename.m4: New file.
506         * modules/localename: New file.
507
508 2007-06-07  Bruno Haible  <bruno@clisp.org>
509
510         Work around the lack of <wchar.h> on some builds of uClibc.
511         * doc/headers/wchar.texi: Update.
512         * lib/wchar_.h: Include <wchar.h> only if it exists.
513         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
514         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
515         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
516         doesn't exist.
517         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
518         * modules/mbfile (Depends-on): Add wchar.
519         * modules/mbiter (Depends-on): Likewise.
520         * modules/mbuiter (Depends-on): Likewise.
521         Reported by Simon Josefsson.
522
523 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
524
525         Work around problem reported by Steven M. Schweda in
526         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
527         Tru64 5.1B with the Compaq compiler environment installed declares
528         an 'isblank' function but does not define it in the C library.
529         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
530         * lib/regex_internal.h (isblank): Likewise.
531         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
532         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
533
534 2007-06-05  Bruno Haible  <bruno@clisp.org>
535
536         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
537         ia64.
538         * modules/printf-safe: New file.
539         * modules/fprintf-posix (Depends-on): Add printf-safe.
540         * modules/printf-posix (Depends-on): Likewise.
541         * modules/snprintf-posix (Depends-on): Likewise.
542         * modules/sprintf-posix (Depends-on): Likewise.
543         * modules/vasnprintf-posix (Depends-on): Likewise.
544         * modules/vasprintf-posix (Depends-on): Likewise.
545         * modules/vfprintf-posix (Depends-on): Likewise.
546         * modules/vprintf-posix (Depends-on): Likewise.
547         * modules/vsnprintf-posix (Depends-on): Likewise.
548         * modules/vsprintf-posix (Depends-on): Likewise.
549         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
550         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
551         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
552         "no" on i386, x86_64, ia64.
553         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
554         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
555         on i386, x86_64, ia64.
556         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
557         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
558         on i386, x86_64, ia64.
559         * tests/test-vasnprintf-posix.c: Include float.h.
560         (LDBL80_WORDS): New macro.
561         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
562         on i386, x86_64, ia64.
563         * tests/test-vasprintf-posix.c: Include float.h.
564         (LDBL80_WORDS): New macro.
565         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
566         on i386, x86_64, ia64.
567         * tests/test-snprintf-posix.c: Include float.h.
568         * tests/test-sprintf-posix.c: Likewise.
569         * tests/test-vsnprintf-posix.c: Likewise.
570         * tests/test-vsprintf-posix.c: Likewise.
571
572 2007-06-05  Bruno Haible  <bruno@clisp.org>
573
574         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
575         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
576         non-IEEE numbers on i386, x86_64, ia64.
577         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
578         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
579         * tests/test-isnanl.h: Include float.h.
580         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
581
582 2007-06-05  Bruno Haible  <bruno@clisp.org>
583
584         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
585         also the %a / %A. Handle the %a / %A code before this extra handling.
586
587 2007-06-05  Bruno Haible  <bruno@clisp.org>
588
589         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
590         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
591
592 2007-06-05  Bruno Haible  <bruno@clisp.org>
593
594         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
595         typo in variable name.
596
597 2007-06-05  Eric Blake  <ebb9@byu.net>
598
599         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
600         Reported by Simon Josefsson.
601
602 2007-06-04  Bruno Haible  <bruno@clisp.org>
603
604         Avoid test failures on some PowerPC platforms.
605         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
606         Define differently for PowerPC.
607         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
608         Reported by Gary V. Vaughan <gary@gnu.org>.
609
610 2007-06-02  Bruno Haible  <bruno@clisp.org>
611
612         Fix test-stdint failure on FreeBSD/ia64.
613         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
614         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
615         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
616         * doc/headers/stdint.texi: Update.
617
618 2007-06-01  Bruno Haible  <bruno@clisp.org>
619
620         * tests/test-binary-io.c (main): Pass a third argument to open().
621         Reported by Gary V. Vaughan <gary@gnu.org>.
622
623 2007-06-01  Bruno Haible  <bruno@clisp.org>
624
625         * doc/functions/frexpl.texi: Update for mingw.
626
627 2007-06-01  Bruno Haible  <bruno@clisp.org>
628
629         * tests/test-lseek.c (main): Disable test of errno for invalid third
630         argument.
631         * doc/functions/lseek.texi: Update.
632         Reported by Gary V. Vaughan <gary@gnu.org>.
633
634 2007-05-28  Bruno Haible  <bruno@clisp.org>
635
636         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
637
638 2007-05-31  Eric Blake  <ebb9@byu.net>
639
640         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
641         cross compiling.
642
643 2007-05-30  Eric Blake  <ebb9@byu.net>
644         and Bruno Haible  <bruno@clisp.org>
645
646         Work around mingw test failures exposed by m4-1.4.9b.
647         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
648         * tests/test-unistd.c: Disable uid_t and git_t tests for the
649         moment.
650
651 2007-05-30  Bruno Haible  <bruno@clisp.org>
652
653         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
654         assuming that they are closed. Needed on HP-UX 11.
655
656 2007-05-29  Bruno Haible  <bruno@clisp.org>
657
658         Fix a problem with #include_next.
659         * lib/dirent_.h: Split the double-inclusion guard.
660         * lib/fcntl_.h: Likewise.
661         * lib/float_.h: Likewise.
662         * lib/iconv_.h: Likewise.
663         * lib/inttypes_.h: Likewise.
664         * lib/locale_.h: Likewise.
665         * lib/math_.h: Likewise.
666         * lib/netinet_in_.h: Likewise.
667         * lib/search_.h: Likewise.
668         * lib/signal_.h: Likewise.
669         * lib/stdint_.h: Likewise.
670         * lib/stdio_.h: Likewise.
671         * lib/stdlib_.h: Likewise.
672         * lib/string_.h: Likewise.
673         * lib/sys_select_.h: Likewise.
674         * lib/sys_socket_.h: Likewise.
675         * lib/sys_stat_.h: Likewise.
676         * lib/sys_time_.h: Likewise.
677         * lib/sysexits_.h: Likewise.
678         * lib/time_.h: Likewise.
679         * lib/unistd_.h: Likewise.
680         * lib/wchar_.h: Likewise.
681         * lib/wctype_.h: Likewise.
682
683 2007-05-29  Bruno Haible  <bruno@clisp.org>
684
685         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
686         for the moment.
687
688 2007-05-29  Bruno Haible  <bruno@clisp.org>
689
690         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
691         invocation.
692         Reported by Eric Blake.
693
694 2007-05-29  Bruno Haible  <bruno@clisp.org>
695
696         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
697         compiling case.
698
699 2007-05-29  Eric Blake  <ebb9@byu.net>
700             Bruno Haible  <bruno@clisp.org>
701
702         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
703         cross compiles.
704
705 2007-05-28  Eric Blake  <ebb9@byu.net>
706
707         * modules/closein-tests (test_closein_LDADD): Support test on
708         cygwin with libtool.
709
710 2007-05-28  Bruno Haible  <bruno@clisp.org>
711
712         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
713         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
714         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
715         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
716         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
717         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
718         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
719         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
720         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
721
722 2007-05-28  Eric Blake  <ebb9@byu.net>
723
724         Unconditionally include <config.h> in unit tests.
725         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
726         * tests/test-allocsa.c, tests/test-arcfour.c,
727         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
728         tests/test-array_list.c, tests/test-array_oset.c,
729         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
730         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
731         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
732         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
733         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
734         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
735         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
736         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
737         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
738         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
739         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
740         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
741         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
742         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
743         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
744         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
745         test-md5.c, test-memmem.c, test-printf-posix.c,
746         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
747         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
748         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
749         test-strcasestr.c, test-striconv.c, test-striconveh.c,
750         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
751         test-vasnprintf-posix2.c, test-vasnprintf.c,
752         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
753         test-vfprintf-posix.c, test-vprintf-posix.c,
754         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
755         test-xvasprintf.c: Likewise.
756
757 2007-05-28  Bruno Haible  <bruno@clisp.org>
758
759         * gnulib-tool (func_import): Remember the --with-tests command-line
760         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
761         Reported by Eric Blake.
762
763 2007-05-28  Bruno Haible  <bruno@clisp.org>
764
765         * modules/ftell-tests: New file.
766         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
767         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
768
769         * lib/ftell.c: New file.
770         * modules/ftell: New file.
771         * m4/ftell.m4: New file.
772         * doc/functions/ftell.texi: Update.
773         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
774         REPLACE_FTELL.
775         * lib/stdio_.h (rpl_ftell): New declaration.
776         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
777         REPLACE_FTELL.
778
779 2007-05-28  Eric Blake  <ebb9@byu.net>
780
781         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
782
783 2007-05-28  Bruno Haible  <bruno@clisp.org>
784
785         * modules/fseek-tests: New file.
786         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
787         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
788
789         * lib/fseek.c: New file.
790         * modules/fseek: New file.
791         * m4/fseek.m4: New file.
792         * doc/functions/fseek.texi: Update.
793         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
794         REPLACE_FSEEK.
795         * lib/stdio_.h (rpl_fseek): New declaration.
796         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
797         REPLACE_FSEEK.
798
799 2007-05-28  Bruno Haible  <bruno@clisp.org>
800
801         * lib/stdio_.h (fflush): More comments.
802
803 2007-05-28  Bruno Haible  <bruno@clisp.org>
804
805         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
806         runtime test.
807
808 2007-05-28  Eric Blake  <ebb9@byu.net>
809
810         Improve lseek module.
811         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
812         * lib/unistd_.h (lseek): Scale back link warning message.
813         * tests/test-lseek.c: Beef up test.
814         * tests/test-lseek.sh: Exercise more facets of lseek.
815         Reported by Bruno Haible.
816
817 2007-05-28  Bruno Haible  <bruno@clisp.org>
818
819         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
820         to define.
821
822 2007-05-27  Bruno Haible  <bruno@clisp.org>
823
824         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
825
826 2007-05-27  Bruno Haible  <bruno@clisp.org>
827
828         * modules/openmp: New file.
829         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
830         Noah Misch.
831
832 2007-05-26  Bruno Haible  <bruno@clisp.org>
833
834         * modules/chdir-long (Depends-on): Add fchdir.
835         * modules/chdir-safer (Depends-on): Likewise.
836         * modules/fts (Depends-on): Likewise.
837         * modules/fts-lgpl (Depends-on): Likewise.
838         * modules/openat (Depends-on): Likewise.
839         * modules/savewd (Depends-on): Likewise.
840
841 2007-05-24  Eric Blake  <ebb9@byu.net>
842
843         Fix lseek on mingw.
844         * modules/lseek: New module.
845         * m4/lseek.m4: New file.
846         * lib/lseek.c: New file.
847         * modules/lseek-tests: New file.
848         * tests/test-lseek.c: New file.
849         * tests/test-lseek.sh: New file.
850         * MODULES.html.sh: Document lseek module.
851         * modules/fflush (Depends-on): Add lseek, fseeko.
852         * modules/fseeko (Depends-on): Likewise.
853         * modules/ftello (Depends-on): Likewise.
854         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
855         broken.
856         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
857         broken.
858         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
859         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
860         * lib/ftello.c (rpl_ftello): Likewise.
861         * tests/test-fseeko.c (main): Test this.
862         * tests/test-fseeko.sh: Likewise.
863         * tests/test-ftello.c (main): Likewise.
864         * tests/test-ftello.sh: Likewise.
865         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
866         implies replacing fseek.
867         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
868         HAVE_FTELLO.
869         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
870         * modules/unistd (Makefile.am): Likewise.
871         * lib/unistd_.h (lseek): Declare a replacement.
872         * doc/functions/lseek.texi (lseek): Document this fix.
873         * doc/functions/fseek.texi (fseek): Likewise.
874         * doc/functions/ftell.texi (ftell): Likewise.
875
876 2007-05-24  Bruno Haible  <bruno@clisp.org>
877
878         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
879         in the printed representation of a NaN.
880         * tests/test-vasprintf-posix.c (test_function): Likewise.
881         * tests/test-snprintf-posix.h (test_function): Likewise.
882         * tests/test-sprintf-posix.h (test_function): Likewise.
883         Reported by Eric Blake.
884
885 2007-05-23  Eric Blake  <ebb9@byu.net>
886
887         Fix fseeko/ftello on cygwin 1.5.24.
888         * doc/functions/fseeko.texi (fseeko): Document the fix.
889         * doc/functions/ftello.texi (ftello): Document the fix.
890         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
891         * doc/functions/stdout.text (stdout): New file.
892         * doc/functions/stderr.text (stderr): New file.
893         * doc/gnulib.texi (Function Substitutes): Use new files.
894         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
895         prior to 1.7.0.
896         * tests/test-ftello.c (main): Likewise for ftello.
897         * tests/test-fseeko.sh: New file.
898         * tests/test-ftello.sh: New file.
899         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
900         with seekable stdin.
901         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
902         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
903         (gl_REPLACE_FSEEKO): New macro.
904         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
905         * modules/fseeko (Files): Distribute fseeko.c.
906         * modules/ftello (Files): Distribute ftello.c.
907         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
908         mode.
909         * lib/ftello.c (rpl_ftello): New file.
910         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
911         fseeko, ftello.
912         (gl_STDIN_LARGE_OFFSET): New macro.
913         * modules/stdio (Makefile.am): Perform the replacement.
914         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
915
916 2007-05-23  Bruno Haible  <bruno@clisp.org>
917
918         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
919         GNULIB_POSIXCHECK is defined.
920
921 2007-05-21  Bruno Haible  <bruno@clisp.org>
922
923         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
924         Check also the output for NaN arguments. When cross-compiling, guess
925         no on IRIX.
926         * lib/vasnprintf.c: Update comments.
927         * tests/test-vasnprintf-posix.c (strisnan): New function.
928         (test_function): Use it.
929         * tests/test-vasprintf-posix.c (strisnan): New function.
930         (test_function): Use it.
931         * tests/test-snprintf-posix.h (strisnan): New function.
932         (test_function): Use it.
933         * tests/test-sprintf-posix.h (strisnan): New function.
934         (test_function): Use it.
935         Reported by Eric Blake.
936
937 2007-05-20  Bruno Haible  <bruno@clisp.org>
938
939         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
940         numbers that fails on BeOS.
941         * doc/functions/frexpl.texi: Update.
942
943 2007-05-20  Jim Meyering  <jim@meyering.net>
944
945         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
946         forced upon us by glibc-2.6.
947
948 2007-05-20  Bruno Haible  <bruno@clisp.org>
949
950         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
951         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
952         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
953         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
954         NEED_PRINTF_INFINITE.
955         (is_infinitel): New function.
956         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
957         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
958         gl_PREREQ_VASNPRINTF_INFINITE.
959         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
960         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
961         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
962         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
963         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
964         gl_PREREQ_VASNPRINTF_INFINITE.
965         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
966         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
967         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
968         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
969         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
970         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
971         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
972         * doc/functions/fprintf.texi: Update.
973         * doc/functions/printf.texi: Update.
974         * doc/functions/snprintf.texi: Update.
975         * doc/functions/sprintf.texi: Update.
976         * doc/functions/vfprintf.texi: Update.
977         * doc/functions/vprintf.texi: Update.
978         * doc/functions/vsnprintf.texi: Update.
979         * doc/functions/vsprintf.texi: Update.
980
981 2007-05-20  Bruno Haible  <bruno@clisp.org>
982
983         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
984         was not found in libc.
985         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
986
987 2007-05-20  Bruno Haible  <bruno@clisp.org>
988
989         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
990         printed as "-nan" instead of "nan".
991         * tests/test-vasprintf-posix.c (test_function): Likewise.
992         * tests/test-snprintf-posix.h (test_function): Likewise.
993         * tests/test-sprintf-posix.h (test_function): Likewise.
994         Needed for HP-UX 11.
995
996 2007-05-20  Jim Meyering  <jim@meyering.net>
997
998         Fix buggy test for the fchownat-deref bug.
999         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
1000         symlink required for the run-test.  Without it, this test would
1001         always declare that fchownat doesn't work, and client code would
1002         unnecessarily use the replacement function with fixed libc.
1003         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
1004         Reported by Greg Schafer.
1005
1006 2007-05-19  Bruno Haible  <bruno@clisp.org>
1007
1008         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
1009         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
1010         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
1011         Needed for IRIX 6.5 and Solaris 2.5.1.
1012
1013 2007-05-19  Bruno Haible  <bruno@clisp.org>
1014
1015         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
1016         (test_function): Skip tests involving -0.0 on platforms where
1017         -0.0 = 0.0.
1018         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
1019         (test_function): Skip tests involving -0.0 on platforms where
1020         -0.0 = 0.0.
1021         * tests/test-snprintf-posix.h (have_minus_zero): New function.
1022         (test_function): Skip tests involving -0.0 on platforms where
1023         -0.0 = 0.0.
1024         * tests/test-sprintf-posix.h (have_minus_zero): New function.
1025         (test_function): Skip tests involving -0.0 on platforms where
1026         -0.0 = 0.0.
1027         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
1028         tests.
1029         * tests/test-printf-posix.h (test_function): Likewise.
1030         * tests/test-printf-posix.output: Remove all -0.0 related results.
1031         Needed for IRIX 6.5.
1032
1033 2007-05-19  Bruno Haible  <bruno@clisp.org>
1034
1035         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
1036         printed as "nan0x7fffffff" instead of "nan".
1037         * tests/test-vasprintf-posix.c (test_function): Likewise.
1038         * tests/test-snprintf-posix.h (test_function): Likewise.
1039         * tests/test-sprintf-posix.h (test_function): Likewise.
1040         * tests/test-fprintf-posix.h (NaN): Remove macro.
1041         (test_function): Remove all NaN related tests.
1042         * tests/test-printf-posix.h (NaN): Remove macro.
1043         (test_function): Remove all NaN related tests.
1044         * tests/test-printf-posix.output: Remove all NaN related results.
1045         Needed for IRIX 6.5.
1046
1047 2007-05-19  Bruno Haible  <bruno@clisp.org>
1048
1049         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
1050         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
1051
1052 2007-05-19  Bruno Haible  <bruno@clisp.org>
1053
1054         * lib/float_.h: New file.
1055         * m4/float_h.m4: New file.
1056         * modules/float: New file.
1057         * modules/isnanl (Dependencies): Add float.
1058         * modules/isnanl-nolibm (Dependencies): Likewise.
1059         * modules/mathl (Dependencies): Likewise.
1060         * modules/printf-frexpl (Dependencies): Likewise.
1061         * modules/signbit (Dependencies): Likewise.
1062         * modules/vasnprintf (Dependencies): Likewise.
1063         * doc/headers/float.texi: Update.
1064
1065 2007-05-19  Jim Meyering  <jim@meyering.net>
1066
1067         * lib/utimens.c (gl_futimens): Rename from futimens,
1068         now that glibc-2.6 declares futimens.
1069         * lib/utimens.h: Likewise.
1070
1071 2007-05-19  Bruno Haible  <bruno@clisp.org>
1072
1073         Avoid test failures on mingw.
1074         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
1075         * tests/test-printf-posix.sh: Likewise.
1076         * tests/test-vfprintf-posix.sh: Likewise.
1077         * tests/test-vprintf-posix.sh: Likewise.
1078
1079 2007-05-19  Bruno Haible  <bruno@clisp.org>
1080
1081         Fix *printf result for NaN, Inf, -0.0 on mingw.
1082         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
1083         * lib/vasnprintf.c: Include math.h and isnan.h.
1084         (is_infinite_or_zero): New function.
1085         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
1086         values in the %f, %F, %e, %E, %g, %G directives.
1087         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
1088         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1089         gl_PRINTF_INFINITE and test its result. Invoke
1090         gl_PREREQ_VASNPRINTF_INFINITE.
1091         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1092         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1093         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1094         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1095         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1096         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1097         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1098         * doc/functions/fprintf.texi: Update.
1099         * doc/functions/printf.texi: Update.
1100         * doc/functions/snprintf.texi: Update.
1101         * doc/functions/sprintf.texi: Update.
1102         * doc/functions/vfprintf.texi: Update.
1103         * doc/functions/vprintf.texi: Update.
1104         * doc/functions/vsnprintf.texi: Update.
1105         * doc/functions/vsprintf.texi: Update.
1106
1107 2007-05-19  Bruno Haible  <bruno@clisp.org>
1108
1109         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
1110         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
1111         Instead of multiplying with 10^k, set extra_zeroes to k.
1112         (scale10_round_long_double): Remove function.
1113
1114 2007-05-18  Bruno Haible  <bruno@clisp.org>
1115
1116         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
1117         introduced on 2007-05-06.
1118
1119 2007-05-18  Bruno Haible  <bruno@clisp.org>
1120
1121         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
1122         %g directives.
1123         * tests/test-vasprintf-posix.c (test_function): Likewise.
1124         * tests/test-snprintf-posix.h (test_function): Likewise.
1125         * tests/test-sprintf-posix.h (test_function): Likewise.
1126
1127 2007-05-18  Bruno Haible  <bruno@clisp.org>
1128
1129         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
1130         (strmatch): New function.
1131         (test_function): Test the %f directive on numbers of various exponents.
1132         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
1133         (strmatch): New function.
1134         (test_function): Test the %f directive on numbers of various exponents.
1135         * tests/test-snprintf-posix.h (strmatch): New function.
1136         (test_function): Test the %f directive on numbers of various exponents.
1137         * tests/test-sprintf-posix.h (strmatch): New function.
1138         (test_function): Test the %f directive on numbers of various exponents.
1139         * tests/test-snprintf-posix.c (SIZEOF): New macro.
1140         * tests/test-sprintf-posix.c (SIZEOF): New macro.
1141         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
1142         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
1143
1144 2007-05-18  Bruno Haible  <bruno@clisp.org>
1145
1146         Add support for 'long double' number output.
1147         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
1148         * lib/vasnprintf.c: Include math.h and float+.h.
1149         (mp_limb_t): New type.
1150         (GMP_LIMB_BITS): New macro.
1151         (mp_twolimb_t): New type.
1152         (GMP_TWOLIMB_BITS): New macro.
1153         (mpn_t): New type.
1154         (multiply, divide, convert_to_decimal, decode_long_double,
1155         scale10_round_long_double, scale10_round_decimal_long_double,
1156         floorlog10l): New functions.
1157         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
1158         for the %f, %F, %e, %E, %g, %G directives.
1159         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
1160         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
1161         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
1162         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
1163         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
1164         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1165         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1166         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1167         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1168         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1169         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1170         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
1171         * modules/snprintf-posix (Depends-on): Likewise.
1172         * modules/sprintf-posix (Depends-on): Likewise.
1173         * modules/vasnprintf-posix (Depends-on): Likewise.
1174         * modules/vasprintf-posix (Depends-on): Likewise.
1175         * modules/vfprintf-posix (Depends-on): Likewise.
1176         * modules/vsnprintf-posix (Depends-on): Likewise.
1177         * modules/vsprintf-posix (Depends-on): Likewise.
1178         * modules/vasnprintf (Files): Add lib/float+.h.
1179         * doc/functions/fprintf.texi: Update.
1180         * doc/functions/printf.texi: Update.
1181         * doc/functions/snprintf.texi: Update.
1182         * doc/functions/sprintf.texi: Update.
1183         * doc/functions/vfprintf.texi: Update.
1184         * doc/functions/vprintf.texi: Update.
1185         * doc/functions/vsnprintf.texi: Update.
1186         * doc/functions/vsprintf.texi: Update.
1187
1188 2007-05-18  Bruno Haible  <bruno@clisp.org>
1189
1190         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
1191
1192 2007-05-18  Bruno Haible  <bruno@clisp.org>
1193
1194         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
1195         for printing 64-bit integers. Needed for mingw.
1196
1197 2007-05-18  Bruno Haible  <bruno@clisp.org>
1198
1199         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
1200         gl_FUNC_FREXPL_WORKS.
1201         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
1202
1203 2007-05-18  Bruno Haible  <bruno@clisp.org>
1204
1205         * modules/frexpl-nolibm-tests: New file.
1206
1207         * modules/frexpl-nolibm: New file.
1208         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
1209
1210 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
1211
1212         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
1213         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1214         GCC 4.2, which otherwise issues a lot of warnings.
1215         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
1216         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
1217         Likewise.
1218         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
1219         * modules/iconv_open (iconv.h): Likewise.
1220         * modules/locale (locale.h): Likewise.
1221         * modules/netinet_in (netinet/in.h): Likewise.
1222         * modules/sys_select (sys_select.h): Likewise.
1223         * modules/sys_socket (sys/socket.h): Likewise.
1224         * modules/sys_stat (sys/stat.h): Likewise.
1225         * modules/sysexits (sysexits.h): Likewise.
1226         * modules/unistd (unistd.h): Likewise.
1227
1228 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1229
1230         * modules/closein-tests (Makefile.am): Distribute
1231         `test-closein.sh'.
1232
1233 2007-05-17  Bruno Haible  <bruno@clisp.org>
1234
1235         * tests/test-printf-posix.output: Renamed from
1236         tests/test-fprintf-posix.out.
1237         * modules/fprintf-posix-tests: Update.
1238         * modules/printf-posix-tests: Update.
1239         * modules/vfprintf-posix-tests: Update.
1240         * modules/vprintf-posix-tests: Update.
1241         * tests/test-fprintf-posix.sh: Update.
1242         * tests/test-printf-posix.sh: Update.
1243         * tests/test-vfprintf-posix.sh: Update.
1244         * tests/test-vprintf-posix.sh: Update.
1245         Reported by Ralf Wildenhues.
1246
1247 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
1248
1249         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
1250         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
1251         GCC 4.2, which otherwise issues a lot of warnings.
1252         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
1253         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
1254         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
1255         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
1256         it should no longer be needed.
1257         * lib/string_.h: Likewise.
1258         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
1259         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
1260         * modules/inttypes (inttypes.h): Likewise.
1261         * modules/math (math.h): Likewise.
1262         * modules/search (search.h): Likewise.
1263         * modules/signal (signal.h): Likewise.
1264         * modules/stdint (stdint.h): Likewise.
1265         * modules/stdio (stdio.h): Likewise.
1266         * modules/stdlib (stdlib.h): Likewise.
1267         * modules/string (string.h): Likewise.
1268         * modules/sys_time (sys/time.h): Likewise.
1269         * modules/time (time.h): Likewise.
1270         * modules/wchar (wchar.h): Likewise.
1271         * modules/wctype (wtype.h): Likewise.
1272
1273 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
1274
1275         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
1276
1277 2007-05-13  Bruno Haible  <bruno@clisp.org>
1278
1279         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
1280         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
1281         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
1282         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
1283         (gl_PREREQ_STRTOK_R): Don't require it here.
1284
1285 2007-05-13  Bruno Haible  <bruno@clisp.org>
1286
1287         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
1288         when used in C++ mode.
1289
1290 2007-05-12  Bruno Haible  <bruno@clisp.org>
1291
1292         * lib/linebuffer.h: Tweak doc.
1293         * lib/linebuffer.c: Likewise.
1294
1295 2007-05-12  James Youngman  <jay@gnu.org>
1296
1297         * lib/linebuffer.c (readlinebuffer_delim): New function,
1298         like readlinebuffer, but use a caller-specified delimiter.
1299         (readlinebuffer): Just call readlinebuffer_delim with '\n'
1300         as the delimiter.
1301         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
1302
1303 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1304
1305         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
1306         * modules/openat (Files): Remove openat-die.c.
1307         (Depends-on): Add openat-die.
1308         * modules/openat-die: New module.
1309
1310 2007-05-06  Bruno Haible  <bruno@clisp.org>
1311
1312         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
1313         Update with info about Cygwin.
1314         * doc/functions/fprintf.texi: Update.
1315         * doc/functions/printf.texi: Update.
1316         * doc/functions/snprintf.texi: Update.
1317         * doc/functions/sprintf.texi: Update.
1318         * doc/functions/vfprintf.texi: Update.
1319         * doc/functions/vprintf.texi: Update.
1320         * doc/functions/vsnprintf.texi: Update.
1321         * doc/functions/vsprintf.texi: Update.
1322         Reported by Eric Blake.
1323
1324 2007-05-06  Bruno Haible  <bruno@clisp.org>
1325
1326         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
1327         padding ourselves for the floating-point directives.
1328         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
1329         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
1330         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1331         gl_PRINTF_FLAG_ZERO and test its result. Invoke
1332         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
1333         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1334         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1335         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1336         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1337         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1338         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1339         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1340         * tests/test-snprintf-posix.h (test_function): Also check the width
1341         and some flags in the %f directive.
1342         * tests/test-sprintf-posix.h (test_function): Likewise.
1343         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1344         * tests/test-vasprintf-posix.c (test_function): Likewise.
1345         * doc/functions/fprintf.texi: Update.
1346         * doc/functions/printf.texi: Update.
1347         * doc/functions/snprintf.texi: Update.
1348         * doc/functions/sprintf.texi: Update.
1349         * doc/functions/vfprintf.texi: Update.
1350         * doc/functions/vprintf.texi: Update.
1351         * doc/functions/vsnprintf.texi: Update.
1352         * doc/functions/vsprintf.texi: Update.
1353
1354 2007-05-06  Bruno Haible  <bruno@clisp.org>
1355
1356         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
1357         pass the ' flag character to sprintf or snprintf.
1358         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
1359         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
1360         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1361         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
1362         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
1363         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
1364         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
1365         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
1366         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
1367         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
1368         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1369         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
1370         * tests/test-snprintf-posix.h (test_function): Also check the grouping
1371         flag.
1372         * tests/test-sprintf-posix.h (test_function): Likewise.
1373         * tests/test-vasnprintf-posix.c (test_function): Likewise.
1374         * tests/test-vasprintf-posix.c (test_function): Likewise.
1375         * doc/functions/fprintf.texi: Update.
1376         * doc/functions/printf.texi: Update.
1377         * doc/functions/snprintf.texi: Update.
1378         * doc/functions/sprintf.texi: Update.
1379         * doc/functions/vfprintf.texi: Update.
1380         * doc/functions/vprintf.texi: Update.
1381         * doc/functions/vsnprintf.texi: Update.
1382         * doc/functions/vsprintf.texi: Update.
1383
1384 2007-05-01  Bruno Haible  <bruno@clisp.org>
1385
1386         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
1387
1388 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
1389
1390         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
1391         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
1392
1393 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
1394
1395         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
1396         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
1397         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
1398
1399 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
1400
1401         * lib/argp-help.c (struct hol_entry): New member `ord'.
1402         (HOL_ENTRY_PTRCMP): Use ord for comparison
1403         (hol_sort): Initialize ord.
1404
1405 2007-05-01  Bruno Haible  <bruno@clisp.org>
1406
1407         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
1408         Reported by Eric Blake.
1409         * doc/gnulib.texi (Function Substitutes): Update.
1410
1411 2007-05-01  Bruno Haible  <bruno@clisp.org>
1412
1413         * doc/functions.texi: Remove file, now redundant through
1414         doc/functions/*.texi.
1415
1416 2007-05-01  Bruno Haible  <bruno@clisp.org>
1417
1418         * modules/argp (Depends-on): Add sleep.
1419
1420 2007-05-01  Bruno Haible  <bruno@clisp.org>
1421
1422         * modules/sleep-tests: New file.
1423         * tests/test-sleep.c: New file.
1424
1425         * modules/sleep: New file.
1426         * lib/sleep.c: New file.
1427         * m4/sleep.m4: New file.
1428         * lib/unistd_.h (sleep): New declaration.
1429         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
1430         HAVE_SLEEP.
1431         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
1432         * doc/functions/sleep.texi: Document the sleep module.
1433
1434 2007-05-01  Bruno Haible  <bruno@clisp.org>
1435
1436         * lib/sigprocmask.h: Remove file.
1437         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
1438         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
1439         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
1440         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
1441         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
1442         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
1443         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
1444         HAVE_SIGSET_T as a shell variable.
1445         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
1446         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
1447         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
1448         (Depends-on): Add signal. Remove verify.
1449         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
1450         (Include): Mention <signal.h> instead of sigprocmask.h.
1451         * NEWS: Mention the change.
1452         * lib/fatal-signal.c: Don't include sigprocmask.h.
1453
1454 2007-05-01  Bruno Haible  <bruno@clisp.org>
1455
1456         * modules/signal: New file.
1457         * lib/signal_.h: New file.
1458         * m4/signal_h.m4: New file.
1459
1460 2007-05-01  Bruno Haible  <bruno@clisp.org>
1461
1462         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
1463         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
1464         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
1465         HAVE_WCTYPE_CTMP_BUG into wctype.h.
1466
1467 2007-05-01  Bruno Haible  <bruno@clisp.org>
1468
1469         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
1470         configure time.
1471         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
1472         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
1473         * modules/sys_stat (Makefile.am): Substitute their values into
1474         sys/stat.h.
1475
1476 2007-05-01  Bruno Haible  <bruno@clisp.org>
1477
1478         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
1479         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
1480         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
1481
1482 2007-05-01  Bruno Haible  <bruno@clisp.org>
1483
1484         * doc/header/assert.texi: Undo last change: don't mention the gnulib
1485         'assert' module here.
1486
1487 2007-05-01  Bruno Haible  <bruno@clisp.org>
1488
1489         * doc/functions/*.texi: New files.
1490         * doc/functions/google-ranking.txt: New file.
1491         * doc/gnulib.texi (Function Substitutes): New chapter.
1492         (ctime, inet_ntoa): Remove sections.
1493         * doc/ctime.texi: Remove file.
1494         * doc/inet_ntoa.texi: Remove file.
1495         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
1496         dependencies.
1497         (%.info): New rule, specifying a --reference-limit.
1498
1499 2007-05-01  Bruno Haible  <bruno@clisp.org>
1500
1501         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
1502
1503 2007-05-01  Bruno Haible  <bruno@clisp.org>
1504
1505         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
1506         the portability of 'mkdir' to mingw systems.
1507
1508 2007-05-01  Bruno Haible  <bruno@clisp.org>
1509
1510         * doc/headers/google-ranking.txt: New file.
1511
1512 2007-04-30  Eric Blake  <ebb9@byu.net>
1513
1514         Prefer fseeko to fseek.
1515         * modules/getpass (Depends-on): Add fseeko.
1516         * lib/getpass.c (getpass): Use fseeko, not fseek.
1517
1518 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
1519
1520         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
1521         assumes the sorting is stable, while most qsort implementations
1522         are not.  Use argument addresses to ensure they never compare as
1523         equal.
1524
1525         * tests/test-argp-2.sh (usage-indent test): Fix output
1526         (func_compare): Restore diff options
1527         * tests/test-argp.c: Restore #include "progname.h"
1528
1529 2007-04-29  Bruno Haible  <bruno@clisp.org>
1530
1531         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
1532         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
1533         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
1534         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
1535         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
1536         (configure.ac): Define CHECK_SNPRINTF_POSIX.
1537         (TESTS, check_PROGRAMS): Add test-snprintf.
1538         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
1539         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
1540         (TESTS, check_PROGRAMS): Add test-vsnprintf.
1541         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
1542         assertions that fail on HP-UX, OSF/1, or IRIX.
1543         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
1544
1545 2007-04-29  Bruno Haible  <bruno@clisp.org>
1546
1547         * MODULES.html.sh (posix_functions): Remove 'contents'.
1548
1549 2007-04-29  Karl Berry  <karl@gnu.org>
1550
1551         * config/srclist.txt (gendocs_template_min): new entry.
1552
1553 2007-04-29  Bruno Haible  <bruno@clisp.org>
1554
1555         Work around fpurge bug on BSD systems.
1556         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
1557         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
1558         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
1559         fpurge to rpl_fpurge if the system already has this function.
1560         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
1561         the case where the system already has this function. Correct invariants
1562         on BSD systems.
1563         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
1564         BSD systems.
1565
1566 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
1567
1568         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
1569         proposed by Sven Verdoolaege.
1570
1571         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
1572         options.
1573         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
1574         (usage and help tests): Update
1575
1576 2007-04-29  Bruno Haible  <bruno@clisp.org>
1577
1578         * tests/test-fflush.c (main): Use a file of size 17, not 10.
1579         Print more information in case of failure. Disable a test on BeOS.
1580
1581 2007-04-29  Bruno Haible  <bruno@clisp.org>
1582
1583         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
1584         This helps debugging on systems on which no gdb is available.
1585
1586 2007-04-29  Bruno Haible  <bruno@clisp.org>
1587
1588         * lib/freading.h: Improve comments.
1589         * lib/fwriting.h: Likewise.
1590         * tests/test-freading.c (main): Don't check freading immediately after
1591         repositioning. Needed for glibc.
1592
1593 2007-04-29  Bruno Haible  <bruno@clisp.org>
1594
1595         * lib/freading.c (freading): Trivial simplification.
1596
1597 2007-04-28  Bruno Haible  <bruno@clisp.org>
1598
1599         * tests/test-fwriting.c (main): Also test the interaction between
1600         fflush and fwriting.
1601         * modules/fwriting-tests (Depends-on): Add fflush.
1602
1603         * tests/test-freading.c (main): Also test the interaction between
1604         fflush and freading.
1605         * modules/freading-tests (Depends-on): Add fflush.
1606
1607 2007-04-28  Bruno Haible  <bruno@clisp.org>
1608
1609         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
1610         fseeko and ftello.
1611         Suggested by Eric Blake.
1612
1613 2007-04-28  Jim Meyering  <jim@meyering.net>
1614
1615         Avoid false-negative in gl_STDINT_H's C99 conformance test.
1616         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
1617         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
1618
1619 2007-04-27  Eric Blake  <ebb9@byu.net>
1620
1621         * doc/headers/assert.texi (assert.h): Document assert module use.
1622
1623 2007-04-27  Bruno Haible  <bruno@clisp.org>
1624
1625         * doc/headers/*.texi: New files.
1626         * doc/gnulib.texi (Header File Substitutes): New chapter.
1627         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
1628         dependencies.
1629         (standards.info ,standards.html, standards.dvi): Update dependencies.
1630         (mostlyclean, clean): New targets.
1631
1632 2007-04-27  Bruno Haible  <bruno@clisp.org>
1633
1634         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
1635         * modules/sysexits (Files, Makefile.am): Update.
1636
1637         * lib/sys_socket_.h: Renamed from lib/socket_.h.
1638         * modules/sys_socket (Files, Makefile.am): Update.
1639
1640         * lib/sys_stat_.h: Renamed from lib/stat_.h.
1641         * modules/sys_stat (Files, Makefile.am): Update.
1642
1643 2007-04-27  Eric Blake  <ebb9@byu.net>
1644
1645         * lib/freading.h: Improve comments.
1646         * lib/fwriting.h: Likewise.
1647         * lib/fflush.c: Likewise.
1648
1649         Fix closein for mingw.
1650         * modules/closein-tests: Add tests for closein.
1651         * tests/test-closein.c: New file.
1652         * tests/test-closein.sh: Likewise.
1653         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
1654         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
1655
1656 2007-04-27  Bruno Haible  <bruno@clisp.org>
1657
1658         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
1659         version is < 6.
1660         * lib/math_.h [__DECC]: Likewise.
1661         * lib/stdio_.h [__DECC]: Likewise.
1662         * lib/stdlib_.h [__DECC]: Likewise.
1663         * lib/string_.h [__DECC]: Likewise.
1664         * lib/time_.h [__DECC]: Likewise.
1665         * lib/wchar_.h [__DECC]: Likewise.
1666         * lib/wctype_.h [__DECC]: Likewise.
1667
1668 2007-04-27  Bruno Haible  <bruno@clisp.org>
1669
1670         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
1671
1672 2007-04-27  Bruno Haible  <bruno@clisp.org>
1673
1674         * lib/fflush.c: Add comments.
1675         * modules/fpurge-tests (Depends-on): Add fflush.
1676         * modules/freadable-tests (Depends-on): Likewise.
1677         * modules/fwritable-tests (Depends-on): Likewise.
1678
1679 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
1680
1681         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
1682         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
1683         Report by Bruno Haible <bruno@clisp.org>.
1684
1685 2007-04-26  Eric Blake  <ebb9@byu.net>
1686
1687         Fix fflush on mingw.
1688         * modules/fflush (Depends-on): Add freading.
1689         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
1690         but unread data.
1691
1692 2007-04-26  Eric Blake  <ebb9@byu.net>
1693         and Bruno Haible  <bruno@clisp.org>
1694
1695         Implement freading and fwriting.
1696         * lib/freading.c: New file.
1697         * lib/freading.h: Likewise.
1698         * m4/freading.m4: Likewise.
1699         * modules/freading: Likewise.
1700         * modules/freading-tests: Likewise.
1701         * tests/test-freading.c: Likewise.
1702         * lib/fwriting.c: New file.
1703         * lib/fwriting.h: Likewise.
1704         * m4/fwriting.m4: Likewise.
1705         * modules/fwriting: Likewise.
1706         * modules/fwriting-tests: Likewise.
1707         * tests/test-fwriting.c: Likewise.
1708         * MODULES.html.sh (File stream based Input/Output): Mention them.
1709
1710 2007-04-26  Bruno Haible  <bruno@clisp.org>
1711
1712         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
1713         'long' when we assume it.
1714         Suggested by Eric Blake.
1715
1716 2007-04-26  Bruno Haible  <bruno@clisp.org>
1717
1718         Ensure fseeko, ftello are declared on glibc systems.
1719         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
1720         * modules/fseeko (configure.ac-early): Likewise.
1721         * modules/ftello (configure.ac-early): Likewise.
1722         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
1723         AC_FUNC_FSEEKO for this.
1724         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
1725         (gl_CHECK_FSEEKO): Remove macro.
1726
1727 2007-04-26  Bruno Haible  <bruno@clisp.org>
1728
1729         * tests/test-fflush.c (main): Also check the ftell result after
1730         fflush and fseek/fseeko.
1731         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
1732         file descriptor position cache in the stream.
1733         * lib/fseeko.c (rpl_fseeko): Likewise.
1734
1735 2007-04-26  Bruno Haible  <bruno@clisp.org>
1736
1737         * modules/fflush-tests (Depends-on): Add fseeko.
1738
1739 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
1740             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1741
1742         * lib/argz_.h: ensure error_t definition is obtained in same
1743         mechanism system argz.h would have.
1744         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
1745         argz facilities are known bad.  Err on the side of caution if
1746         cross-compiling.
1747
1748 2007-04-25  Eric Blake  <ebb9@byu.net>
1749
1750         * lib/fpurge.c (includes): Use stdlib.h for free.
1751         * tests/test-fflush.c (main): Also test fflush-fseeko.
1752
1753 2007-04-25  Bruno Haible  <bruno@clisp.org>
1754
1755         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
1756         * lib/fseeko.c: New file.
1757         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
1758         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
1759         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
1760         gl_FUNC_FSEEKO.
1761         (gl_FUNC_FSEEKO): Invoke it.
1762         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
1763         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
1764         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
1765
1766 2007-04-25  Bruno Haible  <bruno@clisp.org>
1767
1768         * modules/fflush (Depends-on): Add ftello.
1769
1770 2007-04-25  Bruno Haible  <bruno@clisp.org>
1771
1772         * modules/ftello-tests: New file.
1773         * tests/test-ftello.c: New file.
1774
1775         * modules/ftello: New file.
1776         * m4/ftello.m4: New file.
1777         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
1778         HAVE_FTELLO.
1779         * lib/stdio_.h (ftello): New declaration.
1780         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
1781         HAVE_FTELLO.
1782
1783 2007-04-25  Bruno Haible  <bruno@clisp.org>
1784
1785         * modules/fseeko-tests: New file.
1786         * tests/test-fseeko.c: New file.
1787
1788         * modules/fseeko: New file.
1789         * m4/fseeko.m4: New file.
1790         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
1791         HAVE_FSEEKO.
1792         * lib/stdio_.h (fseeko): New declaration.
1793         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
1794         HAVE_FSEEKO.
1795
1796 2007-04-25  Bruno Haible  <bruno@clisp.org>
1797
1798         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
1799
1800 2007-04-25  Bruno Haible  <bruno@clisp.org>
1801
1802         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
1803         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
1804         * tests/test-unistd.c: Likewise.
1805         * tests/test-fcntl.c: Likewise.
1806
1807 2007-04-23  Eric Blake  <ebb9@byu.net>
1808
1809         * lib/fflush.c: Fix missing include.
1810         Reported by Bruno Haible.
1811
1812 2007-04-23  Bruno Haible  <bruno@clisp.org>
1813
1814         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
1815         Reported by Eric Blake.
1816
1817 2007-04-23  Bruno Haible  <bruno@clisp.org>
1818
1819         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
1820
1821 2007-04-23  Bruno Haible  <bruno@clisp.org>
1822
1823         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
1824
1825 2007-04-23  Bruno Haible  <bruno@clisp.org>
1826
1827         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
1828         Needed on HP-UX 11.
1829
1830 2007-04-16  Eric Blake  <ebb9@byu.net>
1831
1832         Make fflush rely on fpurge.
1833         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
1834         open coding all variants.
1835         * modules/fflush (Depends-on): Add fpurge and unistd.
1836         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
1837         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
1838
1839         Fix --with-tests compilation on cygwin.
1840         * modules/argmatch-tests (Makefile.am): List gnulib library first
1841         in LDADD.
1842         * modules/argp-tests (Makefile.am): Likewise.
1843         * modules/array-list-tests (Makefile.am): Likewise.
1844         * modules/array-oset-tests (Makefile.am): Likewise.
1845         * modules/avltree-list-tests (Makefile.am): Likewise.
1846         * modules/avltree-oset-tests (Makefile.am): Likewise.
1847         * modules/avltreehash-list-tests (Makefile.am): Likewise.
1848         * modules/carray-list-tests (Makefile.am): Likewise.
1849         * modules/dirname-tests (Makefile.am): Likewise.
1850         * modules/frexp-tests (Makefile.am): Likewise.
1851         * modules/isnanl-tests (Makefile.am): Likewise.
1852         * modules/linked-list-tests (Makefile.am): Likewise.
1853         * modules/linkedhash-list-tests (Makefile.am): Likewise.
1854         * modules/lock-tests (Makefile.am): Likewise.
1855         * modules/rbtree-list-tests (Makefile.am): Likewise.
1856         * modules/rbtree-oset-tests (Makefile.am): Likewise.
1857         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
1858         * modules/tls-tests (Makefile.am): Likewise.
1859         * modules/tsearch-tests (Makefile.am): Likewise.
1860         * modules/xvasprintf-tests (Makefile.am): Likewise.
1861
1862         Fix fpurge for cygwin.
1863         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
1864         value.
1865         * modules/fpurge-tests (Depends-on): Clean up trash.
1866
1867 2007-04-16  Simon Josefsson  <simon@josefsson.org>
1868
1869         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
1870
1871         * m4/autobuild.m4: Re-indent.
1872
1873 2007-04-13  Bruno Haible  <bruno@clisp.org>
1874
1875         * modules/fpurge-tests: New file.
1876         * tests/test-fpurge.c: New file.
1877
1878         * modules/fpurge: New file.
1879         * lib/fpurge.h: New file.
1880         * lib/fpurge.c: New file.
1881         * m4/fpurge.m4: New file.
1882
1883 2007-04-13  Bruno Haible  <bruno@clisp.org>
1884
1885         * modules/fbufmode-tests: New file.
1886         * tests/test-fbufmode.c: New file.
1887
1888         * modules/fbufmode: New file.
1889         * lib/fbufmode.h: New file.
1890         * lib/fbufmode.c: New file.
1891         * m4/fbufmode.m4: New file.
1892
1893 2007-04-13  Bruno Haible  <bruno@clisp.org>
1894
1895         * modules/fwritable-tests: New file.
1896         * tests/test-fwritable.c: New file.
1897
1898         * modules/fwritable: New file.
1899         * lib/fwritable.h: New file.
1900         * lib/fwritable.c: New file.
1901         * m4/fwritable.m4: New file.
1902
1903 2007-04-13  Bruno Haible  <bruno@clisp.org>
1904
1905         * modules/freadable-tests: New file.
1906         * tests/test-freadable.c: New file.
1907
1908         * modules/freadable: New file.
1909         * lib/freadable.h: New file.
1910         * lib/freadable.c: New file.
1911         * m4/freadable.m4: New file.
1912
1913 2007-04-13  Bruno Haible  <bruno@clisp.org>
1914
1915         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
1916         MOSTLYCLEANFILES.
1917
1918 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
1919
1920         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
1921         gzip bootstrap.conf to avoid dragging in i18n machinery.
1922         (gnulib_tool_option): Use it.
1923
1924 2007-04-13  Bruno Haible  <bruno@clisp.org>
1925
1926         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
1927         %F directives.
1928         * tests/test-vasprintf-posix.c (test_function): Likewise.
1929         * tests/test-snprintf-posix.h (test_function): Likewise.
1930         * tests/test-sprintf-posix.h (test_function): Likewise.
1931         * tests/test-fprintf-posix.h (test_function): Likewise.
1932         * tests/test-printf-posix.h (test_function): Likewise.
1933         * tests/test-fprintf-posix.out: Likewise.
1934
1935 2007-04-13  Bruno Haible  <bruno@clisp.org>
1936
1937         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
1938         * modules/tls-tests (configure.ac): Likewise.
1939         Reported by Arto C. Nirkko <anirkko@insel.ch>.
1940
1941 2007-04-13  Bruno Haible  <bruno@clisp.org>
1942
1943         * lib/tls.c (glthread_tls_get): Fix return type.
1944         Patch by Arto C. Nirkko <anirkko@insel.ch>.
1945
1946 2007-04-12  Eric Blake  <ebb9@byu.net>
1947
1948         * modules/gettime (Depends-on): Remove gettime.
1949         Reported by Dmitry V. Levin.
1950
1951 2007-04-12  Bruno Haible  <bruno@clisp.org>
1952
1953         * modules/fflush (Include): Mention <stdio.h>.
1954         * modules/strtoimax (Include): Mention <inttypes.h>.
1955         * modules/strtoumax (Include): Likewise.
1956
1957 2007-04-12  Eric Blake  <ebb9@byu.net>
1958
1959         * .cvsignore: New file.
1960         * .gitignore: Likewise.
1961
1962 2007-04-12  Bruno Haible  <bruno@clisp.org>
1963
1964         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
1965         not before, since $(LDADD) often contains libgnu.a.
1966         * modules/striconv-tests (test_striconv_LDADD): Likewise.
1967         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
1968         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
1969         Needed on Cygwin.
1970
1971 2007-04-12  Eric Blake  <ebb9@byu.net>
1972
1973         Work around glibc's failure to flush stdin on fclose.
1974         * lib/closein.c (close_stdin): Flush stdin before closing.
1975
1976         Work around glibc's failure to reset seekable stdin on exit.
1977         * modules/closein: New module.
1978         * lib/closein.c: New file.
1979         * lib/closein.h: Likewise.
1980         * m4/closein.m4: Likewise.
1981         * MODULES.html.sh (File stream based Input/Output): Document it.
1982
1983 2007-04-12  Simon Josefsson  <simon@josefsson.org>
1984
1985         * gnulib-tool: Rename generated 'autobuild' script to
1986         'do-autobuild' in --create-megatestdir output.
1987
1988         * doc/gnulib.texi (Build robot for gnulib): Fix.
1989
1990 2007-04-12  Simon Josefsson  <simon@josefsson.org>
1991
1992         * modules/sysexits (Depends-on): Add absolute-header.
1993
1994 2007-04-12  Eric Blake  <ebb9@byu.net>
1995
1996         No need to preserve errno on success.
1997         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
1998         Reported by Bruno Haible.
1999
2000 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2001
2002         * MODULES.html.sh (Support for maintaining and releasing
2003         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
2004
2005 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2006
2007         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
2008
2009 2007-04-12  Simon Josefsson  <simon@josefsson.org>
2010
2011         * modules/autobuild: New module.
2012
2013         * m4/autobuild.m4: New file.
2014
2015 2007-04-11  Bruno Haible  <bruno@clisp.org>
2016
2017         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
2018         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
2019         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
2020         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
2021         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2022         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2023         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2024         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2025         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2026         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2027         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
2028         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2029         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2030         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
2031         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2032         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2033         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
2034         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2035         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2036         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
2037         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2038         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2039         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
2040         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2041         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2042         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
2043         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
2044         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
2045         Reported by Eric Blake.
2046
2047 2007-04-11  Bruno Haible  <bruno@clisp.org>
2048
2049         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
2050
2051 2007-04-10  Bruno Haible  <bruno@clisp.org>
2052
2053         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
2054         for NaN and Infinity. Needed on FreeBSD 6.1.
2055         * tests/test-vasnprintf-posix.c (test_function): Undo last change
2056         regarding results for "%010a" of Infinity and NaN.
2057         * tests/test-vasprintf-posix.c (test_function): Likewise.
2058         * tests/test-snprintf-posix.h (test_function): Likewise.
2059         * tests/test-sprintf-posix.h (test_function): Likewise.
2060         * tests/test-fprintf-posix.h (test_function): Likewise.
2061         * tests/test-printf-posix.h (test_function): Likewise.
2062         * tests/test-fprintf-posix.out: Likewise.
2063
2064 2007-04-10  Bruno Haible  <bruno@clisp.org>
2065
2066         * modules/locale-tests: New file.
2067         * tests/test-locale.c: New file.
2068
2069         * modules/locale: New file.
2070         * lib/locale_.h: New file.
2071         * m4/locale_h.m4: New file.
2072
2073 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
2074             Bruno Haible  <bruno@clisp.org>
2075
2076         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
2077         be determined, test for availability of the copysignf, copysign,
2078         copysignl functions.
2079         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
2080         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
2081         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
2082
2083 2007-04-09  Eric Blake  <ebb9@byu.net>
2084
2085         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
2086         * modules/stdio (Makefile.am): Support fflush.
2087         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
2088         * modules/fflush: New file.
2089         * lib/fflush.c: Likewise.
2090         * m4/fflush.m4: Likewise.
2091         * modules/fflush-tests: New test.
2092         * tests/test-fflush.c: Likewise.
2093         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
2094
2095 2007-04-06  Bruno Haible  <bruno@clisp.org>
2096
2097         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
2098         (VASNPRINTF): Use signbit for faster determination whether to print a
2099         minus sign.
2100         * modules/vasnprintf (Files): Remove lib/float+.h.
2101         * modules/fprintf-posix (Depends-on): Add signbit.
2102         * modules/snprintf-posix (Depends-on): Likewise.
2103         * modules/sprintf-posix (Depends-on): Likewise.
2104         * modules/vasnprintf-posix (Depends-on): Likewise.
2105         * modules/vasprintf-posix (Depends-on): Likewise.
2106         * modules/vfprintf-posix (Depends-on): Likewise.
2107         * modules/vsnprintf-posix (Depends-on): Likewise.
2108         * modules/vsprintf-posix (Depends-on): Likewise.
2109
2110 2007-04-06  Bruno Haible  <bruno@clisp.org>
2111
2112         * tests/test-frexp.c (main): Test also the sign bit of zero results.
2113         * tests/test-frexpl.c (main): Likewise.
2114         * tests/test-ldexpl.c (main): Likewise.
2115         * modules/frexp-tests (Depends-on): Add signbit.
2116         * modules/frexpl-tests (Depdends-on): Likewise.
2117         * modules/ldexpl-tests (Depdends-on): Likewise.
2118
2119 2007-04-06  Bruno Haible  <bruno@clisp.org>
2120
2121         * modules/signbit-tests: New file.
2122         * tests/test-signbit.c: New file.
2123
2124         * modules/signbit: New file.
2125         * lib/signbitf.c: New file.
2126         * lib/signbitd.c: New file.
2127         * lib/signbitl.c: New file.
2128         * m4/signbit.m4: New file.
2129         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
2130         (signbit): New macro.
2131         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
2132         REPLACE_SIGNBIT.
2133         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
2134         REPLACE_FREXPL into math.h.
2135
2136 2007-04-06  Bruno Haible  <bruno@clisp.org>
2137
2138         * modules/isnanf-nolibm-tests: New file.
2139         * tests/test-isnanf.c: New file.
2140
2141         * modules/isnanf-nolibm: New file.
2142         * lib/isnanf.h: New file.
2143         * lib/isnanf.c: New file.
2144         * lib/isnan.c: Consider the USE_FLOAT macro.
2145         * m4/isnanf.m4: New file.
2146
2147 2007-04-06  Bruno Haible  <bruno@clisp.org>
2148
2149         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
2150         (Link): New section.
2151
2152         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
2153
2154 2007-04-06  Bruno Haible  <bruno@clisp.org>
2155
2156         Assume the 'long double' type.
2157         * m4/longdouble.m4: Remove file.
2158         * config/srclist.txt: Don't mention longdouble.m4.
2159         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
2160         * lib/float+.h: Likewise.
2161         * lib/frexp.c: Likewise.
2162         * lib/printf-args.h: Likewise.
2163         * lib/printf-args.c: Likewise.
2164         * lib/printf-frexp.c: Likewise.
2165         * lib/printf-parse.c: Likewise.
2166         * lib/vasnprintf.c: Likewise.
2167         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
2168         * m4/intl.m4: Likewise.
2169         * m4/isnanl.m4: Likewise.
2170         * m4/printf.m4: Likewise.
2171         * m4/printf-frexpl.m4: Likewise.
2172         * m4/vasnprintf.m4: Likewise.
2173         * modules/allocsa (Files): Remove m4/longdouble.m4.
2174         * modules/gettext (Files): Likewise.
2175         * modules/relocatable-prog-wrapper (Files): Likewise.
2176         * modules/vasnprintf (Files): Likewise.
2177         * modules/isnanl (Files): Likewise.
2178         (Include): Simplify.
2179         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
2180         (Include): Simplify.
2181         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
2182         (Include): Simplify.
2183         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
2184         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2185         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
2186         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2187         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2188         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2189         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
2190         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2191         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
2192         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2193         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
2194         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
2195         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
2196         * tests/test-isnanl.c: Likewise.
2197         * tests/test-snprintf-posix.h: Likewise.
2198         * tests/test-sprintf-posix.h: Likewise.
2199         * tests/test-vasnprintf-posix.c: Likewise.
2200         * tests/test-vasnprintf-posix2.c: Likewise.
2201         * tests/test-vasprintf-posix.c: Likewise.
2202
2203 2007-04-06  Bruno Haible  <bruno@clisp.org>
2204
2205         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
2206         * lib/math_.h [__DECC]: Include the overridden include file through
2207         #include_next, outside the double-inclusion guard.
2208         * lib/stdio_.h [__DECC]: Likewise.
2209         * lib/stdlib_.h [__DECC]: Likewise.
2210         * lib/string_.h [__DECC]: Likewise.
2211         * lib/time_.h [__DECC]: Likewise.
2212         * lib/wchar_.h [__DECC]: Likewise.
2213         * lib/wctype_.h [__DECC]: Likewise.
2214         * lib/inttypes_.h [__DECC]: Likewise.
2215         Reported by Albert Chin <china@thewrittenword.com> in
2216         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
2217
2218 2007-04-04  Eric Blake  <ebb9@byu.net>
2219
2220         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
2221         1.5.x.
2222
2223 2007-04-04  Bruno Haible  <bruno@clisp.org>
2224
2225         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
2226         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
2227
2228 2007-04-04  Bruno Haible  <bruno@clisp.org>
2229
2230         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
2231         results for "%010a" of Infinity and NaN.
2232         * tests/test-vasprintf-posix.c (test_function): Likewise.
2233         * tests/test-snprintf-posix.h (test_function): Likewise.
2234         * tests/test-sprintf-posix.h (test_function): Likewise.
2235         * tests/test-fprintf-posix.h (test_function): Remove these tests.
2236         * tests/test-printf-posix.h (test_function): Likewise.
2237         * tests/test-fprintf-posix.out: Update.
2238         Needed for FreeBSD 6.1.
2239
2240 2007-04-04  Bruno Haible  <bruno@clisp.org>
2241
2242         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
2243         directly used by the gnulib modules nor by gnulib-tool.
2244
2245 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
2246
2247         * DEPENDENCIES: Give overall description of version dependency
2248         desirability.  Use more-typical names for apps.
2249         Add shell, coreutils, diffutils, grep, tar, gzip.
2250
2251 2007-04-04  Simon Josefsson  <simon@josefsson.org>
2252
2253         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
2254
2255 2007-04-04  Karl Berry  <karl@gnu.org>
2256
2257         * MODULES.html.sh (func_module): missing '.
2258
2259 2007-04-03  Bruno Haible  <bruno@clisp.org>
2260
2261         * modules/argmatch-tests (Makefile.am): New variable
2262         test_argmatch_LDADD.
2263         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
2264         * modules/array-list-tests (Makefile.am): New variable
2265         test_array_list_LDADD.
2266         * modules/array-oset-tests (Makefile.am): New variable
2267         test_array_oset_LDADD.
2268         * modules/avltree-list-tests (Makefile.am): New variable
2269         test_avltree_list_LDADD.
2270         * modules/avltree-oset-tests (Makefile.am): New variable
2271         test_avltree_oset_LDADD.
2272         * modules/avltreehash-list-tests (Makefile.am): New variable
2273         test_avltreehash_list_LDADD.
2274         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
2275         test_canonicalize_lgpl_LDADD.
2276         * modules/carray-list-tests (Makefile.am): New variable
2277         test_carray_list_LDADD.
2278         * modules/dirname-tests (Makefile.am): New variable
2279         test_dirname_LDADD.
2280         * modules/linked-list-tests (Makefile.am): New variable
2281         test_linked_list_LDADD.
2282         * modules/linkedhash-list-tests (Makefile.am): New variable
2283         test_linkedhash_list_LDADD.
2284         * modules/rbtree-list-tests (Makefile.am): New variable
2285         test_rbtree_list_LDADD.
2286         * modules/rbtree-oset-tests (Makefile.am): New variable
2287         test_rbtree_oset_LDADD.
2288         * modules/rbtreehash-list-tests (Makefile.am): New variable
2289         test_rbtreehash_list_LDADD.
2290         * modules/xvasprintf-tests (Makefile.am): New variable
2291         test_xvasprintf_LDADD.
2292         Reported by Eric Blake.
2293
2294 2007-04-03  Eric Blake  <ebb9@byu.net>
2295
2296         * DEPENDENCIES: Weaken m4 requirements.
2297
2298 2007-04-03  Bruno Haible  <bruno@clisp.org>
2299
2300         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
2301         * modules/isnanl-tests (configure.ac): Likewise.
2302
2303 2007-04-03  Ben Pfaff  <blp@gnu.org>
2304
2305         * modules/iconv_open: Add $(srcdir)/ to source directory
2306         references in Makefile fragments that call gperf, to fix VPATH
2307         builds.
2308
2309 2007-04-03  Bruno Haible  <bruno@clisp.org>
2310
2311         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
2312         * lib/ldexpl.c: Undo last change.
2313
2314 2007-04-03  Bruno Haible  <bruno@clisp.org>
2315
2316         * modules/printf-frexpl (Depends-on): Undo last change.
2317         (Files): Add m4/ldexpl.m4.
2318
2319 2007-04-03  Bruno Haible  <bruno@clisp.org>
2320
2321         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
2322         * modules/isnanl (Link): New section.
2323
2324         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
2325         * modules/frexp (Link): New section.
2326
2327         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
2328         * modules/frexpl (Link): New section.
2329
2330         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
2331         * modules/ldexpl (Link): New section.
2332
2333 2007-04-03  Bruno Haible  <bruno@clisp.org>
2334
2335         * modules/TEMPLATE-EXTENDED: New file.
2336         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
2337
2338 2007-04-03  Bruno Haible  <bruno@clisp.org>
2339
2340         * DEPENDENCIES: New file.
2341         Suggested by Simon Josefsson.
2342
2343 2007-04-03  Bruno Haible  <bruno@clisp.org>
2344
2345         * doc/gnulib.texi: Escape @.
2346
2347 2007-04-03  James Youngman  <jay@gnu.org>
2348         and Paul Eggert  <eggert@cs.ucla.edu>
2349
2350         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
2351         birthtime on all systems that have birthtime, not just those which
2352         use st_birthtimensec rather than st_birthtim.  Putting zero in
2353         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
2354         that the birth time is not available for files on an NFS mount.
2355
2356 2007-04-03  Simon Josefsson  <simon@josefsson.org>
2357
2358         * modules/memxor: Move back from crypto/, suggested by Bruno.
2359         * modules/crypto/hmac-sha1: Fix memxor dependency.
2360
2361         * modules/crypto/gc: Moved from ../.
2362
2363 2007-04-02  Eric Blake  <ebb9@byu.net>
2364
2365         * lib/ldexpl.c (includes): Avoid libm.
2366
2367         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
2368
2369 2007-04-02  Bruno Haible  <bruno@clisp.org>
2370
2371         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
2372         on IRIX.
2373
2374 2007-04-02  Bruno Haible  <bruno@clisp.org>
2375
2376         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
2377         x86 or x86_64 platforms running MacOS X.
2378         Reported by Ryan Schmidt <@ryandesign.com>.
2379
2380 2007-04-02  Bruno Haible  <bruno@clisp.org>
2381
2382         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
2383         i386.
2384
2385 2007-04-01  Simon Josefsson  <simon@josefsson.org>
2386
2387         * modules/crypto/arcfour: Moved from ../.
2388         * modules/crypto/arcfour-tests: Moved from ../.
2389         * modules/crypto/arctwo: Moved from ../.
2390         * modules/crypto/arctwo-tests: Moved from ../.
2391         * modules/crypto/des: Moved from ../.
2392         * modules/crypto/des-tests: Moved from ../.
2393         * modules/crypto/gc-arcfour: Moved from ../.
2394         * modules/crypto/gc-arcfour-tests: Moved from ../.
2395         * modules/crypto/gc-arctwo: Moved from ../.
2396         * modules/crypto/gc-arctwo-tests: Moved from ../.
2397         * modules/crypto/gc-des: Moved from ../.
2398         * modules/crypto/gc-des-tests: Moved from ../.
2399         * modules/crypto/gc-hmac-md5: Moved from ../.
2400         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
2401         * modules/crypto/gc-hmac-sha1: Moved from ../.
2402         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
2403         * modules/crypto/gc-md2: Moved from ../.
2404         * modules/crypto/gc-md2-tests: Moved from ../.
2405         * modules/crypto/gc-md4: Moved from ../.
2406         * modules/crypto/gc-md4-tests: Moved from ../.
2407         * modules/crypto/gc-md5: Moved from ../.
2408         * modules/crypto/gc-md5-tests: Moved from ../.
2409         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
2410         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
2411         * modules/crypto/gc-random: Moved from ../.
2412         * modules/crypto/gc-rijndael: Moved from ../.
2413         * modules/crypto/gc-rijndael-tests: Moved from ../.
2414         * modules/crypto/gc-sha1: Moved from ../.
2415         * modules/crypto/gc-sha1-tests: Moved from ../.
2416         * modules/crypto/gc-tests: Moved from ../.
2417         * modules/crypto/hmac-md5: Moved from ../.
2418         * modules/crypto/hmac-md5-tests: Moved from ../.
2419         * modules/crypto/hmac-sha1: Moved from ../.
2420         * modules/crypto/hmac-sha1-tests: Moved from ../.
2421         * modules/crypto/md2: Moved from ../.
2422         * modules/crypto/md2-tests: Moved from ../.
2423         * modules/crypto/md4: Moved from ../.
2424         * modules/crypto/md4-tests: Moved from ../.
2425         * modules/crypto/md5: Moved from ../.
2426         * modules/crypto/md5-tests: Moved from ../.
2427         * modules/crypto/memxor: Moved from ../.
2428         * modules/crypto/rijndael: Moved from ../.
2429         * modules/crypto/rijndael-tests: Moved from ../.
2430         * modules/crypto/sha1: Moved from ../.
2431
2432 2007-03-30  James Youngman  <jay@gnu.org>
2433
2434         * tests/test-stat-time.c (prepare_test): use chmod() rather than
2435         rename() to change the ctime of a file (because ctime is unaffected
2436         by rename on jfs2 on AIX 5.1).
2437         (main): Start by doing cleanup, in case a previous run failed leaving
2438         test files behind.
2439
2440 2007-03-31  Bruno Haible  <bruno@clisp.org>
2441
2442         Support old proprietary implementations of iconv.
2443         * modules/iconv_open: New file.
2444         * lib/iconv_.h: New file.
2445         * m4/iconv_h.m4: New file.
2446         * lib/iconv_open.c: New file.
2447         * lib/iconv_open-aix.gperf: New file.
2448         * lib/iconv_open-hpux.gperf: New file.
2449         * lib/iconv_open-irix.gperf: New file.
2450         * lib/iconv_open-osf.gperf: New file.
2451         * m4/iconv_open.m4: New file.
2452         * modules/linebreak (Depends-on): Add iconv_open.
2453         * modules/striconv (Depends-on): Likewise.
2454         * modules/striconveh (Depends-on): Likewise.
2455         * modules/unicodeio (Depends-on): Likewise.
2456         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
2457         (iconv_t)(-1).
2458         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
2459         conversion if cd is (iconv_t)(-1).
2460         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
2461         is not possible.
2462
2463 2007-03-31  Bruno Haible  <bruno@clisp.org>
2464
2465         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
2466         work on Solaris either. Protect also second use of "autodetect_jp".
2467
2468 2007-03-31  Bruno Haible  <bruno@clisp.org>
2469
2470         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
2471         the function is not present.
2472
2473 2007-03-31  Bruno Haible  <bruno@clisp.org>
2474
2475         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
2476         the function is not present.
2477
2478 2007-03-31  Bruno Haible  <bruno@clisp.org>
2479
2480         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
2481         a bug in HP-UX iconv_open().
2482
2483 2007-03-31  Bruno Haible  <bruno@clisp.org>
2484
2485         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
2486         (Mathematics <math.h>): New section, add fpieee.
2487         (Input/output <stdio.h>): Add fseterr.
2488         (Mathematics <math.h>): New section, add printf-frexp.
2489         (Container data structures): Add sublist.
2490         (Core language properties): Add fpucw, inline.
2491         (Functions for greatest-width integer types <inttypes.h>): Add
2492         imaxabs, imaxdiv, inttypes.
2493         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
2494         isnanl-nolibm, ldexp.
2495         (Mathematics <math.h>): New section, add printf-frexpl.
2496         (Support for systems lacking POSIX:2001): Add fprintf-posix,
2497         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
2498         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
2499         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
2500         (Unicode string functions): Add unistr/u*-mbtoucr.
2501         (Java): Add javacomp-script, javaexec-script.
2502         (C#): Add csharpcomp-script, csharpexec-script.
2503         (Support for building libraries and executables): Add havelib,
2504         relocatable-*.
2505         (Support for maintaining and releasing projects): Renamed from
2506         'Support for maintaining and release projects'. Add announce-gen.
2507
2508 2007-03-31  Bruno Haible  <bruno@clisp.org>
2509
2510         * README: Talk primarily about git.
2511         (git and CVS): Renamed from CVS.
2512         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
2513         gnulib is available through git.
2514         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
2515
2516 2007-03-30  Bruno Haible  <bruno@clisp.org>
2517
2518         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
2519         * lib/poll_.h: Likewise.
2520         * lib/stat_.h: Likewise.
2521         * lib/sys_time_.h: Likewise.
2522         * lib/sysexit_.h: Likewise.
2523         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
2524         * lib/stdbool_.h: Likewise.
2525         * lib/byteswap_.h: Add double-inclusion guard.
2526
2527 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
2528
2529         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
2530
2531 2007-03-30  Karl Berry  <karl@gnu.org>
2532
2533         * config/srclist-update: double space after USA in the license
2534         substitution, since that's how it's usually (?) written.
2535
2536 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
2537
2538         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
2539         reported by Bruno Haible.
2540
2541 2007-03-29  Bruno Haible  <bruno@clisp.org>
2542
2543         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
2544         a bug in AIX iconv().
2545
2546 2007-03-29  Bruno Haible  <bruno@clisp.org>
2547
2548         * modules/ldexpl-tests: New file.
2549         * tests/test-ldexpl.c: New file.
2550
2551 2007-03-29  Bruno Haible  <bruno@clisp.org>
2552
2553         * lib/ldexpl.c: Include fpucw.h.
2554         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
2555         multiplication.
2556         * modules/ldexpl (Depends-on): Add fpucw.
2557
2558 2007-03-29  Bruno Haible  <bruno@clisp.org>
2559
2560         * modules/ldexpl: New file.
2561         * m4/ldexpl.m4: New file.
2562         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
2563         set.
2564         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
2565         REPLACE_LDEXPL.
2566         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
2567         REPLACE_LDEXPL.
2568         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2569         gl_FUNC_LDEXPL_WORKS.
2570         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
2571         * modules/mathl (Files): Remove lib/ldexpl.c.
2572         (Depends-on): Add ldexpl.
2573
2574 2007-03-29  Bruno Haible  <bruno@clisp.org>
2575
2576         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
2577
2578 2007-03-29  Bruno Haible  <bruno@clisp.org>
2579
2580         * tests/test-striconveh.c (main): Don't assume that a direct conversion
2581         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
2582         and possibly also HP-UX.
2583         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
2584         work on AIX, IRIX, HP-UX, OSF/1.
2585         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
2586         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
2587         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
2588         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
2589         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
2590         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
2591
2592 2007-03-29  Bruno Haible  <bruno@clisp.org>
2593
2594         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
2595
2596 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2597
2598         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
2599         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
2600
2601 2007-03-29  Eric Blake  <ebb9@byu.net>
2602
2603         * lib/acl-internal.h: Remove redundant include.
2604         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
2605         Cygwin when a file is locked.
2606
2607 2007-03-29  Bruno Haible  <bruno@clisp.org>
2608
2609         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
2610         file.
2611         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
2612
2613 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
2614
2615         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
2616         try to remove a parent directory if the child couldn't be removed
2617         (except for the first rmdir, which could fail because the child
2618         doesn't exist).  Problem reported by Jeff Blaine in
2619         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
2620
2621 2007-03-28  Bruno Haible  <bruno@clisp.org>
2622
2623         * lib/striconveh.c (utf8conv_carefully): New function.
2624         (mem_cd_iconveh_internal): Invoke it.
2625
2626 2007-03-28  Bruno Haible  <bruno@clisp.org>
2627
2628         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
2629         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
2630         input.
2631         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
2632         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
2633         unistr/u8-uctomb.
2634
2635 2007-03-28  Bruno Haible  <bruno@clisp.org>
2636
2637         * modules/unistr/u8-mbtoucr: New file.
2638         * lib/unistr/u8-mbtoucr.c: New file.
2639         * modules/unistr/u16-mbtoucr: New file.
2640         * lib/unistr/u16-mbtoucr.c: New file.
2641         * modules/unistr/u16-mbtoucr: New file.
2642         * lib/unistr/u16-mbtoucr.c: New file.
2643         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
2644
2645 2007-03-27  Simon Josefsson  <simon@josefsson.org>
2646             Bruno Haible  <bruno@clisp.org>
2647
2648         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
2649         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
2650         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
2651
2652         * m4/stdio_h.m4: Add stubs for vasprintf too.
2653
2654         * modules/stdio: Support vasprintf in sed command.
2655
2656         * modules/vasprintf: Depend on stdio for prototypes.  Remove
2657         vasprintf.h.  Add stdio module indicator.
2658
2659         * lib/stdio_.h: Declare asprintf and vasprintf, based on
2660         vasprintf.h.
2661
2662         * lib/vasprintf.h: File removed.
2663
2664         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
2665         * lib/vasprintf.c: Ditto.
2666         * lib/xvasprintf.c: Ditto.
2667         * tests/test-vasprintf-posix.c: Ditto.
2668         * tests/test-vasprintf.c: Ditto.
2669
2670 2007-03-27  Bruno Haible  <bruno@clisp.org>
2671
2672         Make vasnprintf multithread-safe.
2673         * lib/vasnprintf.c (decimal_point_char): New function.
2674         (VASNPRINTF): Use it.
2675         Suggested by Simon Josefsson.
2676
2677 2007-03-27  Eric Blake  <ebb9@byu.net>
2678
2679         Support sub-second birthtime on cygwin.
2680         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
2681         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
2682         (get_stat_birthtime): Also work with st_birthtim.
2683
2684 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
2685
2686         * lib/stat-time.h (USE_BIRTHTIME): Remove.
2687         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
2688         (get_stat_birthtime_ns): Do not try to use "spare" fields.
2689         (get_stat_birthtime_ns): Simplify compile-time tests.
2690         (get_stat_birthtime): Change the API to look like
2691         get_stat_mtime etc., except return a negative tv_nsec on error.
2692         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
2693         Don't check for "spare" fields.
2694         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
2695         or for struct stat.st_birthtime, as these tests aren't used.
2696         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
2697
2698 2007-03-27  Bruno Haible  <bruno@clisp.org>
2699
2700         * lib/stat-time.h: Include <sys/stat.h>.
2701
2702 2007-03-27  James Youngman  <jay@gnu.org>
2703
2704         * lib/stat-time.h (get_stat_birthtime): New function for
2705           retrieving st_birthtime as provided by UFS2 (hence *BSD).
2706         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
2707           and its variants.
2708         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
2709         * modules/stat-time-test: New file.
2710         * tests/test-stat-time.c: New test, devised by Bruno Haible.
2711
2712 2007-03-26  Bruno Haible  <bruno@clisp.org>
2713
2714         Better support of signalling NaNs.
2715         * lib/atanl.c: Include isnanl.h.
2716         (atanl): Perform test for NaN at the beginning of the function and
2717         through a call to isnanl.
2718         * lib/cosl.c: Include isnanl.h.
2719         (cosl): Perform test for NaN at the beginning of the function and
2720         through a call to isnanl.
2721         * lib/ldexpl.c: Include isnanl.h.
2722         (ldexpl): Perform test for NaN through a call to isnanl.
2723         * lib/logl.c: Include isnanl.h.
2724         (logl): Perform test for NaN at the beginning of the function and
2725         through a call to isnanl.
2726         * lib/sinl.c: Include isnanl.h.
2727         (sinl): Perform test for NaN at the beginning of the function and
2728         through a call to isnanl.
2729         * lib/sqrtl.c: Include isnanl.h.
2730         (sqrtl): Perform test for NaN at the beginning of the function and
2731         through a call to isnanl.
2732         * lib/tanl.c: Include isnanl.h.
2733         (tanl): Perform test for NaN at the beginning of the function and
2734         through a call to isnanl.
2735         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
2736         * modules/mathl (Depends-on): Add isnanl.
2737
2738 2007-03-26  Eric Blake  <ebb9@byu.net>
2739
2740         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
2741         regression in logic sense of previous patch.
2742
2743 2007-03-26  Bruno Haible  <bruno@clisp.org>
2744
2745         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
2746         unportable shell command "if ! ...".
2747         Reported by Ralf Wildenhues.
2748
2749 2007-03-25  Bruno Haible  <bruno@clisp.org>
2750
2751         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
2752         <sysexits.h> file, and only add EX_CONFIG.
2753         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
2754         absolute file name and whether it is sufficient. Substitute also
2755         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
2756         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
2757         ABSOLUTE_SYSEXITS_H into sysexits.h.
2758
2759 2007-03-25  Bruno Haible  <bruno@clisp.org>
2760
2761         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
2762         hints is NULL.
2763
2764 2007-03-25  Bruno Haible  <bruno@clisp.org>
2765
2766         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
2767         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
2768
2769 2007-03-25  Bruno Haible  <bruno@clisp.org>
2770
2771         * lib/vasnprintf.c: Include langinfo.h.
2772         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
2773         multithread-safe.
2774         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
2775         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
2776         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2777         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2778         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2779         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2780         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2781         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
2782         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2783         Reported by Simon Josefsson.
2784
2785 2007-03-25  Bruno Haible  <bruno@clisp.org>
2786
2787         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
2788         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
2789         * modules/vasnprintf (Depends-on): Add stdint.
2790
2791 2007-03-25  Bruno Haible  <bruno@clisp.org>
2792
2793         * modules/fpieee: New file.
2794         * m4/fpieee.m4: New file.
2795         * modules/isnan-nolibm (Depends-on): Add fpieee.
2796         * modules/isnanl-nolibm (Depends-on): Add fpieee.
2797         * modules/isnanl (Depends-on): Add fpieee.
2798
2799 2007-03-25  Bruno Haible  <bruno@clisp.org>
2800
2801         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
2802
2803 2007-03-25  Bruno Haible  <bruno@clisp.org>
2804
2805         Avoid test failures on IRIX 6.5.
2806         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
2807         (main): Use it.
2808         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
2809         macros.
2810         (main): Use them.
2811
2812 2007-03-25  Bruno Haible  <bruno@clisp.org>
2813
2814         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
2815         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
2816         exists but doesn't work.
2817         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
2818         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
2819         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
2820         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
2821
2822 2007-03-25  Bruno Haible  <bruno@clisp.org>
2823
2824         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
2825         returns inf. Needed on IRIX 6.5.
2826
2827 2007-03-25  Bruno Haible  <bruno@clisp.org>
2828
2829         * tests/test-frexpl.c: Include isnanl-nolibm.h.
2830         (main): Use isnanl instead of x != x idiom.
2831         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
2832
2833         * tests/test-frexp.c: Include isnan.h.
2834         (main): Use isnan instead of x != x idiom.
2835         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
2836
2837 2007-03-25  Bruno Haible  <bruno@clisp.org>
2838
2839         * tests/test-frexp.c (NaN): New function/macro.
2840         (main): Use it instead of 0.0 / 0.0.
2841         * tests/test-isnan.c (NaN): New function/macro.
2842         (main): Use it instead of 0.0 / 0.0.
2843         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
2844         (test_function): Use it instead of 0.0 / 0.0.
2845         * tests/test-vasprintf-posix.c (NaN): New function/macro.
2846         (test_function): Use it instead of 0.0 / 0.0.
2847         * tests/test-snprintf-posix.h (NaN): New function/macro.
2848         (test_function): Use it instead of 0.0 / 0.0.
2849         * tests/test-sprintf-posix.h (NaN): New function/macro.
2850         (test_function): Use it instead of 0.0 / 0.0.
2851         * tests/test-fprintf-posix.h (NaN): New function/macro.
2852         (test_function): Use it instead of 0.0 / 0.0.
2853         * tests/test-printf-posix.h (NaN): New function/macro.
2854         (test_function): Use it instead of 0.0 / 0.0.
2855
2856         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
2857
2858 2007-03-25  Bruno Haible  <bruno@clisp.org>
2859
2860         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
2861
2862 2007-03-25  Bruno Haible  <bruno@clisp.org>
2863
2864         * lib/regexec.c (merge_state_with_log): Make static.
2865
2866 2007-03-25  Bruno Haible  <bruno@clisp.org>
2867
2868         * lib/trigl.c (kernel_rem_pio2): Make static.
2869
2870 2007-03-25  Bruno Haible  <bruno@clisp.org>
2871
2872         * lib/sincosl.c (sincosl_table): Make static.
2873
2874 2007-03-25  Bruno Haible  <bruno@clisp.org>
2875
2876         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
2877         if the compiler does not support C99.
2878
2879 2007-03-25  Bruno Haible  <bruno@clisp.org>
2880
2881         * modules/time (Makefile.am): Ensure all rule action lines start with a
2882         tab.
2883
2884 2007-03-24  Bruno Haible  <bruno@clisp.org>
2885
2886         * modules/tsearch-tests: New file.
2887         * tests/test-tsearch.sh: New file.
2888         * tests/test-tsearch.c: New file, mostly copied from glibc.
2889
2890         * modules/search-tests: New file.
2891         * tests/test-search.c: New file.
2892
2893         * modules/search: New file.
2894         * lib/search_.h: New file, incorporating lib/tsearch.h.
2895         * m4/search_h.m4: New file.
2896         * lib/tsearch.h: Remove file.
2897         * lib/tsearch.c: Include search.h instead of tsearch.h.
2898         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
2899         HAVE_TSEARCH.
2900         * modules/tsearch (Files): Remove lib/tsearch.h.
2901         (Depends-on): Add search.
2902         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
2903         (Include): Change tsearch.h into search.h.
2904
2905 2007-03-24  Bruno Haible  <bruno@clisp.org>
2906
2907         * modules/fpucw: New file.
2908         * lib/fpucw.h: New file.
2909         * lib/frexp.c: Include fpucw.h.
2910         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
2911         (FUNC): Use them.
2912         * lib/printf-frexp.c: Include fpucw.h.
2913         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
2914         (FUNC): Use them.
2915         * lib/vasnprintf.c: Include fpucw.h.
2916         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
2917         'long double' calculations.
2918         * tests/test-frexpl.c: Include fpucw.h.
2919         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
2920         * tests/test-printf-frexpl.c: Include fpucw.h.
2921         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
2922         * modules/frexpl (Depends-on): Add fpucw.
2923         * modules/printf-frexpl (Depends-on): Likewise.
2924         * modules/fprintf-posix (Depends-on): Likewise.
2925         * modules/snprintf-posix (Depends-on): Likewise.
2926         * modules/sprintf-posix (Depends-on): Likewise.
2927         * modules/vasnprintf-posix (Depends-on): Likewise.
2928         * modules/vasprintf-posix (Depends-on): Likewise.
2929         * modules/vfprintf-posix (Depends-on): Likewise.
2930         * modules/vsnprintf-posix (Depends-on): Likewise.
2931         * modules/vsprintf-posix (Depends-on): Likewise.
2932         * modules/frexpl-tests (Depends-on): Likewise.
2933         * modules/printf-frexpl-tests (Depends-on): Likewise.
2934
2935 2007-03-24  Bruno Haible  <bruno@clisp.org>
2936
2937         * lib/float+.h: New file.
2938         * lib/isnan.c: Include float+.h.
2939         (SIZE): New macro.
2940         (FUNC): Compare only SIZE bytes of the value.
2941         * lib/vasnprintf.c: Include float+.h.
2942         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
2943         SIZEOF_LDBL or SIZEOF_DBL bytes.
2944         * modules/isnan-nolibm (Files): Add lib/float+.h.
2945         * modules/isnanl-nolibm (Files): Add lib/float+.h.
2946         * modules/isnanl (Files): Add lib/float+.h.
2947         * modules/vasnprintf (Files): Add lib/float+.h.
2948
2949 2007-03-24  Bruno Haible  <bruno@clisp.org>
2950
2951         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
2952         include isnanl-nolibm.h.
2953
2954 2007-03-24  Bruno Haible  <bruno@clisp.org>
2955
2956         * tests/test-read-file.c (main): Don't produce spurious output for
2957         expected situations. Make the test fail if it encountered unexpected
2958         results.
2959
2960 2007-03-24  Bruno Haible  <bruno@clisp.org>
2961
2962         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
2963         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
2964
2965 2007-03-24  Bruno Haible  <bruno@clisp.org>
2966
2967         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
2968
2969 2007-03-24  Bruno Haible  <bruno@clisp.org>
2970
2971         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
2972         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
2973
2974         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
2975         * modules/utf8-ucs4: Turn into a symbolic link to module
2976         unistr/u8-mbtouc.
2977
2978         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
2979         utf8-ucs4-unsafe.
2980         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
2981         unistr/u8-mbtouc-unsafe.
2982
2983         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
2984         * modules/utf16-ucs4: Turn into a symbolic link to module
2985         unistr/u16-mbtouc.
2986
2987         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
2988         utf16-ucs4-unsafe.
2989         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
2990         unistr/u16-mbtouc-unsafe.
2991
2992         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
2993         * modules/ucs4-utf8: Turn into a symbolic link to module
2994         unistr/u8-ubtomb.
2995
2996         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
2997         * modules/ucs4-utf16: Turn into a symbolic link to module
2998         unistr/u16-ubtomb.
2999
3000 2007-03-24  Bruno Haible  <bruno@clisp.org>
3001
3002         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
3003         Enable the function only if HAVE_INLINE.
3004         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
3005         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3006         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
3007         Enable the function only if HAVE_INLINE.
3008         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
3009         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
3010         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
3011         Enable the function only if HAVE_INLINE.
3012         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
3013         Enable the function only if HAVE_INLINE.
3014         * modules/utf8-ucs4: Update.
3015         * modules/utf8-ucs4-unsafe: Update.
3016         * modules/utf16-ucs4: Update.
3017         * modules/utf16-ucs4-unsafe: Update.
3018         * modules/ucs4-utf8: Update.
3019         * modules/ucs4-utf16: Update.
3020
3021 2007-03-24  Bruno Haible  <bruno@clisp.org>
3022
3023         * lib/utf8-ucs4.h: Remove file.
3024         * lib/utf8-ucs4-unsafe.h: Remove file.
3025         * lib/utf16-ucs4.h: Remove file.
3026         * lib/utf16-ucs4-unsafe.h: Remove file.
3027         * lib/ucs4-utf8.h: Remove file.
3028         * lib/ucs4-utf16.h: Remove file.
3029         * lib/unistr.h: Include their previous contents.
3030         * m4/utf-ucs4.m4: Remove file.
3031         * m4/ucs4-utf.m4: Remove file.
3032         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
3033         (Depends-on): Add unistr/base.
3034         (configure.ac): Remove gl_UTF_UCS4.
3035         (Makefile.am): Update.
3036         (Include): Change to unistr.h.
3037         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
3038         (Depends-on): Add unistr/base.
3039         (configure.ac): Remove gl_UTF_UCS4.
3040         (Makefile.am): Update.
3041         (Include): Change to unistr.h.
3042         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
3043         (Depends-on): Add unistr/base.
3044         (configure.ac): Remove gl_UTF_UCS4.
3045         (Makefile.am): Update.
3046         (Include): Change to unistr.h.
3047         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
3048         (Depends-on): Add unistr/base.
3049         (configure.ac): Remove gl_UTF_UCS4.
3050         (Makefile.am): Update.
3051         (Include): Change to unistr.h.
3052         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
3053         (Depends-on): Add unistr/base.
3054         (configure.ac): Remove gl_UCS4_UTF.
3055         (Makefile.am): Update.
3056         (Include): Change to unistr.h.
3057         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
3058         (Depends-on): Add unistr/base.
3059         (configure.ac): Remove gl_UCS4_UTF.
3060         (Makefile.am): Update.
3061         (Include): Change to unistr.h.
3062         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
3063         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
3064         utf8-ucs4-unsafe.h.
3065         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
3066         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
3067         utf16-ucs4-unsafe.h.
3068         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
3069         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
3070         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
3071         * lib/unistr/u8-strchr.c: Likewise.
3072         * lib/unistr/u8-strrchr.c: Likewise.
3073         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
3074         * lib/unistr/u16-strchr.c: Likewise.
3075         * lib/unistr/u16-strrchr.c: Likewise.
3076         * lib/striconveh.c: Update.
3077         * lib/linebreak.c: Update.
3078
3079 2007-03-24  Bruno Haible  <bruno@clisp.org>
3080
3081         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
3082         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
3083
3084 2007-03-22  Bruno Haible  <bruno@clisp.org>
3085
3086         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
3087
3088 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
3089
3090         * MODULES.html.sh (File system functions): New module write-any-file.
3091         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
3092         * m4/write-any-file.m4: New files.
3093
3094 2007-03-23  Eric Blake  <ebb9@byu.net>
3095
3096         * gnulib-tool: Rearrange space-tab sequences, since some editors
3097         like to eat them.
3098
3099 2007-03-23  Eric Blake  <ebb9@byu.net>
3100
3101         * lib/version-etc.c (version_etc_va): Update license wording to
3102         be more concise.  Recommended by Richard Stallman.
3103
3104 2007-03-22  Bruno Haible  <bruno@clisp.org>
3105
3106         * lib/poll.c (MSG_PEEK): New fallback definition.
3107
3108 2007-03-22  Bruno Haible  <bruno@clisp.org>
3109
3110         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
3111         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
3112         (main): Update.
3113         Fixes a compilation error on BeOS.
3114
3115 2007-03-22  Bruno Haible  <bruno@clisp.org>
3116
3117         * modules/frexpl-tests: New file.
3118         * tests/test-frexpl.c: New file.
3119
3120         * modules/frexpl: New file.
3121         * m4/frexpl.m4: New file.
3122         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
3123         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
3124         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
3125         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
3126         (Depends-on): Add frexpl. Remove isnanl-nolibm.
3127         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
3128
3129 2007-03-22  Bruno Haible  <bruno@clisp.org>
3130
3131         * lib/frexpl.c: Share code with lib/frexp.c.
3132         * modules/mathl (Files): Add lib/frexp.c.
3133         (Depends-on): Add isnanl-nolibm.
3134
3135 2007-03-22  Bruno Haible  <bruno@clisp.org>
3136
3137         * modules/printf-frexp (Files): Add m4/frexp.m4.
3138         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
3139         only if the found frexp function actually works.
3140
3141 2007-03-22  Bruno Haible  <bruno@clisp.org>
3142
3143         * lib/frexp.c: Remove older implementation that uses divisions.
3144
3145 2007-03-21  Bruno Haible  <bruno@clisp.org>
3146
3147         * modules/frexp-tests: New file.
3148         * tests/test-frexp.c: New file.
3149
3150         * modules/frexp: New file.
3151         * lib/frexp.c: New file.
3152         * m4/frexp.m4: New file.
3153         * lib/math_.h (frexp): New declaration.
3154         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
3155         REPLACE_FREXP.
3156         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
3157
3158 2007-03-21  Bruno Haible  <bruno@clisp.org>
3159
3160         * modules/isnanl-tests: New file.
3161         * tests/test-isnanl.c: New file.
3162
3163         * modules/isnanl: New file.
3164         * lib/isnanl.h: New file.
3165         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
3166         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
3167         gl_FUNC_ISNANL_WORKS.
3168         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
3169         New macros.
3170
3171 2007-03-21  Bruno Haible  <bruno@clisp.org>
3172
3173         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
3174         lib/isnanl.h.
3175         (Include): Update.
3176         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
3177         * lib/vasnprintf.c: Update.
3178         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
3179         tests/test-isnanl.h, remove tests/test-isnanl.c.
3180         (Makefile.am): Update.
3181         * tests/test-isnanl-nolibm.c: New file.
3182         * tests/test-isnanl.h: New file.
3183         * tests/test-isnanl.c: Remove file.
3184
3185 2007-03-21  Jim Meyering  <jim@meyering.net>
3186
3187         When trying to open ".", treat ESTALE like EACCES.
3188         * lib/savewd.c (savewd_save): Resort to forking not just upon
3189         failure with EACCES, but also when errno is ESTALE.
3190
3191 2007-03-20  Bruno Haible  <bruno@clisp.org>
3192
3193         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
3194         Needed on AIX 5.1. Reported by Matthew Woehlke.
3195
3196 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3197
3198         Suggestions by Bruno Haible:
3199         * lib/acl-internal.h: Include "gettext.h" rather than rolling
3200         our own.
3201         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
3202         * modules/acl (Depends-on): Add gettext.
3203
3204 2007-03-19  Bruno Haible  <bruno@clisp.org>
3205
3206         * modules/iconvme: Remove file.
3207         * lib/iconvme.h: Remove file.
3208         * lib/iconvme.c: Remove file.
3209         * m4/iconvme.m4: Remove file.
3210
3211 2007-03-19  Bruno Haible  <bruno@clisp.org>
3212
3213         * doc/relocatable-maint.texi: Break long shell script line.
3214         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3215
3216 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3217
3218         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
3219         handle file_has_acl.
3220         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
3221         * lib/acl.c: Move header inclusions and related macro defns into
3222         lib/acl-internal.h.
3223         (S_ISLNK): Remove defn, since that's now done for us.
3224         (file_has_acl): Move to lib/file-has-acl.c.
3225         Call acl_trivial if available.  This is the crucial part of the fix.
3226         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
3227         shared within the library.  Rewrite a bit, partly to make it compatible
3228         with the GNU coding style.
3229         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
3230         Remove unnecessary double-quotes.
3231         Don't test for acl_to_text; the build will catch that.
3232         Replace acl_entries if it doesn't exist and it is needed.
3233         Check for -lsec and acl_trivial (as used on Solaris 10).
3234         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
3235         lib/file-has-acl.c.
3236         (Depends-on): Add sys_stat, for S_ISLNK.
3237
3238 2007-03-19  Ben Pfaff  <blp@gnu.org>
3239
3240         * doc/gnulib.texi: Fix typos.
3241         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
3242
3243 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
3244
3245         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
3246         If size is zero here, buf must be zero.
3247
3248 2007-03-19  Simon Josefsson  <simon@josefsson.org>
3249
3250         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
3251         <bruno@clisp.org>.
3252
3253 2007-03-18  Bruno Haible  <bruno@clisp.org>
3254
3255         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
3256         Suggested by Eric Blake.
3257
3258 2007-03-18  Ben Pfaff  <blp@gnu.org>
3259
3260         * doc/relocatable.texi: Recommend using as prefix a directory
3261         that does not exist and will never be created.  Based on
3262         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
3263         and others.
3264
3265 2007-03-17  Bruno Haible  <bruno@clisp.org>
3266
3267         * lib/fchownat.c: Include lchown.h.
3268
3269 2007-03-17  Bruno Haible  <bruno@clisp.org>
3270
3271         Fix endless loop when the given allocated size was > INT_MAX.
3272         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
3273         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
3274         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
3275         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
3276         * lib/sprintf.c (sprintf): Likewise.
3277
3278 2007-03-17  Bruno Haible  <bruno@clisp.org>
3279
3280         * tests/test-argp-2.sh (func_compare): Output a context diff.
3281
3282 2007-03-17  Bruno Haible  <bruno@clisp.org>
3283
3284         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
3285         locale's decimal-point character.
3286
3287 2007-03-17  Bruno Haible  <bruno@clisp.org>
3288
3289         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
3290         before comparing it. Needed because on some platforms (e.g. x86) a
3291         'long double' occupies less bytes than sizeof (long double).
3292
3293 2007-03-17  Bruno Haible  <bruno@clisp.org>
3294
3295         * tests/test-crc.c (main): Make printf statements 64-bit clean.
3296         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
3297         * tests/test-getaddrinfo.c (simple): Likewise.
3298         * tests/test-read-file.c (main): Likewise.
3299
3300 2007-03-17  Bruno Haible  <bruno@clisp.org>
3301
3302         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
3303
3304 2007-03-17  Bruno Haible  <bruno@clisp.org>
3305
3306         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
3307         unused variable.
3308
3309 2007-03-17  Bruno Haible  <bruno@clisp.org>
3310
3311         * tests/test-c-strcasecmp.c: Include c-strcase.h.
3312         * tests/test-c-strncasecmp.c: Likewise.
3313
3314 2007-03-17  Bruno Haible  <bruno@clisp.org>
3315
3316         * modules/stdlib (Depends-on): Add unistd.
3317         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
3318         Needed for MacOS X 10.3.
3319
3320 2007-03-17  Bruno Haible  <bruno@clisp.org>
3321
3322         * lib/unistr/u-strdup.h: Include <stdlib.h>.
3323
3324 2007-03-17  Bruno Haible  <bruno@clisp.org>
3325
3326         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
3327
3328 2007-03-17  Bruno Haible  <bruno@clisp.org>
3329
3330         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
3331         to reflect files copied from gnulib (with or without modifications).
3332         Suggested by Jim Meyering.
3333
3334 2007-03-17  Eric Blake  <ebb9@byu.net>
3335
3336         * NEWS: Document stdlib change from 2007-02-18.
3337
3338 2007-03-17  Jim Meyering  <jim@meyering.net>
3339
3340         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
3341         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
3342         someone uses a name containing shell meta-characters.
3343         Reported by Alfred M. Szmidt.
3344
3345         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
3346
3347 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3348
3349         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
3350         and copy gettext configuration files only if configure.ac contains
3351         a use of AM_GNU_GETTEXT_VERSION.
3352
3353 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
3354
3355         * build-aux/bootstrap (gnulib_name): New variable.
3356         (gnulib_tool_options): Use it.
3357
3358 2007-03-13  Simon Josefsson  <simon@josefsson.org>
3359
3360         * tests/test-des.c: Use new namespace.
3361
3362 2007-03-15  Bruno Haible  <bruno@clisp.org>
3363
3364         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
3365         Reported by James Youngman <jay@gnu.org>.
3366
3367 2007-03-15  Bruno Haible  <bruno@clisp.org>
3368
3369         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
3370         declared prototype. Needed with cc on OSF/1 5.1.
3371
3372 2007-03-15  Bruno Haible  <bruno@clisp.org>
3373
3374         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
3375         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
3376         (struct gl_list_implementation): Add dispose_fn argument to the
3377         'create_empty', 'create' methods.
3378         (struct gl_list_impl_base): Add field 'dispose_fn'.
3379         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
3380         argument.
3381         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
3382         dispose_fn argument.
3383         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
3384         dispose_fn on the dropped values.
3385         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
3386         dispose_fn argument.
3387         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
3388         dropped values.
3389         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
3390         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3391         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
3392         (gl_tree_remove_node): Call dispose_fn on the dropped value.
3393         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
3394         argument.
3395         (gl_tree_list_free): Call dispose_fn on the dropped values.
3396         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
3397         the dropped values.
3398         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
3399         Add dispose_fn argument.
3400         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
3401         Call dispose_fn on the dropped values.
3402         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
3403         Add dispose_fn argument.
3404         (gl_sublist_create): Initialize the 'dispose_fn' field.
3405         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
3406         * tests/test-array_list.c (main): Update.
3407         * tests/test-carray_list.c (main): Update.
3408         * tests/test-avltree_list.c (main): Update.
3409         * tests/test-rbtree_list.c (main): Update.
3410         * tests/test-avltreehash_list.c (main): Update.
3411         * tests/test-rbtreehash_list.c (main): Update.
3412         * tests/test-linked_list.c (main): Update.
3413         * tests/test-linkedhash_list.c (main): Update.
3414         * tests/test-array_oset.c (main): Update.
3415
3416 2007-03-15  Bruno Haible  <bruno@clisp.org>
3417
3418         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
3419         (gl_oset_create_empty): Add dispose_fn argument.
3420         (struct gl_oset_implementation): Add dispose_fn argument to
3421         'create_empty' method.
3422         (struct gl_oset_impl_base): Add dispose_fn field.
3423         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
3424         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
3425         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
3426         values.
3427         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
3428         (gl_tree_oset_free): Call dispose_fn on the dropped values.
3429         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
3430         dropped value.
3431         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
3432         dropped value.
3433         * tests/test-array_oset.c (main): Update.
3434         * tests/test-avltree_oset.c (main): Update.
3435         * tests/test-rbtree_oset.c (main): Update.
3436         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
3437
3438 2007-03-13  Bruno Haible  <bruno@clisp.org>
3439
3440         * tests/test-stdbool.c (i): Update after last patch.
3441
3442 2007-03-12  Bruno Haible  <bruno@clisp.org>
3443
3444         * lib/quotearg.c: Include <wctype.h> early, before the definition of
3445         the iswprint macro. Needed on Solaris 2.5.1.
3446
3447 2007-03-12  Bruno Haible  <bruno@clisp.org>
3448
3449         * tests/test-printf-frexp.c (main): Declare x as volatile.
3450
3451 2007-03-12  Simon Josefsson  <simon@josefsson.org>
3452
3453         * doc/gnulib.texi (Build robot for gnulib): New section.
3454
3455 2007-03-12  Jim Meyering  <jim@meyering.net>
3456
3457         * build-aux/bootstrap: New file.
3458         * build-aux/bootstrap.conf: New file, from coreutils.
3459
3460 2007-03-11  Bruno Haible  <bruno@clisp.org>
3461
3462         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
3463
3464 2007-03-12  Simon Josefsson  <simon@josefsson.org>
3465
3466         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
3467         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
3468         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
3469
3470 2007-03-11  Bruno Haible  <bruno@clisp.org>
3471
3472         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
3473         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
3474
3475 2007-03-11  Bruno Haible  <bruno@clisp.org>
3476
3477         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
3478         formula. Needed for SunPRO C 5.0.
3479
3480 2007-03-11  Bruno Haible  <bruno@clisp.org>
3481
3482         * modules/long-options (Depends-on): Add getopt.
3483
3484 2007-03-11  Bruno Haible  <bruno@clisp.org>
3485
3486         * modules/modechange (Depends-on): Add stdbool.
3487
3488 2007-03-11  Bruno Haible  <bruno@clisp.org>
3489
3490         * modules/i-ring (Depends-on): Add stdbool.
3491
3492 2007-03-11  Bruno Haible  <bruno@clisp.org>
3493
3494         * modules/gc-des (Depends-on): Add stdbool.
3495
3496 2007-03-11  Bruno Haible  <bruno@clisp.org>
3497
3498         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
3499
3500 2007-03-11  Bruno Haible  <bruno@clisp.org>
3501
3502         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
3503
3504 2007-03-11  Bruno Haible  <bruno@clisp.org>
3505
3506         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
3507
3508 2007-03-11  Bruno Haible  <bruno@clisp.org>
3509
3510         * lib/vasnprintf.c (sprintf): Undefine.
3511
3512 2007-03-11  Bruno Haible  <bruno@clisp.org>
3513
3514         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
3515         initializers in SunPRO C and Compaq C compilers.
3516
3517 2007-03-11  Bruno Haible  <bruno@clisp.org>
3518
3519         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
3520         decrementing code ANSI C compliant.
3521
3522 2007-03-11  Bruno Haible  <bruno@clisp.org>
3523
3524         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
3525         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
3526
3527 2007-03-11  Bruno Haible  <bruno@clisp.org>
3528
3529         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
3530         <stdbool.h> substitute doesn't pass.
3531
3532 2007-03-11  Bruno Haible  <bruno@clisp.org>
3533
3534         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
3535
3536 2007-03-11  Bruno Haible  <bruno@clisp.org>
3537
3538         * gnulib-tool (func_create_megatestdir): Create also an autobuild
3539         script, for submission to autobuild.josefsson.org.
3540
3541 2007-03-10  Bruno Haible  <bruno@clisp.org>
3542
3543         * modules/canonicalize-lgpl-tests: New file.
3544         * tests/test-canonicalize-lgpl.sh: New file.
3545         * tests/test-canonicalize-lgpl.c: New file.
3546
3547         * modules/c-strcase-tests: New file.
3548         * tests/test-c-strcase.sh: New file.
3549         * tests/test-c-strcasecmp.c: New file.
3550         * tests/test-c-strncasecmp.c: New file.
3551
3552         * modules/atexit-tests: New file.
3553         * tests/test-atexit.sh: New file.
3554         * tests/test-atexit.c: New file.
3555
3556 2007-03-10  Bruno Haible  <bruno@clisp.org>
3557
3558         * tests/test-binary-io.sh: Use temporary filenames that are not so
3559         likely to clash with those of other tests (in a parallel make).
3560         * tests/test-binary-io.c: Likewise.
3561
3562 2007-03-10  Bruno Haible  <bruno@clisp.org>
3563
3564         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
3565         fallback; use #error instead.
3566         Suggested by Simon Josefsson.
3567
3568 2007-03-10  Bruno Haible  <bruno@clisp.org>
3569
3570         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
3571         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
3572         first and the last.
3573
3574 2007-03-10  Bruno Haible  <bruno@clisp.org>
3575
3576         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
3577
3578 2007-03-10  Bruno Haible  <bruno@clisp.org>
3579
3580         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
3581         "make distcheck".
3582         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
3583         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
3584         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
3585
3586 2007-03-10  Bruno Haible  <bruno@clisp.org>
3587
3588         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
3589         variable.
3590         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
3591         variable.
3592
3593 2007-03-09  Eric Blake  <ebb9@byu.net>
3594         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
3595
3596         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
3597         types are not being provided by gnulib.
3598         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
3599         types are supported.
3600
3601 2007-03-10  Bruno Haible  <bruno@clisp.org>
3602
3603         * lib/stdio_.h (__attribute__): New macro.
3604         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
3605         vsprintf): Specify __attribute__ __format__ for GCC.
3606         Suggested by Eric Blake.
3607
3608 2007-03-09  Bruno Haible  <bruno@clisp.org>
3609
3610         * modules/printf-posix-tests: New file.
3611         * tests/test-printf-posix.sh: New file.
3612         * tests/test-printf-posix.c: New file.
3613
3614         * modules/printf-posix: New file.
3615         * lib/printf.c: New file.
3616         * m4/printf-posix-rpl.m4: New file.
3617         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
3618         REPLACE_PRINTF.
3619         * lib/stdio_.h (printf): New declaration.
3620         (format, __format__, ____printf____, ____scanf____, ____strftime____,
3621         ____strfmon____): New macros.
3622         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
3623         REPLACE_PRINTF.
3624
3625 2007-03-09  Bruno Haible  <bruno@clisp.org>
3626
3627         * tests/test-vasnprintf-posix2.sh: New file.
3628         * tests/test-vasnprintf-posix2.c: New file.
3629         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
3630         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
3631         (Makefile.am): Activate test-vasnprintf-posix2.sh.
3632
3633         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
3634         a locale dependent decimal point, rather than always '.'.
3635
3636 2007-03-09  Eric Blake  <ebb9@byu.net>
3637
3638         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
3639         spite of platforms like Tandem/NSK that define it to -1.
3640
3641 2007-03-08  Bruno Haible  <bruno@clisp.org>
3642
3643         * modules/vprintf-posix-tests: New file.
3644         * tests/test-vprintf-posix.sh: New file.
3645         * tests/test-vprintf-posix.c: New file.
3646         * tests/test-printf-posix.h: New file.
3647
3648         * modules/vprintf-posix: New file.
3649         * lib/vprintf.c: New file.
3650         * m4/vprintf-posix.m4: New file.
3651         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
3652         REPLACE_VPRINTF.
3653         * lib/stdio_.h (vprintf): New declaration.
3654         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
3655         REPLACE_VPRINTF.
3656
3657 2007-03-08  Bruno Haible  <bruno@clisp.org>
3658
3659         * modules/fprintf-posix-tests: New file.
3660         * tests/test-fprintf-posix.sh: New file.
3661         * tests/test-fprintf-posix.c: New file.
3662
3663         * modules/fprintf-posix: New file.
3664         * lib/fprintf.c: New file.
3665         * m4/fprintf-posix.m4: New file.
3666         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
3667         REPLACE_FPRINTF.
3668         * lib/stdio_.h (fprintf): New declaration.
3669         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
3670         REPLACE_FPRINTF.
3671
3672 2007-03-08  Bruno Haible  <bruno@clisp.org>
3673
3674         * modules/vfprintf-posix-tests: New file.
3675         * tests/test-vfprintf-posix.sh: New file.
3676         * tests/test-vfprintf-posix.c: New file.
3677         * tests/test-fprintf-posix.h: New file.
3678         * tests/test-fprintf-posix.out: New file.
3679
3680         * modules/vfprintf-posix: New file.
3681         * lib/vfprintf.c: New file.
3682         * m4/vfprintf-posix.m4: New file.
3683         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
3684         REPLACE_VFPRINTF.
3685         * lib/stdio_.h (vfprintf): New declaration.
3686         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
3687         REPLACE_VFPRINTF.
3688
3689 2007-03-08  Bruno Haible  <bruno@clisp.org>
3690
3691         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
3692
3693 2007-03-08  Bruno Haible  <bruno@clisp.org>
3694
3695         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
3696         instead of 'expr' invocations.
3697         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
3698         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
3699         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
3700         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3701         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
3702         Suggested by Paul Eggert.
3703
3704 2007-03-08  Bruno Haible  <bruno@clisp.org>
3705
3706         * modules/fseterr-tests: New file.
3707         * tests/test-fseterr.c: New file.
3708
3709         * modules/fseterr: New file.
3710         * lib/fseterr.h: New file.
3711         * lib/fseterr.c: New file.
3712
3713 2007-03-08  Bruno Haible  <bruno@clisp.org>
3714
3715         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
3716         * lib/getopt_.h: Likewise.
3717         * lib/mbswidth.h: Likewise.
3718         * lib/setenv.h: Likewise.
3719         * lib/vasnprintf.h: Likewise.
3720         * lib/vasprintf.h: Likewise.
3721         * lib/verror.h: Likewise.
3722         * lib/xsetenv.h: Likewise.
3723         * lib/xvasprintf.h: Likewise.
3724
3725 2007-03-08  Jim Meyering  <jim@meyering.net>
3726
3727         * users.txt: Add parted.
3728
3729         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
3730
3731 2007-03-07  Bruno Haible  <bruno@clisp.org>
3732
3733         * m4/printf.m4: Make the shell script snippets copy&pastable.
3734
3735 2007-03-02  Bruno Haible  <bruno@clisp.org>
3736
3737         * lib/netinet_in_.h: New file.
3738         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
3739         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
3740         * modules/netinet_in (Files): Add lib/netinet_in_.h.
3741         (Depends-on): Add absolute-header.
3742         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
3743         into netinet/in.h.
3744
3745 2007-03-03  Bruno Haible  <bruno@clisp.org>
3746
3747         * lib/sys_select_.h: New file.
3748         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
3749         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
3750         * modules/sys_select (Files): Add lib/sys_select_.h.
3751         (Depends-on): Add absolute-header.
3752         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
3753         into sys/select.h.
3754
3755 2007-03-02  Bruno Haible  <bruno@clisp.org>
3756
3757         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
3758         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
3759         values.
3760         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
3761         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
3762         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
3763         * modules/sys_socket (Depends-on): Add absolute-header.
3764         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
3765         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
3766         (Include): Remove requirement of inclusion of <sys/types.h>.
3767
3768 2007-03-02  Bruno Haible  <bruno@clisp.org>
3769
3770         * lib/byteswap_.h (bswap_32): Fix formula.
3771
3772 2007-03-06  Bruno Haible  <bruno@clisp.org>
3773
3774         * modules/sprintf-posix-tests: New file.
3775         * tests/test-sprintf-posix.c: New file.
3776
3777         * modules/sprintf-posix: New file.
3778         * lib/sprintf.c: New file.
3779         * m4/sprintf-posix.m4: New file.
3780         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
3781         REPLACE_SPRINTF.
3782         * lib/stdio_.h (sprintf): New declaration.
3783         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
3784         REPLACE_SPRINTF.
3785
3786 2007-03-06  Bruno Haible  <bruno@clisp.org>
3787
3788         * modules/vsprintf-posix-tests: New file.
3789         * tests/test-vsprintf-posix.c: New file.
3790         * tests/test-sprintf-posix.h: New file.
3791
3792         * modules/vsprintf-posix: New file.
3793         * lib/vsprintf.c: New file.
3794         * m4/vsprintf-posix.m4: New file.
3795         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
3796         REPLACE_VSPRINTF.
3797         * lib/stdio_.h (vsprintf): New declaration.
3798         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
3799         REPLACE_VSPRINTF.
3800
3801 2007-03-06  Bruno Haible  <bruno@clisp.org>
3802
3803         * modules/vsnprintf (Depend-on): Remove minmax.
3804
3805 2007-03-06  Bruno Haible  <bruno@clisp.org>
3806
3807         * modules/snprintf-posix-tests: New file.
3808         * tests/test-snprintf-posix.c: New file.
3809
3810         * modules/snprintf-posix: New file.
3811         * m4/snprintf-posix.m4: New file.
3812         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
3813         gl_FUNC_SNPRINTF.
3814         (gl_FUNC_SNPRINTF): Invoke it.
3815         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
3816         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
3817         is set.
3818         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
3819
3820 2007-03-06  Bruno Haible  <bruno@clisp.org>
3821
3822         * modules/vsnprintf-posix-tests: New file.
3823         * tests/test-vsnprintf-posix.c: New file.
3824         * tests/test-snprintf-posix.h: New file.
3825
3826         * modules/vsnprintf-posix: New file.
3827         * m4/vsnprintf-posix.m4: New file.
3828         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
3829         gl_FUNC_VSNPRINTF.
3830         (gl_FUNC_VSNPRINTF): Invoke it.
3831         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
3832         * lib/stdio_.h (vsnprintf): Define as a replacement if
3833         REPLACE_VSNPRINTF is set.
3834         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
3835
3836 2007-03-06  Bruno Haible  <bruno@clisp.org>
3837
3838         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
3839         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
3840
3841 2007-03-06  Bruno Haible  <bruno@clisp.org>
3842
3843         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
3844         (asinl): Declare also if HAVE_DECL_ASINL is set.
3845         (atanl): Declare also if HAVE_DECL_ATANL is set.
3846         (ceill): Declare also if HAVE_DECL_CEILL is set.
3847         (cosl): Declare also if HAVE_DECL_COSL is set.
3848         (expl): Declare also if HAVE_DECL_EXPL is set.
3849         (floorl): Declare also if HAVE_DECL_FLOORL is set.
3850         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
3851         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
3852         (logl): Declare also if HAVE_DECL_LOGL is set.
3853         (sinl): Declare also if HAVE_DECL_SINL is set.
3854         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
3855         (tanl): Declare also if HAVE_DECL_TANL is set.
3856         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
3857         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
3858         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
3859         declaration of frexpl, ldexpl.
3860         * modules/printf-frexpl (Depends-on): Add math.
3861         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
3862
3863 2007-03-05  Bruno Haible  <bruno@clisp.org>
3864
3865         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
3866         frexpl and ldexpl are declared.
3867         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
3868
3869 2007-03-05  Bruno Haible  <bruno@clisp.org>
3870
3871         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
3872         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
3873
3874 2007-03-05  Bruno Haible  <bruno@clisp.org>
3875
3876         * lib/stdio_.h: Include <stddef.h>.
3877
3878 2007-03-05  Bruno Haible  <bruno@clisp.org>
3879
3880         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
3881
3882 2007-03-05  Bruno Haible  <bruno@clisp.org>
3883
3884         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
3885         NetBSD 4, from Ralf Wildenhues.
3886
3887 2007-03-04  Bruno Haible  <bruno@clisp.org>
3888
3889         * lib/vasprintf.h: Update #if logic for the case when the functions
3890         exist but are overridden.
3891
3892 2007-03-04  Bruno Haible  <bruno@clisp.org>
3893
3894         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
3895         implementations: glibc-2.4 and MacOS X 10.3.
3896         * tests/test-vasnprintf-posix.c (test_function): Test also the case
3897         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
3898         * tests/test-vasprintf-posix.c (test_function): Likewise.
3899
3900 2007-03-04  Bruno Haible  <bruno@clisp.org>
3901
3902         * modules/vasprintf-posix-tests: New file.
3903         * tests/test-vasprintf-posix.c: New file.
3904
3905         * modules/vasprintf-posix: New file.
3906         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
3907         defined.
3908         * m4/vasprintf-posix.m4: New file.
3909         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
3910         gl_FUNC_VASPRINTF.
3911         (gl_FUNC_VASPRINTF): Invoke it.
3912         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
3913         here.
3914         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
3915
3916 2007-03-04  Bruno Haible  <bruno@clisp.org>
3917
3918         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
3919         REPLACE_GETTIMEOFDAY.
3920         * modules/sys_time (Makefile.am): Likewise.
3921         * m4/sys_time_h.m4: Likewise.
3922         * m4/gettimeofday.m4: Likewise.
3923
3924 2007-03-04  Bruno Haible  <bruno@clisp.org>
3925
3926         * modules/vasnprintf-posix-tests: New file.
3927         * tests/test-vasnprintf-posix.c: New file.
3928
3929         * modules/vasnprintf-posix: New file.
3930         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
3931         printf-frexpl.h.
3932         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
3933         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
3934         REPLACE_VASNPRINTF is defined.
3935         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
3936         gl_FUNC_VASNPRINTF.
3937         (gl_FUNC_VASNPRINTF): Invoke it.
3938         * m4/vasnprintf-posix.m4: New file.
3939         * m4/printf.m4: New file.
3940
3941 2007-03-04  Bruno Haible  <bruno@clisp.org>
3942
3943         Compile progreloc.c only if --enable-relocatable is specified.
3944         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
3945         if --enable-relocatable was specified.
3946         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
3947         lib_SOURCES.
3948
3949 2007-03-04  Jim Meyering  <jim@meyering.net>
3950
3951         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
3952         Use it consistently, rather than enumerating errno constants.
3953
3954 2007-03-04  Bruno Haible  <bruno@clisp.org>
3955
3956         * modules/xvasprintf-tests: New file.
3957         * tests/test-xvasprintf.c: New file.
3958
3959         * modules/vasprintf-tests: New file.
3960         * tests/test-vasprintf.c: New file.
3961
3962         * modules/vasnprintf-tests: New file.
3963         * tests/test-vasnprintf.c: New file.
3964
3965         * modules/vsnprintf-tests: New file.
3966         * tests/test-vsnprintf.c: New file.
3967
3968         * modules/snprintf-tests: New file.
3969         * tests/test-snprintf.c: New file.
3970
3971 2007-03-04  Bruno Haible  <bruno@clisp.org>
3972
3973         Compile relocatable.c only if --enable-relocatable is specified.
3974         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
3975         gl_RELOCATABLE_LIBRARY.
3976         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
3977         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
3978         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
3979         gl_RELOCATABLE_LIBRARY.
3980         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
3981         (Makefile.am): Remove lib_SOURCES.
3982         * modules/relocatable-lib-lgpl (configure.ac): Invoke
3983         gl_RELOCATABLE_LIBRARY.
3984         (Makefile.am): Remove lib_SOURCES.
3985         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
3986         always.
3987         * modules/relocatable-prog-wrapper (configure.ac): Invoke
3988         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
3989
3990 2007-03-04  Bruno Haible  <bruno@clisp.org>
3991
3992         * modules/argmatch-tests: New file.
3993         * tests/test-argmatch.c: New file.
3994
3995         * tests/test-allocsa.c (main): Halve the number of loop runs.
3996
3997         * modules/alloca-opt-tests: New file.
3998         * tests/test-alloca-opt.c: New file.
3999
4000 2007-03-04  Jim Meyering  <jim@meyering.net>
4001
4002         Work around difference between Linux ACLs and Solaris 10 ZFS.
4003         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
4004         for EINVAL.
4005
4006 2007-03-03  Bruno Haible  <bruno@clisp.org>
4007
4008         * modules/relocatable-prog (Depends-on): Add back progreloc's
4009         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
4010
4011 2007-03-03  Bruno Haible  <bruno@clisp.org>
4012
4013         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
4014         * modules/relocatable-lib: New file.
4015
4016 2007-03-03  Bruno Haible  <bruno@clisp.org>
4017
4018         * modules/relocatable-prog: Renamed from modules/relocatable.
4019         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
4020
4021 2007-03-03  Bruno Haible  <bruno@clisp.org>
4022
4023         * modules/relocatable-script (Files): Add doc/relocatable.texi,
4024         m4/relocatable-lib.m4.
4025         (Depends-on): Remove 'relocatable'.
4026         (configure.ac): Add gl_RELOCATABLE_NOP.
4027
4028 2007-03-03  Bruno Haible  <bruno@clisp.org>
4029
4030         * modules/relocatable-prog-wrapper: New file.
4031         * modules/relocatable (Depends-on): Add it. Remove all other
4032         dependencies except progname.
4033         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
4034
4035         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
4036         (gl_FUNC_STRERROR): Nop.
4037         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
4038
4039         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
4040         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
4041
4042         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
4043         (gl_FUNC_READLINK): Update.
4044
4045         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
4046
4047 2007-03-03  Bruno Haible  <bruno@clisp.org>
4048
4049         * lib/xreadlink.c: Include <unistd.h> unconditionally.
4050         * modules/xreadlink (Depends-on): Add unistd.
4051         * modules/xreadlink-with-size (Depends-on): Likewise.
4052
4053 2007-03-03  Bruno Haible  <bruno@clisp.org>
4054
4055         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
4056         extracted from gt_FUNC_SETENV.
4057         (gt_FUNC_SETENV): Remove macro.
4058         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
4059         remove gt_FUNC_SETENV.
4060
4061 2007-03-03  Bruno Haible  <bruno@clisp.org>
4062
4063         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
4064         ENABLE_RELOCATABLE here.
4065         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
4066
4067 2007-03-03  Bruno Haible  <bruno@clisp.org>
4068
4069         * modules/rbtreehash-list-tests (Depends-on): Add progname.
4070         * tests/test-rbtreehash_list.c: Include progname.h.
4071         (main): Call set_program_name.
4072
4073         * modules/rbtree-oset-tests (Depends-on): Add progname.
4074         * tests/test-rbtree_oset.c: Include progname.h.
4075         (main): Call set_program_name.
4076
4077         * modules/rbtree-list-tests (Depends-on): Add progname.
4078         * tests/test-rbtree_list.c: Include progname.h.
4079         (main): Call set_program_name.
4080
4081         * modules/linked-list-tests (Depends-on): Add progname.
4082         * tests/test-linked_list.c: Include progname.h.
4083         (main): Call set_program_name.
4084
4085 2007-03-03  Bruno Haible  <bruno@clisp.org>
4086
4087         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
4088         All uses of __restrict changed to _Restrict_.
4089         * lib/glob_.h (__restrict): Remove macro.
4090
4091 2007-03-02  Bruno Haible  <bruno@clisp.org>
4092
4093         * modules/gettext (configure.ac): Require gettext infrastructure
4094         from version 0.16.1.
4095
4096 2007-03-02  Bruno Haible  <bruno@clisp.org>
4097
4098         * modules/linkedhash-list-tests (Depends-on): Add progname.
4099         * tests/test-linkedhash_list.c: Include progname.h.
4100         (main): Call set_program_name.
4101
4102         * modules/carray-list-tests (Depends-on): Add progname.
4103         * tests/test-carray_list.c: Include progname.h.
4104         (main): Call set_program_name.
4105
4106         * modules/avltreehash-list-tests (Depends-on): Add progname.
4107         * tests/test-avltreehash_list.c: Include progname.h.
4108         (main): Call set_program_name.
4109
4110         * modules/avltree-oset-tests (Depends-on): Add progname.
4111         * tests/test-avltree_oset.c: Include progname.h.
4112         (main): Call set_program_name.
4113
4114         * modules/avltree-list-tests (Depends-on): Add progname.
4115         * tests/test-avltree_list.c: Include progname.h.
4116         (main): Call set_program_name.
4117
4118         * modules/array-oset-tests (Depends-on): Add progname.
4119         * tests/test-array_oset.c: Include progname.h.
4120         (main): Call set_program_name.
4121
4122         * modules/array-list-tests (Depends-on): Add progname.
4123         * tests/test-array_list.c: Include progname.h.
4124         (main): Call set_program_name.
4125
4126         * modules/argp-tests (Depends-on): Add progname.
4127         * tests/test-argp.c: Include argp.h first. Include progname.h.
4128         (main): Call set_program_name.
4129
4130 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
4131
4132         * doc/gnulib-tool.texi (Initial import): Reword description of
4133         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
4134         limited effect even if defined after the first system include.
4135
4136 2007-03-01  Bruno Haible  <bruno@clisp.org>
4137
4138         * build-aux/config.libpath: Update to libtool-1.5.22.
4139         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
4140
4141 2007-03-01  Bruno Haible  <bruno@clisp.org>
4142
4143         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
4144         foo_CFLAGS.
4145         Reported by Ralf Wildenhues.
4146
4147 2007-03-01  Bruno Haible  <bruno@clisp.org>
4148
4149         * build-aux/install-reloc: Remove object files left over by some
4150         compilers.
4151         Reported by Ralf Wildenhues.
4152
4153 2007-03-01  Bruno Haible  <bruno@clisp.org>
4154
4155         * build-aux/install-reloc: Break long lines.
4156
4157 2007-03-01  Bruno Haible  <bruno@clisp.org>
4158
4159         * doc/relocatable.texi: Document that it may not work on OpenBSD.
4160         Reported by Ralf Wildenhues.
4161
4162 2007-03-01  Bruno Haible  <bruno@clisp.org>
4163
4164         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
4165         include ordering constraints.
4166
4167 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
4168
4169         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
4170         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
4171         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
4172         as another example.
4173         * lib/time_.h: Fix misspelling.
4174         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
4175         Require gl_HEADER_TIME_H_DEFAULTS.
4176         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
4177         * m4/time_r.m4 (gl_TIME_R): Likewise.
4178         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
4179
4180 2007-03-01  Bruno Haible  <bruno@clisp.org>
4181
4182         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
4183         * m4/utimens.m4 (gl_UTIMENS): Likewise.
4184
4185 2007-03-01  Jim Meyering  <jim@meyering.net>
4186
4187         * modules/xreadlink (Maintainer): Add my name.
4188         * modules/xreadlink-with-size (Depends-on): Alphabetize.
4189
4190 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
4191             Bruno Haible  <bruno@clisp.org>
4192
4193         * build-aux/install-reloc: Compile also c-ctype.c.
4194         * build-aux/relocatable.sh.in: New file.
4195         * doc/relocatable.texi: New file.
4196         * doc/relocatable-maint.texi: New file.
4197         * doc/gnulib.texi: Include relocatable-maint.texi.
4198         * lib/progreloc.c: Include unistd.h unconditionally.
4199         * lib/relocwrapper.c: Include unistd.h unconditionally.
4200         Include c-ctype.h.
4201         (add_dotbin): Use c_tolower.
4202         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
4203         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
4204         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
4205         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
4206         to m4/relocatable-lib.m4.
4207         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
4208         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
4209         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
4210         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
4211         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
4212         * modules/relocatable: New file.
4213         * modules/relocatable-lib: New file.
4214         * modules/relocatable-script: New file.
4215
4216 2007-02-28  Bruno Haible  <bruno@clisp.org>
4217
4218         Import --enable-relocatable infrastructure.
4219         * build-aux/config.libpath: New file, from GNU gettext.
4220         * build-aux/install-reloc: New file, from GNU gettext.
4221         * build-aux/reloc-ldflags: New file, from GNU gettext.
4222         * lib/relocatable.h: New file, from GNU gettext.
4223         * lib/relocatable.c: New file, from GNU gettext.
4224         * lib/relocwrapper.c: New file, from GNU gettext.
4225         * m4/relocatable.m4: New file, from GNU gettext.
4226
4227 2007-02-28  Bruno Haible  <bruno@clisp.org>
4228
4229         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
4230
4231         * modules/xreadlink: New file, from GNU gettext with modifications.
4232         * lib/xreadlink.c: New file, from GNU gettext.
4233         * lib/xreadlink.h: Add comments.
4234         (xreadlink): New declaration.
4235
4236         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
4237         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
4238         lib/xreadlink-with-size.c.
4239         (configure.ac): Remove gl_XREADLINK invocation.
4240         (Makefile.am): Augment lib_SOURCES.
4241         * m4/xreadlink.m4: Remove file.
4242         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
4243         (xreadlink_with_size): Renamed from xreadink.
4244         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
4245         * modules/canonicalize (Depends-on): Replace xreadlink with
4246         xreadlink-with-size.
4247         * lib/canonicalize.c (canonicalize_filename_mode): Update.
4248
4249 2007-02-25  Jim Meyering  <jim@meyering.net>
4250
4251         * build-aux/announce-gen: When complaining about excess arguments,
4252         list them.
4253
4254 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
4255
4256         * README: Document signed integer overflow situation more
4257         accurately.
4258
4259 2007-02-25  Bruno Haible  <bruno@clisp.org>
4260
4261         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
4262         'a' or 'A' conversion.
4263
4264 2007-02-25  Bruno Haible  <bruno@clisp.org>
4265
4266         * modules/filename: Renamed from modules/pathname.
4267         (Files): Replace lib/pathname.h with lib/filename.h. Replace
4268         lib/concatpath.c with lib/concat-filename.c.
4269         (Makefile.am): Update.
4270         (Include): Replace pathname.h with filename.h.
4271         * lib/filename.h: Renamed from lib/pathname.h.
4272         (concatenated_filename): Renamed from concatenated_pathname.
4273         * lib/concat-filename.c: Renamed from lib/concatpath.c.
4274         (concatenated_filename): Renamed from concatenated_pathname.
4275         * lib/findprog.c: Include filename.h instead of pathname.h.
4276         (find_in_path): Update.
4277         * lib/javacomp.c: Include filename.h instead of pathname.h.
4278         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
4279         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
4280         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
4281         is_oldgcj_14_13_usable, is_javac_usable): Update.
4282         * lib/javaexec.c: Include filename.h instead of pathname.h.
4283         (execute_java_class): Update.
4284         * modules/findprog: Update.
4285         * modules/javacomp: Update.
4286         * modules/javaexec: Update.
4287         * MODULES.html.sh (File system functions): Add 'filename', remove
4288         'pathname'.
4289
4290 2007-02-25  Bruno Haible  <bruno@clisp.org>
4291
4292         * modules/printf-frexpl-tests: New file.
4293         * tests/test-printf-frexpl.c: New file.
4294
4295         * modules/printf-frexpl: New file.
4296         * lib/printf-frexpl.h: New file.
4297         * lib/printf-frexpl.c: New file.
4298         * m4/printf-frexpl.m4: New file.
4299
4300 2007-02-25  Bruno Haible  <bruno@clisp.org>
4301
4302         * modules/printf-frexp-tests: New file.
4303         * tests/test-printf-frexp.c: New file.
4304
4305         * modules/printf-frexp: New file.
4306         * lib/printf-frexp.h: New file.
4307         * lib/printf-frexp.c: New file.
4308         * m4/printf-frexp.m4: New file.
4309
4310 2007-02-25  Bruno Haible  <bruno@clisp.org>
4311
4312         Assume automake >= 1.10 for the tests.
4313         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
4314         * modules/arctwo-tests: Likewise.
4315         * modules/argp-tests: Likewise.
4316         * modules/avltree-list-tests: Likewise.
4317         * modules/avltree-oset-tests: Likewise.
4318         * modules/avltreehash-list-tests: Likewise.
4319         * modules/carray-list-tests: Likewise.
4320         * modules/crc-tests: Likewise.
4321         * modules/des-tests: Likewise.
4322         * modules/gc-arcfour-tests: Likewise.
4323         * modules/gc-arctwo-tests: Likewise.
4324         * modules/gc-des-tests: Likewise.
4325         * modules/gc-hmac-md5-tests: Likewise.
4326         * modules/gc-hmac-sha1-tests: Likewise.
4327         * modules/gc-md2-tests: Likewise.
4328         * modules/gc-md4-tests: Likewise.
4329         * modules/gc-md5-tests: Likewise.
4330         * modules/gc-pbkdf2-sha1-tests: Likewise.
4331         * modules/gc-rijndael-tests: Likewise.
4332         * modules/gc-sha1-tests: Likewise.
4333         * modules/gc-tests: Likewise.
4334         * modules/getaddrinfo-tests: Likewise.
4335         * modules/hmac-md5-tests: Likewise.
4336         * modules/hmac-sha1-tests: Likewise.
4337         * modules/linked-list-tests: Likewise.
4338         * modules/linkedhash-list-tests: Likewise.
4339         * modules/lock-tests: Likewise.
4340         * modules/md2-tests: Likewise.
4341         * modules/md4-tests: Likewise.
4342         * modules/md5-tests: Likewise.
4343         * modules/rbtree-list-tests: Likewise.
4344         * modules/rbtree-oset-tests: Likewise.
4345         * modules/rbtreehash-list-tests: Likewise.
4346         * modules/read-file-tests: Likewise.
4347         * modules/rijndael-tests: Likewise.
4348         * modules/stdint-tests: Likewise.
4349         * modules/tls-tests: Likewise.
4350
4351 2007-02-24  Bruno Haible  <bruno@clisp.org>
4352
4353         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
4354         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
4355         function; instead check whether isnan with a double argument links.
4356         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
4357         function; instead check whether isnan with a 'long double' argument
4358         links.
4359         Reported by Eric Blake <ebb9@byu.net>.
4360
4361 2007-02-24  Bruno Haible  <bruno@clisp.org>
4362
4363         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
4364         defined.
4365         * lib/isnanl.c: Remove all code. Just include isnan.c.
4366         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
4367
4368 2007-02-25  Jim Meyering  <jim@meyering.net>
4369
4370         Avoid conflicting types for 'unsetenv' on FreeBSD.
4371         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
4372         conflicting with FreeBSD's (5.0 and 6.1) function declaration
4373         in stdlib.h.
4374
4375 2007-02-24  Bruno Haible  <bruno@clisp.org>
4376
4377         * modules/isnanl-nolibm-tests: New file.
4378         * tests/test-isnanl.c: New file.
4379
4380         * modules/isnanl-nolibm: New file.
4381         * lib/isnanl.h: New file.
4382         * lib/isnanl.c: New file.
4383         * m4/isnanl.m4: New file.
4384
4385 2007-02-24  Bruno Haible  <bruno@clisp.org>
4386
4387         * modules/isnan-nolibm-tests: New file.
4388         * tests/test-isnan.c: New file.
4389
4390         * modules/isnan-nolibm: New file.
4391         * lib/isnan.h: New file.
4392         * lib/isnan.c: New file.
4393         * m4/isnan.m4: New file.
4394
4395 2007-02-24  Bruno Haible  <bruno@clisp.org>
4396
4397         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
4398         assume that an exponent fits in 20 bits.
4399
4400 2007-02-24  Jim Meyering  <jim@meyering.net>
4401
4402         * m4/regex.m4: Update the description of the configure-time option,
4403         --without-included-regex, to state accurately what the defaults are,
4404         and perhaps to give people an idea why using this option is risky.
4405
4406 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
4407
4408         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
4409         loops on small arguments.  This attempts to avoid the problem
4410         Bruno Haible reported for AIX 4.3.2 in
4411         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
4412
4413 2007-02-23  Bruno Haible  <bruno@clisp.org>
4414
4415         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
4416         Needed for help2man.
4417
4418 2007-02-23  Karl Berry  <karl@gnu.org>
4419
4420         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
4421         exists, foo.h should be cvs-ignored, not committed.
4422
4423 2007-02-23  Eric Blake  <ebb9@byu.net>
4424
4425         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
4426         * lib/stat-time.h (includes): Likewise.
4427         * lib/utimecmp.c (includes): Likewise.
4428         * lib/utimens.h (includes): Likewise.
4429         * lib/getdate.y (includes): Also include "timespec.h" for use
4430         internal to the module.
4431         * modules/utimens (Depends-on): Revert yesterday's patch.
4432         * modules/nanosleep (Depends-on): Add missing dependency.
4433
4434 2007-02-22  Bruno Haible  <bruno@clisp.org>
4435
4436         * lib/glob.c: Don't include getlogin_r.h.
4437
4438 2007-02-22  Jim Meyering  <jim@meyering.net>
4439
4440         * modules/utimens (Depends-on): Add timespec, required for
4441         utimens.h's inclusion of timespec.h.
4442
4443 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
4444
4445         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
4446         long unreadable paths in GNU/Linux.  Problem reported by Andreas
4447         Schwab in
4448         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
4449         I'll try to think of a better way to fix the Solaris problem.
4450
4451         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
4452         like glibc; on Solaris 10, it fails with errno == EINVAL.
4453         POSIX says the behavior is unspecified if the first argument is NULL,
4454         so play it safe and never pass NULL to the system getcwd.
4455
4456 2007-02-21  Jim Meyering  <jim@meyering.net>
4457
4458         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
4459         of gettimeofday.  It would conflict with the one now always
4460         provided via sys_time_.h.  Reported by Matthew Woehlke, as
4461         an IRIX 6.5 build failure.
4462
4463 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
4464
4465         Minor fixups to port to Solaris 10 with Sun C 5.8.
4466         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
4467         * modules/getcwd (Depends-on): Add dirfd.
4468         * lib/putenv.c (putenv): #undef it.
4469         (rpl_putenv): New decl.
4470         (malloc, free): Include <stdlib.h> rather than prototyping separately.
4471
4472 2007-02-20  Bruno Haible  <bruno@clisp.org>
4473
4474         * modules/stdio-tests: New file.
4475         * tests/test-stdio.c: New file.
4476
4477         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
4478         (Depends-on): Add stdio.
4479         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
4480         (Include): Use <stdio.h> instead of vsnprintf.h.
4481         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
4482         HAVE_DECL_VSNPRINTF.
4483         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
4484
4485         * modules/snprintf (Files): Remove lib/snprintf.h.
4486         (Depends-on): Add stdio.
4487         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
4488         (Include): Use <stdio.h> instead of snprintf.h.
4489         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
4490         HAVE_DECL_SNPRINTF.
4491         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
4492         * lib/getaddrinfo.c: Likewise.
4493
4494         * modules/stdio: New file.
4495         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
4496         * lib/snprintf.h: Remove file.
4497         * lib/vsnprintf.h: Remove file.
4498         * lib/.cppi-disable: Remove snprintf.h.
4499         * m4/stdio_h.m4: New file.
4500         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
4501
4502 2007-02-20  Jim Meyering  <jim@meyering.net>
4503
4504         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
4505         used by e.g., mingw.  From Bruno Haible.
4506
4507 2007-02-19  Bruno Haible  <bruno@clisp.org>
4508
4509         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
4510         warnings.
4511         Reported by Ben Pfaff <blp@cs.stanford.edu>.
4512
4513 2007-02-19  Bruno Haible  <bruno@clisp.org>
4514
4515         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
4516         from mingw users.
4517
4518 2007-02-19  Bruno Haible  <bruno@clisp.org>
4519
4520         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
4521         warnings.
4522         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
4523
4524 2007-02-19  Jim Meyering  <jim@meyering.net>
4525
4526         Don't use FD after a successful "fdopendir (fd)".
4527         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
4528         Reset it by calling dirfd on the just-obtained DIR*.
4529
4530         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
4531         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
4532
4533 2007-02-18  Bruno Haible  <bruno@clisp.org>
4534
4535         * lib/readlink.c: Include <unistd.h>.
4536         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
4537         HAVE_READLINK.
4538         * modules/readlink (Depends-on): Add unistd.
4539         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4540         (Include): Add <unistd.h>.
4541
4542         * lib/getlogin_r.h: Remove file.
4543         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
4544         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
4545         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
4546         HAVE_DECL_GETLOGIN_R.
4547         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
4548         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4549         (Include): Use <unistd.h> instead of getlogin_r.h.
4550
4551         * lib/getcwd.h: Remove file.
4552         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
4553         * lib/xgetcwd.c: Likewise.
4554         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
4555         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
4556         * modules/getcwd (Files): Remove lib/getcwd.h.
4557         (Depends-on): Add unistd.
4558         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4559         (Include): Use <unistd.h> instad of getcwd.h.
4560
4561         * lib/ftruncate.c: Include <unistd.h> first.
4562         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
4563         Set HAVE_FTRUNCATE.
4564         * modules/ftruncate (Depends-on): Add unistd.
4565         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4566
4567         * lib/fchdir.c: Include <unistd.h> first.
4568         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
4569         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
4570         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
4571         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4572         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
4573
4574         * lib/dup2.c: Include <unistd.h> first.
4575         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
4576         HAVE_DUP2.
4577         * modules/dup2 (Depends-on): Add unistd.
4578         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4579
4580         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
4581         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
4582         REPLACE_CHOWN. Don't define chown as a macro here.
4583         * modules/chown (Depends-on): Add unistd.
4584         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
4585
4586         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
4587         Add definition for GL_LINK_WARNING.
4588         (chown, dup2): New declarations.
4589         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
4590         link warning.
4591         (ftruncate): New declaration.
4592         (getcwd): New declaration, taken from old getcwd.h.
4593         (getlogin_r): New declaration, taken from old getlogin_r.h.
4594         (readlink): New declaration.
4595         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
4596         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
4597         (gl_PREREQ_UNISTD): Remove macro.
4598         (gl_UNISTD_MODULE_INDICATOR): New macro.
4599         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
4600         many new variables. Don't set UNISTD_H.
4601         * modules/unistd (Description): Change.
4602         (Depends-on): Add link-warning.
4603         (configure.ac): Update.
4604         (Makefile.am): Create unistd.h always. Substitute many new variables
4605         into it.
4606
4607 2007-02-18  Bruno Haible  <bruno@clisp.org>
4608
4609         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
4610         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
4611         HAVE_GETSUBOPT.
4612         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
4613         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
4614         * lib/getsubopt.h: Remove file.
4615         * modules/getsubopt (Files): Remove lib/getsubopt.h.
4616         (Depends-on): Add stdlib.
4617         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4618         (Includes): Use <stdlib.h> instead of getsubopt.h.
4619         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
4620         Set HAVE_GETSUBOPT.
4621         * lib/getsubopt.c: Don't include getsubopt.h.
4622
4623 2007-02-18  Bruno Haible  <bruno@clisp.org>
4624
4625         * modules/fchdir (Depends-on): Add dup2.
4626
4627 2007-02-18  Bruno Haible  <bruno@clisp.org>
4628
4629         * lib/stdlib_.h: Handle glibc's special invocation convention
4630         specially.
4631
4632 2007-02-18  Bruno Haible  <bruno@clisp.org>
4633
4634         * modules/stdlib-tests: New file.
4635         * tests/test-stdlib.c: New file.
4636
4637         * modules/mkstemp (Files): Remove lib/mkstemp.h.
4638         (Depends-on): Add stdlib.
4639         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4640         (Includes): Use <stdlib.h> instead of mkstemp.h.
4641         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
4642         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
4643         * lib/mkstemp.c: Don't include mkstemp.h.
4644         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
4645         * lib/stdlib--.h: Don't include mkstemp.h.
4646
4647         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
4648         (Depends-on): Add stdlib.
4649         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
4650         (Includes): Use <stdlib.h> instead of mkdtemp.h.
4651         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
4652         HAVE_MKDTEMP.
4653         * lib/mkdtemp.c: Don't include mkdtemp.h.
4654         * lib/clean-temp.c: Don't include mkdtemp.h.
4655
4656         * modules/exit (Files): Remove lib/exit.h.
4657         (Depends-on): Add stdlib.
4658         (Makefile.am): Remove lib_SOURCES.
4659         (Include): Use <stdlib.h> instead of exit.h.
4660         * lib/argmatch.c: Don't include exit.h.
4661         * lib/execute.c: Likewise.
4662         * lib/pagealign_alloc.c: Likewise.
4663         * lib/pipe.c: Likewise.
4664         * lib/wait-process.c: Likewise.
4665         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
4666         * lib/exitfail.c: Likewise.
4667         * lib/savewd.c: Likewise.
4668         * lib/xsetenv.c: Likewise.
4669
4670         * modules/stdlib: New file.
4671         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
4672         and extra comments about mkstemp().
4673         * lib/exit.h: Remove file.
4674         * lib/mkdtemp.h: Remove file.
4675         * lib/mkstemp.h: Remove file.
4676         * m4/stdlib_h.m4: New file.
4677         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
4678
4679 2007-02-18  Bruno Haible  <bruno@clisp.org>
4680
4681         * modules/math-tests: New file.
4682         * tests/test-math.c: New file.
4683
4684         * modules/math: New file.
4685         * modules/mathl (Files): Remove lib/mathl.h.
4686         (Depends-on): Add math.
4687         (Makefile.am): Don't mention mathl.h.
4688         (Include): Use <math.h> instead of mathl.h.
4689         * lib/math_.h: New file.
4690         * lib/mathl.h: Remove file.
4691         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
4692         mathl.h.
4693         * lib/asinl.c: Likewise.
4694         * lib/atanl.c: Likewise.
4695         * lib/ceill.c: Likewise.
4696         * lib/cosl.c: Likewise.
4697         * lib/expl.c: Likewise.
4698         * lib/floorl.c: Likewise.
4699         * lib/frexpl.c: Likewise.
4700         * lib/ldexpl.c: Likewise.
4701         * lib/logl.c: Likewise.
4702         * lib/sincosl.c: Likewise.
4703         * lib/sinl.c: Likewise.
4704         * lib/sqrtl.c: Likewise.
4705         * lib/tanl.c: Likewise.
4706         * lib/trigl.c: Likewise.
4707         * m4/math_h.m4: New file.
4708         * MODULES.html.sh (Mathematics): Add math.
4709
4710 2007-02-17  Bruno Haible  <bruno@clisp.org>
4711
4712         * modules/wctype-tests: New file.
4713         * tests/test-wctype.c: New file.
4714
4715         * modules/wchar-tests: New file.
4716         * tests/test-wchar.c: New file.
4717
4718         * modules/unistd-tests: New file.
4719         * tests/test-unistd.c: New file.
4720
4721         * modules/time-tests: New file.
4722         * tests/test-time.c: New file.
4723
4724         * modules/sysexits-tests: New file.
4725         * tests/test-sysexits.c: New file.
4726
4727         * modules/sys_time-tests: New file.
4728         * tests/test-sys_time.c: New file.
4729
4730         * modules/sys_stat-tests: New file.
4731         * tests/test-sys_stat.c: New file.
4732
4733         * modules/sys_socket-tests: New file.
4734         * tests/test-sys_socket.c: New file.
4735
4736         * modules/sys_select-tests: New file.
4737         * tests/test-sys_select.c: New file.
4738
4739         * modules/string-tests: New file.
4740         * tests/test-string.c: New file.
4741
4742         * modules/stdbool-tests: New file.
4743         * tests/test-stdbool.c: New file.
4744
4745         * modules/netinet_in-tests: New file.
4746         * tests/test-netinet_in.c: New file.
4747
4748         * modules/inttypes-tests: New file.
4749         * tests/test-inttypes.c: New file.
4750
4751         * modules/fcntl-tests: New file.
4752         * tests/test-fcntl.c: New file.
4753
4754         * modules/byteswap-tests: New file.
4755         * tests/test-byteswap.c: New file.
4756
4757         * modules/arpa_inet-tests: New file.
4758         * tests/test-arpa_inet.c: New file.
4759
4760 2007-02-17  Bruno Haible  <bruno@clisp.org>
4761
4762         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
4763         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
4764         if the corresponding module is not enabled. Emit link warnings if
4765         the function is used nevertheless.
4766         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
4767         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
4768         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
4769         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
4770         * modules/inttypes (Depends-on): Add link-warning.
4771         (Makefile.am): Copy the contents of build-aux/link-warning.h into
4772         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
4773         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
4774         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
4775         * modules/imaxdiv (configure.ac): Likewise.
4776         * modules/strtoimax (configure.ac): Likewise.
4777         * modules/strtoumax (configure.ac): Likewise.
4778
4779 2007-02-17  Bruno Haible  <bruno@clisp.org>
4780
4781         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
4782         gl_STRING_MODULE_INDICATOR_DEFAULTS.
4783         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
4784         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
4785
4786 2007-02-17  Bruno Haible  <bruno@clisp.org>
4787
4788         * modules/link-warning: New file.
4789         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
4790         * lib/string_.h (GL_LINK_WARNING): Remove definition.
4791         * modules/string (Depends-on): Add link-warning.
4792         (Makefile.am): Copy the contents of build-aux/link-warning.h into
4793         string.h.
4794         * MODULES.html.sh (Support for building libraries and executables): Add
4795         link-warning.
4796
4797 2007-02-17  Bruno Haible  <bruno@clisp.org>
4798
4799         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
4800         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
4801         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
4802         long lines.
4803
4804 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
4805             Bruno Haible  <bruno@clisp.org>
4806
4807         * modules/tmpfile: New file.
4808         * lib/tmpfile.c: New file.
4809         * m4/tmpfile.m4: New file.
4810         * MODULES.html.sh (func_all_modules): New section "Input/output".
4811
4812 2007-02-15  Bruno Haible  <bruno@clisp.org>
4813
4814         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
4815         (supports_delete_on_close): New function.
4816         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
4817
4818 2007-02-14  Bruno Haible  <bruno@clisp.org>
4819
4820         * modules/mbspcasecmp-tests: New file.
4821         * tests/test-mbspcasecmp.sh: New file.
4822         * tests/test-mbspcasecmp.c: New file.
4823
4824         New module mbspcasecmp.
4825         * modules/mbspcasecmp: New file.
4826         * lib/mbspcasecmp.c: New file.
4827         * lib/string_.h (strncasecmp): Change warning message.
4828         (mbspcasecmp): New declaration.
4829         * m4/mbspcasecmp.m4: New file.
4830         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4831         GNULIB_MBSPCASECMP.
4832         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
4833         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
4834
4835 2007-02-14  Bruno Haible  <bruno@clisp.org>
4836
4837         * modules/mbsncasecmp-tests: New file.
4838         * tests/test-mbsncasecmp.sh: New file.
4839         * tests/test-mbsncasecmp.c: New file.
4840
4841         New module mbsncasecmp.
4842         * modules/mbsncasecmp: New file.
4843         * lib/mbsncasecmp.c: New file.
4844         * lib/string_.h (mbsncasecmp): New declaration.
4845         * m4/mbsncasecmp.m4: New file.
4846         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
4847         GNULIB_MBSNCASECMP.
4848         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
4849         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
4850
4851 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
4852
4853         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
4854         Verify that it doesn't overlap with our flags.
4855         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
4856         do not have the desired effect in multibyte locales; instead, use
4857         mbscasecmp.
4858         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
4859         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
4860         we don't require GNU fnmatch ourselves (if our users require it, they
4861         should do so explicitly).
4862
4863         Fix regex code so it doesn't rely on strcasecmp.
4864         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
4865         Otherwise, include gnulib's langinfo.h.
4866         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
4867         undesirable behavior in non-C locales.  Instead, rely on localecharset.
4868         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
4869         * modules/regex (FILES): Remove m4/codeset.m4.
4870         (Depends-on): Add localcharset.  Remove strcase.
4871
4872 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4873
4874         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
4875         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
4876
4877 2007-02-13  Bruno Haible  <bruno@clisp.org>
4878
4879         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
4880         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4881
4882 2007-02-12  Bruno Haible  <bruno@clisp.org>
4883
4884         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
4885         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
4886         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
4887         time warning rather than a link error.
4888
4889 2007-02-12  Bruno Haible  <bruno@clisp.org>
4890
4891         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
4892         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
4893         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4894
4895 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
4896
4897         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
4898         args, not 2.
4899
4900 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
4901
4902         New module 'time', so that apps can include <time.h> as per
4903         POSIX and GNU instead of separate include files like time_r.h
4904         and timegm.h.  This implementation tries out a simpler approach
4905         for replacing decls in standard include files (as compared to
4906         the string module), somewhat as an experiment.
4907
4908         * config/srclist.txt: Comment out mktime.c for now.
4909         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
4910         since it doesn't apply any more.  Use generic wording instead.
4911         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
4912         'time'.
4913         * lib/time_.h, m4/time_h.m4, modules/time: New files.
4914         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
4915         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
4916         Don't include <sys/types.h>; no longer needed since we assume C89.
4917         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
4918         * lib/strftime.c: Likewise.
4919         * lib/time_r.c: Likewise.
4920         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
4921         * lib/nanosleep.c: Include <time.h> first, to check interface.
4922         * lib/strptime.c: Likewise.
4923         * lib/time_r.c: Likewise.
4924         * lib/timegm.c: Likewise.
4925         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
4926         needed.
4927         * lib/timegm.c: Don't include timegm.h; no longer needed.
4928         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
4929         time.h now handles any problems in that area.
4930         (struct timespec, nanosleep): Remove; time.h now arranges for these.
4931         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
4932         that time.h defines struct timespec.
4933         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
4934         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
4935         handles that.
4936         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
4937         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
4938         needed.  Set REPLACE_LOCALTIME.
4939         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
4940         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
4941         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
4942         nanosleep; time_h.m4 now does that.  Don't require
4943         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
4944         module handles this now.
4945         * modules/getdate (Depends-on): Remove timespec.  Add time.
4946         * modules/nanosleep (Depends-on): Likewise.
4947         * modules/stat-time (Depends-on): Likewise.
4948         * modules/nanosleep (Include): Include time.h, not timespec.h.
4949         * modules/strptime (Files): Remove lib/strptime.h.
4950         (Depends-on): Add extensions, time.
4951         (Include): Include time.h, not strptime.h.
4952         * modules/time_r (Files): Remove lib/time_r.h.
4953         (Depends-on): Add time.
4954         (Include): Include time.h, not time_r.h.
4955         * modules/timegm: Likewise.
4956         * modules/timespec (Description): Now does timespec-related decls
4957         of our own, instead of struct timespec itself.
4958         (Depends-on): Add time; remove extensions.
4959         (Maintainer): Add self.
4960         * modules/utimecmp (Depends-on): Add time; remove timespec.
4961         * modules/utimens (Depends-on): Likewise.
4962         * modules/xnanosleep (Depends-on): Likewise.
4963
4964 2007-02-11  Bruno Haible  <bruno@clisp.org>
4965
4966         * lib/c-strstr.c: Include allocsa.h.
4967         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
4968         * lib/c-strcasestr.c: Include allocsa.h.
4969         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
4970         * lib/strcasestr.c: Include allocsa.h.
4971         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
4972         * lib/mbsstr.c: Include allocsa.h.
4973         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
4974         allocsa/freesa instead of malloc/free.
4975         * lib/mbscasestr.c: Include allocsa.h.
4976         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
4977         allocsa/freesa instead of malloc/free.
4978         * modules/c-strstr (Depends-on): Add allocsa.
4979         * modules/c-strcasestr (Depends-on): Likewise.
4980         * modules/strcasestr (Depends-on): Likewise.
4981         * modules/mbsstr (Depends-on): Likewise.
4982         * modules/mbscasestr (Depends-on): Likewise.
4983
4984 2007-02-11  Bruno Haible  <bruno@clisp.org>
4985
4986         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
4987
4988         * modules/mbsspn-tests: New file.
4989         * tests/test-mbsspn.sh: New file.
4990         * tests/test-mbsspn.c: New file.
4991
4992 2007-02-11  Bruno Haible  <bruno@clisp.org>
4993
4994         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
4995
4996         * modules/mbspbrk-tests: New file.
4997         * tests/test-mbspbrk.sh: New file.
4998         * tests/test-mbspbrk.c: New file.
4999
5000 2007-02-11  Bruno Haible  <bruno@clisp.org>
5001
5002         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
5003         unneeded cast.
5004
5005         * modules/mbscspn-tests: New file.
5006         * tests/test-mbscspn.sh: New file.
5007         * tests/test-mbscspn.c: New file.
5008
5009 2007-02-11  Bruno Haible  <bruno@clisp.org>
5010
5011         * modules/mbscasecmp-tests: New file.
5012         * tests/test-mbscasecmp.sh: New file.
5013         * tests/test-mbscasecmp.c: New file.
5014
5015 2007-02-11  Bruno Haible  <bruno@clisp.org>
5016
5017         Ensure O(n) worst-case complexity of mbscasestr.
5018         * lib/mbscasestr.c: Include stdbool.h.
5019         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5020         functions.
5021         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
5022         the bookkeeping indicates that it's worth it.
5023         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
5024
5025         * modules/mbscasestr-tests: New file.
5026         * tests/test-mbscasestr1.c: New file.
5027         * tests/test-mbscasestr2.sh: New file.
5028         * tests/test-mbscasestr2.c: New file.
5029         * tests/test-mbscasestr3.sh: New file.
5030         * tests/test-mbscasestr3.c: New file.
5031         * tests/test-mbscasestr4.sh: New file.
5032         * tests/test-mbscasestr4.c: New file.
5033         * m4/locale-tr.m4: New file.
5034
5035 2007-02-11  Bruno Haible  <bruno@clisp.org>
5036
5037         Ensure O(n) worst-case complexity of mbsstr.
5038         * lib/mbsstr.c: Include stdbool.h.
5039         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
5040         functions.
5041         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
5042         bookkeeping indicates that it's worth it.
5043         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
5044
5045         * modules/mbsstr-tests: New file.
5046         * tests/test-mbsstr1.c: New file.
5047         * tests/test-mbsstr2.sh: New file.
5048         * tests/test-mbsstr2.c: New file.
5049         * tests/test-mbsstr3.sh: New file.
5050         * tests/test-mbsstr3.c: New file.
5051         * m4/locale-fr.m4: New file.
5052
5053 2007-02-11  Bruno Haible  <bruno@clisp.org>
5054
5055         * lib/mbsrchr.c (mbsrchr): Fix bug.
5056
5057         * modules/mbsrchr-tests: New file.
5058         * tests/test-mbsrchr.sh: New file.
5059         * tests/test-mbsrchr.c: New file.
5060
5061 2007-02-11  Bruno Haible  <bruno@clisp.org>
5062
5063         * lib/mbschr.c (mbschr): Fix bug.
5064
5065         * modules/mbschr-tests: New file.
5066         * tests/test-mbschr.sh: New file.
5067         * tests/test-mbschr.c: New file.
5068         * m4/locale-zh.m4: New file.
5069
5070 2007-02-11  Bruno Haible  <bruno@clisp.org>
5071
5072         Support for copying multibyte string iterators.
5073         * lib/mbiter.h: Include <string.h>.
5074         (mbiter_multi_copy): New function.
5075         (mbi_copy): New macro.
5076         * lib/mbuiter.h: Include <string.h>.
5077         (mbuiter_multi_copy): New function.
5078         (mbui_copy): New macro.
5079
5080 2007-02-11  Bruno Haible  <bruno@clisp.org>
5081
5082         New module mbslen.
5083         * modules/mbslen: New file.
5084         * lib/mbslen.c: New file.
5085         * lib/string_.h (mbslen): New declaration.
5086         * m4/mbslen.m4: New file.
5087         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5088         GNULIB_MBSLEN.
5089         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
5090         * MODULES.html.sh (Internationalization functions): Add mbslen.
5091
5092 2007-02-11  Bruno Haible  <bruno@clisp.org>
5093
5094         Ensure O(n) worst-case complexity of strcasestr substitute.
5095         * lib/strcasestr.c: Include stdbool.h.
5096         (knuth_morris_pratt): New function.
5097         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5098         bookkeeping indicates that it's worth it.
5099         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
5100
5101         * modules/strcasestr-tests: New file.
5102         * tests/test-strcasestr.c: New file.
5103
5104 2007-02-11  Bruno Haible  <bruno@clisp.org>
5105
5106         Ensure O(n) worst-case complexity of c_strcasestr.
5107         * lib/c-strcasestr.c: Include stdbool.h, string.h.
5108         (knuth_morris_pratt): New function.
5109         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
5110         the bookkeeping indicates that it's worth it.
5111         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
5112
5113         * modules/c-strcasestr-tests: New file.
5114         * tests/test-c-strcasestr.c: New file.
5115
5116 2007-02-11  Bruno Haible  <bruno@clisp.org>
5117
5118         Ensure O(n) worst-case complexity of c_strstr.
5119         * lib/c-strstr.c: Include stdbool.h, string.h.
5120         (knuth_morris_pratt): New function.
5121         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
5122         bookkeeping indicates that it's worth it.
5123         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
5124
5125         * lib/c-strstr.c: Complete rewrite for maintainability.
5126
5127         * modules/c-strstr-tests: New file.
5128         * tests/test-c-strstr.c: New file.
5129
5130 2007-02-11  Bruno Haible  <bruno@clisp.org>
5131
5132         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
5133         5.2.1 and earlier, whereby \055 was treated just like the range
5134         delimiter '-'.
5135         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
5136
5137 2007-02-08  Bruno Haible  <bruno@clisp.org>
5138
5139         * modules/regex (Depends-on): Add stdbool.
5140         Reported by Dalibor Topic <robilad@kaffe.org>.
5141
5142 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5143
5144         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
5145         Prefer returning from main to exiting from it.
5146         Remove unnecessary parens after sizeof.
5147
5148 2007-02-05  Bruno Haible  <bruno@clisp.org>
5149
5150         New module mbssep.
5151         * modules/mbssep: New file.
5152         * lib/mbssep.c: New file.
5153         * lib/string_.h (strsep): Add a conditional link warning.
5154         (mbssep): New declaration.
5155         * m4/mbssep.m4: New file.
5156         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5157         GNULIB_MBSSEP.
5158         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
5159         * MODULES.html.sh (Internationalization functions): Add mbssep.
5160
5161 2007-02-05  Bruno Haible  <bruno@clisp.org>
5162
5163         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
5164         Optimize search in case of 1 delimiter.
5165
5166 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5167
5168         * lib/acl.h: Include sys/types.h before sys/acl.h.
5169
5170 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
5171
5172         Merge upstream fix for glibc bugzilla #3957:
5173
5174         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
5175
5176         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
5177         bit for RE_HAT_LISTS_NOT_NEWLINE.
5178         (build_charclass_op): Remove bogus comment.
5179
5180 2007-02-05  Simon Josefsson  <simon@josefsson.org>
5181
5182         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
5183
5184 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5185
5186         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
5187         * lib/memmem.c [!defined _LIBC]: Include config.h.
5188
5189 2007-02-04  Bruno Haible  <bruno@clisp.org>
5190
5191         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
5192         warning message.
5193
5194 2007-02-04  Bruno Haible  <bruno@clisp.org>
5195
5196         New module mbstok_r.
5197         * modules/mbstok_r: New file.
5198         * lib/mbstok_r.c: New file.
5199         * lib/string_.h (strtok_r): Change argument names to match the
5200         comments. Add a conditional link warning.
5201         (mbstok_r): New declaration.
5202         * m4/mbstok_r.m4: New file.
5203         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5204         GNULIB_MBSTOK_R.
5205         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
5206         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
5207
5208 2007-02-04  Bruno Haible  <bruno@clisp.org>
5209
5210         New module mbsspn.
5211         * modules/mbsspn: New file.
5212         * lib/mbsspn.c: New file.
5213         * lib/string_.h (strspn): Add a conditional link warning.
5214         (mbsspn): New declaration.
5215         * m4/mbsspn.m4: New file.
5216         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5217         GNULIB_MBSSPN.
5218         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
5219         * MODULES.html.sh (Internationalization functions): Add mbsspn.
5220
5221 2007-02-04  Bruno Haible  <bruno@clisp.org>
5222
5223         New module mbspbrk.
5224         * modules/mbspbrk: New file.
5225         * lib/mbspbrk.c: New file.
5226         * lib/string_.h (strpbrk): Add a conditional link warning.
5227         (mbspbrk): New declaration.
5228         * m4/mbspbrk.m4: New file.
5229         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5230         GNULIB_MBSPBRK.
5231         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
5232         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
5233
5234 2007-02-04  Bruno Haible  <bruno@clisp.org>
5235
5236         New module mbscspn.
5237         * modules/mbscspn: New file.
5238         * lib/mbscspn.c: New file.
5239         * lib/string_.h (strcspn): Add a conditional link warning.
5240         (mbscspn): New declaration.
5241         * m4/mbscspn.m4: New file.
5242         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5243         GNULIB_MBSCSPN.
5244         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
5245         * MODULES.html.sh (Internationalization functions): Add mbscspn.
5246
5247 2007-02-04  Bruno Haible  <bruno@clisp.org>
5248
5249         New module mbscasestr, reduced goal of strcasestr.
5250         * modules/mbscasestr: New file.
5251         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
5252         (mbscasestr): Renamed from strcasestr.
5253         * lib/strcasestr.c: Don't include mbuiter.h.
5254         (strcasestr): Remove support for multibyte locales.
5255         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
5256         Change the conditional link warning.
5257         (mbscasestr): New declaration.
5258         * m4/mbscasestr.m4: New file.
5259         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
5260         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
5261         REPLACE_STRCASESTR.
5262         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
5263         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5264         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5265         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
5266         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
5267         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
5268         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
5269         (Depends-on): Remove mbuiter.
5270         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
5271
5272 2007-02-04  Bruno Haible  <bruno@clisp.org>
5273
5274         Simplify handling of strncasecmp.
5275         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
5276         the conditional link warning.
5277         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
5278         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
5279         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
5280         * modules/strcase (configure.ac): Don't invoke
5281         gl_STRING_MODULE_INDICATOR.
5282         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
5283
5284 2007-02-04  Bruno Haible  <bruno@clisp.org>
5285
5286         New module mbscasecmp, reduced goal of strcasecmp.
5287         * modules/mbscasecmp: New file.
5288         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
5289         (mbscasecmp): Renamed from strcasecmp.
5290         * lib/strcasecmp.c: Don't include mbuiter.h.
5291         (strcasecmp): Remove support for multibyte locales.
5292         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
5293         Change the conditional link warning.
5294         (mbscasecmp): New declaration.
5295         * m4/mbscasecmp.m4: New file.
5296         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
5297         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
5298         REPLACE_STRCASECMP.
5299         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
5300         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5301         GNULIB_MBSCASECMP.
5302         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
5303         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
5304         * modules/strcase (Files): Remove m4/mbrtowc.m4.
5305         (Depends-on): Remove mbuiter.
5306         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
5307
5308 2007-02-04  Bruno Haible  <bruno@clisp.org>
5309
5310         New module mbsstr. Remove module strstr.
5311         * modules/mbsstr: New file.
5312         * modules/strstr: Remove file.
5313         * lib/mbsstr.c: Renamed from lib/strstr.c.
5314         (mbsstr): Renamed from strstr.
5315         * lib/string_.h (strstr): Remove declaration. Change the conditional
5316         link warning.
5317         (mbsstr): New declaration.
5318         * m4/mbsstr.m4: New file.
5319         * m4/strstr.m4: Remove file.
5320         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
5321         REPLACE_STRSTR.
5322         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
5323         Don't initialize GNULIB_STRSTR.
5324         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
5325         substitute GNULIB_STRSTR and REPLACE_STRSTR.
5326         * MODULES.html.sh (Internationalization functions): Add mbsstr.
5327         (Support for systems lacking ANSI C 89): Remove strstr.
5328
5329 2007-02-04  Bruno Haible  <bruno@clisp.org>
5330
5331         New module mbsrchr.
5332         * modules/mbsrchr: New file.
5333         * lib/mbsrchr.c: New file.
5334         * lib/string_.h (strrchr): Add a conditional link warning.
5335         (mbsrchr): New declaration.
5336         * m4/mbsrchr.m4: New file.
5337         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5338         GNULIB_MBSRCHR.
5339         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
5340         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
5341
5342 2007-02-04  Bruno Haible  <bruno@clisp.org>
5343
5344         New module mbschr.
5345         * modules/mbschr: New file.
5346         * lib/mbschr.c: New file.
5347         * lib/string_.h (strchr): Add a conditional link warning.
5348         (mbschr): New declaration.
5349         * m4/mbschr.m4: New file.
5350         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
5351         GNULIB_MBSCHR.
5352         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
5353         * MODULES.html.sh (Internationalization functions): Add mbschr.
5354
5355 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
5356
5357         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
5358
5359         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
5360
5361 2007-02-04  Bruno Haible  <bruno@clisp.org>
5362
5363         New module description section 'configure.ac-early'.
5364         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
5365         (func_get_autoconf_early_snippet): New function.
5366         (func_import, func_create_testdir): Use it. Remove special cases for
5367         modules 'extensions' and 'lock'.
5368         * modules/extensions (configure.ac-early): Require
5369         gl_USE_SYSTEM_EXTENSIONS.
5370         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
5371
5372 2007-02-04  Bruno Haible  <bruno@clisp.org>
5373
5374         Make use of gcj-4.3's -fsource and -ftarget option.
5375         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
5376         and if so try the options -fsource and -ftarget.
5377         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
5378         source_version, ftarget_option, target_version arguments.
5379         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
5380         (is_envjavac_oldgcj_14_14_usable): Renamed from
5381         is_envjavac_gcj_14_14_usable.
5382         (is_envjavac_oldgcj_14_13_usable): Renamed from
5383         is_envjavac_gcj_14_13_usable.
5384         (is_gcj_present): Update.
5385         (is_gcj_43, is_gcj43_usable): New functions.
5386         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
5387         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
5388         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
5389         try the options -fsource and -ftarget.
5390
5391 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
5392
5393         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
5394         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
5395         larger value.
5396
5397 2007-02-03  Jim Meyering  <jim@meyering.net>
5398
5399         Give tools a better chance to allocate space for very large buffers.
5400         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
5401
5402         Make pwd and readlink work also when run with an unreadable parent dir
5403         on systems with openat support.
5404         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
5405         provided getcwd function, even when we have openat support.
5406         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
5407
5408 2007-02-02  Bruno Haible  <bruno@clisp.org>
5409
5410         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
5411         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
5412         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
5413         portability problems if one of these functions is only used on specific
5414         platforms.
5415         Reported by Paul Eggert.
5416
5417 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
5418
5419         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
5420         is causing more trouble than it's curing.
5421         * lib/regex_internal.h (__mempcpy): Remove.
5422         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
5423         (and make the code a tad smaller to boot).
5424         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
5425
5426 2007-02-02  Jim Meyering  <jim@meyering.net>
5427
5428         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
5429         section, not in the Makefile.am: one.
5430
5431 2007-02-02  Eric Blake  <ebb9@byu.net>
5432
5433         * lib/strchrnul.c: Always include config.h first.
5434
5435         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
5436         gnulib strstr is not necessary here.
5437
5438 2007-02-02  Simon Josefsson  <simon@josefsson.org>
5439
5440         * m4/socklen.m4: Fix typo.
5441
5442 2007-02-02  Eric Blake  <ebb9@byu.net>
5443
5444         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
5445         * modules/netinet_in (Makefile.am): Likewise.
5446
5447 2007-02-01  Bruno Haible  <bruno@clisp.org>
5448
5449         * lib/string_.h (GL_LINK_WARNING): New macro.
5450         (strcasecmp, strstr, strcasestr): If provided by the system,
5451         conditionally define as a macro that leads to a warning instead of to
5452         an error.
5453         (strncasecmp): Conditionally define as a macro that leads to a warning.
5454
5455 2007-02-01  Karl Berry  <karl@gnu.org>
5456
5457         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
5458
5459 2007-02-01  Bruno Haible  <bruno@clisp.org>
5460
5461         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
5462         renamings.
5463
5464 2007-02-01  Eric Blake  <ebb9@byu.net>
5465
5466         * modules/regex (Depends-on): Revert dependence on mempcpy.
5467         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
5468         module's definition of mempcpy.
5469         Reported by Paul Eggert.
5470
5471 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
5472
5473         * lib/string_.h: If the gnulib module XYZ is not present, undefine
5474         the symbol XYZ before redefining it.  This fixes a problem with
5475         programs that don't use XYZ, when compiled on systems that define
5476         XYZ to something else.
5477
5478 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
5479
5480         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
5481         occurs when "mkdir -m foo" creates a setgid directory that is (1)
5482         writeable to group or other and (2) is intended to have a special
5483         mode bit that is set or cleared.  In such a case, the directory
5484         should be neither group- nor other-writeable until the special
5485         mode bits are right.
5486
5487 2007-01-31  Eric Blake  <ebb9@byu.net>
5488
5489         * modules/mountlist (Depends-on): Add strstr.
5490
5491         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
5492         bug.
5493         * modules/string (Makefile.am): Remove redundant replacement.
5494         * modules/regex (Depends-on): Add mempcpy.
5495
5496 2007-01-31  Bruno Haible  <bruno@clisp.org>
5497
5498         New module description field 'Link'.
5499         * gnulib-tool (func_usage): Document --extract-link-directive.
5500         (sed_extract_prog): Recognize 'Link' directive.
5501         (func_get_link_directive): New function.
5502         (func_import): Show summary of link directives.
5503         Handle --extract-link-directive option.
5504         * modules/acl (Link): New section.
5505         * modules/clock-time (Link): New section.
5506         * modules/euidaccess (Link): New section.
5507         * modules/gettext (Link): New section.
5508         * modules/iconv (Link): New section.
5509         * modules/lock (Link): New section.
5510         * modules/nanosleep (Link): New section.
5511         * modules/readline (Link): New section.
5512
5513 2007-01-27  Bruno Haible  <bruno@clisp.org>
5514
5515         Enforce the use of gnulib modules for unportable <string.h> functions.
5516         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
5517         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
5518         (gl_HEADER_STRING_H_BODY): Require it.
5519         * lib/string_.h: If the gnulib module XYZ is not present, redefine
5520         the symbol XYZ to one that gives a link error.
5521         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
5522         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
5523         * modules/mempcpy (configure.ac): Likewise.
5524         * modules/memrchr (configure.ac): Likewise.
5525         * modules/stpcpy (configure.ac): Likewise.
5526         * modules/stpncpy (configure.ac): Likewise.
5527         * modules/strcase (configure.ac): Likewise.
5528         * modules/strcasestr (configure.ac): Likewise.
5529         * modules/strchrnul (configure.ac): Likewise.
5530         * modules/strdup (configure.ac): Likewise.
5531         * modules/strndup (configure.ac): Likewise.
5532         * modules/strnlen (configure.ac): Likewise.
5533         * modules/strpbrk (configure.ac): Likewise.
5534         * modules/strsep (configure.ac): Likewise.
5535         * modules/strstr (configure.ac): Likewise.
5536         * modules/strtok_r (configure.ac): Likewise.
5537
5538 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
5539
5540         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
5541
5542 2007-01-30  Jim Meyering  <jim@meyering.net>
5543
5544         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
5545
5546 2007-01-29  Bruno Haible  <bruno@clisp.org>
5547
5548         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
5549         * lib/execute.c: Likewise.
5550         * lib/pipe.c: Likewise.
5551         * lib/printf-args.h: Likewise.
5552         * lib/printf-args.c: Likewise.
5553         * lib/printf-parse.c: Likewise.
5554         * lib/vasnprintf.c: Likewise.
5555
5556 2007-01-29  Eric Blake  <ebb9@byu.net>
5557
5558         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
5559         declaration.
5560
5561 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
5562
5563         * lib/strptime.h (strptime): Use 'restrict' for args where
5564         POSIX requires this.
5565         * lib/strptime.c (strptime): Likewise.
5566         Change license notice from LGPL to GPL, since gnulib-tool will
5567         change this as needed.
5568         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
5569         defined.
5570         Include "strptime.h" first, to check interface.
5571         Do not #undef _LIBC and _NL_CURRENT.
5572         Do not include <stdlib.h>; no longer needed.
5573         Include "time_r.h" and declare ptime_locale_status
5574         only if _LIBC is not defined.
5575         (__P): Remove unused macro.
5576         (match_string): Bring back glibc version, but use it only if _LIBC
5577         is defined.
5578         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
5579         Remove unnecessary assertion and abort() call.
5580         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
5581         * m4/strptime.m4: Fix serial number comment.
5582         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
5583         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
5584         (Depends-on): Add time_r.
5585
5586 2007-01-29  Bruno Haible  <bruno@clisp.org>
5587
5588         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5589         strptime.
5590         * modules/strptime (Depends-on): Add stdbool.
5591         * lib/strptime.h: Include <time.h> always. Add comments.
5592
5593 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
5594
5595         * modules/strptime: New file.
5596         * lib/strptime.h: New file.
5597         * lib/strptime.c: New file.
5598         * m4/strptime.m4: New file.
5599
5600 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
5601
5602         * MODULES.html.sh: New module mpsort.
5603         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
5604
5605         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
5606         a circularity problem with HP-UX ia64 reported by Bob Proulx in
5607         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
5608         All uses changed.
5609         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
5610         All uses changed.
5611         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
5612         to _Restrict_.
5613         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
5614         the parameter matches the prototype.
5615
5616 2007-01-28  Jim Meyering  <jim@meyering.net>
5617
5618         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
5619         sys/time.h here, reverting that part of the previous patch:
5620         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
5621
5622 2007-01-28  Bruno Haible  <bruno@clisp.org>
5623
5624         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
5625         value of $(SYS_TIME_H).
5626         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
5627         remove it conditionally, too. [added by Jim Meyering]
5628         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
5629         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
5630         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
5631         GETTIMEOFDAY_REPLACEMENT to 1.
5632
5633 2007-01-28  Bruno Haible  <bruno@clisp.org>
5634
5635         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
5636         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
5637         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
5638         Set UNISTD_H instead of UNISTD_H2.
5639         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
5640
5641 2007-01-28  Bruno Haible  <bruno@clisp.org>
5642
5643         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
5644         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
5645
5646 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5647
5648         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
5649         (func_create_testdir): Ensure C locale for `grep' and `tr'
5650         character ranges.
5651         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
5652         ACLOCAL_AMFLAGS parsing state machine.
5653
5654 2007-01-27  Bruno Haible  <bruno@clisp.org>
5655
5656         * modules/unistr/base: Update.
5657
5658 2007-01-27  Bruno Haible  <bruno@clisp.org>
5659
5660         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
5661         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
5662         * modules/unistr/u32-mbtouc-unsafe: Renamed from
5663         modules/unistr/u32-mbtouc.
5664         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
5665         * lib/unistr.h: Update.
5666         * lib/linebreak.c: Update.
5667         * modules/unistr/u32-mbtouc: Renamed from
5668         modules/unistr/u32-mbtouc-safe.
5669         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
5670         * lib/unistr.h: Update.
5671         * lib/unistr/u32-to-u8.c: Update.
5672         * lib/unistr/u32-to-u16.c: Update.
5673
5674 2007-01-27  Bruno Haible  <bruno@clisp.org>
5675
5676         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
5677         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
5678         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
5679         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
5680         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
5681         * modules/unistr/u16-mbtouc-unsafe: Renamed from
5682         modules/unistr/u16-mbtouc.
5683         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
5684         * lib/unistr.h: Update.
5685         * lib/linebreak.c: Update.
5686         * modules/linebreak: Update.
5687         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
5688         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
5689         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
5690         * modules/unistr/u16-mbtouc: Renamed from
5691         modules/unistr/u16-mbtouc-safe.
5692         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
5693         * lib/unistr.h: Update.
5694         * lib/unistr/u16-to-u8.c: Update.
5695         * modules/unistr/u16-to-u8: Update.
5696         * lib/unistr/u16-to-u32.c: Update.
5697         * modules/unistr/u16-to-u32: Update.
5698
5699 2007-01-27  Bruno Haible  <bruno@clisp.org>
5700
5701         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
5702         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
5703         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
5704         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
5705         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
5706         * modules/unistr/u8-mbtouc-unsafe: Renamed from
5707         modules/unistr/u8-mbtouc.
5708         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
5709         * lib/unistr.h: Update.
5710         * lib/striconveh.c: Update.
5711         * modules/striconveh: Update.
5712         * lib/linebreak.c: Update.
5713         * modules/linebreak: Update.
5714         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
5715         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
5716         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
5717         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
5718         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
5719         * lib/unistr.h: Update.
5720         * lib/striconveh.c: Update.
5721         * modules/striconveh: Update.
5722         * lib/unistr/u8-to-u16.c: Update.
5723         * modules/unistr/u8-to-u16: Update.
5724         * lib/unistr/u8-to-u32.c: Update.
5725         * modules/unistr/u8-to-u32: Update.
5726
5727 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5728
5729         Sync from Libtool.
5730         * lib/argz.c: Do not include strings.h nor memory.h, include
5731         string.h unconditionally.  Patch by Simon Josefsson.
5732
5733 2007-01-27  Bruno Haible  <bruno@clisp.org>
5734
5735         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
5736         from gl_HEADER_STRING_H_BODY.
5737         (gl_HEADER_STRING_H_BODY): Require it.
5738         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
5739         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
5740         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
5741         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
5742         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
5743         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
5744         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
5745         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
5746         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
5747         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
5748         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
5749         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
5750         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
5751         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
5752         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
5753
5754 2007-01-27  Bruno Haible  <bruno@clisp.org>
5755
5756         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
5757         check_PROGRAMS into noinst_PROGRAMS.
5758         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
5759         check_PROGRAMS in this case.
5760         (func_import): Set for_test to false.
5761         (func_create_testdir): Set for_test to true.
5762
5763 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
5764             Bruno Haible  <bruno@clisp.org>
5765
5766         * modules/strcasestr (Files): Remove lib/strcasestr.h.
5767         (Depends-on): Add string.
5768         (Includes): Use <string.h> instead of strcasestr.h.
5769         * modules/string (Makefile.am): Also substitute the value of
5770         REPLACE_STRCASESTR.
5771         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
5772         assume strcasestr is declared in <string.h> not <strings.h>. Also
5773         set REPLACE_STRCASESTR.
5774         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
5775         REPLACE_STRCASESTR.
5776         * lib/strcasestr.h: Remove file.
5777         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
5778         * lib/string_.h (strcasestr): New declaration.
5779
5780 2007-01-27  Bruno Haible  <bruno@clisp.org>
5781
5782         * lib/string_.h: Use 'extern'.
5783
5784 2007-01-27  Jim Meyering  <jim@meyering.net>
5785
5786         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
5787         of set-but-not-used local, "q".
5788
5789         * lib/mempcpy.c: Include <config.h> before <string.h>.
5790         This fixes a compilation error on HP-UX, due to the system's
5791         "restrict"-using mempcpy prototype.
5792
5793 2007-01-26  Bruno Haible  <bruno@clisp.org>
5794
5795         Small optimization.
5796         * lib/javacomp.c: Include c-strstr.h.
5797          (is_envjavac_gcj): Use c_strstr instead of strstr.
5798         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
5799
5800 2007-01-26  Bruno Haible  <bruno@clisp.org>
5801
5802         * MODULES.html.sh (Unicode string functions): Add the new modules.
5803
5804         * modules/uniconv/u32-strconv-to-locale: New file.
5805         * lib/uniconv/u32-strconv-to-locale.c: New file.
5806
5807         * modules/uniconv/u16-strconv-to-locale: New file.
5808         * lib/uniconv/u16-strconv-to-locale.c: New file.
5809
5810         * modules/uniconv/u8-strconv-to-locale: New file.
5811         * lib/uniconv/u8-strconv-to-locale.c: New file.
5812
5813         * modules/uniconv/u32-strconv-from-locale: New file.
5814         * lib/uniconv/u32-strconv-from-locale.c: New file.
5815
5816         * modules/uniconv/u16-strconv-from-locale: New file.
5817         * lib/uniconv/u16-strconv-from-locale.c: New file.
5818
5819         * modules/uniconv/u8-strconv-from-locale: New file.
5820         * lib/uniconv/u8-strconv-from-locale.c: New file.
5821
5822         * modules/uniconv/u32-strconv-to-enc: New file.
5823         * lib/uniconv/u32-strconv-to-enc.c: New file.
5824         * modules/uniconv/u32-strconv-to-enc-tests: New file.
5825         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
5826
5827         * modules/uniconv/u16-strconv-to-enc: New file.
5828         * lib/uniconv/u16-strconv-to-enc.c: New file.
5829         * lib/uniconv/u-strconv-to-enc.h: New file.
5830         * modules/uniconv/u16-strconv-to-enc-tests: New file.
5831         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
5832
5833         * modules/uniconv/u8-strconv-to-enc: New file.
5834         * lib/uniconv/u8-strconv-to-enc.c: New file.
5835         * modules/uniconv/u8-strconv-to-enc-tests: New file.
5836         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
5837
5838         * modules/uniconv/u32-strconv-from-enc: New file.
5839         * lib/uniconv/u32-strconv-from-enc.c: New file.
5840         * modules/uniconv/u32-strconv-from-enc-tests: New file.
5841         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
5842
5843         * modules/uniconv/u16-strconv-from-enc: New file.
5844         * lib/uniconv/u16-strconv-from-enc.c: New file.
5845         * modules/uniconv/u16-strconv-from-enc-tests: New file.
5846         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
5847
5848         * modules/uniconv/u8-strconv-from-enc: New file.
5849         * lib/uniconv/u8-strconv-from-enc.c: New file.
5850         * lib/uniconv/u-strconv-from-enc.h: New file.
5851         * modules/uniconv/u8-strconv-from-enc-tests: New file.
5852         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
5853
5854         * modules/uniconv/u32-conv-from-enc: New file.
5855         * lib/uniconv/u32-conv-from-enc.c: New file.
5856         * modules/uniconv/u32-conv-from-enc-tests: New file.
5857         * tests/uniconv/test-u32-conv-from-enc.c: New file.
5858
5859         * modules/uniconv/u16-conv-from-enc: New file.
5860         * lib/uniconv/u16-conv-from-enc.c: New file.
5861         * lib/uniconv/u-conv-from-enc.h: New file.
5862         * modules/uniconv/u16-conv-from-enc-tests: New file.
5863         * tests/uniconv/test-u16-conv-from-enc.c: New file.
5864
5865         * modules/uniconv/u8-conv-from-enc: New file.
5866         * lib/uniconv/u8-conv-from-enc.c: New file.
5867         * modules/uniconv/u8-conv-from-enc-tests: New file.
5868         * tests/uniconv/test-u8-conv-from-enc.c: New file.
5869
5870         * modules/uniconv/base: New file.
5871         * lib/uniconv.h: New file.
5872
5873 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
5874
5875         * doc/gnulib-tool.texi (Initial import): Update to match current
5876         behavior with strdup module.
5877         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
5878         * lib/memmem.h: Remove; all uses removed.  This is now done
5879         by <string.h>.
5880         * lib/mempcpy.h: Likewise.
5881         * lib/memrchr.h: Likewise.
5882         * lib/stpcpy.h: Likewise.
5883         * lib/stpncpy.h: Likewise.
5884         * lib/strcase.h: Likewise.
5885         * lib/strchrnul.h: Likewise.
5886         * lib/strdup.h: Likewise.
5887         * lib/strndup.h: Likewise.
5888         * lib/strnlen.h: Likewise.
5889         * lib/strpbrk.h: Likewise.
5890         * lib/strsep.h: Likewise.
5891         * lib/strstr.h: Likewise.
5892         * lib/strtok_r.h: Likewise.
5893         * lib/string_.h: New file.
5894         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
5895         Rely on <string.h> instead.
5896         * lib/canon-host.c: Likewise.
5897         * lib/chdir-long.c: Likewise.
5898         * lib/concatpath.c: Likewise.
5899         * lib/exclude.c: Likewise.
5900         * lib/fchdir.c: Likewise.
5901         * lib/getaddrinfo.c: Likewise.
5902         * lib/getcwd.c: Likewise.
5903         * lib/getsubopt.c: Likewise.
5904         * lib/glob.c: Likewise.
5905         * lib/hard-locale.c: Likewise.
5906         * lib/iconvme.c: Likewise.
5907         * lib/javacomp.c: Likewise.
5908         * lib/mempcpy.c: Likewise.
5909         * lib/memrchr.c: Likewise.
5910         * lib/regex_internal.h: Likewise.
5911         * lib/stpncpy.c: Likewise.
5912         * lib/strcasecmp.c: Likewise.
5913         * lib/strchrnul.c: Likewise.
5914         * lib/strdup.c: Likewise.
5915         * lib/striconv.c: Likewise.
5916         * lib/striconveh.c: Likewise.
5917         * lib/striconveha.c: Likewise.
5918         * lib/strncasecmp.c: Likewise.
5919         * lib/strndup.c: Likewise.
5920         * lib/strnlen.c: Likewise.
5921         * lib/strsep.c: Likewise.
5922         * lib/strstr.c: Likewise.
5923         * lib/strtok_r.c: Likewise.
5924         * lib/userspec.c: Likewise.
5925         * lib/w32spawn.h: Likewise.
5926         * lib/xstrndup.c: Likewise.
5927         * lib/mountlist.c (strstr): Remove decl.
5928         * m4/string_h.m4: New file.
5929         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
5930         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
5931         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
5932         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
5933         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
5934         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
5935         Set REPLACE_STRCASECMP if necessary.
5936         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
5937         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
5938         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
5939         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
5940         HAVE_DECL_STRDUP if necessary.
5941         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
5942         since gl_FUNC_STRNDUP does that now.
5943         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
5944         Check for decl here...
5945         (gl_PREREQ_STRNLEN): ... not here.
5946         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
5947         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
5948         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
5949         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
5950         necessary.
5951         * modules/string: New file.
5952         * modules/memmem (Files): Remove special-purpose include file.
5953         (Depends-on): Add string.
5954         (Include): Include <string.h>, not the removed file.
5955         * modules/mempcpy: Likewise.
5956         * modules/memrchr: Likewise.
5957         * modules/stpcpy: Likewise.
5958         * modules/stpncpy: Likewise.
5959         * modules/strcase: Likewise.
5960         * modules/strchrnul: Likewise.
5961         * modules/strdup: Likewise.
5962         * modules/strndup: Likewise.
5963         * modules/strnlen: Likewise.
5964         * modules/strpbrk: Likewise.
5965         * modules/strsep: Likewise.
5966         * modules/strstr: Likewise.
5967         * modules/strtok_r: Likewise.
5968         * tests/test-dirname.c: Don't include "strdup.h", since
5969         <string.h> now suffices.
5970         * tests/test-memmem.c: Don't include "memmem.h", since
5971         <string.h> now suffices.
5972
5973 2007-01-25  Bruno Haible  <bruno@clisp.org>
5974
5975         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
5976         *resultp is 0.
5977
5978         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
5979         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
5980         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
5981         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
5982
5983         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
5984         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
5985         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
5986         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
5987         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
5988         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
5989
5990 2007-01-24  Bruno Haible  <bruno@clisp.org>
5991
5992         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
5993         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
5994         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
5995         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
5996         gl_FUNC_FTS_CORE.
5997         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
5998         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
5999         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
6000         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
6001         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
6002         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
6003         gl_FUNC_FCHOWNAT.
6004         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
6005         gl_FUNC_STRFTIME.
6006         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
6007         Reported by Ralf Wildenhues.
6008
6009 2007-01-24  Bruno Haible  <bruno@clisp.org>
6010
6011         Drop AC_REQUIRE calls that are redundant with the module dependencies.
6012         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
6013         gl_GETADDRINFO.
6014         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
6015         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
6016         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
6017
6018 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
6019
6020         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
6021         Don't use 'exit'; just return from 'main'.
6022         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
6023
6024         * lib/fnmatch_.h: Readjust white space and comments to match
6025         glibc, to avoid spurious diffs.
6026
6027 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6028
6029         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
6030         2004-12-01 change by Jakub Jelinek, since this code won't compile
6031         if !LIBC.  Problem reported by Bob Proulx.
6032
6033 2007-01-23  Bruno Haible  <bruno@clisp.org>
6034
6035         * lib/striconveh.c: Include c-strcaseeq.h.
6036         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
6037         * modules/striconveh (Depends-on): Add c-strcaseeq.
6038
6039 2007-01-23  Bruno Haible  <bruno@clisp.org>
6040
6041         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
6042
6043         * modules/c-strcaseeq: New file.
6044         * lib/c-strcaseeq.h: New file.
6045
6046         * modules/streq: New file.
6047         * lib/streq.h: New file.
6048
6049 2007-01-23  Bruno Haible  <bruno@clisp.org>
6050
6051         * modules/striconveha-tests: New file.
6052         * tests/test-striconveha.c: New file.
6053
6054         * lib/striconveha.h: Include <stdbool.h>.
6055         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
6056         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
6057         (mem_iconveha_notranslit): Renamed from mem_iconveha.
6058         (mem_iconveha): New function.
6059         (str_iconveha_notranslit): Renamed from str_iconveha.
6060         (str_iconveha): New function.
6061         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
6062         c-strcase.
6063
6064 2007-01-23  Bruno Haible  <bruno@clisp.org>
6065
6066         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
6067         encodings without forgiving before trying any encoding with handler.
6068         (str_iconveha): Try all encodings without forgiving before trying any
6069         encoding with handler.
6070
6071 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
6072
6073         Import the following changes from libc.
6074
6075         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6076
6077         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
6078
6079         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6080
6081         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
6082         normal_bracket label.
6083
6084         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
6085
6086         [BZ #361]
6087         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
6088         to normal_bracket after fetching the next character.
6089
6090 2007-01-22  Bruno Haible  <bruno@clisp.org>
6091
6092         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
6093         argument.
6094         * lib/striconveh.c (iconv_carefully_1): New function.
6095         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
6096         argument.
6097         (str_cd_iconveh): Update.
6098         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
6099         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
6100         * tests/test-striconveh.c (MAGIC): New macro.
6101         (new_offsets): New function.
6102         (main): Test call with and without offsets.
6103
6104 2007-01-22  Bruno Haible  <bruno@clisp.org>
6105
6106         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
6107         * modules/sys_select (Makefile.am): Likewise.
6108         * modules/sys_socket (Makefile.am): Likewise.
6109         * modules/sys_time (Makefile.am): Likewise.
6110
6111 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
6112
6113         * modules/gettimeofday (License): Change from GPL to LGPL, since
6114         gettimeofday is a library function.
6115
6116 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6117
6118         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
6119
6120 2007-01-21  Bruno Haible  <bruno@clisp.org>
6121
6122         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
6123
6124 2007-01-21  Bruno Haible  <bruno@clisp.org>
6125
6126         * modules/striconveha: New file.
6127         * lib/striconveha.h: New file.
6128         * lib/striconveha.c: New file.
6129         * MODULES.html.sh (Internationalization functions): Add striconveha.
6130         * lib/striconv.c (str_iconv): Optimize the case of an empty input
6131         string.
6132         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
6133
6134 2007-01-21  Bruno Haible  <bruno@clisp.org>
6135
6136         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
6137         * lib/striconveh.c (str_iconveh): Likewise.
6138
6139 2007-01-21  Bruno Haible  <bruno@clisp.org>
6140
6141         * lib/striconveh.h (mem_iconveh): New declaration.
6142         * lib/striconveh.c (mem_iconveh): New function.
6143         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
6144
6145 2007-01-21  Bruno Haible  <bruno@clisp.org>
6146
6147         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
6148
6149         * lib/striconveh.h (mem_cd_iconveh): Change specification.
6150         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
6151         original result buffer.
6152         (str_cd_iconveh): Update.
6153         * tests/test-striconveh.c (main): Update.
6154
6155         * lib/striconv.h (mem_cd_iconv): Change specification.
6156         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
6157         result buffer.
6158         (str_cd_iconv): Update.
6159         * tests/test-striconv.c (main): Update.
6160
6161 2007-01-21  Bruno Haible  <bruno@clisp.org>
6162
6163         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
6164
6165 2007-01-20  Jim Meyering  <jim@meyering.net>
6166
6167         * lib/userspec.c (parse_with_separator): If a user or group string
6168         starts with "+", skip the corresponding name-to-ID look-up, since
6169         such a look-up must fail: user and group names may not include "+".
6170
6171 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
6172
6173         * lib/poll.c: Include sys/time.h and time.h unconditionally,
6174         since we now assume the sys_time module.
6175         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
6176         check for sys/time.h; no longer needed.
6177         * modules/poll (Depends-on): Depend on sys_time.
6178
6179 2007-01-18  Bruno Haible  <bruno@clisp.org>
6180
6181         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
6182         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6183
6184         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
6185         gettimeofday.
6186
6187         * tests/test-gettimeofday.c: Include <time.h>.
6188         (dummy): Remove variable.
6189
6190         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
6191         gl_HEADER_SYS_TIME_H.
6192         (gl_HEADER_SYS_TIME_H): New macro.
6193
6194         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
6195         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6196         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
6197         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
6198         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6199         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
6200         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
6201         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6202         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
6203         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
6204         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6205
6206         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
6207         last change; it caused a compilation error when cross-compiling to
6208         Cygwin.
6209
6210 2007-01-18  Jim Meyering  <jim@meyering.net>
6211
6212         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
6213         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
6214         than the race-prone "test -d sys || mkdir sys".
6215         (configure.ac): Use AC_PROG_MKDIR_P.
6216         * modules/sys_select: Likewise.
6217         * modules/sys_socket: Likewise.
6218         * modules/sys_time: Likewise.
6219
6220 2007-01-18  Eric Blake  <ebb9@byu.net>
6221
6222         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
6223         replace gettimeofday.
6224         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
6225         name, to avoid infinite recursion.
6226
6227 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
6228
6229         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
6230         module sys_time.
6231         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
6232         assume timespec.h defines struct timeval.
6233         * lib/settime.c: Likewise.
6234         * lib/utimens.c: Likewise.
6235         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
6236         since we now assume the gettimeofday module.
6237         * lib/tempname.c (__gen_tempname): Likewise.
6238         * lib/gettimeofday.h: Remove.
6239         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
6240         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
6241         Include <time.h>, for 'time()'.
6242         (localtime_buffer_addr): Also use this workaround if
6243         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
6244         to simplify the uses.  All uses changed.
6245         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
6246         that #undef is inside {}, and 'const' follows type name consistently.
6247         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
6248         (gettimeofday): Do not use the maximum possible value for
6249         tv->tv_usec, since that might break usages other than ls.c.
6250         Instead, we'll leave ls.c alone.  This undoes today's patch
6251         by Bruno.  Add a compile-time warning for 1s-clock resolution;
6252         we've never observed the problem but might as well keep the
6253         canary.
6254         * lib/nanosleep.c: Include timespec.h first, for interface check.
6255         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
6256         now assume the sys_time module.
6257         * lib/tempname.c: Likewise.
6258         * lib/timespec.h: Likewise.
6259         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
6260         needed.
6261         * lib/strftime.c: Likewise.
6262         * lib/timespec.h: Likewise.
6263         * lib/posixtm.c: Include posixtm.h first, for interface check.
6264         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
6265         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
6266         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
6267         * lib/sys_time_.h: New file.
6268         * lib/timespec.h (struct timespec): Use long int, not long.
6269         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
6270         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
6271         Remove obsolescent call to AC_HEADER_TIME.
6272         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
6273         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6274         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
6275         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
6276         Likewise.
6277         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
6278         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
6279         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
6280         into the sys_time module.  Check for gettimeofday just once.
6281         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
6282         for gettimeofday signature to just check the signature.  Merely
6283         compile it, since linking doesn't test signature.  Improve test for
6284         whether gettimeofday.o is actually needed.
6285         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
6286         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
6287         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
6288         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6289         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
6290         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
6291         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
6292         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
6293         than worrying about sys/time.h.
6294         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
6295         Don't bother worrying about TIME_WITH_SYS_TIME.
6296         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
6297         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
6298         * m4/sys_time_h.m4: New file.
6299         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
6300         Don't include sys/time.h.  Return from main rather than exiting.
6301         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
6302         all uses changed.
6303         * modules/gethrxtime (Depends-on): Add sys_time.
6304         * modules/gettime (Depends-on): Likewise.
6305         * modules/gettimeofday (Depends-on): Likewise.
6306         * modules/nanosleep (Depends-on): Likewise.
6307         * modules/settime (Depends-on): Likewise.
6308         * modules/tempname (Depends-on): Likewise.
6309         * modules/utimens (Depends-on): Likewise.
6310         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
6311         (Include:) Change back to <sys/time.h>.
6312         (Maintainer:) Add self.
6313         * modules/sys_time: New file.
6314         * modules/tempname (Depends-on): Add gettimeofday.
6315         * tests/test-gettimeofday.c: Include <sys/time.h>
6316         rather than gettimeofday.h.
6317
6318 2007-01-17  Bruno Haible  <bruno@clisp.org>
6319
6320         * gnulib-tool (func_get_license): Revert last patch. Instead, let
6321         the license default to GPL.
6322         (func_create_testdir): Don't complain if a module is LGPL and its
6323         tests module depends on GPLed modules.
6324
6325 2007-01-17  Bruno Haible  <bruno@clisp.org>
6326
6327         * lib/gettimeofday.c (gettimeofday): Add code for the case
6328         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
6329         maximum possible value for tv->tv_usec, rather than the minimum one.
6330
6331 2005-10-08  Martin Lambers  <marlam@marlam.de>
6332 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6333 2007-01-16  Bruno Haible  <bruno@clisp.org>
6334
6335         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
6336         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
6337         gl_FUNC_GETTIMEOFDAY.
6338         (Include): Add gettimeofday.h.
6339         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
6340         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
6341         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
6342         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
6343         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
6344         * lib/gettimeofday.h: New file.
6345         * lib/gettimeofday.c: Include <sys/timeb.h>.
6346         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
6347         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
6348         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
6349         fall back on time().
6350
6351         * tests/test-gettimeofday.c: New file.
6352         * modules/gettimeofday-tests: New file.
6353
6354 2007-01-16  Eric Blake  <ebb9@byu.net>
6355
6356         * modules/fnmatch (Depends-on): Depend on wchar.
6357         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
6358         * m4/fnmatch.m4: Likewise.
6359         * modules/mbchar (Makefile.am): Assume <wchar.h>.
6360         * m4/mbchar.m4: Likewise.
6361         * modules/mbswidth (Depends-on): Depend on wchar.
6362         * lib/mbswidth.c: Assume <wchar.h>.
6363         * m4/mbswidth.m4: Likewise.
6364         * modules/quotearg (Depends-on): Depend on wchar.
6365         * lib/quotearg.c: Assume <wchar.h>.
6366         * m4/quotearg.m4: Likewise.
6367         * modules/regex (Depends-on): Depend on wchar.
6368         * lib/regex_internal.h: Assume <wchar.h>.
6369         * m4/regex.m4: Likewise.
6370         * modules/stdint (Depends-on): Depend on wchar.
6371         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
6372         * m4/stdint.m4: Likewise.
6373         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
6374         * modules/strftime (Depends-on): Depend on wchar.
6375         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
6376         * modules/strtol (Depends-on): Depend on wchar.
6377         * lib/strtol.c: Assume <wchar.h>.
6378         * modules/wcwidth (Depends-on): Depend on wchar.
6379         * lib/wcwidth.h: Assume <wchar.h>.
6380         * m4/wcwidth.m4: Likewise.
6381
6382 2007-01-16  Bruno Haible  <bruno@clisp.org>
6383
6384         * modules/csharpexec-script: New, created from...
6385         * modules/csharpexec: ... this.
6386
6387 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
6388
6389         * modules/javaexec-script: New, created from...
6390         * modules/javaexec: ... this.
6391
6392 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6393
6394         * modules/poll (Dependencies): Add sys_select.
6395
6396 2007-01-15  Jim Meyering  <jim@meyering.net>
6397
6398         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
6399         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
6400         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
6401         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
6402
6403 2007-01-15  Bruno Haible  <bruno@clisp.org>
6404
6405         * modules/striconveh: New file.
6406         * lib/striconveh.h: New file.
6407         * lib/striconveh.c: New file.
6408         * MODULES.html.sh (Internationalization functions): Add striconveh.
6409
6410         * modules/striconveh-tests: New file.
6411         * tests/test-striconveh.c: New file.
6412
6413 2007-01-15  Bruno Haible  <bruno@clisp.org>
6414
6415         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
6416         not from GNU libiconv or GNU libc.
6417
6418 2007-01-15  Bruno Haible  <bruno@clisp.org>
6419
6420         * doc/gnulib-intro.texi (Copyright): Explain the different license
6421         terms for module descriptions, autoconf macros, tests, documentation.
6422
6423 2007-01-14  Bruno Haible  <bruno@clisp.org>
6424
6425         * modules/striconv-tests: New file.
6426         * tests/test-striconv.c: New file.
6427
6428 2007-01-14  Bruno Haible  <bruno@clisp.org>
6429
6430         * modules/iconv-tests: New file.
6431         * tests/test-iconv.c: New file.
6432
6433 2007-01-14  Bruno Haible  <bruno@clisp.org>
6434
6435         * gnulib-tool (func_get_license): For test modules, use the license of
6436         the main module.
6437
6438 2007-01-14  Bruno Haible  <bruno@clisp.org>
6439
6440         * modules/iconv (Include): Clarify that <iconv.h> can only be included
6441         if iconv is found to exist.
6442
6443 2007-01-14  Bruno Haible  <bruno@clisp.org>
6444
6445         * modules/c-ctype-tests: New file.
6446         * tests/test-c-ctype.c: New file.
6447
6448 2007-01-14  Bruno Haible  <bruno@clisp.org>
6449
6450         * modules/binary-io-tests: New file.
6451         * tests/test-binary-io.sh: New file.
6452         * tests/test-binary-io.c: New file.
6453
6454 2007-01-14  Bruno Haible  <bruno@clisp.org>
6455
6456         * modules/array-oset-tests: New file.
6457         * tests/test-array_oset.c: New file.
6458
6459 2007-01-14  Bruno Haible  <bruno@clisp.org>
6460
6461         * modules/array-list-tests: New file.
6462         * tests/test-array_list.c: New file.
6463
6464 2007-01-14  Bruno Haible  <bruno@clisp.org>
6465
6466         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
6467         and make.
6468         Reported by Simon Josefsson in
6469         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
6470
6471 2007-01-14  Bruno Haible  <bruno@clisp.org>
6472
6473         * modules/allocsa-tests: New file.
6474         * tests/test-allocsa.c: New file.
6475
6476 2007-01-14  Bruno Haible  <bruno@clisp.org>
6477
6478         * modules/fchdir (Depends-on): Add absolute-header.
6479         * modules/unistd (Depends-on): Likewise.
6480
6481 2006-12-30  Bruno Haible  <bruno@clisp.org>
6482
6483         * modules/fchdir: New file.
6484         * modules/unistd (Files): Add lib/unistd_.h.
6485         (Makefile.am): Generate unistd.h from unistd_.h.
6486         * lib/fchdir.c: New file.
6487         * lib/dirent_.h: New file.
6488         * lib/unistd_.h: New file.
6489         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
6490         * m4/fchdir.m4: New file.
6491         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
6492         (gl_HEADER_UNISTD): Invoke it.
6493         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
6494         function.
6495         * lib/backupfile.c (opendir, closedir): Undefine.
6496         * lib/chown.c (open, close): Undefine.
6497         * lib/clean-temp.c (open, close): Undefine.
6498         * lib/copy-file.c (open, close): Undefine.
6499         * lib/execute.c (open, close): Undefine.
6500         * lib/fsusage.c (open, close): Undefine.
6501         * lib/gc-gnulib.c (open, close): Undefine.
6502         * lib/getcwd.c (opendir, closedir): Undefine.
6503         * lib/glob.c (opendir, closedir): Undefine.
6504         * lib/javacomp.c (open, close): Undefine.
6505         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
6506         * lib/openat-proc.c (open, close): Undefine.
6507         * lib/pagealign_alloc.c (open, close): Undefine.
6508         * lib/pipe.c (open, close): Undefine.
6509         * lib/progreloc.c (open, close): Undefine.
6510         * lib/savedir.c (opendir, closedir): Undefine.
6511         * lib/utime.c (open, close): Undefine.
6512         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
6513
6514 2007-01-10  Bruno Haible  <bruno@clisp.org>
6515
6516         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
6517
6518 2007-01-12  Eric Blake  <ebb9@byu.net>
6519
6520         Provide a robust <wchar.h>.  Further simplifications are now
6521         possible in other modules, but not included here.
6522         * modules/wchar: New module.
6523         * m4/wchar.m4: New file.
6524         * lib/wchar_.h: Likewise.
6525         * modules/mbchar (Depends-on): Depend on wchar, as the first use
6526         of the new module.
6527         * MODULES.html.sh (Extended multibyte and wide character utilities):
6528         New section.
6529
6530 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
6531
6532         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
6533         to a reasonable default for memory allocation.
6534         (xreadlink): Don't allocate a huge buffer, to work around a buggy
6535         file system that reports garbage st_size values for symlinks.
6536         Problem reported by Liyang Hu.
6537
6538 2007-01-11  Simon Josefsson  <simon@josefsson.org>
6539
6540         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
6541         Emacs .#* auto-save files).
6542
6543 2007-01-11  Bruno Haible  <bruno@clisp.org>
6544
6545         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
6546         directory.
6547
6548 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
6549
6550         Use @...@ consistently in lib/wctype_.h.
6551         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
6552         on it being set to 1 or 0.
6553         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
6554         go back to AC_SUBSTing it.
6555         * modules/wctype (Makefile.am): Undo previous change.
6556
6557 2007-01-10  Eric Blake  <ebb9@byu.net>
6558
6559         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
6560         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
6561         * modules/wctype (Makefile.am): Likewise.
6562         Reported by Chris McGuire.
6563
6564 2007-01-10  Jim Meyering  <jim@meyering.net>
6565
6566         fts.c: a small readability/maintainability improvement
6567         * lib/fts.c (fts_read): Make this code slightly more readable and
6568         maintainable by hoisting the "sp->fts_cur = p" assignments to
6569         immediately follow the statements that set P.  Derived from
6570         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
6571
6572 2007-01-10  Eric Blake  <ebb9@byu.net>
6573
6574         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
6575         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
6576         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
6577         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
6578         Reported by Chris McGuire.
6579
6580 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6581
6582         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
6583         in sed script.
6584
6585 2007-01-09  Bruno Haible  <bruno@clisp.org>
6586
6587         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
6588         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
6589         variables.
6590         (func_module): Use them.
6591
6592 2007-01-09  Bruno Haible  <bruno@clisp.org>
6593
6594         * modules/unistr/base: New file.
6595         * lib/unistr.h: New file.
6596
6597         * modules/unistr/u8-to-u16: New file.
6598         * lib/unistr/u8-to-u16.c: New file.
6599
6600         * modules/unistr/u8-to-u32: New file.
6601         * lib/unistr/u8-to-u32.c: New file.
6602
6603         * modules/unistr/u16-to-u8: New file.
6604         * lib/unistr/u16-to-u8.c: New file.
6605
6606         * modules/unistr/u16-to-u32: New file.
6607         * lib/unistr/u16-to-u32.c: New file.
6608
6609         * modules/unistr/u32-to-u8: New file.
6610         * lib/unistr/u32-to-u8.c: New file.
6611
6612         * modules/unistr/u32-to-u16: New file.
6613         * lib/unistr/u32-to-u16.c: New file.
6614
6615         * modules/unistr/u8-check: New file.
6616         * modules/unistr/u16-check: New file.
6617         * modules/unistr/u32-check: New file.
6618         * lib/unistr/u8-check.c: New file.
6619         * lib/unistr/u16-check.c: New file.
6620         * lib/unistr/u32-check.c: New file.
6621
6622         * modules/unistr/u8-chr: New file.
6623         * modules/unistr/u16-chr: New file.
6624         * modules/unistr/u32-chr: New file.
6625         * lib/unistr/u8-chr.c: New file.
6626         * lib/unistr/u16-chr.c: New file.
6627         * lib/unistr/u32-chr.c: New file.
6628
6629         * modules/unistr/u8-cmp: New file.
6630         * modules/unistr/u16-cmp: New file.
6631         * modules/unistr/u32-cmp: New file.
6632         * lib/unistr/u8-cmp.c: New file.
6633         * lib/unistr/u16-cmp.c: New file.
6634         * lib/unistr/u32-cmp.c: New file.
6635
6636         * modules/unistr/u8-cpy: New file.
6637         * modules/unistr/u16-cpy: New file.
6638         * modules/unistr/u32-cpy: New file.
6639         * lib/unistr/u8-cpy.c: New file.
6640         * lib/unistr/u16-cpy.c: New file.
6641         * lib/unistr/u32-cpy.c: New file.
6642         * lib/unistr/u-cpy.h: New file.
6643
6644         * modules/unistr/u8-cpy-alloc: New file.
6645         * modules/unistr/u16-cpy-alloc: New file.
6646         * modules/unistr/u32-cpy-alloc: New file.
6647         * lib/unistr/u8-cpy-alloc.c: New file.
6648         * lib/unistr/u16-cpy-alloc.c: New file.
6649         * lib/unistr/u32-cpy-alloc.c: New file.
6650         * lib/unistr/u-cpy-alloc.h: New file.
6651
6652         * modules/unistr/u8-endswith: New file.
6653         * modules/unistr/u16-endswith: New file.
6654         * modules/unistr/u32-endswith: New file.
6655         * lib/unistr/u8-endswith.c: New file.
6656         * lib/unistr/u16-endswith.c: New file.
6657         * lib/unistr/u32-endswith.c: New file.
6658         * lib/unistr/u-endswith.h: New file.
6659
6660         * modules/unistr/u8-mblen: New file.
6661         * modules/unistr/u16-mblen: New file.
6662         * modules/unistr/u32-mblen: New file.
6663         * lib/unistr/u8-mblen.c: New file.
6664         * lib/unistr/u16-mblen.c: New file.
6665         * lib/unistr/u32-mblen.c: New file.
6666
6667         * modules/unistr/u8-mbtouc: New file.
6668         * modules/unistr/u16-mbtouc: New file.
6669         * modules/unistr/u32-mbtouc: New file.
6670         * lib/unistr/u8-mbtouc.c: New file.
6671         * lib/unistr/u16-mbtouc.c: New file.
6672         * lib/unistr/u32-mbtouc.c: New file.
6673
6674         * modules/unistr/u8-mbtouc-safe: New file.
6675         * modules/unistr/u16-mbtouc-safe: New file.
6676         * modules/unistr/u32-mbtouc-safe: New file.
6677         * lib/unistr/u8-mbtouc-safe.c: New file.
6678         * lib/unistr/u16-mbtouc-safe.c: New file.
6679         * lib/unistr/u32-mbtouc-safe.c: New file.
6680
6681         * modules/unistr/u8-move: New file.
6682         * modules/unistr/u16-move: New file.
6683         * modules/unistr/u32-move: New file.
6684         * lib/unistr/u8-move.c: New file.
6685         * lib/unistr/u16-move.c: New file.
6686         * lib/unistr/u32-move.c: New file.
6687         * lib/unistr/u-move.h: New file.
6688
6689         * modules/unistr/u8-next: New file.
6690         * modules/unistr/u16-next: New file.
6691         * modules/unistr/u32-next: New file.
6692         * lib/unistr/u8-next.c: New file.
6693         * lib/unistr/u16-next.c: New file.
6694         * lib/unistr/u32-next.c: New file.
6695
6696         * modules/unistr/u8-prev: New file.
6697         * modules/unistr/u16-prev: New file.
6698         * modules/unistr/u32-prev: New file.
6699         * lib/unistr/u8-prev.c: New file.
6700         * lib/unistr/u16-prev.c: New file.
6701         * lib/unistr/u32-prev.c: New file.
6702
6703         * modules/unistr/u8-set: New file.
6704         * modules/unistr/u16-set: New file.
6705         * modules/unistr/u32-set: New file.
6706         * lib/unistr/u8-set.c: New file.
6707         * lib/unistr/u16-set.c: New file.
6708         * lib/unistr/u32-set.c: New file.
6709         * lib/unistr/u-set.h: New file.
6710
6711         * modules/unistr/u8-startswith: New file.
6712         * modules/unistr/u16-startswith: New file.
6713         * modules/unistr/u32-startswith: New file.
6714         * lib/unistr/u8-startswith.c: New file.
6715         * lib/unistr/u16-startswith.c: New file.
6716         * lib/unistr/u32-startswith.c: New file.
6717         * lib/unistr/u-startswith.h: New file.
6718
6719         * modules/unistr/u8-stpcpy: New file.
6720         * modules/unistr/u16-stpcpy: New file.
6721         * modules/unistr/u32-stpcpy: New file.
6722         * lib/unistr/u8-stpcpy.c: New file.
6723         * lib/unistr/u16-stpcpy.c: New file.
6724         * lib/unistr/u32-stpcpy.c: New file.
6725         * lib/unistr/u-stpcpy.h: New file.
6726
6727         * modules/unistr/u8-stpncpy: New file.
6728         * modules/unistr/u16-stpncpy: New file.
6729         * modules/unistr/u32-stpncpy: New file.
6730         * lib/unistr/u8-stpncpy.c: New file.
6731         * lib/unistr/u16-stpncpy.c: New file.
6732         * lib/unistr/u32-stpncpy.c: New file.
6733         * lib/unistr/u-stpncpy.h: New file.
6734
6735         * modules/unistr/u8-strcat: New file.
6736         * modules/unistr/u16-strcat: New file.
6737         * modules/unistr/u32-strcat: New file.
6738         * lib/unistr/u8-strcat.c: New file.
6739         * lib/unistr/u16-strcat.c: New file.
6740         * lib/unistr/u32-strcat.c: New file.
6741         * lib/unistr/u-strcat.h: New file.
6742
6743         * modules/unistr/u8-strchr: New file.
6744         * modules/unistr/u16-strchr: New file.
6745         * modules/unistr/u32-strchr: New file.
6746         * lib/unistr/u8-strchr.c: New file.
6747         * lib/unistr/u16-strchr.c: New file.
6748         * lib/unistr/u32-strchr.c: New file.
6749
6750         * modules/unistr/u8-strcmp: New file.
6751         * modules/unistr/u16-strcmp: New file.
6752         * modules/unistr/u32-strcmp: New file.
6753         * lib/unistr/u8-strcmp.c: New file.
6754         * lib/unistr/u16-strcmp.c: New file.
6755         * lib/unistr/u32-strcmp.c: New file.
6756
6757         * modules/unistr/u8-strcpy: New file.
6758         * modules/unistr/u16-strcpy: New file.
6759         * modules/unistr/u32-strcpy: New file.
6760         * lib/unistr/u8-strcpy.c: New file.
6761         * lib/unistr/u16-strcpy.c: New file.
6762         * lib/unistr/u32-strcpy.c: New file.
6763         * lib/unistr/u-strcpy.h: New file.
6764
6765         * modules/unistr/u8-strcspn: New file.
6766         * modules/unistr/u16-strcspn: New file.
6767         * modules/unistr/u32-strcspn: New file.
6768         * lib/unistr/u8-strcspn.c: New file.
6769         * lib/unistr/u16-strcspn.c: New file.
6770         * lib/unistr/u32-strcspn.c: New file.
6771         * lib/unistr/u-strcspn.h: New file.
6772
6773         * modules/unistr/u8-strdup: New file.
6774         * modules/unistr/u16-strdup: New file.
6775         * modules/unistr/u32-strdup: New file.
6776         * lib/unistr/u8-strdup.c: New file.
6777         * lib/unistr/u16-strdup.c: New file.
6778         * lib/unistr/u32-strdup.c: New file.
6779         * lib/unistr/u-strdup.h: New file.
6780
6781         * modules/unistr/u8-strlen: New file.
6782         * modules/unistr/u16-strlen: New file.
6783         * modules/unistr/u32-strlen: New file.
6784         * lib/unistr/u8-strlen.c: New file.
6785         * lib/unistr/u16-strlen.c: New file.
6786         * lib/unistr/u32-strlen.c: New file.
6787         * lib/unistr/u-strlen.h: New file.
6788
6789         * modules/unistr/u8-strmblen: New file.
6790         * modules/unistr/u16-strmblen: New file.
6791         * modules/unistr/u32-strmblen: New file.
6792         * lib/unistr/u8-strmblen.c: New file.
6793         * lib/unistr/u16-strmblen.c: New file.
6794         * lib/unistr/u32-strmblen.c: New file.
6795
6796         * modules/unistr/u8-strmbtouc: New file.
6797         * modules/unistr/u16-strmbtouc: New file.
6798         * modules/unistr/u32-strmbtouc: New file.
6799         * lib/unistr/u8-strmbtouc.c: New file.
6800         * lib/unistr/u16-strmbtouc.c: New file.
6801         * lib/unistr/u32-strmbtouc.c: New file.
6802
6803         * modules/unistr/u8-strncat: New file.
6804         * modules/unistr/u16-strncat: New file.
6805         * modules/unistr/u32-strncat: New file.
6806         * lib/unistr/u8-strncat.c: New file.
6807         * lib/unistr/u16-strncat.c: New file.
6808         * lib/unistr/u32-strncat.c: New file.
6809         * lib/unistr/u-strncat.h: New file.
6810
6811         * modules/unistr/u8-strncmp: New file.
6812         * modules/unistr/u16-strncmp: New file.
6813         * modules/unistr/u32-strncmp: New file.
6814         * lib/unistr/u8-strncmp.c: New file.
6815         * lib/unistr/u16-strncmp.c: New file.
6816         * lib/unistr/u32-strncmp.c: New file.
6817
6818         * modules/unistr/u8-strncpy: New file.
6819         * modules/unistr/u16-strncpy: New file.
6820         * modules/unistr/u32-strncpy: New file.
6821         * lib/unistr/u8-strncpy.c: New file.
6822         * lib/unistr/u16-strncpy.c: New file.
6823         * lib/unistr/u32-strncpy.c: New file.
6824         * lib/unistr/u-strncpy.h: New file.
6825
6826         * modules/unistr/u8-strnlen: New file.
6827         * modules/unistr/u16-strnlen: New file.
6828         * modules/unistr/u32-strnlen: New file.
6829         * lib/unistr/u8-strnlen.c: New file.
6830         * lib/unistr/u16-strnlen.c: New file.
6831         * lib/unistr/u32-strnlen.c: New file.
6832         * lib/unistr/u-strnlen.h: New file.
6833
6834         * modules/unistr/u8-strpbrk: New file.
6835         * modules/unistr/u16-strpbrk: New file.
6836         * modules/unistr/u32-strpbrk: New file.
6837         * lib/unistr/u8-strpbrk.c: New file.
6838         * lib/unistr/u16-strpbrk.c: New file.
6839         * lib/unistr/u32-strpbrk.c: New file.
6840         * lib/unistr/u-strpbrk.h: New file.
6841
6842         * modules/unistr/u8-strrchr: New file.
6843         * modules/unistr/u16-strrchr: New file.
6844         * modules/unistr/u32-strrchr: New file.
6845         * lib/unistr/u8-strrchr.c: New file.
6846         * lib/unistr/u16-strrchr.c: New file.
6847         * lib/unistr/u32-strrchr.c: New file.
6848
6849         * modules/unistr/u8-strspn: New file.
6850         * modules/unistr/u16-strspn: New file.
6851         * modules/unistr/u32-strspn: New file.
6852         * lib/unistr/u8-strspn.c: New file.
6853         * lib/unistr/u16-strspn.c: New file.
6854         * lib/unistr/u32-strspn.c: New file.
6855         * lib/unistr/u-strspn.h: New file.
6856
6857         * modules/unistr/u8-strstr: New file.
6858         * modules/unistr/u16-strstr: New file.
6859         * modules/unistr/u32-strstr: New file.
6860         * lib/unistr/u8-strstr.c: New file.
6861         * lib/unistr/u16-strstr.c: New file.
6862         * lib/unistr/u32-strstr.c: New file.
6863         * lib/unistr/u-strstr.h: New file.
6864
6865         * modules/unistr/u8-strtok: New file.
6866         * modules/unistr/u16-strtok: New file.
6867         * modules/unistr/u32-strtok: New file.
6868         * lib/unistr/u8-strtok.c: New file.
6869         * lib/unistr/u16-strtok.c: New file.
6870         * lib/unistr/u32-strtok.c: New file.
6871         * lib/unistr/u-strtok.h: New file.
6872
6873         * modules/unistr/u8-uctomb: New file.
6874         * modules/unistr/u16-uctomb: New file.
6875         * modules/unistr/u32-uctomb: New file.
6876         * lib/unistr/u8-uctomb.c: New file.
6877         * lib/unistr/u16-uctomb.c: New file.
6878         * lib/unistr/u32-uctomb.c: New file.
6879
6880         * MODULES.html.sh (Unicode string functions): Add the new modules.
6881
6882 2007-01-08  Bruno Haible  <bruno@clisp.org>
6883
6884         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
6885         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
6886         subdirectories.
6887
6888 2007-01-08  Karl Berry  <karl@gnu.org>
6889
6890         * doc/error.texi: mention that main() fns must set program_name
6891         when progname is used.
6892
6893 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
6894
6895         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
6896         WCTYPE_H is empty, for the benefit of builds from non-distclean
6897         directories.  Problem reported by Eric Blake in
6898         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
6899
6900 2007-01-08  Bruno Haible  <bruno@clisp.org>
6901
6902         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
6903         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
6904         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
6905         PROVIDE_CANONICALIZE_FILENAME_MODE.
6906         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
6907
6908 2007-01-08  Bruno Haible  <bruno@clisp.org>
6909
6910         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
6911         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
6912         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
6913         * lib/fts.c: Likewise.
6914         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
6915
6916 2006-12-25  Bruno Haible  <bruno@clisp.org>
6917
6918         * modules/utf8-ucs4-safe: New file.
6919         * lib/utf8-ucs4-safe.h: New file.
6920         * lib/unistr/utf8-ucs4-safe.c: New file.
6921
6922         * modules/utf16-ucs4-safe: New file.
6923         * lib/utf16-ucs4-safe.h: New file.
6924         * lib/unistr/utf16-ucs4-safe.c: New file.
6925
6926         * MODULES.html.sh (Unicode string functions): Add the new modules.
6927
6928 2007-01-08  Bruno Haible  <bruno@clisp.org>
6929
6930         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
6931         (Depends-on): Add unitypes.
6932         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
6933         (u8_mbtouc_aux): Move out to separate file.
6934         (u8_mbtouc): Use ucs4_t, uint8_t types.
6935         * lib/unistr/utf8-ucs4.c: New file.
6936
6937         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
6938         (Depends-on): Add unitypes.
6939         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
6940         (u16_mbtouc_aux): Move out to separate file.
6941         (u16_mbtouc): Use ucs4_t, uint16_t types.
6942         * lib/unistr/utf16-ucs4.c: New file.
6943
6944         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
6945         (Depends-on): Add unitypes.
6946         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
6947         (u8_uctomb_aux): Move out to separate file.
6948         (u8_uctomb): Use ucs4_t, uint8_t types.
6949         * lib/unistr/ucs4-utf8.c: New file.
6950
6951         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
6952         (Depends-on): Add unitypes.
6953         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
6954         (u16_uctomb_aux): Move out to separate file.
6955         (u16_uctomb): Use ucs4_t, uint16_t types.
6956         * lib/unistr/ucs4-utf16.c: New file.
6957
6958 2006-12-25  Bruno Haible  <bruno@clisp.org>
6959
6960         * modules/unitypes: New file.
6961         * lib/unitypes.h: New file.
6962         * MODULES.html.sh (func_all_modules): New section "Unicode string
6963         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
6964         this section. Add unitypes.
6965
6966 2007-01-08  Bruno Haible  <bruno@clisp.org>
6967
6968         Avoid variable names that conflict with those from libtool.
6969         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
6970         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
6971         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
6972         library_names_spec to acl_library_names_spec, hardcode_* to
6973         acl_hardcode_*.
6974         Reported by Ralf Wildenhues.
6975
6976 2007-01-08  Bruno Haible  <bruno@clisp.org>
6977
6978         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
6979         definition.
6980         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
6981         definition.
6982         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
6983         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
6984         definition.
6985         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
6986         definition.
6987         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
6988         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
6989         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
6990         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
6991         definition.
6992         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
6993         definition.
6994         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
6995         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
6996         GC_USE_<algorithm>.
6997         * lib/gc-libgcrypt.c: Likewise.
6998         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
6999         * modules/gc-arctwo (configure.ac): Likewise.
7000         * modules/gc-des (configure.ac): Likewise.
7001         * modules/gc-hmac-md5 (configure.ac): Likewise.
7002         * modules/gc-hmac-sha1 (configure.ac): Likewise.
7003         * modules/gc-md2 (configure.ac): Likewise.
7004         * modules/gc-md4 (configure.ac): Likewise.
7005         * modules/gc-md5 (configure.ac): Likewise.
7006         * modules/gc-random (configure.ac): Likewise.
7007         * modules/gc-rijndael (configure.ac): Likewise.
7008         * modules/gc-sha1 (configure.ac): Likewise.
7009
7010 2007-01-08  Bruno Haible  <bruno@clisp.org>
7011
7012         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
7013         macro definition.
7014         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
7015         definition.
7016         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
7017         definition.
7018         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
7019         * modules/fcntl-safer (configure.ac): Likewise.
7020         * modules/fopen-safer (configure.ac): Likewise.
7021         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
7022         GNULIB_FWRITEERROR macro definition.
7023
7024 2007-01-08  Bruno Haible  <bruno@clisp.org>
7025
7026         * m4/gnulib-common.m4: New file.
7027         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
7028         (func_get_filelist): Add m4/gnulib-common.m4.
7029
7030 2007-01-08  Bruno Haible  <bruno@clisp.org>
7031
7032         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
7033         command.
7034
7035 2007-01-08  Jim Meyering  <jim@meyering.net>
7036
7037         Use a more robust test for a "can't happen" condition.
7038         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
7039         narrowed the st_size value.  Presuming the "can't happen" condition
7040         is true, that narrowing could conceivably convert an invalid st_size
7041         value into a valid one.  Instead, use a change based on Matthew
7042         Woehlke's original patch.
7043
7044         Slight readability improvement: use an assert-like macro
7045         in place of literal "abort ()" uses.
7046         * lib/fts.c (fts_assert): Define.
7047         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
7048         Use this macro instead of a bare 'abort'.
7049
7050 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
7051
7052         Don't worry about using IRIX 5.3's wctype.h broken definitions;
7053         simply work around them.
7054         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
7055         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
7056         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
7057         declaring.
7058         Don't bother to define as macros, since the standard doesn't require it.
7059         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
7060         longer worry about IRIX 5.3.
7061         (HAVE_WCTYPE_CTMP_BUG): Remove.
7062
7063 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7064
7065         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
7066         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
7067         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
7068         Problems reported by Georg Schwarz for IRIX 5.3.
7069
7070         * gnulib-tool (autoconf_minversion): Take the maximum version number
7071         found, not the minimum.  Problem reported by James Youngman.
7072
7073 2007-01-03  Karl Berry  <karl@gnu.org>
7074
7075         * doc/error.texi: new file, explaining interaction with progname.
7076         * doc/gnulib.texi: include it.  Update copyright.
7077
7078 2007-01-03  Simon Josefsson  <simon@josefsson.org>
7079
7080         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
7081         AC_CANONICAL_HOST, to improve autobuild outputs.
7082
7083 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
7084             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7085
7086         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
7087         sockets, server sockets, and other file descriptors.  Count errors
7088         to compute the return value.  Reorder the code a bit to be easier
7089         to follow.  Don't set event bits that were not requested (except
7090         POLLERR and POLLHUP).
7091
7092 2007-01-01  Bruno Haible  <bruno@clisp.org>
7093
7094         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
7095
7096 2007-01-03  Jim Meyering  <jim@meyering.net>
7097
7098         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
7099
7100 2007-01-02  Bruno Haible  <bruno@clisp.org>
7101
7102         * modules/settime (Include): Require timespec.h.
7103         * modules/nanosleep (Include): Likewise.
7104
7105 2007-01-01  Bruno Haible  <bruno@clisp.org>
7106
7107         * gnulib-tool (func_emit_copyright_notice): Bump year.
7108         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
7109
7110 2007-01-01  Bruno Haible  <bruno@clisp.org>
7111
7112         Improve support for OpenBSD.
7113         * build-aux/config.rpath (libname_spec): Export.
7114         (library_names_spec): New variable. Export.
7115         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
7116         library_names_spec from the config.rpath output. Locate shared library
7117         through the name pattern in library_names_spec.
7118
7119 2007-01-01  Eric Blake  <ebb9@byu.net>
7120
7121         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
7122
7123 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
7124
7125         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
7126         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
7127         assume the C locale, and avoid an "eval" that could cause trouble.
7128         Problem with SORT reported by Bob Proulx.
7129
7130         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
7131         Define.  Trivial patch from Henning Nielsen Lund, originally
7132         sent to bug-grep@gnu.org today.
7133
7134 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
7135
7136         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
7137         struct stat.  Problem reported by Henning Nielsen Lund.
7138         * lib/acl.c: Include acl.h first, to check interface.  Don't
7139         bother to include sys/types.h and sys/stat.h again.
7140
7141 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
7142
7143         Import the following change from libc; problem reported by
7144         Sven Verdoolaege.
7145
7146         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
7147
7148         [BZ #1373]
7149         * lib/argp.h: Remove __NTH for __argp_usage inline function.
7150
7151 2006-12-28  Jim Meyering  <jim@meyering.net>
7152
7153         * build-aux/announce-gen: Do not assume that the package
7154         builds any of tar.gz, tar.bz2, and .xdelta files.
7155         Suggestion from Simon Josefsson.
7156
7157 2006-12-28  Simon Josefsson  <simon@josefsson.org>
7158
7159         * modules/announce-gen: New file.
7160
7161 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
7162
7163         * lib/mbchar.h: Just include <wctype.h>; the wctype module
7164         handles its gotchas now.
7165         * lib/mbswidth.c: Likewise.
7166         * lib/wcwidth.h: Likewise.
7167         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
7168         and iswcntrl; the wctype module does this stuff now.
7169         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
7170         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
7171         * modules/mbchar (Depends-on): Add wctype.
7172         * modules/mbswidth (Depends-on): Likewise.
7173         * modules/wcwidth (Depends-on): Likewise.
7174
7175 2006-12-27  Eric Blake  <ebb9@byu.net>
7176
7177         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
7178         module uses more than what <wctype.h> is required to provide.
7179
7180 2006-12-26  Eric Blake  <ebb9@byu.net>
7181
7182         * gnulib-tool (sed_extract_prog): Avoid space-tab.
7183
7184 2006-12-26  Eric Blake  <ebb9@byu.net>
7185
7186         * modules/absolute-header: New module.
7187         * modules/fcntl (Depends-on): Depend on it.
7188         * modules/inttypes (Depends-on): Likewise.
7189         * modules/stdint (Depends-on): Likewise.
7190         * modules/sys_stat (Depends-on): Likewise.
7191         * modules/wctype (Depends-on): Likewise.
7192         * MODULES.html.sh (Support for building libraries and
7193         executables): Document it.
7194
7195 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
7196
7197         * gnulib-tool (SED): Remove, undoing previous change.
7198         The problem was that it broke coreutils on Solaris, because
7199         "sed --posix" leaked into a makefile.
7200         (sed): New alias, if 'alias' and GNU sed.
7201
7202 2006-12-24  Jim Meyering  <jim@meyering.net>
7203
7204         Work around an fchownat bug in glibc-2.4:
7205         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
7206         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
7207         in spite of the -P option.
7208         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
7209         New macros.
7210         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
7211         * modules/openat (Files): Add lib/fchownat.c.
7212         * lib/openat.c (fchownat): Don't define here.  Move to...
7213         * lib/fchownat.c: ...this new file.
7214
7215 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
7216
7217         Fix bug reported by Bruno Haible in
7218         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
7219         where quotearg.c didn't compile on Mac OS X 10.2 because it
7220         lacks <wchar.h> and wint_t.
7221         * lib/wctype_.h (__wctype_wint_t): New type.
7222         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
7223         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
7224         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
7225         Arg is now of type __wctype_wint_t, not wint_t.
7226         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
7227         substitute HAVE_WINT_T.
7228         * modules/wctype (Files): Add m4/wint_t.m4.
7229         (wctype.h): Substitute HAVE_WINT_T.
7230
7231 2006-12-23  Bruno Haible  <bruno@clisp.org>
7232
7233         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
7234
7235 2006-12-23  Bruno Haible  <bruno@clisp.org>
7236
7237         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
7238         S_ISLNK.
7239         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
7240         mingw.
7241
7242 2006-12-22  Bruno Haible  <bruno@clisp.org>
7243
7244         * lib/copy-file.c: Include acl.h.
7245         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
7246         Close the file descriptors only after being done with copy_acl.
7247         * modules/copy-file (Depends-on): Add acl.
7248
7249 2006-12-22  Bruno Haible  <bruno@clisp.org>
7250
7251         * gnulib-tool (SED): New variable.
7252         Use $SED instead of sed everywhere.
7253
7254 2006-12-22  Bruno Haible  <bruno@clisp.org>
7255
7256         * modules/no-c++: New file.
7257         * m4/no-c++.m4: New file.
7258         * MODULES.html.sh (Support for building libraries and executables):
7259         Add no-c++.
7260
7261 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
7262
7263         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7264         Include <limits.h>, and use its INT_MAX to rewrite the
7265         j loop so that it does not overflow 'int'.  Problem reported by
7266         Ralf Wildenhues in
7267         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
7268         Play it safe by shifting left by 1 rather than multiplying by 2,
7269         as GCC is less likely to optimize this away when the value
7270         is signed (when it assumes overflow leads to undefined behavior).
7271         Also, don't assume time_t uses two's complement.
7272
7273 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
7274
7275         * MODULES.html.sh: New module wctype.
7276         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
7277         * lib/fnmatch.c: Don't bother to include <wchar.h> before
7278         <wctype.h>, since the new wctype module should fix this.
7279         * lib/quotearg.c: Include <wctype.h> unconditionally, since
7280         the wctype module should arrange for it.
7281         * lib/regex_internal.h: Likewise.
7282         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
7283         since the wctype module should handle this now.
7284         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
7285         * modules/fnmatch (Depends-on): Add wctype.
7286         * modules/quotearg (Depends-on): Likewise.
7287         * modules/regex (Depends-on): Likewise.
7288
7289 2006-12-19  Bruno Haible  <bruno@clisp.org>
7290
7291         * lib/strdup.h [C++]: Wrap definitions in extern "C".
7292         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
7293
7294 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7295
7296         * modules/savewd (Depends-on): Fix dependency on fcntl.
7297
7298 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7299
7300         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
7301         conforms to C99, rather than relying on the user's environment
7302         setting of STDINT_H.
7303
7304 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
7305         and Eric Blake  <ebb9@byu.net>
7306
7307         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
7308         This is more consistent with the other defines here.
7309         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
7310         Port to z/OS.  Problem reported by Paul Gilmartin.
7311         Change local vars to use gl_ prefix rather than ac_.
7312         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
7313         with other defines.
7314         * modules/double-slash-root: New module.
7315         * modules/dirname (Files): Remove m4/double-slash-root.m4.
7316         (Depends-on): Add double-slash-root.
7317         * MODULES.html.sh (File system functions): Mention new module.
7318
7319 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
7320
7321         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
7322         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
7323         This is for the benefit of gzip, which doesn't do i18n.
7324
7325 2006-12-12  Jim Meyering  <jim@meyering.net>
7326
7327         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
7328         Reported by Andreas Schwab <schwab@suse.de>.
7329
7330 2006-12-12  Bruno Haible  <bruno@clisp.org>
7331
7332         Merge these changes.
7333         2006-09-05  Bruno Haible  <bruno@clisp.org>
7334         * lib/iconvme.c (iconv_string): No need to save and restore errno when
7335         iconv_alloc succeeded.
7336         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
7337         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
7338         test for " && dest " at the end - dest is always != NULL there. Call
7339         iconv with 4xNULL arguments initially, to reset the state. Call iconv
7340         with 2xNULL arguments, also to flush the state storage. Handle the
7341         IRIX iconv behaviour. Realloc the final result, to throw away unused
7342         memory.
7343
7344 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
7345
7346         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
7347         and fchmodat unconditionally, since glibc 2.4 has them.
7348         Problem reported by Arkadiusz Miskiewicz.
7349
7350 2006-12-10  Bruno Haible  <bruno@clisp.org>
7351
7352         * gnulib-tool (func_import): Show the include files only for those
7353         modules that are copied and specified.
7354         Reported by Karl Berry.
7355
7356 2006-12-08  Jim Meyering  <jim@meyering.net>
7357
7358         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
7359         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
7360
7361         * build-aux/announce-gen: Add two new options, both optional:
7362         --bootstrap-tools=TOOL_LIST
7363               a comma-separated list of tools, e.g.,
7364               autoconf,automake,bison,gnulib
7365         --gnulib-snapshot-date=DATE
7366               if gnulib is in the bootstrap tool list,
7367               then report this as the snapshot date.
7368               If not specified, use the current date/time.
7369               If you specify a date here, be sure it's UTC.
7370
7371 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7372
7373         * tests/test-argp-2.sh: Fix test to match actual output.
7374         (func_compare): Fix sed script to be portable.
7375
7376 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
7377
7378         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
7379         workaround for this case.  It is not autoconfigured now; offhand
7380         it's hard to see how to autoconfigure it.
7381
7382 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
7383
7384         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
7385         a directory that is about to be chowned.  Such a directory's
7386         initial file permissions should permit the owner only and this
7387         should not be changed until after the chown, since the group and
7388         other bits would be incorrect if they granted permission before
7389         the chown.
7390
7391         Fix porting problem for iswctype reported by Georg Schwarz in:
7392         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
7393         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
7394         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
7395         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
7396         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
7397
7398 2006-12-03  Jim Meyering  <jim@meyering.net>
7399
7400         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
7401         p->fts_statp may not yet be defined.
7402         (fts_read): Instead, set it in the caller, once p->fts_statp is
7403         sure to be defined, and corresponds to a top-level directory.
7404         This bug made du -x fail.  Here's the coreutils test case:
7405         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
7406         Reported by Mike Frysinger.
7407
7408 2006-12-01  Jim Meyering  <jim@meyering.net>
7409
7410         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
7411         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
7412         Reported by Simon Josefsson.
7413
7414 2006-11-30  Jim Meyering  <jim@meyering.net>
7415
7416         * m4/warning.m4: Use the all-permissive copyright notice
7417         recommended by RMS (rather than LGPL).
7418         * m4/vararrays.m4: Likewise.
7419         * m4/flexmember.m4: Likewise.
7420
7421 2006-11-29  Bruno Haible  <bruno@clisp.org>
7422
7423         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7424         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
7425         using +=.
7426         Reported by Simon Josefsson <simon@josefsson.org>.
7427
7428 2006-11-28  James Youngman <jay@gnu.org>
7429
7430         * README: Advise users that they might find the bug-gnulib@gnu.org
7431         and autotools-announce@gnu.org mailing lists useful.
7432
7433 2006-11-28  Bruno Haible  <bruno@clisp.org>
7434
7435         * m4/ptrdiff_max.m4: Remove file.
7436
7437 2006-11-21  Bruno Haible  <bruno@clisp.org>
7438
7439         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
7440         _AC_COMPUTE_INT.
7441         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7442         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
7443         _AC_COMPUTE_INT.
7444         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7445         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
7446         _AC_COMPUTE_INT.
7447         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7448
7449 2006-11-28  Jim Meyering  <jim@meyering.net>
7450
7451         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
7452         warning from "gcc -Wshadow" about shadowing the builtin.
7453
7454 2006-11-27  Bruno Haible  <bruno@clisp.org>
7455
7456         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
7457         _AC_COMPUTE_INT.
7458         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
7459
7460 2006-11-27  Bruno Haible  <bruno@clisp.org>
7461             Paul Eggert  <eggert@cs.ucla.edu>
7462
7463         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
7464
7465 2006-11-26  Bruno Haible  <bruno@clisp.org>
7466
7467         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7468         noinst_LTLIBRARIES.
7469
7470 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
7471             Bruno Haible  <bruno@clisp.org>
7472
7473         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
7474         if compiling with "gcc -ansi".
7475
7476 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
7477
7478         Fix some incompatibilities with gcc -ansi -pedantic.
7479         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
7480         if compiling pedantically with GCC, unless it's C99 or later.
7481         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
7482         it mishandles gcc -ansi -pedantic as well.
7483         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
7484         if gcc -pedantic.
7485         * lib/regexec.c (check_node_accept_bytes): Don't use auto
7486         initializers for struct if -pedantic, unless it's C99 or later.
7487
7488 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
7489
7490         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
7491         Don't close an fd more than once. Identical atimes indicate
7492         success, not failure.
7493
7494 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
7495
7496         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
7497
7498 2006-11-23  Jim Meyering  <jim@meyering.net>
7499
7500         * build-aux/announce-gen: New file.  From coreutils.
7501
7502 2006-11-22  Jim Meyering  <jim@meyering.net>
7503
7504         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
7505         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
7506         (fts_read): Use a temporary to narrow the overused st_size member
7507         before using it in a switch statement.  Reported by Matthew Woehlke.
7508
7509         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
7510         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
7511
7512 2006-11-20  Bruno Haible  <bruno@clisp.org>
7513
7514         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
7515         changequote instead of pairs of brackets.
7516         Reported by Andreas Schwab <schwab@suse.de>.
7517
7518 2006-11-21  Jim Meyering  <jim@meyering.net>
7519
7520         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
7521         so as to remain compatible with older compilers.
7522         Patch from Michael Deutschmann.
7523
7524 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
7525
7526         * MODULES.html.sh (File system functions): Add openat.
7527
7528         * lib/openat.h (rpl_fstatat): New macro, if
7529         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
7530         (fstatat): Define to rpl_fstatat under the same conditions,
7531         unless COMPILING_FSTATAT.
7532         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
7533         seems to have the bug.
7534         * lib/fstatat.c: New file.
7535         * modules/openat (Files): Add it.
7536
7537 2006-11-20  Bruno Haible  <bruno@clisp.org>
7538
7539         * Makefile: New file.
7540
7541 2006-11-20  Jim Meyering  <jim@meyering.net>
7542
7543         The beginnings of syntax-related checks for gnulib.
7544         * lib/Makefile: New file.
7545         * lib/t-idcache: New script.  Ensure that the two halves of
7546         idcache.c stay in sync.
7547
7548         * lib/idcache.c: Adjust comments in user- and group- portions to
7549         be more accurate, and to be consistent with one another.
7550
7551 2006-11-20  Jim Meyering  <jim@meyering.net>
7552
7553         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
7554         continue using the flexible array member (thus, this module performs
7555         half as many malloc calls), with the addition that...
7556         (getgroup, getuser): Consistently record a non-match via an empty
7557         "name" string, and map an empty string match to a NULL return value.
7558         * modules/idcache (Depends-on): Re-add flexmember.
7559
7560         * lib/idcache.c (getuser): Remove all uses of the register keyword.
7561         (getuidbyname, getgroup, getgidbyname): Likewise.
7562
7563         Use cleaner syntax: NULL rather than 0.
7564         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
7565
7566 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
7567
7568         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
7569         It mishandled the case where the group was missing.
7570         Problem reported by Greg Schafer.
7571         * modules/idcache: Likewise.
7572
7573 2006-11-18  Jim Meyering  <jim@meyering.net>
7574
7575         * check-module (%exempt_header): Add exception for some
7576         conditionally-included headers.
7577
7578         * modules/i-ring (Depends-on): Add verify.
7579         (License): Change to LGPL.
7580
7581 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
7582
7583         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
7584         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
7585         and inttostr.h.  Use snprintf rather than uinttostr, so that
7586         LGPLed code doesn't depend on GPLed.
7587
7588 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
7589
7590         * modules/inline (License): Change from GPL to LGPL.
7591
7592 2006-11-17  Jim Meyering  <jim@meyering.net>
7593
7594         * modules/d-type (License): Switch to LGPL.
7595
7596 2006-11-15  Bruno Haible  <bruno@clisp.org>
7597
7598         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
7599
7600 2006-11-15  Eric Blake  <ebb9@byu.net>
7601
7602         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
7603         the module dependency.
7604
7605 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7606             Bruno Haible  <bruno@clisp.org>
7607
7608         * gnulib-tool (func_create_testdir): Add license consistency check.
7609
7610 2006-11-15  Eric Blake  <ebb9@byu.net>
7611
7612         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
7613         random "(cached)" in configure output.
7614
7615 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7616
7617         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
7618         test for conforming inttypes.h is both announced and cached.
7619
7620         * MODULES.html.sh (seen_modules, seen_files): New variables.
7621         (func_module): Rewrite to use a few less gnulib-tool and sed
7622         invocations.  Avoid a couple of quadratic algorithms for ...
7623         (missed_modules, missed_files): ... these, with ...
7624         (func_append, func_tmpdir): ... these new functions, from
7625         gnulib-tool.  Analogously, install traps for cleanup.
7626
7627         * tests/test-gc.c (main): Remove unused variables.
7628         * tests/test-read-file.c: Include stdlib.h, for 'free'.
7629
7630 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
7631
7632         * modules/inttostr (License): Change to LGPL.
7633
7634 2006-11-14  Eric Blake  <ebb9@byu.net>
7635
7636         * modules/tempname (License): Change to LGPL.
7637
7638 2006-11-14  Eric Blake  <ebb9@byu.net>
7639
7640         * doc/functions.texi (Function Portability): *printf functions on
7641         Cygwin now understand all POSIX size specifiers.
7642
7643 2006-11-14  Bruno Haible  <bruno@clisp.org>
7644
7645         * modules/c-ctype (License): Change to LGPL.
7646
7647 2006-11-12  Bruno Haible  <bruno@clisp.org>
7648
7649         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
7650         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
7651         for GNOME libraries, for which the include files are installed in
7652         subdirectories of $prefix/include.
7653
7654 2006-11-12  Bruno Haible  <bruno@clisp.org>
7655
7656         * m4/lib-link.m4: Require at least autoconf-2.54.
7657         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
7658         name to underscores for the --with option.
7659
7660 2006-11-13  Bruno Haible  <bruno@clisp.org>
7661
7662         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
7663         the tests directory.
7664         Reported by Ralf Wildenhues.
7665
7666 2006-11-13  Bruno Haible  <bruno@clisp.org>
7667
7668         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
7669         (func_emit_initmacro_end): Undo the override here.
7670         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
7671         Works around the famous automake error in coreutils.
7672
7673 2006-11-13  Eric Blake  <ebb9@byu.net>
7674
7675         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
7676         element, not its node.
7677
7678 2006-11-12  Bruno Haible  <bruno@clisp.org>
7679
7680         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
7681         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
7682
7683 2006-11-12  Bruno Haible  <bruno@clisp.org>
7684
7685         * gnulib-tool: New option --local-symlink.
7686         (func_usage): Document it.
7687         (lsymbolic): New variable.
7688         (func_import, func_create_testdir): If --symlink was not specified,
7689         test whether --local-symlink was specified and the file comes from
7690         the local_gnulib_dir.
7691
7692 2006-11-12  Bruno Haible  <bruno@clisp.org>
7693
7694         * gnulib-tool (func_ln): New function.
7695         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
7696
7697 2006-11-12  Bruno Haible  <bruno@clisp.org>
7698
7699         Finish support for source files in subdirectories.
7700         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
7701         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
7702         AUTOMAKE_OPTIONS.
7703         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
7704
7705 2006-11-12  Bruno Haible  <bruno@clisp.org>
7706
7707         * gnulib-tool (func_get_automake_snippet): Synthesize also an
7708         EXTRA_lib_SOURCES augmentation.
7709         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
7710
7711 2006-11-12  Jim Meyering  <jim@meyering.net>
7712
7713         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
7714         file descriptors.  This also averts a failure on systems with
7715         native openat support when a traversed directory lacks "x" access.
7716         * lib/fts_.h: Include "i-ring.h"
7717         (struct FTS) [fts_fd_ring]: New member.
7718         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
7719         (FCHDIR): Add parentheses.
7720         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
7721         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
7722         When descending, rather than simply closing the previous
7723         fts_cwd_fd value, push that file descriptor onto the ring.
7724         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
7725         (fts_open): Initialize the new fd_ring member.
7726         (fts_close): Clear the ring.
7727         (fts_safe_changedir): When possible, use our new fd_ring to skip
7728         the diropen and fstat and dev/ino comparison that would normally
7729         accompany a virtual `chdir ("..")'.
7730
7731         * modules/fts (Depends-on): Add i-ring.
7732         * modules/i-ring: New module.
7733         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
7734         * m4/i-ring.m4: New file.
7735
7736 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7737
7738         * gnulib-tool (func_create_testdir): Fix replacement of
7739         `build-aux' in configure.ac.  Run autotools in gltests
7740         subdirectory.
7741         (func_create_testdir, func_create_megatestdir, test): There is
7742         no need for '--force' in most autotool invocations in a new
7743         tree.  Actually fail the whole test if any of the tools, or the
7744         configure or make stages fail.
7745
7746         Sync from Automake.
7747         * build-aux/gnupload: Revert last change.  Add pointer to upload
7748         instructions of the GNU Maintenance Instructions.
7749         Suggestion by Karl Berry.
7750
7751 2006-11-10  Jim Meyering  <jim@meyering.net>
7752
7753         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
7754
7755 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
7756
7757         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
7758         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
7759         (bind_textdomain_codeset) [! ENABLE_NLS]:
7760         Evaluate all the arguments.  That way, callers get compatible behavior
7761         if the arguments have side effects.  Also, it avoids some GCC
7762         diagnostics in some cases; Joel E. Denny reported problems when Bison
7763         was configured with --enable-gcc-warnigs.
7764
7765 2006-11-10  Jim Meyering  <jim@meyering.net>
7766
7767         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
7768         relevant options in CFLAGS (like -O, -fno-inline) are taken into
7769         account.
7770
7771 2006-11-10  Jim Meyering  <jim@meyering.net>
7772
7773         * modules/inline: New file/module.
7774         * modules/xalloc (Files): Remove m4/inline.m4.
7775         (Depends-on): Add inline, instead.
7776         * modules/oset: Likewise.
7777         * modules/list: Likewise.
7778
7779 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
7780
7781         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
7782         Problem reported by Matthew Woehlke.
7783
7784 2006-11-09  Bruno Haible  <bruno@clisp.org>
7785
7786         * lib/tempname.c (gen_tempname): Remove variant that invokes
7787         __gen_tempname.
7788         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
7789         __gen_tempname.
7790
7791 2006-11-08  Bruno Haible  <bruno@clisp.org>
7792
7793         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
7794         to 'yes' instead of 'cross-compiling'.
7795
7796 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
7797
7798         * lib/quotearg.h (quotearg_free): New decl.
7799         * lib/quotearg.c (quotearg_free): New function.
7800         (slot0, nslots, slotvec0, slotvec):
7801         Now file-scope so that quotearg_free can get at them.
7802
7803 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7804
7805         Sync from Automake.
7806         * build-aux/gnupload: Add missing 'gnu' to example URL.
7807         Report by Karl Berry.
7808
7809 2006-11-08  Bruno Haible  <bruno@clisp.org>
7810
7811         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
7812         Suggested by Paul Eggert.
7813
7814 2006-11-08  Jim Meyering  <jim@meyering.net>
7815
7816         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
7817         It's already included if !_LIBC.
7818         (fts_safe_changedir): Add a comment.
7819
7820 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
7821
7822         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
7823         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
7824         Matthew Woehlke.
7825
7826         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
7827         definitions up, to avoid colliding with change below.
7828         (static_inline) [HAVE_INLINE]: New macro.
7829         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
7830         Provide extern decls when !HAVE_INLINE.  Do not define unless
7831         static_inline is defined, either by us or by xmalloc.c.  Use
7832         static_inline rather than static inline.
7833         (XCALLOC): Optimize sizeof(T) = 1 case.
7834         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
7835
7836 2006-11-07  Bruno Haible  <bruno@clisp.org>
7837
7838         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
7839         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
7840         AC_C_INLINE.
7841         * modules/xalloc (Files): Add m4/inline.m4.
7842
7843 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7844
7845         * README: Fix typo.
7846         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
7847         (Miscellanous Notes): ...from this.
7848
7849 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
7850
7851         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
7852         Mention that offsetof should be used instead of sizeof.
7853         From Bruno Haible.
7854
7855 2006-11-07  Bruno Haible  <bruno@clisp.org>
7856
7857         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
7858
7859 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
7860
7861         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
7862         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
7863         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
7864         (gl_tree_add_before, gl_tree_add_after):
7865         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
7866         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
7867         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
7868         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
7869         (gl_linked_add_after, gl_linked_add_at): Likewise.
7870         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
7871         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
7872         (gl_tree_add_before, gl_tree_add_after): Likewise.
7873         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
7874         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
7875         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
7876
7877 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7878
7879         * lib/gl_oset.h: Use C comment style, not C++ comment style.
7880
7881 2006-11-06  Bruno Haible  <bruno@clisp.org>
7882
7883         * m4/inline.m4: New file.
7884         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
7885         * modules/list (Files): Add m4/inline.m4.
7886         * modules/oset (Files): Likewise.
7887
7888 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
7889
7890         * lib/idcache.c: Include <stddef.h>, for offsetof.
7891         (struct userid.name): Change from char * to a flexible array member.
7892         All uses changed.
7893         * modules/idcache (Depends-on): Add flexmember.
7894
7895         * MODULES.html.sh (Core language properties): New module flexmember.
7896         * modules/flexmember, m4/flexmember.m4: New files.
7897
7898         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
7899         inline functions that are identical with the old xnmalloc_inline,
7900         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
7901         that we can avoid some unnecessary integer multiplications and
7902         divisions in the common case where the element size is known at
7903         compile time.
7904         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
7905         needed.
7906         (xnboundedmalloc): Remove.
7907         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
7908         arguments, for consistency with rest of this header.
7909         (xcharalloc): Rewrite using XNMALLOC.
7910         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
7911         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
7912         versions have been moved to lib/xalloc.h and renamed to be the
7913         non-*_inline versions.
7914         (xmalloc, xrealloc): Implement without reference to the xnmalloc
7915         and xnrealloc functions, since those functions are now inline and
7916         now call us.
7917         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
7918         renaming described above.
7919         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
7920         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
7921         captures the dependency in AC_C_INLINE.
7922
7923         New module canonicalize-lgpl, proposed by Charles Wilson in
7924         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
7925         with a few small changes afterwards.
7926         * MODULES.html.sh (File system functions): New module
7927         canonicalize-lgpl.
7928         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
7929         and canonicalize_file_name.
7930         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
7931         * modules/canonicalize-lgpl: New files.
7932
7933 2006-11-05  Bruno Haible  <bruno@clisp.org>
7934
7935         * gnulib-tool (func_import, func_create_testdir): Create directories
7936         also for files in subdirectories of lib/.
7937
7938 2006-11-05  Bruno Haible  <bruno@clisp.org>
7939
7940         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
7941         ANSI C compliant.
7942
7943 2006-11-03  Bruno Haible  <bruno@clisp.org>
7944
7945         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
7946         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
7947         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
7948         (xnboundedmalloc): New inline function.
7949         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
7950         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
7951         xmalloc.
7952         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
7953         xmalloc.
7954         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
7955         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
7956         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
7957         xmalloc.
7958         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
7959         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
7960         xmalloc.
7961         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
7962         gl_tree_add_after): Use XMALLOC instead of xmalloc.
7963         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
7964         xmalloc.
7965         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
7966         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
7967         gl_tree_add_after): Use XMALLOC instead of xmalloc.
7968         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
7969         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
7970         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
7971         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
7972
7973 2006-11-03  Bruno Haible  <bruno@clisp.org>
7974
7975         * lib/c-ctype.h [C++]: Define functions without name mangling.
7976         * lib/fwriteerror.h [C++]: Likewise.
7977         * lib/gcd.h [C++]: Likewise.
7978         * lib/linebreak.h [C++]: Likewise.
7979
7980 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
7981
7982         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
7983         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
7984         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
7985         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
7986         Check for functions and headers just once.
7987         Check for declaration of canonicalize_file_name.
7988         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
7989
7990 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
7991
7992         * gnulib-tool (func_import): Fix typo in actioncmd.
7993
7994 2006-11-02  Bruno Haible  <bruno@clisp.org>
7995
7996         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
7997         newline sequence in the Makefile.am snippet as a space, like "make"
7998         does.
7999         Reported by Roger Persson <perrog@gmail.com>.
8000
8001 2006-11-01  Bruno Haible  <bruno@clisp.org>
8002
8003         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
8004         already declared in <string.h>.
8005         * lib/strcase.h (strncasecmp): Don't declare it if yes.
8006
8007 2006-11-01  Bruno Haible  <bruno@clisp.org>
8008
8009         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
8010         * lib/strcase.h: Include <string.h>.
8011         (strcasecmp): Define to rpl_strcasecmp here.
8012
8013 2006-11-01  Bruno Haible  <bruno@clisp.org>
8014
8015         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
8016
8017 2006-11-01  Eric Blake  <ebb9@byu.net>
8018
8019         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
8020
8021         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
8022
8023 2006-10-29  Bruno Haible  <bruno@clisp.org>
8024
8025         Make it compile in C++ mode.
8026         * lib/full-write.c (full_rw): Add a cast.
8027
8028 2006-11-01  Bruno Haible  <bruno@clisp.org>
8029
8030         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
8031         be POSIX compliant.
8032         Reported by Roger Persson <perrog@gmail.com>.
8033
8034 2006-11-01  Eric Blake  <ebb9@byu.net>
8035
8036         * lib/getopt_.h: Fix comments.
8037
8038 2006-10-31  Eric Blake  <ebb9@byu.net>
8039
8040         * modules/tmpdir (Depends-on): Add sys_stat.
8041         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
8042         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
8043         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
8044         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
8045         tempname.
8046
8047 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
8048
8049         Avoid some C++ diagnostics reported by Bruno Haible.
8050         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
8051         xmalloc.
8052         (quotearg_alloc): Use xcharalloc rather than xmalloc.
8053         (struct slotvec): Move to top level.
8054         (quotearg_n_options): Rewrite to avoid xmalloc.
8055         * lib/xalloc.h (xcharalloc): New function.
8056         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
8057         [defined __cplusplus]: Add function template that provides result
8058         type propagation.  This part of the change is from Bruno Haible.
8059
8060 2006-10-29  Bruno Haible  <bruno@clisp.org>
8061
8062         Make it compile in C++ mode.
8063         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
8064         * lib/strnlen1.c (strnlen1): Cast memchr result.
8065         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
8066         * lib/clean-temp.c (string_equals, string_hash): Add casts.
8067         (create_temp_dir): Rename local variable 'template'.
8068         (compile_csharp_using_sscli): Add cast.
8069         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
8070         * lib/findprog.c (find_in_path): Likewise.
8071         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
8072         * lib/wait-process.c (register_slave_subprocess): Likewise.
8073
8074 2006-10-22  Bruno Haible  <bruno@clisp.org>
8075
8076         * modules/tsearch: New file.
8077         * lib/tsearch.h: New file.
8078         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
8079         * m4/tsearch.m4: New file.
8080         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
8081
8082 2006-10-29  Eric Blake  <ebb9@byu.net>
8083
8084         * lib/arcfour.c: Assume config.h.
8085         * lib/arctwo.c: Likewise.
8086         * lib/base64.c: Likewise.
8087         * lib/check-version.c: Likewise.
8088         * lib/crc.c: Likewise.
8089         * lib/des.c: Likewise.
8090         * lib/gc-gnulib.c: Likewise.
8091         * lib/gc-libgcrypt.c: Likewise.
8092         * lib/gc-pbkdf2-sha1.c: Likewise.
8093         * lib/getaddrinfo.c: Likewise.
8094         * lib/getdelim.c: Likewise.
8095         * lib/getline.c: Likewise.
8096         * lib/hmac-md5.c: Likewise.
8097         * lib/hmac-sha1.c: Likewise.
8098         * lib/iconvme.c: Likewise.
8099         * lib/md2.c: Likewise.
8100         * lib/md4.c: Likewise.
8101         * lib/memxor.c: Likewise.
8102         * lib/read-file.c: Likewise.
8103         * lib/readline.c: Likewise.
8104         * lib/rijndael-alg-fst.c: Likewise.
8105         * lib/rijndael-api-fst.c: Likewise.
8106         * lib/xgetdomainname.c: Likewise.
8107
8108 2006-10-28  Eric Blake  <ebb9@byu.net>
8109
8110         * lib/xstrndup.c: Assume config.h.
8111
8112 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8113
8114         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
8115         stat-macros.h is now for our own macros, whereas stat_h is for
8116         macros in the <sys/stat.h> name space.
8117         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
8118         (STAT_MACROS_H): Remove.
8119         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
8120         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
8121         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
8122         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
8123         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
8124         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
8125         Move these macros to ...
8126         * lib/stat_.h: here.  Don't include stat-macros.h.
8127         * lib/canonicalize.c: Don't include stat-macros.h.
8128         * lib/chown.c: Likewise.
8129         * lib/euidaccess.c: Likewise.
8130         * lib/file-type.c: Likewise.
8131         * lib/filemode.c: Likewise.
8132         * lib/glob.c: Likewise.
8133         * lib/isapipe.c: Likewise.
8134         * lib/lchown.c: Likewise.
8135         * lib/lstat.c: Likewise.
8136         * lib/mkdir-p.c: Likewise.
8137         * lib/rmdir.c: Likewise.
8138         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
8139         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
8140         unless mkdir isn't declared, to speed up 'configure'.
8141         Always create sys/stat.h, since it's unlikely any real sys/stat.h
8142         would define all the S_* symbols.
8143         * modules/canonicalize (Depends-on):
8144         Depend on sys_stat, not stat-macros.
8145         * modules/chown: Likewise.
8146         * modules/euidaccess: Likewise.
8147         * modules/filemode: Likewise.
8148         * modules/file-type: Likewise.
8149         * modules/glob: Likewise.
8150         * modules/isapipe: Likewise.
8151         * modules/lchown: Likewise.
8152         * modules/lstat: Likewise.
8153         * modules/mkancesdirs: Likewise.
8154         * modules/rmdir: Likewise.
8155         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
8156         * modules/modechange: Likewise.
8157         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
8158         (configure.ac): Remove gl_STAT_MACROS.
8159         * modules/sys_stat (Depends-on): Remove stat-macros.
8160
8161 2006-10-27  Bruno Haible  <bruno@clisp.org>
8162
8163         * m4/signed.m4: Remove file.
8164         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
8165         invocation.
8166         * modules/vasnprintf (Files): Remove m4/signed.m4.
8167
8168 2006-10-27  Bruno Haible  <bruno@clisp.org>
8169
8170         Update to GNU gettext 0.16.
8171         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
8172         m4/inttypes-h.m4, m4/signed.m4.
8173         * m4/gettext.m4: Update to GNU gettext 0.16.
8174         * m4/intl.m4: New file, from GNU gettext.
8175         * m4/intldir.m4: New file, from GNU gettext.
8176         * config/srclist.txt: Update
8177
8178 2006-10-27  Eric Blake  <ebb9@byu.net>
8179
8180         * MODULES.html.sh: Document tempname.
8181         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
8182         dependencies.
8183         (Files): Move lib/tempname.c...
8184         * modules/tempname: ...to this new module.
8185         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
8186         (gl_PREREQ_TEMPNAME): Move...
8187         * m4/tempname.m4: ...to this new file.
8188         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
8189         * modules/sys_stat (Depends-on): Add stat-macros.
8190         * lib/stat_.h (includes): Pick up stat macros.
8191         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
8192         if stat macros are broken.
8193         * lib/tempname.c (includes): No need to include "stat-macros.h".
8194         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
8195         (direxists, __path_search) [!_LIBC]: Don't compile these in
8196         gnulib; the tmpdir module covers that.
8197         * lib/tempname.h: New file.
8198
8199 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
8200
8201         * COPYING: Explain how gnulib-tool converts licence headers.
8202         Almost all wording by Eric Blake.
8203
8204 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
8205
8206         * lib/mbchar.h (is_basic_table): Make read-only.
8207         * lib/mbchar.c (is_basic_table): Likewise.
8208         Reported by John Darrington.
8209
8210 2006-10-25  Bruno Haible  <bruno@clisp.org>
8211
8212         * lib/progname.h (set_program_name): Undefine before defining.
8213
8214 2006-10-25  Bruno Haible  <bruno@clisp.org>
8215
8216         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
8217         false for non-gcc C++ compilers.
8218         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
8219
8220 2006-10-24  Bruno Haible  <bruno@clisp.org>
8221
8222         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
8223         iconv implementations like Irix iconv.
8224
8225 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8226
8227         * modules/vararrays: New file.
8228         * m4/vararrays.m4: New file, taken from diffutils.
8229         * MODULES.html.sh: New module vararrays.
8230
8231 2006-10-24  Karl Berry  <karl@gnu.org>
8232
8233         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
8234         Don't call GNU Unix.
8235
8236 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8237
8238         * users.txt: Add Libtool.
8239
8240         Sync from Libtool:
8241
8242         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8243
8244         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
8245         to gnulib's policy of including config.h unconditionally.
8246
8247 2006-10-24  Bruno Haible  <bruno@clisp.org>
8248
8249         * modules/wcwidth (Files): Add m4/wint_t.m4.
8250         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
8251         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
8252
8253 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
8254
8255         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
8256         to pacify GCC with some -W flags enabled.  Problem reported by
8257         Bruno Haible.
8258
8259 2006-10-24  Jim Meyering  <jim@meyering.net>
8260
8261         * MODULES.html.sh: Remove uinttostr.  It's not a module.
8262         Reported by Karl Berry.
8263
8264 2006-10-23  Bruno Haible  <bruno@clisp.org>
8265
8266         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
8267
8268 2006-10-24  Bruno Haible  <bruno@clisp.org>
8269
8270         * lib/gl_list.h: Use C comment style, not C++ comment style.
8271
8272 2006-10-23  Eric Blake  <ebb9@byu.net>
8273
8274         * lib/getaddrinfo.c (includes): Add missing include.
8275
8276 2006-10-23  Bruno Haible  <bruno@clisp.org>
8277             Paul Eggert  <eggert@cs.ucla.edu>
8278
8279         Ability to rename obstack_free.
8280         * lib/obstack.h (__obstack_free): New macro. Declare instead of
8281         obstack_free.
8282         (obstack_free): Invoke the __obstack_free macro.
8283         * lib/obstack.c (obstack_free): Use __obstack_free macro.
8284
8285 2006-10-23  Bruno Haible  <bruno@clisp.org>
8286             Paul Eggert  <eggert@cs.ucla.edu>
8287
8288         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
8289         __argc, __argv from the declaration. (They are defined as macros on
8290         mingw.)
8291
8292 2006-10-22  Bruno Haible  <bruno@clisp.org>
8293
8294         * doc/gnulib-intro.texi: New file.
8295         * doc/gnulib.texi: Include it.
8296
8297 2006-10-21  Bruno Haible  <bruno@clisp.org>
8298
8299         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
8300         "Introduction", "Miscellanous Notes", "Particular Modules".
8301
8302 2006-10-21  Bruno Haible  <bruno@clisp.org>
8303
8304         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8305         Change mostlyclean-local rule to avoid sh syntax error from bash
8306         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
8307
8308 2006-10-23  Jim Meyering  <jim@meyering.net>
8309
8310         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
8311         in place of snprintf.
8312
8313         * modules/inttostr (Files): Add lib/uinttostr.c.
8314         * lib/uinttostr.c (inttostr): New file/function.
8315         * lib/inttostr.h (uinttostr): Declare.
8316         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
8317         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8318         Add uinttostr.
8319         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
8320
8321 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8322
8323         * lib/canonicalize.c (ELOOP): Define if not already defined.
8324         Problem reported by Bruno Haible in
8325         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
8326
8327 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
8328
8329         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
8330         Problem reported by Perry Smith and Ville Laurikari.
8331
8332         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
8333         uses.
8334
8335 2006-10-19  Bruno Haible  <bruno@clisp.org>
8336
8337         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
8338         for mingw.
8339
8340 2006-10-19  Bruno Haible  <bruno@clisp.org>
8341
8342         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
8343         Needed for mingw.
8344
8345 2006-10-19  Bruno Haible  <bruno@clisp.org>
8346
8347         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
8348
8349 2006-10-19  Bruno Haible  <bruno@clisp.org>
8350
8351         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
8352         it.
8353
8354 2006-10-19  Bruno Haible  <bruno@clisp.org>
8355
8356         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
8357         invocation.
8358
8359 2006-10-19  Bruno Haible  <bruno@clisp.org>
8360
8361         * gnulib-tool (func_create_testdir): Don't include ftruncate and
8362         mountlist by default.
8363
8364 2006-10-16  Bruno Haible  <bruno@clisp.org>
8365
8366         * lib/c-strstr.c: Include c-strstr.h.
8367
8368 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8369
8370         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
8371         in a slash.
8372
8373 2006-10-18  Bruno Haible  <bruno@clisp.org>
8374
8375         * lib/lock.h [C++]: Wrap definitions in extern "C".
8376
8377 2006-10-18  Bruno Haible  <bruno@clisp.org>
8378
8379         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
8380         gl_LIBOBJS list.
8381
8382 2006-10-18  Bruno Haible  <bruno@clisp.org>
8383
8384         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
8385
8386 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
8387
8388         * lib/xstrtol.h: Include gettext.h.
8389         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
8390         Problem reported by Eric Blake.
8391         * modules/xstrtol (Depends-on): Add gettext-h.
8392
8393 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
8394
8395         * lib/strftime.c (advance): New macro.
8396         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
8397         incomplete type, so you can't add 0 to it.  Problem and patch
8398         reported by Eelco Dolstra for dietlibc.
8399
8400 2006-10-18  Jim Meyering  <jim@meyering.net>
8401
8402         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
8403         type for a local, and rename it: s/up/user_proc/.
8404
8405 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
8406
8407         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
8408         READ_UTMP_USER_PROCESS.
8409         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
8410
8411 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
8412
8413         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
8414         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
8415
8416 2006-10-17  Eric Blake  <ebb9@byu.net>
8417
8418         * lib/sigprocmask.c (sigprocmask): Fix typo.
8419
8420         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
8421
8422         * modules/clean-temp (Makefile.am): Don't add to make output...
8423         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
8424         config.h.
8425
8426 2006-10-17  Bruno Haible  <bruno@clisp.org>
8427
8428         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
8429         differently if DEFAULT_TEXT_DOMAIN is set.
8430
8431 2006-10-16  Bruno Haible  <bruno@clisp.org>
8432
8433         * lib/clean-temp.c: Include fwriteerror.h.
8434
8435 2006-10-16  Bruno Haible  <bruno@clisp.org>
8436
8437         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
8438
8439 2006-10-16  Bruno Haible  <bruno@clisp.org>
8440
8441         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
8442         * lib/sigprocmask.h: Include <sys/types.h>.
8443         (sigset_t): Use the system's definition if present.
8444
8445 2006-10-17  Eric Blake  <ebb9@byu.net>
8446
8447         * lib/xvasprintf.c (includes): Assume config.h.
8448         * lib/xasprintf.c (includes): Likewise.
8449
8450 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
8451
8452         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
8453         at least as wide as intmax_t.
8454
8455 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
8456
8457         (Imported from Automake.)
8458         * build-aux/gnupload: Update to version 1.1 of directive file.
8459
8460 2006-10-16  Eric Blake  <ebb9@byu.net>
8461
8462         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
8463         match Automake 1.10a.
8464
8465 2006-10-14  Bruno Haible  <bruno@clisp.org>
8466
8467         * modules/sigprocmask: New file.
8468         * lib/sigprocmask.h: New file.
8469         * lib/sigprocmask.c: New file.
8470         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
8471         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
8472         request sigprocmask.o.
8473         (gl_PREREQ_SIGPROCMASK): New macro.
8474         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
8475         (Depends-on): Add sigprocmask.
8476         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
8477         gt_SIGNALBLOCKING. Test for 'raise' only once.
8478         * lib/fatal-signal.c: Include sigprocmask.h.
8479         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
8480         unblock_fatal_signals): Define always.
8481         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
8482         sigprocmask.
8483
8484 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8485
8486         Sync from Automake.
8487         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
8488         which incorrectly sets the mode of an existing destination
8489         directory.  In some cases the unpatched install-sh could do the
8490         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
8491         system.  We hope this is rare in practice, but it's clearly worth
8492         fixing.  Problem reported by Alex Unleashed in
8493         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
8494         Also, don't bother to check for -m bugs unless we're using -m;
8495         suggested by Stepan Kasal.
8496
8497 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8498
8499         Sync from Automake.
8500         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
8501         `-c' flag, so they appear at the same position as in %FASTDEP%
8502         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
8503         which ignores unknown options only after the first non-option.
8504         Bug report against M4 by Nelson H. F. Beebe.
8505
8506 2006-10-13  Jim Meyering  <jim@meyering.net>
8507
8508         Fix a bug in yesterday's change.
8509         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
8510         p->fts_statp->st_dev would be used uninitialized.
8511         Ensures that we always call fts_stat on the very first entry.
8512         Miklos Szeredi reported that find -xdev stopped working.
8513
8514 2006-10-12  Bruno Haible  <bruno@clisp.org>
8515
8516         * gnulib-tool (func_get_automake_snippet): Append an automatically
8517         computed EXTRA_DIST augmentation.
8518         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
8519         * modules/alloca-opt (Makefile.am): Likewise.
8520         * modules/allocsa (Makefile.am): Likewise.
8521         * modules/arcfour (Makefile.am): Likewise.
8522         * modules/arctwo (Makefile.am): Likewise.
8523         * modules/argmatch (Makefile.am): Likewise.
8524         * modules/argz (Makefile.am): Likewise.
8525         * modules/atexit (Makefile.am): Likewise.
8526         * modules/backupfile (Makefile.am): Likewise.
8527         * modules/byteswap (Makefile.am): Likewise.
8528         * modules/c-strtod (Makefile.am): Likewise.
8529         * modules/c-strtold (Makefile.am): Likewise.
8530         * modules/calloc (Makefile.am): Likewise.
8531         * modules/canon-host (Makefile.am): Likewise.
8532         * modules/canonicalize (Makefile.am): Likewise.
8533         * modules/chdir-long (Makefile.am): Likewise.
8534         * modules/chdir-safer (Makefile.am): Likewise.
8535         * modules/check-version (Makefile.am): Likewise.
8536         * modules/chown (Makefile.am): Likewise.
8537         * modules/cloexec (Makefile.am): Likewise.
8538         * modules/close-stream (Makefile.am): Likewise.
8539         * modules/closeout (Makefile.am): Likewise.
8540         * modules/crc (Makefile.am): Likewise.
8541         * modules/csharpexec (Makefile.am): Likewise.
8542         * modules/cycle-check (Makefile.am): Likewise.
8543         * modules/des (Makefile.am): Likewise.
8544         * modules/dev-ino (Makefile.am): Likewise.
8545         * modules/dirfd (Makefile.am): Likewise.
8546         * modules/dirname (Makefile.am): Likewise.
8547         * modules/dup2 (Makefile.am): Likewise.
8548         * modules/eealloc (Makefile.am): Likewise.
8549         * modules/error (Makefile.am): Likewise.
8550         * modules/euidaccess (Makefile.am): Likewise.
8551         * modules/exclude (Makefile.am): Likewise.
8552         * modules/exitfail (Makefile.am): Likewise.
8553         * modules/fcntl-safer (Makefile.am): Likewise.
8554         * modules/fcntl (Makefile.am): Likewise.
8555         * modules/file-type (Makefile.am): Likewise.
8556         * modules/fileblocks (Makefile.am): Likewise.
8557         * modules/filemode (Makefile.am): Likewise.
8558         * modules/filenamecat (Makefile.am): Likewise.
8559         * modules/fnmatch (Makefile.am): Likewise.
8560         * modules/fopen-safer (Makefile.am): Likewise.
8561         * modules/fpending (Makefile.am): Likewise.
8562         * modules/fprintftime (Makefile.am): Likewise.
8563         * modules/free (Makefile.am): Likewise.
8564         * modules/fsusage (Makefile.am): Likewise.
8565         * modules/ftruncate (Makefile.am): Likewise.
8566         * modules/fts (Makefile.am): Likewise.
8567         * modules/gc-arcfour (Makefile.am): Likewise.
8568         * modules/gc-des (Makefile.am): Likewise.
8569         * modules/gc-hmac-md5 (Makefile.am): Likewise.
8570         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
8571         * modules/gc-md4 (Makefile.am): Likewise.
8572         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
8573         * modules/gc-sha1 (Makefile.am): Likewise.
8574         * modules/gc (Makefile.am): Likewise.
8575         * modules/getaddrinfo (Makefile.am): Likewise.
8576         * modules/getcwd (Makefile.am): Likewise.
8577         * modules/getdelim (Makefile.am): Likewise.
8578         * modules/getdomainname (Makefile.am): Likewise.
8579         * modules/getgroups (Makefile.am): Likewise.
8580         * modules/gethostname (Makefile.am): Likewise.
8581         * modules/gethrxtime (Makefile.am): Likewise.
8582         * modules/getline (Makefile.am): Likewise.
8583         * modules/getloadavg (Makefile.am): Likewise.
8584         * modules/getlogin_r (Makefile.am): Likewise.
8585         * modules/getndelim2 (Makefile.am): Likewise.
8586         * modules/getopt (Makefile.am): Likewise.
8587         * modules/getpagesize (Makefile.am): Likewise.
8588         * modules/getpass-gnu (Makefile.am): Likewise.
8589         * modules/getpass (Makefile.am): Likewise.
8590         * modules/getsubopt (Makefile.am): Likewise.
8591         * modules/gettime (Makefile.am): Likewise.
8592         * modules/gettimeofday (Makefile.am): Likewise.
8593         * modules/getugroups (Makefile.am): Likewise.
8594         * modules/getusershell (Makefile.am): Likewise.
8595         * modules/glob (Makefile.am): Likewise.
8596         * modules/group-member (Makefile.am): Likewise.
8597         * modules/hard-locale (Makefile.am): Likewise.
8598         * modules/hash (Makefile.am): Likewise.
8599         * modules/hmac-md5 (Makefile.am): Likewise.
8600         * modules/hmac-sha1 (Makefile.am): Likewise.
8601         * modules/human (Makefile.am): Likewise.
8602         * modules/idcache (Makefile.am): Likewise.
8603         * modules/imaxabs (Makefile.am): Likewise.
8604         * modules/imaxdiv (Makefile.am): Likewise.
8605         * modules/inet_ntop (Makefile.am): Likewise.
8606         * modules/inet_pton (Makefile.am): Likewise.
8607         * modules/intprops (Makefile.am): Likewise.
8608         * modules/inttostr (Makefile.am): Likewise.
8609         * modules/inttypes (Makefile.am): Likewise.
8610         * modules/isapipe (Makefile.am): Likewise.
8611         * modules/javaversion (Makefile.am): Likewise.
8612         * modules/lchmod (Makefile.am): Likewise.
8613         * modules/lchown (Makefile.am): Likewise.
8614         * modules/localcharset (Makefile.am): Likewise.
8615         * modules/long-options (Makefile.am): Likewise.
8616         * modules/lstat (Makefile.am): Likewise.
8617         * modules/malloc (Makefile.am): Likewise.
8618         * modules/mathl (Makefile.am): Likewise.
8619         * modules/mbchar (Makefile.am): Likewise.
8620         * modules/md2 (Makefile.am): Likewise.
8621         * modules/md4 (Makefile.am): Likewise.
8622         * modules/md5 (Makefile.am): Likewise.
8623         * modules/memcasecmp (Makefile.am): Likewise.
8624         * modules/memchr (Makefile.am): Likewise.
8625         * modules/memcmp (Makefile.am): Likewise.
8626         * modules/memcoll (Makefile.am): Likewise.
8627         * modules/memcpy (Makefile.am): Likewise.
8628         * modules/memmem (Makefile.am): Likewise.
8629         * modules/memmove (Makefile.am): Likewise.
8630         * modules/mempcpy (Makefile.am): Likewise.
8631         * modules/memrchr (Makefile.am): Likewise.
8632         * modules/memset (Makefile.am): Likewise.
8633         * modules/memxor (Makefile.am): Likewise.
8634         * modules/mkancesdirs (Makefile.am): Likewise.
8635         * modules/mkdir-p (Makefile.am): Likewise.
8636         * modules/mkdir (Makefile.am): Likewise.
8637         * modules/mkdtemp (Makefile.am): Likewise.
8638         * modules/mkstemp (Makefile.am): Likewise.
8639         * modules/mktime (Makefile.am): Likewise.
8640         * modules/modechange (Makefile.am): Likewise.
8641         * modules/mountlist (Makefile.am): Likewise.
8642         * modules/nanosleep (Makefile.am): Likewise.
8643         * modules/obstack (Makefile.am): Likewise.
8644         * modules/openat (Makefile.am): Likewise.
8645         * modules/pagealign_alloc (Makefile.am): Likewise.
8646         * modules/pathmax (Makefile.am): Likewise.
8647         * modules/physmem (Makefile.am): Likewise.
8648         * modules/poll (Makefile.am): Likewise.
8649         * modules/posixtm (Makefile.am): Likewise.
8650         * modules/posixver (Makefile.am): Likewise.
8651         * modules/putenv (Makefile.am): Likewise.
8652         * modules/quote (Makefile.am): Likewise.
8653         * modules/quotearg (Makefile.am): Likewise.
8654         * modules/raise (Makefile.am): Likewise.
8655         * modules/read-file (Makefile.am): Likewise.
8656         * modules/readline (Makefile.am): Likewise.
8657         * modules/readlink (Makefile.am): Likewise.
8658         * modules/readtokens (Makefile.am): Likewise.
8659         * modules/readutmp (Makefile.am): Likewise.
8660         * modules/realloc (Makefile.am): Likewise.
8661         * modules/regex (Makefile.am): Likewise.
8662         * modules/rename-dest-slash (Makefile.am): Likewise.
8663         * modules/rename (Makefile.am): Likewise.
8664         * modules/rijndael (Makefile.am): Likewise.
8665         * modules/rmdir (Makefile.am): Likewise.
8666         * modules/rpmatch (Makefile.am): Likewise.
8667         * modules/safe-read (Makefile.am): Likewise.
8668         * modules/safe-write (Makefile.am): Likewise.
8669         * modules/same-inode (Makefile.am): Likewise.
8670         * modules/same (Makefile.am): Likewise.
8671         * modules/save-cwd (Makefile.am): Likewise.
8672         * modules/savedir (Makefile.am): Likewise.
8673         * modules/setenv (Makefile.am): Likewise.
8674         * modules/settime (Makefile.am): Likewise.
8675         * modules/sha1 (Makefile.am): Likewise.
8676         * modules/sig2str (Makefile.am): Likewise.
8677         * modules/snprintf (Makefile.am): Likewise.
8678         * modules/stat-macros (Makefile.am): Likewise.
8679         * modules/stat-time (Makefile.am): Likewise.
8680         * modules/stdbool (Makefile.am): Likewise.
8681         * modules/stdint (Makefile.am): Likewise.
8682         * modules/stdlib-safer (Makefile.am): Likewise.
8683         * modules/stpcpy (Makefile.am): Likewise.
8684         * modules/stpncpy (Makefile.am): Likewise.
8685         * modules/strcase (Makefile.am): Likewise.
8686         * modules/strcasestr (Makefile.am): Likewise.
8687         * modules/strchrnul (Makefile.am): Likewise.
8688         * modules/strcspn (Makefile.am): Likewise.
8689         * modules/strdup (Makefile.am): Likewise.
8690         * modules/strerror (Makefile.am): Likewise.
8691         * modules/strftime (Makefile.am): Likewise.
8692         * modules/strndup (Makefile.am): Likewise.
8693         * modules/strnlen (Makefile.am): Likewise.
8694         * modules/strpbrk (Makefile.am): Likewise.
8695         * modules/strsep (Makefile.am): Likewise.
8696         * modules/strstr (Makefile.am): Likewise.
8697         * modules/strtod (Makefile.am): Likewise.
8698         * modules/strtoimax (Makefile.am): Likewise.
8699         * modules/strtok_r (Makefile.am): Likewise.
8700         * modules/strtol (Makefile.am): Likewise.
8701         * modules/strtoll (Makefile.am): Likewise.
8702         * modules/strtoul (Makefile.am): Likewise.
8703         * modules/strtoull (Makefile.am): Likewise.
8704         * modules/strtoumax (Makefile.am): Likewise.
8705         * modules/strverscmp (Makefile.am): Likewise.
8706         * modules/sys_socket (Makefile.am): Likewise.
8707         * modules/sys_stat (Makefile.am): Likewise.
8708         * modules/sysexits (Makefile.am): Likewise.
8709         * modules/time_r (Makefile.am): Likewise.
8710         * modules/timegm (Makefile.am): Likewise.
8711         * modules/timespec (Makefile.am): Likewise.
8712         * modules/tmpfile-safer (Makefile.am): Likewise.
8713         * modules/trim (Makefile.am): Likewise.
8714         * modules/unistd-safer (Makefile.am): Likewise.
8715         * modules/unlinkdir (Makefile.am): Likewise.
8716         * modules/unlocked-io (Makefile.am): Likewise.
8717         * modules/userspec (Makefile.am): Likewise.
8718         * modules/utime (Makefile.am): Likewise.
8719         * modules/utimecmp (Makefile.am): Likewise.
8720         * modules/utimens (Makefile.am): Likewise.
8721         * modules/vasnprintf (Makefile.am): Likewise.
8722         * modules/vasprintf (Makefile.am): Likewise.
8723         * modules/vsnprintf (Makefile.am): Likewise.
8724         * modules/xalloc (Makefile.am): Likewise.
8725         * modules/xgetcwd (Makefile.am): Likewise.
8726         * modules/xnanosleep (Makefile.am): Likewise.
8727         * modules/xreadlink (Makefile.am): Likewise.
8728         * modules/xstrtod (Makefile.am): Likewise.
8729         * modules/xstrtol (Makefile.am): Likewise.
8730         * modules/xstrtold (Makefile.am): Likewise.
8731         * modules/yesno (Makefile.am): Likewise.
8732         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
8733
8734 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
8735
8736         * modules/error (Makefile.am): Distribute files through
8737         EXTRA_DIST, not lib_SOURCES.
8738
8739 2006-10-12  Eric Blake  <ebb9@byu.net>
8740
8741         * modules/error (Makefile.am): Distribute files in /lib.
8742         * modules/obstack (Makefile.am): Likewise.
8743
8744 2006-10-12  Bruno Haible  <bruno@clisp.org>
8745
8746         * modules/acl (Makefile.am): Distribute all files in lib/ through
8747         EXTRA_DIST.
8748         * modules/arcfour (Makefile.am): Likewise.
8749         * modules/arctwo (Makefile.am): Likewise.
8750         * modules/argmatch (Makefile.am): Likewise.
8751         * modules/argz (Makefile.am): Likewise.
8752         * modules/atexit (Makefile.am): Likewise.
8753         * modules/backupfile (Makefile.am): Likewise.
8754         * modules/c-strtod (Makefile.am): Likewise.
8755         * modules/c-strtold (Makefile.am): Likewise.
8756         * modules/calloc (Makefile.am): Likewise.
8757         * modules/canon-host (Makefile.am): Likewise.
8758         * modules/canonicalize (Makefile.am): Likewise.
8759         * modules/chdir-long (Makefile.am): Likewise.
8760         * modules/chdir-safer (Makefile.am): Likewise.
8761         * modules/check-version (Makefile.am): Likewise.
8762         * modules/chown (Makefile.am): Likewise.
8763         * modules/cloexec (Makefile.am): Likewise.
8764         * modules/close-stream (Makefile.am): Likewise.
8765         * modules/closeout (Makefile.am): Likewise.
8766         * modules/crc (Makefile.am): Likewise.
8767         * modules/cycle-check (Makefile.am): Likewise.
8768         * modules/des (Makefile.am): Likewise.
8769         * modules/dirfd (Makefile.am): Likewise.
8770         * modules/dirname (Makefile.am): Likewise.
8771         * modules/dup2 (Makefile.am): Likewise.
8772         * modules/euidaccess (Makefile.am): Likewise.
8773         * modules/exclude (Makefile.am): Likewise.
8774         * modules/exitfail (Makefile.am): Likewise.
8775         * modules/fcntl-safer (Makefile.am): Likewise.
8776         * modules/file-type (Makefile.am): Likewise.
8777         * modules/fileblocks (Makefile.am): Likewise.
8778         * modules/filemode (Makefile.am): Likewise.
8779         * modules/filenamecat (Makefile.am): Likewise.
8780         * modules/fnmatch (Makefile.am): Likewise.
8781         * modules/fopen-safer (Makefile.am): Likewise.
8782         * modules/fpending (Makefile.am): Likewise.
8783         * modules/fprintftime (Makefile.am): Likewise.
8784         * modules/free (Makefile.am): Likewise.
8785         * modules/fsusage (Makefile.am): Likewise.
8786         * modules/ftruncate (Makefile.am): Likewise.
8787         * modules/fts (Makefile.am): Likewise.
8788         * modules/gc (Makefile.am): Likewise.
8789         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
8790         * modules/getaddrinfo (Makefile.am): Likewise.
8791         * modules/getcwd (Makefile.am): Likewise.
8792         * modules/getdelim (Makefile.am): Likewise.
8793         * modules/getdomainname (Makefile.am): Likewise.
8794         * modules/getgroups (Makefile.am): Likewise.
8795         * modules/gethostname (Makefile.am): Likewise.
8796         * modules/gethrxtime (Makefile.am): Likewise.
8797         * modules/getline (Makefile.am): Likewise.
8798         * modules/getloadavg (Makefile.am): Likewise.
8799         * modules/getlogin_r (Makefile.am): Likewise.
8800         * modules/getopt (Makefile.am): Likewise.
8801         * modules/getpass (Makefile.am): Likewise.
8802         * modules/getpass-gnu (Makefile.am): Likewise.
8803         * modules/getsubopt (Makefile.am): Likewise.
8804         * modules/gettime (Makefile.am): Likewise.
8805         * modules/gettimeofday (Makefile.am): Likewise.
8806         * modules/getugroups (Makefile.am): Likewise.
8807         * modules/getusershell (Makefile.am): Likewise.
8808         * modules/glob (Makefile.am): Likewise.
8809         * modules/group-member (Makefile.am): Likewise.
8810         * modules/hard-locale (Makefile.am): Likewise.
8811         * modules/hash (Makefile.am): Likewise.
8812         * modules/hmac-md5 (Makefile.am): Likewise.
8813         * modules/hmac-sha1 (Makefile.am): Likewise.
8814         * modules/human (Makefile.am): Likewise.
8815         * modules/idcache (Makefile.am): Likewise.
8816         * modules/imaxabs (Makefile.am): Likewise.
8817         * modules/imaxdiv (Makefile.am): Likewise.
8818         * modules/inet_ntop (Makefile.am): Likewise.
8819         * modules/inet_pton (Makefile.am): Likewise.
8820         * modules/inttostr (Makefile.am): Likewise.
8821         * modules/isapipe (Makefile.am): Likewise.
8822         * modules/lchown (Makefile.am): Likewise.
8823         * modules/long-options (Makefile.am): Likewise.
8824         * modules/lstat (Makefile.am): Likewise.
8825         * modules/malloc (Makefile.am): Likewise.
8826         * modules/mathl (Makefile.am): Likewise.
8827         * modules/mbchar (Makefile.am): Likewise.
8828         * modules/md2 (Makefile.am): Likewise.
8829         * modules/md4 (Makefile.am): Likewise.
8830         * modules/md5 (Makefile.am): Likewise.
8831         * modules/memcasecmp (Makefile.am): Likewise.
8832         * modules/memchr (Makefile.am): Likewise.
8833         * modules/memcmp (Makefile.am): Likewise.
8834         * modules/memcoll (Makefile.am): Likewise.
8835         * modules/memcpy (Makefile.am): Likewise.
8836         * modules/memmem (Makefile.am): Likewise.
8837         * modules/memmove (Makefile.am): Likewise.
8838         * modules/mempcpy (Makefile.am): Likewise.
8839         * modules/memrchr (Makefile.am): Likewise.
8840         * modules/memset (Makefile.am): Likewise.
8841         * modules/memxor (Makefile.am): Likewise.
8842         * modules/mkancesdirs (Makefile.am): Likewise.
8843         * modules/mkdir (Makefile.am): Likewise.
8844         * modules/mkdir-p (Makefile.am): Likewise.
8845         * modules/mkdtemp (Makefile.am): Likewise.
8846         * modules/mkstemp (Makefile.am): Likewise.
8847         * modules/mktime (Makefile.am): Likewise.
8848         * modules/modechange (Makefile.am): Likewise.
8849         * modules/mountlist (Makefile.am): Likewise.
8850         * modules/nanosleep (Makefile.am): Likewise.
8851         * modules/openat (Makefile.am): Likewise.
8852         * modules/pagealign_alloc (Makefile.am): Likewise.
8853         * modules/physmem (Makefile.am): Likewise.
8854         * modules/poll (Makefile.am): Likewise.
8855         * modules/posixtm (Makefile.am): Likewise.
8856         * modules/posixver (Makefile.am): Likewise.
8857         * modules/putenv (Makefile.am): Likewise.
8858         * modules/quote (Makefile.am): Likewise.
8859         * modules/quotearg (Makefile.am): Likewise.
8860         * modules/raise (Makefile.am): Likewise.
8861         * modules/read-file (Makefile.am): Likewise.
8862         * modules/readline (Makefile.am): Likewise.
8863         * modules/readlink (Makefile.am): Likewise.
8864         * modules/readtokens (Makefile.am): Likewise.
8865         * modules/readutmp (Makefile.am): Likewise.
8866         * modules/realloc (Makefile.am): Likewise.
8867         * modules/regex (Makefile.am): Likewise.
8868         * modules/rename (Makefile.am): Likewise.
8869         * modules/rename-dest-slash (Makefile.am): Likewise.
8870         * modules/rijndael (Makefile.am): Likewise.
8871         * modules/rmdir (Makefile.am): Likewise.
8872         * modules/rpmatch (Makefile.am): Likewise.
8873         * modules/safe-read (Makefile.am): Likewise.
8874         * modules/safe-write (Makefile.am): Likewise.
8875         * modules/same (Makefile.am): Likewise.
8876         * modules/save-cwd (Makefile.am): Likewise.
8877         * modules/savedir (Makefile.am): Likewise.
8878         * modules/setenv (Makefile.am): Likewise.
8879         * modules/settime (Makefile.am): Likewise.
8880         * modules/sha1 (Makefile.am): Likewise.
8881         * modules/sig2str (Makefile.am): Likewise.
8882         * modules/snprintf (Makefile.am): Likewise.
8883         * modules/stdlib-safer (Makefile.am): Likewise.
8884         * modules/stpcpy (Makefile.am): Likewise.
8885         * modules/stpncpy (Makefile.am): Likewise.
8886         * modules/strcase (Makefile.am): Likewise.
8887         * modules/strcasestr (Makefile.am): Likewise.
8888         * modules/strchrnul (Makefile.am): Likewise.
8889         * modules/strcspn (Makefile.am): Likewise.
8890         * modules/strdup (Makefile.am): Likewise.
8891         * modules/strerror (Makefile.am): Likewise.
8892         * modules/strftime (Makefile.am): Likewise.
8893         * modules/strndup (Makefile.am): Likewise.
8894         * modules/strnlen (Makefile.am): Likewise.
8895         * modules/strpbrk (Makefile.am): Likewise.
8896         * modules/strsep (Makefile.am): Likewise.
8897         * modules/strstr (Makefile.am): Likewise.
8898         * modules/strtod (Makefile.am): Likewise.
8899         * modules/strtoimax (Makefile.am): Likewise.
8900         * modules/strtok_r (Makefile.am): Likewise.
8901         * modules/strtol (Makefile.am): Likewise.
8902         * modules/strtoll (Makefile.am): Likewise.
8903         * modules/strtoul (Makefile.am): Likewise.
8904         * modules/strtoull (Makefile.am): Likewise.
8905         * modules/strtoumax (Makefile.am): Likewise.
8906         * modules/strverscmp (Makefile.am): Likewise.
8907         * modules/time_r (Makefile.am): Likewise.
8908         * modules/timegm (Makefile.am): Likewise.
8909         * modules/tmpfile-safer (Makefile.am): Likewise.
8910         * modules/unistd-safer (Makefile.am): Likewise.
8911         * modules/unlinkdir (Makefile.am): Likewise.
8912         * modules/userspec (Makefile.am): Likewise.
8913         * modules/utime (Makefile.am): Likewise.
8914         * modules/utimecmp (Makefile.am): Likewise.
8915         * modules/utimens (Makefile.am): Likewise.
8916         * modules/vasnprintf (Makefile.am): Likewise.
8917         * modules/vasprintf (Makefile.am): Likewise.
8918         * modules/vsnprintf (Makefile.am): Likewise.
8919         * modules/xalloc (Makefile.am): Likewise.
8920         * modules/xgetcwd (Makefile.am): Likewise.
8921         * modules/xnanosleep (Makefile.am): Likewise.
8922         * modules/xreadlink (Makefile.am): Likewise.
8923         * modules/xstrtod (Makefile.am): Likewise.
8924         * modules/xstrtol (Makefile.am): Likewise.
8925         * modules/xstrtold (Makefile.am): Likewise.
8926         * modules/yesno (Makefile.am): Likewise.
8927
8928 2006-10-12  Jim Meyering  <jim@meyering.net>
8929
8930         * m4/getloadavg.m4: Revert the change below.
8931
8932         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
8933         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
8934         fail with a symlink, which is what coreutils' ./bootstrap now
8935         creates by default.
8936
8937 2006-10-12  Bruno Haible  <bruno@clisp.org>
8938
8939         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
8940         mingw.
8941         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
8942         MSVC and mingw explicitly.
8943
8944 2006-10-11  Simon Josefsson  <jas@extundo.com>
8945             Bruno Haible  <bruno@clisp.org>
8946
8947         Add support for multiple gnulib-tool invocations in the scope of a
8948         single configure.ac file.
8949         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
8950         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
8951         with the same contents as the _LIBADD variable.
8952         (func_emit_initmacro_start, func_emit_initmacro_end,
8953         func_emit_initmacro_done): New functions.
8954         (func_import, func_create_testdir): Invoke them. Allow the identifiers
8955         gl_LIBOBJS and gl_LTLIBOBJS.
8956
8957 2006-10-11  Bruno Haible  <bruno@clisp.org>
8958
8959         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
8960         (func_create_testdir): Don't create po/Makefile.am, don't invoke
8961         autoreconf. Instead, invoke autopoint explicitly but move back the
8962         *.m4 files from gnulib.
8963
8964 2006-10-11  Bruno Haible  <bruno@clisp.org>
8965
8966         * gnulib-tool (func_usage): Make module names after --create-testdir
8967         optional.
8968         (func_create_testdir): If no module was specified, use nearly all
8969         modules.
8970
8971 2006-10-12  Jim Meyering  <jim@meyering.net>
8972
8973         Big performance improvement for fts-based tools that use FTS_NOSTAT.
8974         Avoid spurious inode-mismatch problems on non-POSIX file systems.
8975         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
8976         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
8977         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
8978         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
8979         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
8980         (fts_set_stat_required): New function.
8981         (fts_open): Defer the calls to fts_stat, if possible or requested.
8982         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
8983         into fts_stat itself.
8984         (fts_read): Perform any required (deferred) fts_stat call.
8985         (fts_build): Likewise, for the directory we're about to open and read.
8986         In the readdir loop, carefully decide whether each entry will require
8987         an eventual call to fts_stat, using dirent.d_type info if available.
8988         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
8989         a command line argument into this function.  Update all callers.
8990         Map a return value of FTS_DOT to FTS_D for a command line argument.
8991         * modules/fts (Depends-on): Add d-type.  Alphabetize.
8992         Thanks to Miklos Szeredi for his tenacity and for the initial
8993         bug report about "find" failing on a FUSE-based file system.
8994
8995         * lib/fts.c (fts_open): Use consistent indentation.
8996
8997 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
8998
8999         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
9000         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
9001         reported by Jim Meyering.  All uses of cache variables renamed
9002         to match Autoconf's.
9003         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
9004         the other one.
9005
9006         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
9007         Fix misspelling in diagnostic.
9008
9009 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9010
9011         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
9012         defined.  Problem reported by Matthew Woehlke.
9013
9014         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
9015         Add support for Tandem NonStop R series.
9016         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
9017         Use new macro.
9018
9019         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
9020         (has_trailing_slash): Omit size arg; all callers changed.
9021         Omit 'inline', since it doesn't help performance and we'd
9022         need to configure it.
9023         Don't count //, ///, etc. as having a trailing slash.
9024         As a side effect, this removes a C99ism reported by Matthew Woehlke.
9025         (rpl_rename_dest_slash): On failure, use rename's errno rather
9026         than (in some cases) an incorrect or junk errno.
9027         Simplify code by removing need to compute length; this does
9028         cause it to make two passes instead of one over the file name,
9029         but it's worth it.
9030
9031         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
9032         change, since Autoconf's version may no longer be appropriate now
9033         that we are using CVS Autoconf's version.  Add support for Tandem.
9034
9035 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
9036             Bruno Haible  <bruno@clisp.org>
9037
9038         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
9039         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
9040         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
9041         gl_AC_TYPE_LONG_LONG.
9042
9043         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
9044         instead of HAVE_LONG_LONG.
9045         * lib/printf-args.c (printf_fetchargs): Likewise.
9046         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
9047         * lib/vasnprintf.c (VASNPRINTF): Likewise.
9048         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
9049         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
9050         gl_AC_TYPE_LONG_LONG.
9051
9052 2006-10-11  Bruno Haible  <bruno@clisp.org>
9053
9054         * m4/longlong.m4: Add comments.
9055         * m4/ulonglong.m4: Likewise.
9056
9057 2006-10-10  Bruno Haible  <bruno@clisp.org>
9058
9059         Make it possible to #define stpcpy, strdup to aliases.
9060         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
9061         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
9062
9063 2006-10-10  Bruno Haible  <bruno@clisp.org>
9064
9065         Make it possible to #define gcd to an alias.
9066         * lib/gcd.c: Include config.h.
9067
9068 2006-10-10  Bruno Haible  <bruno@clisp.org>
9069
9070         Make it possible to #define c_isascii to an alias.
9071         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
9072         defined. Undefine the macros before defining them, to avoid gcc
9073         warnings.
9074         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
9075         define NO_C_CTYPE_MACROS early.
9076
9077 2006-10-10  Bruno Haible  <bruno@clisp.org>
9078
9079         Make it possible to #define set_program_name to an alias.
9080         * lib/progname.c: Don't undefine set_program_name; instead, undefine
9081         ENABLE_RELOCATABLE early.
9082
9083 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
9084
9085         Port to Tandem NSK OSS, which has 64-bit signed int but at most
9086         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
9087         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
9088         More generally, don't assume that 64-bit signed int is available
9089         if unsigned int is, and vice versa.
9090         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
9091         unsigned symbols, not on their signed counterparts.
9092         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
9093         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
9094         (UINT64_C, UINTMAX_C):
9095         Likewise.
9096         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
9097         unsigned counterparts.
9098         (Have_long_long, Unsigned): New macros.
9099         (Int): Renamed from INT.
9100         (strtoimax): Use the new macros.
9101         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
9102         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
9103         * modules/inttypes (inttypes.h): Substitute
9104         HAVE_UNSIGNED_LONG_LONG_INT.
9105         * modules/stdint (stdint.h): Likewise.
9106         (Files): Add m4/ulonglong.m4.
9107
9108 2006-10-10  Bruno Haible  <bruno@clisp.org>
9109
9110         Fix a gcc -Wshadow warning.
9111         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
9112         to 'bucket'.
9113         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
9114         gl_linked_indexof_from_to): Likewise.
9115         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
9116         Likewise.
9117         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
9118         Likewise.
9119         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
9120         Reported by Eric Blake.
9121
9122 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
9123
9124         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
9125         for NetBSD.  Problem reported by Bruno Haible.
9126
9127 2006-10-09  Jim Meyering  <jim@meyering.net>
9128
9129         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
9130         Patch from Bruno Haible.
9131
9132 2006-10-09  Jim Meyering  <jim@meyering.net>
9133
9134         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
9135         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
9136         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
9137
9138 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
9139
9140         Don't include <config.h> twice; this doesn't work in some cases,
9141         e.g., when config.h has "#define intmax_t long long int" and
9142         we include <config.h>, <inttypes.h>, <config.h> in that order.
9143         Problem reported by Matthew Woehlke in:
9144         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
9145         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
9146         * lib/fts-cycle.c: Don't include config.h.
9147         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
9148         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
9149         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
9150         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
9151         inttypes.h.
9152         * lib/xstrtoumax.c: Likewise.
9153         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
9154         __strtol and the like, so that this module is more like its siblings.
9155         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
9156         Remove; no longer needed now that we assume gnulib inttypes.h.
9157
9158 2006-10-08  Bruno Haible  <bruno@clisp.org>
9159
9160         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
9161         option.
9162
9163 2006-10-07  Jim Meyering  <jim@meyering.net>
9164
9165         * modules/inttypes (inttypes.h): Revert what seems to have been
9166         an inadvertent part of today's change: use "|", not "/" in the
9167         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
9168
9169 2006-10-07  Bruno Haible  <bruno@clisp.org>
9170
9171         * modules/sublist: New file.
9172
9173 2006-10-07  Bruno Haible  <bruno@clisp.org>
9174
9175         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
9176         * modules/argz (argz.h): Likewise.
9177         * modules/arpa_inet (arpa/inet.h): Likewise.
9178         * modules/byteswap (byteswap.h): Likewise.
9179         * modules/configmake (configmake.h): Likewise.
9180         * modules/fcntl (fcntl.h): Likewise.
9181         * modules/fnmatch (fnmatch.h): Likewise.
9182         * modules/getopt (getopt.h): Likewise.
9183         * modules/glob (glob.h): Likewise.
9184         * modules/inttypes (inttypes.h): Likewise.
9185         * modules/netinet_in (netinet/in.h): Likewise.
9186         * modules/poll (poll.h): Likewise.
9187         * modules/stdbool (stdbool.h): Likewise.
9188         * modules/stdint (stdint.h): Likewise.
9189         * modules/sys_select (sys/select.h): Likewise.
9190         * modules/sys_socket (sys/socket.h): Likewise.
9191         * modules/sys_stat (sys/stat.h): Likewise.
9192         * modules/sysexits (sysexits.h): Likewise.
9193         * modules/unistd (unistd.h): Likewise.
9194         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9195         Add a "DO NOT EDIT" comment to the generated file.
9196         (func_import): Likewise for gnulib-comp.m4.
9197
9198 2006-10-07  Bruno Haible  <bruno@clisp.org>
9199
9200         * lib/gl_sublist.h: New file.
9201         * lib/gl_sublist.c: New file.
9202
9203 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
9204
9205         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
9206         name (relative to the original working directory) and the file
9207         name component (relative to the temporary working directory).  All
9208         callers changed.
9209         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
9210         * lib/mkdir-p.c (make_dir_parents): Likewise.
9211         * lib/mkdir-p.h (make_dir_parents): Likewise.
9212
9213 2006-10-06  Eric Blake  <ebb9@byu.net>
9214
9215         Define several macros for use by the clean-temp module.
9216         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
9217         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
9218         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
9219
9220         * lib/clean-temp.h (close_stream_temp): New declaration.
9221         * lib/clean-temp.c (includes): Pull in headers according to what
9222         other modules are in use.
9223         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
9224
9225 2006-10-06  Bruno Haible  <bruno@clisp.org>
9226
9227         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
9228         instead of fopen, fwriteerror.
9229
9230 2006-10-06  Bruno Haible  <bruno@clisp.org>
9231
9232         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
9233         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
9234         int.
9235         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
9236         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
9237         Return an error indicator.
9238         Suggested by Eric Blake.
9239
9240 2006-10-06  Bruno Haible  <bruno@clisp.org>
9241
9242         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
9243         Reported by Eric Blake.
9244
9245 2006-10-06  Bruno Haible  <bruno@clisp.org>
9246
9247         * modules/closeout (Description): Mention stderr too.
9248
9249 2006-10-06  Bruno Haible  <bruno@clisp.org>
9250         and Paul Eggert  <eggert@cs.ucla.edu>
9251
9252         * lib/closeout.c (close_stdout): Also close stderr.
9253         * lib/closeout.h: Update comment.
9254
9255 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
9256
9257         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
9258         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
9259         * lib/dirchownmod.c: Include lchown.h.
9260         * lib/lchown.c: Don't include files that lchown.h now includes.
9261         Don't declare chown, since lchown.h now does that.
9262         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
9263         (lchown): Define to rpl_chown if lchown is declared but
9264         does not exist.  Declare using a prototype if lchown is not
9265         declared.  Add a copyright notice.
9266         * lib/mkstemp.h: Include <unistd.h>.
9267         * lib/openat.c: Include lchown.h.
9268
9269         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
9270         we now test for that separately.
9271         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
9272         rather than O_NOFOLLOW, when testing whether it's possible to
9273         avoid a race condition reliably.
9274         * lib/savewd.c (savewd_chdir): Likewise.
9275
9276         Remove macros that are no longer needed now that stdint.h is
9277         reliable.
9278         * lib/fsusage.c (UINTMAX_MAX): Remove.
9279         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
9280         * lib/utimecmp.c (SIZE_MAX): Remove.
9281
9282         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
9283
9284         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
9285         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
9286         O_NOATIME works.
9287
9288 2006-10-05  Bruno Haible  <bruno@clisp.org>
9289
9290         * lib/gl_list.h (gl_sortedlist_search_from_to,
9291         gl_sortedlist_indexof_from_to): New declarations.
9292         (gl_list_implementation): New fields sortedlist_search_from_to,
9293         sortedlist_indexof_from_to.
9294         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
9295         inline functions.
9296         * lib/gl_list.c (gl_sortedlist_search_from_to,
9297         gl_sortedlist_indexof_from_to): New functions.
9298         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
9299         function.
9300         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
9301         (gl_array_sortedlist_search_from_to): New function.
9302         (gl_array_list_implementation): Update.
9303         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
9304         function.
9305         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
9306         (gl_carray_sortedlist_search_from_to): New function.
9307         (gl_carray_list_implementation): Update.
9308         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
9309         gl_linked_sortedlist_indexof_from_to): New functions.
9310         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9311         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9312         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
9313         gl_tree_sortedlist_indexof_from_to): New functions.
9314         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9315         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9316         Update.
9317         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9318         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
9319         Update.
9320
9321 2006-10-05  Bruno Haible  <bruno@clisp.org>
9322
9323         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
9324         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
9325         (struct gl_list_implementation): Add fields search_from_to,
9326         indexof_from_to. Remove fields search, indexof.
9327         (gl_list_search): Use the search_from_to method.
9328         (gl_list_search_from, gl_list_search_from_to): New functions.
9329         (gl_list_indexof): Use the indexof_from_to method.
9330         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9331         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
9332         (gl_list_search_from, gl_list_search_from_to): New functions.
9333         (gl_list_indexof): Use the indexof_from_to method.
9334         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
9335         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
9336         gl_array_indexof. Add start_index, end_index arguments.
9337         (gl_array_search_from_to): Renamed from gl_array_search. Add
9338         start_index, end_index arguments.
9339         (gl_array_remove, gl_array_list_implementation): Update.
9340         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
9341         gl_carray_indexof. Add start_index, end_index arguments.
9342         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
9343         start_index, end_index arguments.
9344         (gl_carray_remove, gl_carray_list_implementation): Update.
9345         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
9346         gl_linked_search. Add start_index, end_index arguments.
9347         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
9348         start_index, end_index arguments.
9349         (gl_linked_remove): Update.
9350         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
9351         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
9352         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
9353         field to 'size_t'.
9354         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
9355         gl_tree_search. Add start_index, end_index arguments.
9356         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9357         start_index, end_index arguments.
9358         (gl_tree_remove): Update.
9359         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
9360         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
9361         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
9362         function.
9363         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
9364         gl_tree_search. Add start_index, end_index arguments.
9365         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
9366         start_index, end_index arguments.
9367         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
9368         Update.
9369         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
9370
9371 2006-10-05  Bruno Haible  <bruno@clisp.org>
9372
9373         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
9374
9375         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
9376         fwriteerror_temp): New declarations.
9377         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
9378         (descriptors): New variable.
9379         (cleanup): First, close the descriptors.
9380         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
9381         fclose_temp, fwriteerror_temp): New functions.
9382
9383 2006-10-04  Jim Meyering  <jim@meyering.net>
9384
9385         * lib/fts.c (fts_open): Tiny comment change.
9386
9387 2006-10-04  Bruno Haible  <bruno@clisp.org>
9388
9389         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
9390         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
9391         gl_LOCK_BODY.
9392         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
9393         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
9394         gl_LOCK_EARLY_BODY.
9395         (gl_LOCK): Require gl_LOCK_BODY.
9396
9397 2006-10-04  Bruno Haible  <bruno@clisp.org>
9398
9399         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
9400         (gl_oset_search_atleast): New declaration.
9401         (struct gl_oset_implementation): Add field 'search_atleast'.
9402         (gl_oset_search_atleast): New inline function.
9403         * lib/gl_oset.c (gl_oset_search_atleast): New function.
9404         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
9405         (gl_array_oset_implementation): Update.
9406         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
9407         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
9408         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
9409
9410 2006-10-04  Bruno Haible  <bruno@clisp.org>
9411
9412         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
9413
9414 2006-10-03  Bruno Haible  <bruno@clisp.org>
9415
9416         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
9417         from gl_avltreehash_list_implementation.
9418
9419 2006-10-03  Bruno Haible  <bruno@clisp.org>
9420
9421         * lib/gl_oset.c (gl_oset_add): Fix return type.
9422
9423 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
9424
9425         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
9426
9427 2006-10-02  Eric Blake  <ebb9@byu.net>
9428
9429         * modules/strnlen (Depends-on): Add extensions.
9430
9431 2006-10-02  Eric Blake  <ebb9@byu.net>
9432
9433         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
9434         definition in 2.60+.
9435
9436 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
9437
9438         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
9439         checks.
9440
9441 2006-10-02  Bruno Haible  <bruno@clisp.org>
9442
9443         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
9444         to the AUTOMAKE_OPTIONS.
9445         Reported by Jim Meyering.
9446
9447 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
9448
9449         Work around bug in Solaris 10 /proc file system:
9450         /proc/self/fd/NNN/.. isn't the parent directory of
9451         the directory whose file descriptor is NNN.  This needs to
9452         be worked around at run time, not compile time, since a
9453         program might be built on Solaris 8, where things work, and
9454         run on Solaris 10.
9455         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
9456         to use the following interface instead:
9457         (OPENAT_BUFFER_SIZE): New macro.
9458         (openat_proc_name): New function.
9459         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
9460         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
9461         Likewise.
9462         * lib/openat-proc.c: New file.
9463         * modules/openat (Files): Add lib/openat-proc.c.
9464         (Depends-on): Add same-inode, stdbool.
9465         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
9466
9467 2006-09-29  Bruno Haible  <bruno@clisp.org>
9468
9469         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
9470         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
9471         argument. Set stdout_closed before testing for ferror, not after.
9472         (fwriteerror, fwriteerror_no_ebadf): New functions.
9473
9474 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9475
9476         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
9477
9478 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
9479
9480         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
9481         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
9482
9483 2006-09-28  Jim Meyering  <jim@meyering.net>
9484
9485         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
9486         Include <unistd.h>.
9487
9488 2006-09-28  Bruno Haible  <bruno@clisp.org>
9489
9490         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
9491         * modules/linkedhash-list (Depends-on): Likewise.
9492         * modules/rbtreehash-list (Depends-on): Likewise.
9493
9494 2006-09-28  Bruno Haible  <bruno@clisp.org>
9495
9496         * lib/strndup.h: Simplify the redefinition of strndup.
9497         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
9498         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
9499
9500 2006-09-28  Bruno Haible  <bruno@clisp.org>
9501
9502         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
9503         * lib/gl_linkedhash_list.c: Likewise.
9504         * lib/gl_rbtreehash_list.c: Likewise.
9505
9506 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
9507
9508         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
9509         getaddrinfo.
9510
9511         * lib/__fpending.h: Don't include <stdio_ext.h> unless
9512         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
9513         it causes <stdio_ext.h> to cause a compile-time error.
9514         Problem reported by Nelson H. F. Beebe.
9515         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
9516         of HAVE_DECL___PENDING.
9517
9518         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
9519         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
9520         declaration.
9521
9522 2006-09-27  Jim Meyering  <jim@meyering.net>
9523
9524         This file could end up with a definition for a function
9525         named __strndup, rather than rpl_strndup on a system with
9526         incomplete weak_alias support.
9527         * lib/strndup.c (strndup): Rename from __strndup.
9528         Remove #defines that used to map __strndup to strndup.
9529         Don't use K&R prototypes.
9530         Remove LIBC-related code, since this file is not sync'd with glibc.
9531         * lib/strndup.h: Revamp, accordingly.
9532         * m4/strndup.m4: Modernize.
9533
9534 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
9535
9536         * modules/savewd (Depends-on): Add 'raise'.
9537         * lib/savewd.c: Include <signal.h>, for 'raise'.
9538
9539 2006-09-26  Jim Meyering  <jim@meyering.net>
9540
9541         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
9542         when we detect Darwin 8.7.0's acl_get_file bug.
9543         Rearrange to perform the new (below) run-test while $LIBS
9544         contains any acl-related library.  Set USE_ACL at the end.
9545         (gl_ACL_GET_FILE): New function.
9546
9547 2006-09-26  Eric Blake  <ebb9@byu.net>
9548
9549         * lib/verror.c: Include <config.h> unconditionally.
9550
9551 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
9552
9553         * modules/clock-time (Maintainer): Add self.
9554         * modules/getlogin_r (Depends-on): Add extensions.
9555
9556 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9557
9558         * modules/clock-time: New module.
9559         * modules/nanosleep (Depends-on): Add clock-time.
9560         * modules/gethrxtime (Depends-on): Likewise.
9561         * modules/gettime (Depends-on): Likewise.
9562         * modules/settime (Depends-on): Likewise.
9563
9564         * modules/fts-lgpl: Depend on openat.
9565         * modules/mkancesdirs: Depend on savewd.
9566         * modules/mkdir-p: Likewise.
9567
9568 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9569
9570         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
9571
9572         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
9573         `gl_have_arbitrary_file_name_length_limit' to
9574         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
9575         actually works between configure runs.
9576
9577 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9578             Bruno Haible  <bruno@clisp.org>
9579
9580         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
9581
9582 2006-09-25  Jim Meyering  <jim@meyering.net>
9583
9584         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
9585         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
9586
9587 2006-09-25  Eric Blake  <ebb9@byu.net>
9588
9589         * gnulib-tool (func_import, func_create_testdir): Fix typos in
9590         exec's in 2006-09-18 patch when shuffling fds.
9591
9592 2006-09-25  Bruno Haible  <bruno@clisp.org>
9593
9594         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
9595         Reported by Jim Meyering.
9596
9597 2006-09-24  Jim Meyering  <jim@meyering.net>
9598
9599         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
9600         compare a pointer against a literal "0".  That caused failures with
9601         at least HP-UX's hpcc.
9602
9603 2006-09-22  Simon Josefsson  <jas@extundo.com>
9604
9605         * modules/gc-sha1:
9606         * modules/gc-md4:
9607         * modules/gc-hmac-sha1:
9608         * modules/gc-hmac-md5:
9609         * modules/gc-des:
9610         * modules/gc-arcfour: Distribute more files.
9611
9612 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9613
9614         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
9615         (gl_linked_iterator_from_to): Initialize struct completely.
9616         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
9617         (gl_tree_iterator_from_to): Likewise
9618         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
9619         * lib/gl_array_list.c [lint] (gl_array_iterator)
9620         (gl_array_iterator_from_to): Likewise.
9621         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
9622         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
9623         (gl_carray_iterator_from_to): Likewise.
9624
9625         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
9626         * lib/md4.c (md4_process_block): Remove unused variable.
9627         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
9628         parentheses for clarity.
9629
9630 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9631
9632         * modules/bison-i18n (Depends-on): Add gettext.
9633
9634 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9635
9636         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
9637         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
9638         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
9639         also add missing comma that caused broken test.
9640         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
9641         stdlib.h, for `abort'.
9642         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
9643         variables.
9644         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
9645         include unistd.h if present, for `rmdir'.
9646         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
9647         variables.
9648         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
9649         in the process include standard headers for prototypes.
9650         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
9651         gets declared on GNU/Linux.
9652         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
9653         unistd.h, for `rmdir'.
9654         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
9655
9656         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
9657         always true.
9658         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
9659
9660         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
9661
9662 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9663
9664         * gnulib-tool (func_version): Create output all at once.  This
9665         may help avoid triggering unnecessary SIGPIPEs, and at any
9666         rate it doesn't hurt.
9667
9668 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9669             Bruno Haible  <bruno@clisp.org>
9670
9671         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
9672         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
9673         * m4/signed.m4 (bh_C_SIGNED): Likewise.
9674
9675         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
9676         (gl_FUNC_VASPRINTF): Invoke it.
9677
9678 2006-09-22  Bruno Haible  <bruno@clisp.org>
9679
9680         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
9681         getloadavg.c as first argument.
9682
9683 2006-09-22  Bruno Haible  <bruno@clisp.org>
9684
9685         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
9686         at the beginning of the gl_INIT macro.
9687         * modules/getloadavg (configure.ac): Pass $gl_source_base to
9688         gl_GETLOADAVG.
9689
9690 2006-09-22  Bruno Haible  <bruno@clisp.org>
9691
9692         * gnulib-tool (func_create_megatestdir): Don't include the config-h
9693         module.
9694         Suggested by Ralf Wildenhues.
9695
9696 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
9697
9698         Import this patch from libc:
9699
9700         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
9701
9702         * lib/regex_internal.c (re_string_reconstruct): Handle
9703         offset < pstr->valid_raw_len && pstr->offsets_needed case.
9704         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
9705         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
9706         re_string_context_at.
9707
9708         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
9709         now requires it.
9710         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
9711         gl_REGEX now does it for us.
9712         (gl_REGEX): Add test taken from
9713         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
9714
9715         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
9716         Check that large offsets work.  Modernize Autoconf usages.
9717         Prefer "yes" to mean a good thing rather than a bad.
9718         Don't put "#define mkstemp" in config.h, as this might interfere
9719         with standard system headers that "#define mkstemp mkstemp64".
9720
9721         * modules/mkstemp (Depends-on): Add extensions, so that
9722         mkstemp is visible on some platforms.
9723         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
9724         (Include): Change to "mkstemp.h" from <stdlib.h>.
9725         (Files): Add mkstemp.h.
9726
9727         * lib/mkstemp.h: New file, since some standard headers
9728         #define mkstemp.
9729         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
9730         Include "mkstemp.h".
9731         Make the _LIBC code resemble glibc original more,
9732         e.g., use K&R style.
9733         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
9734         (mkstemp): Remove, since mkstemp.h does this for us.
9735         * lib/stdlib--.h: Include mkstemp.h.
9736
9737         Import this patch from libc:
9738
9739         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
9740
9741         * lib/tempname.c (__gen_tempname): Change attempts_min
9742         into a macro.  Use preprocessor to decide how to initialize
9743         attempts [Coverity CID 67].
9744
9745 2006-09-20  Bruno Haible  <bruno@clisp.org>
9746
9747         * lib/mkdtemp.c: Import from libc.
9748         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
9749                 * sysdeps/posix/tempname.c (__gen_tempname): Change
9750                 attempts_min into a macro.  Use preprocessor to decide how to
9751                 initialize attempts [Coverity CID 67].
9752         2001-11-27  Paul Eggert  <eggert@twinsun.com>
9753                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
9754                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
9755
9756 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9757
9758         * gnulib-tool (func_exit): New function, to allow to pass the
9759         exit status portably through the trap.  Use everywhere.
9760         (--help, --version): Signal a write error.
9761         (trap): catch SIGPIPE, for write errors.
9762         Exit at the end of the trap, with the correct exit status.
9763
9764 2006-09-19  Karl Berry  <karl@gnu.org>
9765
9766         * doc/gnulib.texi: note about the license texinfo files.
9767
9768 2006-09-19  Eric Blake  <ebb9@byu.net>
9769
9770         * gnulib-tool: Avoid space-tab.
9771
9772 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
9775         that prevented coreutils 6.1 from building.  Problem reported
9776         by Petter Reinholdtsen.
9777
9778 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
9779
9780         * gnulib-tool (avoidlist): Fix typo that broke options like
9781         --avoid=lock that are used by coreutils bootstrap.
9782
9783 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
9784
9785         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
9786         more systematically.
9787
9788 2006-09-18  Jim Meyering  <jim@meyering.net>
9789
9790         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
9791
9792 2006-09-18  Bruno Haible  <bruno@clisp.org>
9793
9794         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
9795
9796 2006-09-18  Bruno Haible  <bruno@clisp.org>
9797
9798         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
9799         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
9800         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
9801         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
9802         * m4/gettext.m4: Require autoconf >= 2.52.
9803         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
9804         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
9805         of gl_cv_header_inttypes_h.
9806
9807 2006-09-18  Bruno Haible  <bruno@clisp.org>
9808
9809         * lib/javaversion.c: Include configmake.h.
9810
9811 2006-09-18  Bruno Haible  <bruno@clisp.org>
9812
9813         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
9814         avoid that the while loops be executed in a subshell.
9815
9816 2006-09-18  Bruno Haible  <bruno@clisp.org>
9817
9818         * MODULES.html.sh (func_module): Break long lines.
9819         Suggested by Bruce Korb <bkorb@gnu.org>.
9820
9821 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9822
9823         Speed up by a factor of 1.12.
9824         * gnulib-tool (nl): New variable.
9825         (func_import): Rewrite include directive extraction to only read each
9826         directive once.
9827
9828 2006-09-17  Bruno Haible  <bruno@clisp.org>
9829
9830         * modules/javaversion (Makefile.am): Remove DEFS setting.
9831         (Depends-on): Add configmake, for PKGDATADIR definition.
9832
9833 2006-09-17  Bruno Haible  <bruno@clisp.org>
9834
9835         * gnulib-tool (func_create_testdir): Rewrite all files at once.
9836
9837 2006-09-17  Bruno Haible  <bruno@clisp.org>
9838
9839         * gnulib-tool (func_append): New function, stolen from libtool.m4.
9840         (func_modules_transitive_closure, func_modules_add_dummy,
9841         func_modules_to_filelist, func_import, func_create_testdir,
9842         func_create_megatestdir, ...): Use it wherever possible.
9843         Suggested by Ralf Wildenhues.
9844
9845 2006-09-16  Karl Berry  <karl@gnu.org>
9846
9847         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
9848         to avoid sectioning errors.
9849         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
9850         [ifinfo]: blank line after @center-ed titles.
9851         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
9852         Spell FSF address consistently with others.
9853         (These changes approved by rms.)
9854
9855 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9856
9857         Speed up by a factor of 1.61.
9858         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
9859         already checked module names again.
9860
9861 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9862
9863         Speed up by a factor of 1.13.
9864         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
9865         for new_files, and the input to func_add_or_update.
9866
9867 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9868
9869         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
9870         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
9871
9872 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9873
9874         * modules/mkancesdirs (Depends-on): Add fcntl.
9875         * modules/savewd: New file.
9876         * MODULES.html.sh (File system functions): Add savewd.
9877
9878         * modules/configmake (Makefile.am): Add support for the
9879         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
9880
9881 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9882
9883         * m4/savewd.m4: New file.
9884
9885 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9886
9887         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
9888         (dirchownmod): New arg FD.  All callers changed.
9889         Use FD rather than opening the directory ourself, as opening is
9890         now the caller's responsibility.
9891         * lib/dirchownmod.h: Likewise.
9892         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
9893         hosts that require <sys/types.h> before <sys/stat.h>.  Include
9894         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
9895         (test_dir): Remove.
9896         (mkancesdirs): Return length of prefix of FILE that has already
9897         been made, or -2 if there is a child doing the work.  Redo
9898         algorithm so that it is O(N) rather than O(N**2).  Optimize away
9899         ".", and treat ".." specially since it might stray back into
9900         already-created areas.  Use a subprocess if necessary.  New arg
9901         WD; all users changed.  MAKE_DIR function should now return 1
9902         if it creates a directory that is not readable.  Return -2 if
9903         a child process is spun off.
9904         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
9905         Adjust signature to match code.
9906         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
9907         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
9908         all users changed.
9909         * lib/savewd.c, lib/savewd.h: New files.
9910
9911 2006-09-15  Jim Meyering  <jim@meyering.net>
9912
9913         * modules/rename-dest-slash: New module.
9914         * MODULES.html.sh (posix_compat): Add it here.
9915
9916         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
9917
9918 2006-09-15  Jim Meyering  <jim@meyering.net>
9919
9920         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
9921         file.
9922
9923         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
9924
9925 2006-09-15  Jim Meyering  <jim@meyering.net>
9926
9927         * lib/rename-dest-slash.c (has_trailing_slash): Use
9928         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
9929         (rpl_rename_dest_slash): Perform the cheaper trailing slash
9930         test before testing whether SRC is a directory.
9931         Suggestions from Bruno Haible.
9932
9933         Avoid a warning about an unused variable.
9934         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
9935         into the #ifdef block where it's used.
9936
9937         * lib/rename-dest-slash.c: New file.
9938
9939 2006-09-14  Bruno Haible  <bruno@clisp.org>
9940
9941         * lib/allocsa.c: Include <config.h> unconditionally.
9942         * lib/asnprintf.c: Likewise.
9943         * lib/asprintf.c: Likewise.
9944         * lib/c-strcasecmp.c: Likewise.
9945         * lib/c-strcasestr.c: Likewise.
9946         * lib/c-strncasecmp.c: Likewise.
9947         * lib/c-strstr.c: Likewise.
9948         * lib/classpath.c: Likewise.
9949         * lib/clean-temp.c: Likewise.
9950         * lib/concatpath.c: Likewise.
9951         * lib/copy-file.c: Likewise.
9952         * lib/csharpcomp.c: Likewise.
9953         * lib/csharpexec.c: Likewise.
9954         * lib/execute.c: Likewise.
9955         * lib/fatal-signal.c: Likewise.
9956         * lib/findprog.c: Likewise.
9957         * lib/fwriteerror.c: Likewise.
9958         * lib/gl_array_list.c: Likewise.
9959         * lib/gl_array_oset.c: Likewise.
9960         * lib/gl_avltree_list.c: Likewise.
9961         * lib/gl_avltree_oset.c: Likewise.
9962         * lib/gl_avltreehash_list.c: Likewise.
9963         * lib/gl_carray_list.c: Likewise.
9964         * lib/gl_linked_list.c: Likewise.
9965         * lib/gl_linkedhash_list.c: Likewise.
9966         * lib/gl_list.c: Likewise.
9967         * lib/gl_oset.c: Likewise.
9968         * lib/gl_rbtree_list.c: Likewise.
9969         * lib/gl_rbtree_oset.c: Likewise.
9970         * lib/gl_rbtreehash_list.c: Likewise.
9971         * lib/imaxabs.c: Likewise.
9972         * lib/imaxdiv.c: Likewise.
9973         * lib/javacomp.c: Likewise.
9974         * lib/javaexec.c: Likewise.
9975         * lib/javaversion.c: Likewise.
9976         * lib/linebreak.c: Likewise.
9977         * lib/localcharset.c: Likewise.
9978         * lib/lock.c: Likewise.
9979         * lib/mbchar.c: Likewise.
9980         * lib/mbswidth.c: Likewise.
9981         * lib/mkdtemp.c: Likewise.
9982         * lib/pipe.c: Likewise.
9983         * lib/printf-args.c: Likewise.
9984         * lib/printf-parse.c: Likewise.
9985         * lib/progname.c: Likewise.
9986         * lib/progreloc.c: Likewise.
9987         * lib/readlink.c: Likewise.
9988         * lib/sh-quote.c: Likewise.
9989         * lib/stpcpy.c: Likewise.
9990         * lib/stpncpy.c: Likewise.
9991         * lib/strcasecmp.c: Likewise.
9992         * lib/strcasestr.c: Likewise.
9993         * lib/strcspn.c: Likewise.
9994         * lib/striconv.c: Likewise.
9995         * lib/strncasecmp.c: Likewise.
9996         * lib/strnlen1.c: Likewise.
9997         * lib/strstr.c: Likewise.
9998         * lib/strtok_r.c: Likewise.
9999         * lib/tls.c: Likewise.
10000         * lib/tmpdir.c: Likewise.
10001         * lib/unicodeio.c: Likewise.
10002         * lib/unsetenv.c: Likewise.
10003         * lib/vasnprintf.c: Likewise.
10004         * lib/vasprintf.c: Likewise.
10005         * lib/wait-process.c: Likewise.
10006         * lib/xallocsa.c: Likewise.
10007         * lib/xsetenv.c: Likewise.
10008         * lib/xstriconv.c: Likewise.
10009
10010 2006-09-13  Simon Josefsson  <jas@extundo.com>
10011
10012         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
10013         that internally, suggested by Ralf Wildenhues
10014         <Ralf.Wildenhues@gmx.de>.
10015
10016 2006-09-13  Simon Josefsson  <jas@extundo.com>
10017
10018         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
10019         @LIBOBJS@.
10020         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10021
10022 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
10023
10024         * lib/_fpending.c: Include <config.h> unconditionally, since we no
10025         longer worry about uses that don't define HAVE_CONFIG_H.
10026         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
10027         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
10028         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
10029         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
10030         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
10031         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
10032         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
10033         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
10034         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
10035         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
10036         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
10037         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
10038         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
10039         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
10040         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
10041         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
10042         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
10043         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
10044         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
10045         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
10046         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
10047         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
10048         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
10049         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
10050         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
10051         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
10052         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
10053         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
10054         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
10055         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
10056         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
10057         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
10058         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
10059         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
10060         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
10061         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
10062         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
10063         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
10064         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
10065         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
10066         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
10067         Likewise.
10068
10069 2006-09-13  Eric Blake  <ebb9@byu.net>
10070
10071         * lib/getopt.c: Fix typo in last commit.
10072
10073 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
10074
10075         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
10076         dgettext.
10077
10078 2006-09-12  Jim Meyering  <jim@meyering.net>
10079
10080         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
10081         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
10082         Reported by Nelson H. F. Beebe.
10083
10084 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10085
10086         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
10087         program_invocation_name and program_invocation_short_name are
10088         initialized.
10089         * lib/argp-namefrob.h: Move declarations of program_invocation_name
10090         and program_invocation_short_name to argp.h, so they are visible
10091         to user programs.
10092         * lib/argp.h: Likewise
10093
10094 2006-09-10  Bruno Haible  <bruno@clisp.org>
10095
10096         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
10097         m4/inttypes_h.m4, m4/uintmax_t.m4.
10098
10099 2006-09-10  Bruno Haible  <bruno@clisp.org>
10100
10101         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
10102         gl_AC_TYPE_UINTMAX_T.
10103
10104 2006-09-10  Bruno Haible  <bruno@clisp.org>
10105
10106         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
10107
10108 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10109
10110         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
10111         convention.  Text proposed by Bruno Haible.
10112         (struct argp_option): Document the use of N_() wrappers.
10113
10114         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
10115         '\v', and translate the two parts separately, instead of feeding
10116         the whole string to gettext.  This allows to exclude
10117         '\v' from the strings visible to the translator by writing doc
10118         strings as N_("..") "\v" N_("..").
10119
10120 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
10121
10122         * config/srclist.txt: Undo latest change; the bug was fixed.
10123
10124 2006-09-09  Bruno Haible  <bruno@clisp.org>
10125
10126         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
10127         assignments if building a library without libtool.
10128         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
10129         in func_emit_lib_Makefile_am.
10130         (func_import): When building a static library libfoo.a, arrange to
10131         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
10132         (func_create_testdir): Likewise.
10133         * modules/gc (configure.ac, Makefile.am): If building statically,
10134         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
10135         * modules/iconvme (configure.ac, Makefile.am): Likewise.
10136         * modules/striconv (configure.ac, Makefile.am): Likewise.
10137         Based on a suggestion by Ralf Wildenhues.
10138
10139 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10140
10141         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
10142         Check for unistd.h too, since Autoconf doesn't assume POSIX.
10143         Also:
10144
10145         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10146         Add year_2050_test to catch glibc bug 2821
10147         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10148
10149         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10150         Prefer #ifdef to #if.
10151
10152         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
10153         Return from 'main' instead of calling 'exit'.
10154
10155 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10156
10157         * lib/mktime.c (guess_time_tm): Fix bug where mktime
10158         returned the maximum time_t value rather than (time_t) -1.
10159         Problem originally reported by William Bardwell
10160         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
10161
10162         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10163         Moved to here ...
10164         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
10165         ... from here.
10166
10167 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
10168
10169         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
10170         2821 is fixed.
10171
10172 2006-09-08  Jim Meyering  <jim@meyering.net>
10173
10174         Don't make generated files read-only.  That would bother too many
10175         people.  However, do retain the ability to work when targets are
10176         read-only: remove the destination and temporary files before writing
10177         them (when generated via sed or echo), or by using the -f option for
10178         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
10179         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10180         * modules/byteswap, modules/configmake, modules/fcntl:
10181         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10182         * modules/localcharset, modules/netinet_in, modules/poll:
10183         * modules/stdbool, modules/stdint, modules/sys_select:
10184         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10185
10186 2006-09-08  Jim Meyering  <jim@meyering.net>
10187
10188         Avoid new build failure on FreeBSD 6.0.
10189         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
10190         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
10191         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
10192
10193 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10194
10195         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
10196
10197 2006-09-07  Jim Meyering  <jim@meyering.net>
10198
10199         Fix global typo in last change: use chmod u-w, not chmod u-x.
10200         Spotted by Paul Eggert and Bruce Korb.
10201         * modules/alloca-opt, modules/argz, modules/arpa_inet:
10202         * modules/byteswap, modules/configmake, modules/fcntl:
10203         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
10204         * modules/localcharset, modules/netinet_in, modules/poll:
10205         * modules/stdbool, modules/stdint, modules/sys_select:
10206         * modules/sys_socket, modules/sys_stat, modules/sysexits:
10207
10208 2006-09-06  Jim Meyering  <jim@meyering.net>
10209
10210         Make generated files be read-only.
10211         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
10212         Ensure that each generated file is now read-only.
10213         * modules/argz: Likewise.
10214         * modules/arpa_inet: Likewise.
10215         * modules/byteswap: Likewise.
10216         * modules/configmake: Likewise.
10217         * modules/fcntl: Likewise.
10218         * modules/fnmatch: Likewise.
10219         * modules/getopt: Likewise.
10220         * modules/glob: Likewise.
10221         * modules/inttypes: Likewise.
10222         * modules/netinet_in: Likewise.
10223         * modules/poll: Likewise.
10224         * modules/stdbool: Likewise.
10225         * modules/stdint: Likewise.
10226         * modules/sys_select: Likewise.
10227         * modules/sys_socket: Likewise.
10228         * modules/sys_stat: Likewise.
10229         * modules/sysexits: Likewise.
10230         * modules/localcharset: Same as above, but continue using temporary
10231         file named "t-$@" (why different?) rather than the "$@-t" used
10232         everywhere else.
10233
10234         * modules/sysexits (Makefile.am): Replace literal occurrences
10235         of "sysexit.h" more readable, and more consistent, "$@".
10236
10237 2006-09-06  Bruno Haible  <bruno@clisp.org>
10238
10239         * modules/striconv: New file.
10240         * modules/xstriconv: New file.
10241         * MODULES.html.sh (Internationalization functions): Add striconv,
10242         xstriconv.
10243
10244 2006-09-06  Bruno Haible  <bruno@clisp.org>
10245
10246         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
10247         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
10248         not using libtool correctly.
10249
10250 2006-09-06  Bruno Haible  <bruno@clisp.org>
10251
10252         * lib/striconv.h: New file.
10253         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
10254         iconvstring.c.
10255         * lib/xstriconv.h: New file.
10256         * lib/xstriconv.c: New file.
10257
10258 2006-09-06  Bruno Haible  <bruno@clisp.org>
10259
10260         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
10261         lib_..._LDFLAGS.
10262
10263 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10264
10265         * lib/argz_.h: Sync from Libtool.
10266
10267         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
10268                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10269
10270         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
10271
10272 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10273
10274         * modules/trim: New file.
10275
10276 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
10277
10278         * lib/trim.h: New file.
10279         * lib/trim.c: New file.
10280
10281 2006-09-05  Bruno Haible  <bruno@clisp.org>
10282
10283         * MODULES.html.sh (String handling): Add trim.
10284
10285 2006-09-04  Karl Berry  <karl@gnu.org>
10286
10287         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
10288         until next release.
10289
10290 2006-09-03  Bruno Haible  <bruno@clisp.org>
10291
10292         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
10293         correctly.
10294
10295 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10296
10297         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
10298         not gl_GETLOADAVG.  Omit unneeded semicolons.
10299         Problems reported by Ralf Wildenhues in
10300         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10301         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
10302         at the end, which is the usual gnulib style.
10303
10304         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
10305         of doing all the work ourselves.
10306         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
10307         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
10308
10309 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10310
10311         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
10312         Problem reported by Ralf Wildenhues in
10313         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
10314
10315         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
10316         HAVE_STRUCT_STATFS_F_FSTYPENAME.
10317
10318 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
10319
10320         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
10321         yesterday's patch by changing test -n to test -z.
10322
10323 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10324
10325         * modules/getloadavg (Files): Add m4/getloadavg.m4.
10326         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
10327         the former is now obsolescent.
10328
10329         * modules/chdir-long (Depends-on): Add fcntl.
10330
10331 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10332
10333         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
10334         obsolescent, and programs should use gnulib instead.
10335         * m4/getloadavg.m4: New file, with contents taken from Autoconf
10336         but with prefixes changed.
10337
10338 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
10339
10340         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
10341         or stdbool.h, because they might not exist while configuring.
10342
10343         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
10344         Don't include unistd.h or limits.h; not needed, since chdir-long.h
10345         does that for us.
10346         (O_DIRECTORY): Remove.
10347
10348 2006-08-31  Eric Blake  <ebb9@byu.net>
10349
10350         * gnulib-tool: Don't let emacs change spaces to TAB.
10351
10352 2006-08-31  Bruno Haible  <bruno@clisp.org>
10353
10354         * gnulib-tool: When calling func_import more than once, do it in a
10355         subshell.
10356         Reported by Eric Blake <ebb9@byu.net>.
10357
10358 2006-08-31  Bruno Haible  <bruno@clisp.org>
10359
10360         * gnulib-tool (nl): Remove variable.
10361         (sed_transform_lib_file): Use more robust test for config-h module.
10362         (func_import): Fix typo in 2006-08-25 patch.
10363
10364 2006-08-31  Bruno Haible  <bruno@clisp.org>
10365
10366         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
10367         specified, augment Makefile.am variables instead of assigning them.
10368
10369 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10370
10371         Work around a bug in both the Linux and SunOS 64-bit kernels:
10372         nanosleep mishandles sleeps for longer than 2**31 seconds.
10373         Problem reported by Frank v Waveren in
10374         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10375         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
10376         Check for nanosleep bug.
10377         (LIB_NANOSLEEP): Append clock_gettime library if needed.
10378
10379 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10380
10381         Work around a bug in both the Linux and SunOS 64-bit kernels:
10382         nanosleep mishandles sleeps for longer than 2**31 seconds.
10383         Problem reported by Frank v Waveren in
10384         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
10385         * lib/nanosleep.c (BILLION): New constant.
10386         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
10387         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
10388         implementation.
10389
10390 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10391
10392         * modules/nanosleep (Depends-on): Add gettime.
10393
10394 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
10395         and Simon Josefsson  <jas@extundo.com>
10396         and Oskar Liljeblad  <oskar@osk.mine.nu>
10397
10398         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
10399         * gnulib-tool (func_import): New license type 'unmodifiable license
10400         text'.
10401         * modules/fdl: Use it.  Longer description.
10402         * module/gpl, module/lgpl: New files.
10403
10404 2006-08-30  Jim Meyering  <jim@meyering.net>
10405
10406         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
10407         shadowing the parameter.
10408
10409 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10410
10411         Sync from Libtool:
10412
10413         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10414
10415         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
10416         sharing with gnulib.  Report by Eric Blake.
10417
10418 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10419
10420         * modules/isapipe: New file.
10421         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
10422
10423 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10424
10425         * modules/configmake (Makefile.am): Add a comment, and omit
10426         the CONFIGMAKE_ prefix from generated macro names.  Suggested
10427         by Bruno Haible.
10428
10429 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10430
10431         * m4/isapipe.m4: New file.
10432
10433 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
10434
10435         * lib/isapipe.c, lib/isapipe.h: New files.
10436
10437 2006-08-29  Jim Meyering  <jim@meyering.net>
10438
10439         * modules/configmake (Makefile.am): Make configmake.h depend on
10440         Makefile.  Otherwise, a stale configmake.h could hang around.
10441
10442 2006-08-29  Eric Blake  <ebb9@byu.net>
10443
10444         * lib/error.c (error_at_line, print_errno_message): Match libc, after
10445         resolution of upstream bug 3044.
10446
10447 2006-08-29  Bruno Haible  <bruno@clisp.org>
10448
10449         * modules/localcharset (Depends-on): Add configmake.
10450         (Makefile.am): Remove setting of LIBDIR through DEFS.
10451
10452 2006-08-29  Bruno Haible  <bruno@clisp.org>
10453
10454         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
10455         defined.
10456
10457 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10458
10459         * modules/fcntl: New file.
10460         * modules/chdir-safer (Depends-on): Add fcntl.
10461         * modules/fts: Likewise.
10462         * modules/mkdir-p: Likewise.
10463
10464         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
10465         This undoes the most recent change, since we're now addressing the
10466         problem in a different way.
10467
10468         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
10469         into output, since the output might be called Makefile.am even
10470         if $makefile_name is something different.
10471         (func_import): Use $makefile_am rather than
10472         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
10473         empty.
10474
10475         * modules/inttypes (Files): Add m4/inttypes-h.m4.
10476
10477 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10478
10479         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
10480         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
10481         recent change to stdint.m4, since we're now addressing the problem in a
10482         different way.
10483
10484 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10485
10486         * m4/fcntl_h.m4: New file.
10487
10488 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
10489
10490         * lib/fcntl_.h: New file.
10491         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
10492         the fcntl module.
10493         * lib/dirchownmod.c: Likewise.
10494         * lib/fts.c: Likewise.
10495
10496         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
10497         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
10498         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
10499         just before including <inttypes.h>, to avoid circular inclusion.
10500
10501 2006-08-28  Jim Meyering  <jim@meyering.net>
10502
10503         * doc/visibility.texi: Actually read and correct the grammar of the
10504         sentence affected by yesterday's change.
10505
10506 2006-08-28  Eric Blake  <ebb9@byu.net>
10507
10508         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
10509         needs wrapper.
10510
10511 2006-08-28  Eric Blake  <ebb9@byu.net>
10512
10513         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
10514
10515 2006-08-28  Eric Blake  <ebb9@byu.net>
10516
10517         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
10518
10519 2006-08-28  Bruno Haible  <bruno@clisp.org>
10520
10521         * modules/c-strstr: New file, from GNU gettext.
10522         * MODULES.html.sh (String handling): Add c-strstr.
10523
10524 2006-08-28  Bruno Haible  <bruno@clisp.org>
10525
10526         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
10527         macros.
10528         Reported by Eric Blake.
10529
10530 2006-08-28  Bruno Haible  <bruno@clisp.org>
10531
10532         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
10533         (VASNPRINTF): Return a string of length > INT_MAX without failing.
10534         * lib/vasprintf.c: Include errno.h, limits.h.
10535         (EOVERFLOW): New fallback definition.
10536         (vasprintf): Test here whether the string length is > INT_MAX.
10537         * lib/vsnprintf.c: Include errno.h, limits.h.
10538         (EOVERFLOW): New fallback definition.
10539         (vsnprintf): Fix bug when generated string was too long for the buffer.
10540         Test here whether the string length is > INT_MAX.
10541
10542 2006-08-28  Bruno Haible  <bruno@clisp.org>
10543
10544         * lib/inttypes_.h (SCNX*): Remove definitions.
10545         Reported by Eric Blake.
10546
10547 2006-08-28  Bruno Haible  <bruno@clisp.org>
10548
10549         * lib/c-strstr.h: New file, from GNU gettext.
10550         * lib/c-strstr.c: New file, from GNU gettext.
10551
10552 2006-08-28  Bruno Haible  <bruno@clisp.org>
10553
10554         * gnulib-tool: Reorder some statements.
10555
10556 2006-08-28  Bruno Haible  <bruno@clisp.org>
10557
10558         * gnulib-tool: New option --makefile-name.
10559         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
10560         $makefile_name.
10561         (func_import): Write $makefile_name to the cache file, and read it from
10562         there unless explicitly specified. Use $makefile_name as file name
10563         instead of Makefile.am. Adjust the recommendations accordingly.
10564
10565 2006-08-28  Bruno Haible  <bruno@clisp.org>
10566
10567         * gnulib-tool (func_verify_module): Check against misapplying patch.
10568
10569 2006-08-28  Bruno Haible  <bruno@clisp.org>
10570
10571         * gnulib-tool (func_relativize, func_relconcat): New functions.
10572         Give an error if --local-dir is given with --update.
10573         Remove trailing slashes from $local_gnulib_dir.
10574         (func_import): Store the relativized $local_gnulib_dir in
10575         gnulib-cache.m4, and read it from there if not specified explicitly.
10576
10577 2006-08-28  Bruno Haible  <bruno@clisp.org>
10578
10579         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
10580         is the current directory. Respect also $local_gnulib_dir.
10581
10582 2006-08-28  Bruno Haible  <bruno@clisp.org>
10583             Simon Josefsson  <jas@extundo.com>
10584
10585         BeOS portability.
10586         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
10587
10588 2006-08-27  Jim Meyering  <jim@meyering.net>
10589
10590         * doc/visibility.texi: Remove duplicate word: "pointer".
10591
10592 2006-08-26  Bruno Haible  <bruno@clisp.org>
10593
10594         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
10595         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
10596         (Makefile.am): Create inttypes.h from inttypes_.h.
10597         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
10598
10599         * modules/imaxabs: New file.
10600
10601         * modules/imaxdiv: New file.
10602
10603 2006-08-26  Bruno Haible  <bruno@clisp.org>
10604
10605         * m4/inttypes.m4: New file.
10606         * m4/_inttypes_h.m4: Remove file.
10607         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
10608         PRI_MACROS_BROKEN.
10609         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
10610
10611         * m4/imaxabs.m4: New file.
10612
10613         * m4/imaxdiv.m4: New file.
10614
10615 2006-08-26  Bruno Haible  <bruno@clisp.org>
10616
10617         * lib/inttypes_.h: New file.
10618         * lib/inttypes.h: Remove file.
10619         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
10620
10621         * lib/imaxabs.c: New file.
10622
10623         * lib/imaxdiv.c: New file.
10624
10625 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10626
10627         New config-h module, so that "make" output needn't be cluttered
10628         by -DHAVE_CONFIG_H.
10629         * MODULES.html.sh (Support for building libraries and executables):
10630         Add config-h.
10631         * modules/config-h: New file.
10632         * gnulib-tool (nl, sed_transform_lib_file): New vars.
10633         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
10634         the config-h module is used.
10635
10636         New configmake module, so that "make" output needn't be cluttered
10637         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
10638         * MODULES.html.sh (Support for building libraries and executables):
10639         Add configmake.
10640         * modules/configmake: New file.
10641
10642 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10643
10644         * m4/config-h.m4: New file.
10645
10646 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10647
10648         * config/srclist.txt: Add elisp-comp.
10649
10650 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10651
10652         * MODULES.html.sh (Support for building libraries and executables):
10653         Add elisp-comp.
10654         * build-aux/elisp-comp: New file.
10655         * modules/elisp-comp: New file.
10656
10657 2006-08-24  Bruno Haible  <bruno@clisp.org>
10658
10659         * gnulib-tool (func_create_testdir): Use non-default values of
10660         sourcebase and m4base.
10661
10662 2006-08-24  Bruno Haible  <bruno@clisp.org>
10663
10664         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
10665         HTML structure.
10666
10667 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10668
10669         * modules/openat (Depends-on): Add lchown.
10670
10671 2006-08-23  Bruno Haible  <bruno@clisp.org>
10672
10673         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
10674         of gl_LOCK_EARLY instead of gl_LOCK.
10675
10676 2006-08-23  Bruno Haible  <bruno@clisp.org>
10677
10678         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
10679         on OSF/1 to no.
10680         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
10681
10682 2006-08-23  Bruno Haible  <bruno@clisp.org>
10683
10684         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
10685         as unusable.
10686
10687         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
10688         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
10689         (gl_LOCK): New macro.
10690
10691 2006-08-22  Simon Josefsson  <jas@extundo.com>
10692
10693         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
10694         to md5 module.
10695
10696 2006-08-22  Simon Josefsson  <jas@extundo.com>
10697
10698         * MODULES.html.sh: Add "Support for maintaining and release
10699         projects".
10700
10701         * build-aux/gnupload: New file, from coreutils.
10702
10703 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
10704
10705         Avoid the need for AC_LIBSOURCES in m4 macros.
10706         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
10707         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
10708         * modules/check-version (EXTRA_DIST): Add check-version.h.
10709         * modules/crc (EXTRA_DIST): Add crc.h.
10710         * modules/des (EXTRA_DIST): Add des.h.
10711         * modules/gc (EXTRA_DIST): Add gc.h.
10712         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
10713         * modules/getline (EXTRA_DIST): Add getline.h.
10714         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
10715         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
10716         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
10717         * modules/md2 (EXTRA_DIST): Add md2.h.
10718         * modules/md4 (EXTRA_DIST): Add md4.h.
10719         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
10720         * modules/read-file (EXTRA_DIST): Add read-file.h.
10721         * modules/readline (EXTRA_DIST): Add readline.h.
10722         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
10723         rijndael-api-fst.h.
10724
10725 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
10726
10727         * m4/rijndael.m4 (gl_ARCFOUR):
10728         * m4/arctwo.m4 (gl_ARCTWO):
10729         * m4/check-version.m4 (gl_CHECK_VERSION):
10730         * m4/crc.m4 (gl_CRC):
10731         * m4/des.m4 (gl_DES):
10732         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
10733         * m4/gc.m4 (gl_GC):
10734         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
10735         * m4/getline.m4 (gl_FUNC_GETLINE):
10736         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
10737         * m4/hmac-md5.m4 (gl_HMAC_MD5):
10738         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
10739         * m4/md2.m4 (gl_MD2):
10740         * m4/md4.m4 (gl_MD4):
10741         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
10742         * m4/read-file.m4 (gl_FUNC_READ_FILE):
10743         * m4/readline.m4 (gl_FUNC_READLINE):
10744         * m4/rijndael.m4 (gl_RIJNDAEL):
10745         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
10746         to get the necessary .h files and whatnot.
10747
10748 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
10749
10750         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
10751         gnulib rather than the other way around.
10752         * config/srclistvars.sh (COREUTILS): Remove.
10753
10754 2006-08-22  Jim Meyering  <jim@meyering.net>
10755
10756         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
10757
10758         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
10759
10760 2006-08-22  Eric Blake  <ebb9@byu.net>
10761
10762         * modules/regexprops-generic: New file.
10763         * MODULES.html.sh (Support for building documentation): List it.
10764
10765 2006-08-22  Eric Blake  <ebb9@byu.net>
10766
10767         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
10768         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
10769         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
10770         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
10771
10772 2006-08-22  Bruno Haible  <bruno@clisp.org>
10773
10774         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
10775         and lib_LTLIBRARIES like the other lib_* variables.
10776
10777 2006-08-22  Bruno Haible  <bruno@clisp.org>
10778
10779         * build-aux/x-to-1.in: New file, from GNU gettext.
10780
10781 2006-08-22  Bruno Haible  <bruno@clisp.org>
10782
10783         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
10784         <utmpx.h> exists.
10785
10786 2006-08-22  Bruno Haible  <bruno@clisp.org>
10787
10788         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
10789         <utmpx.h> exists.
10790
10791 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
10792
10793         BeOS portability.
10794         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
10795         exist.
10796         Problem reported by Bruno Haible.
10797
10798 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
10799
10800         Avoid the need for AC_LIBSOURCES in m4 macros.
10801         * modules/acl (EXTRA_DIST): Add acl.h.
10802         * modules/argmatch (Files): Add m4/argmatch.m4.
10803         (configure.ac): Add gl_ARGMATCH.
10804         (EXTRA_DIST): Renamed from lib_SOURCES, for
10805         consistency with the other modules.  Remove argmatch.c.
10806         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
10807         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
10808         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
10809         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
10810         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
10811         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
10812         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
10813         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
10814         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
10815         * modules/closeout (EXTRA_DIST): Add closeout.h.
10816         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
10817         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
10818         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
10819         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
10820         dirname.h; remove basename.c and stripslash.c.
10821         * modules/exclude (EXTRA_DIST): Add exclude.h.
10822         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
10823         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
10824         * modules/file-type (EXTRA_DIST): Add file-type.h.
10825         * modules/filemode (EXTRA_DIST): Add filemode.h.
10826         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
10827         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
10828         * modules/fpending (EXTRA_DIST): Add __fpending.h.
10829         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
10830         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
10831         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
10832         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
10833         * modules/getdate (EXTRA_DIST): Add getdate.c.
10834         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
10835         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
10836         * modules/getpass (EXTRA_DIST): Add getpass.h.
10837         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
10838         * modules/group-member (EXTRA_DIST): Add group-member.h.
10839         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
10840         * modules/hash (EXTRA_DIST): Add hash.h.
10841         * modules/human (EXTRA_DIST): Add human.h.
10842         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
10843         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
10844         * modules/lchown (EXTRA_DIST): Add lchown.h.
10845         * modules/long-options (EXTRA_DIST): Add long-options.h.
10846         * modules/lstat (EXTRA_DIST): Add lstat.h.
10847         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
10848         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
10849         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
10850         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
10851         * modules/memxor (EXTRA_DIST): Add memxor.h.
10852         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
10853         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
10854         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
10855         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
10856         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
10857         * modules/physmem (EXTRA_DIST): Add physmem.h.
10858         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
10859         * modules/posixver (EXTRA_DIST): Add posixver.h.
10860         * modules/quote (EXTRA_DIST): Add quote.h.
10861         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
10862         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
10863         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
10864         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
10865         regex_internal.h regexec.c.
10866         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
10867         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
10868         * modules/same (EXTRA_DIST): Add same.h.
10869         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
10870         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
10871         * modules/savedir (EXTRA_DIST): Add savedir.h.
10872         * modules/sha1 (EXTRA_DIST): Add sha1.h.
10873         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
10874         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
10875         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
10876         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
10877         * modules/strdup (EXTRA_DIST): Add strdup.h.
10878         * modules/strftime (EXTRA_DIST): Add strftime.h.
10879         * modules/strndup (EXTRA_DIST): Add strndup.h.
10880         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
10881         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
10882         * modules/time_r (EXTRA_DIST): Add time_r.h.
10883         * modules/timespec (EXTRA_DIST): Add timespec.h.
10884         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
10885         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
10886         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
10887         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
10888         * modules/userspec (EXTRA_DIST): Add userspec.h.
10889         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
10890         * modules/utimens (EXTRA_DIST): Add utimens.h.
10891         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
10892         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
10893         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
10894         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
10895         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
10896         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
10897         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
10898         * modules/yesno (EXTRA_DIST): Add yesno.h.
10899
10900 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
10901
10902         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
10903
10904         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
10905         * m4/dev-ino.m4, same-inode.m4: Remove.
10906
10907         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
10908         * m4/acl.m4 (AC_FUNC_ACL):
10909         * m4/backupfile.m4 (gl_BACKUPFILE):
10910         * m4/c-strtod.m4 (gl_C99_STRTOLD):
10911         * m4/canon-host.m4 (gl_CANON_HOST):
10912         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
10913         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
10914         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
10915         * m4/cloexec.m4 (gl_CLOEXEC):
10916         * m4/close-stream.m4 (gl_CLOSE_STREAM):
10917         * m4/closeout.m4 (gl_CLOSEOUT):
10918         * m4/dirfd.m4 (gl_FUNC_DIRFD):
10919         * m4/dirname.m4 (gl_DIRNAME):
10920         * m4/exclude.m4 (gl_EXCLUDE):
10921         * m4/exitfail.m4 (gl_EXITFAIL):
10922         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
10923         * m4/file-type.m4 (gl_FILE_TYPE):
10924         * m4/filemode.m4 (gl_FILEMODE):
10925         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
10926         * m4/fpending.m4 (gl_FUNC_FPENDING):
10927         * m4/fprintftime.m4 (gl_FPRINTFTIME):
10928         * m4/fts.m4 (gl_FUNC_FTS):
10929         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
10930         * m4/getdate.m4 (gl_GETDATE):
10931         * m4/gethrxtime.m4 (gl_GETHRXTIME):
10932         * m4/getpagesize.m4 (gl_GETPAGESIZE):
10933         * m4/getpass.m4 (gl_FUNC_GETPASS):
10934         * m4/gettime.m4 (gl_GETTIME):
10935         * m4/getugroups.m4 (gl_GETUGROUPS):
10936         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
10937         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
10938         * m4/hard-locale.m4 (gl_HARD_LOCALE):
10939         * m4/hash.m4 (gl_HASH):
10940         * m4/idcache.m4 (gl_IDCACHE):
10941         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
10942         * m4/lchown.m4 (gl_FUNC_LCHOWN):
10943         * m4/long-options.m4 (gl_LONG_OPTIONS):
10944         * m4/lstat.m4 (gl_FUNC_LSTAT):
10945         * m4/md5.m4 (gl_MD5):
10946         * m4/memcasecmp.m4 (gl_MEMCASECMP):
10947         * m4/memcoll.m4 (gl_MEMCOLL):
10948         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
10949         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
10950         * m4/memxor.m4 (gl_MEMXOR):
10951         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
10952         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
10953         * m4/modechange.m4 (gl_MODECHANGE):
10954         * m4/mountlist.m4 (gl_MOUNTLIST):
10955         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
10956         * m4/openat.m4 (gl_FUNC_OPENAT):
10957         * m4/pathmax.m4 (gl_PATHMAX):
10958         * m4/physmem.m4 (gl_PHYSMEM):
10959         * m4/posixtm.m4 (gl_POSIXTM):
10960         * m4/posixver.m4 (gl_POSIXVER):
10961         * m4/quote.m4 (gl_QUOTE):
10962         * m4/quotearg.m4 (gl_QUOTEARG):
10963         * m4/readtokens.m4 (gl_READTOKENS):
10964         * m4/readutmp.m4 (gl_READUTMP):
10965         * m4/regex.m4 (gl_REGEX):
10966         * m4/safe-read.m4 (gl_SAFE_READ):
10967         * m4/safe-write.m4 (gl_SAFE_WRITE):
10968         * m4/same.m4 (gl_SAME):
10969         * m4/save-cwd.m4 (gl_SAVE_CWD):
10970         * m4/savedir.m4 (gl_SAVEDIR):
10971         * m4/settime.m4 (gl_SETTIME):
10972         * m4/sha1.m4 (gl_SHA1):
10973         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
10974         * m4/stat-macros.m4 (gl_STAT_MACROS):
10975         * m4/stat-time.m4 (gl_STAT_TIME):
10976         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
10977         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
10978         * m4/strdup.m4 (gl_FUNC_STRDUP):
10979         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
10980         * m4/strndup.m4 (gl_FUNC_STRNDUP):
10981         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
10982         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
10983         * m4/time_r.m4 (gl_TIME_R):
10984         * m4/timespec.m4 (gl_TIMESPEC):
10985         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
10986         * m4/unlinkdir.m4 (gl_UNLINKDIR):
10987         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
10988         * m4/userspec.m4 (gl_USERSPEC):
10989         * m4/utimecmp.m4 (gl_UTIMECMP):
10990         * m4/utimens.m4 (gl_UTIMENS):
10991         * m4/xalloc.m4 (gl_XALLOC):
10992         * m4/xgetcwd.m4 (gl_XGETCWD):
10993         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
10994         * m4/xreadlink.m4 (gl_XREADLINK):
10995         * m4/xstrtod.m4 (gl_XSTRTOD):
10996         * m4/yesno.m4 (gl_YESNO):
10997         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
10998         to get the necessary .h files and whatnot.
10999
11000 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
11001             Bruno Haible  <bruno@clisp.org>
11002
11003         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
11004         /bin/sh understanding of '!' conditional negation.
11005
11006 2006-08-21  Jim Meyering  <jim@meyering.net>
11007
11008         * modules/openat (Depends-on): Really alphabetize.
11009
11010         * modules/acl (Depends-on): Add error and quote.
11011
11012         * check-module (find_included_lib_files): Add at-func.c to the
11013         ok-to-include-more-than-once white list.
11014
11015         * modules/openat (Depends-on): Add lstat.  Alphabetize.
11016
11017 2006-08-21  Bruno Haible  <bruno@clisp.org>
11018
11019         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11020         Emit a pkgdata_DATA variable only if some snippets add contents to it.
11021         Reported by Martin Lambers <marlam@marlam.de>.
11022
11023 2006-08-21  Bruno Haible  <bruno@clisp.org>
11024
11025         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
11026         specify an installation location, don't emit a noinst_LIBRARIES or
11027         noinst_LTLIBRARIES assignment.
11028
11029 2006-08-21  Bruno Haible  <bruno@clisp.org>
11030
11031         BeOS portability.
11032         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
11033         BeOS has mbrtowc() but no <wctype.h>.
11034
11035 2006-08-21  Bruno Haible  <bruno@clisp.org>
11036
11037         BeOS portability.
11038         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
11039         exist.
11040
11041 2006-08-21  Bruno Haible  <bruno@clisp.org>
11042
11043         BeOS portability.
11044         * lib/mbchar.h: Include <wctype.h> only if it exists.
11045
11046 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11047
11048         Remove files that are no longer needed by their respective modules.
11049         * m4/obstack.m4: Remove.
11050         * m4/strerror_r.m4: Remove.
11051         * m4/uint32_t.m4: Remove.
11052         * m4/uintptr_t.m4: Remove.
11053         * m4/ullong_max.m4: Remove.
11054         * m4/xstrtoimax.m4: Remove.
11055         * m4/xstrtoumax.m4: Remove.
11056
11057         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
11058         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
11059         dependencies now capture this.
11060
11061         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
11062         Do not use AC_LIBSOURCES, since gnulib modules now do this.
11063         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
11064         * m4/human.m4 (gl_HUMAN): Likewise.
11065         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
11066         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
11067
11068         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
11069
11070         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
11071         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
11072         stdint.
11073         * m4/human.m4 (gl_HUMAN): Likewise.
11074         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
11075         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
11076         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11077         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11078         * m4/xstrtol (gl_XSTRTOL): Likewise.
11079
11080         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
11081         AC_TYPE_LONG_LONG_INT.
11082         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
11083         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
11084         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
11085         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
11086
11087         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
11088         on stdbool.
11089
11090         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
11091         (gl_PREREQ_XSTRTOUL): Remove.
11092
11093         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
11094
11095         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
11096         mode.
11097
11098 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11099
11100         Add and change modules to make it easier for coreutils to use
11101         gnulib-tool.
11102         * modules/backupfile (Files): Remove m4/d-ino.m4.
11103         (Depends-on): Add d-ino.
11104         * modules/cycle-check (Depends-on): Add stdint.
11105         (lib_SOURCES): Add cycle-check.h.
11106         * modules/d-ino: New module.
11107         * modules/d-type: New module.
11108         * modules/error (Files): Remove m4/strerror_r.m4.
11109         * modules/filemode (Files): Add m4/st_dm_mode.m4.
11110         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11111         m4/inttypes_h.m4, m4/uintmax_t.m4.
11112         (Depends-on): Add stdint.
11113         (lib_SOURCES): Add fsusage.h.
11114         * modules/getcwd (Files): Remove d-ino.m4.
11115         (Depends-on): Add d-ino.
11116         * modules/getndelim2 (Depends-on): Add stdint.
11117         * modules/glob (Files): Remove m4/d-type.m4.
11118         (Depends-on): Add d-type.
11119         * modules/host-os: New module.
11120         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
11121         m4/inttypes_h.m4, m4/uintmax_t.m4.
11122         * Depends-on: Add stdint.
11123         (lib_SOURCES): Add human.h.
11124         * modules/inttostr (Files): Remove m4/intmax_t.m4,
11125         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
11126         m4/uintmax_t.m4, m4/ulonglong.m4.
11127         (Depends-on): Add stdint.
11128         (EXTRA_DIST): Add inttostr.h.
11129         * modules/lchmod: New module.
11130         * modules/link-follow: New module.
11131         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
11132         (Depends-on): Add lchmod.
11133         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
11134         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
11135         (Depends-on): Add stdint.
11136         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
11137         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
11138         (Depends-on): Add stdint.
11139         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
11140         * modules/perl: New module.
11141         * modules/regex (Depends-on): Add stdint.
11142         * modules/rmdir-errno: New module.
11143         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11144         m4/intmax_t.m4.
11145         (Depends-on): Add stdint.
11146         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
11147         m4/uintmax_t.m4.
11148         (Depends-on): Add stdint.
11149         * modules/unlink-busy: New module.
11150         * modules/utimecmp (Depends-on): Add stdint.
11151         * modules/uptime: New module.
11152         * modules/winsz-ioctl: New module.
11153         * modules/winsz-termios: New module.
11154         * modules/xnanosleep (Depends-on): Add nanosleep.
11155         * modules/ullong_max: Remove.
11156         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
11157         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
11158         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
11159         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
11160         (Depends-on): Add inttypes.
11161         (lib_SOURCES): Add xstrtol.h.
11162         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
11163         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
11164         * MODULES.html.sh: Move 'assert' into the assert section.
11165         Move 'dummy' into the linking section.
11166         Remove ullong_max.
11167         Add section for compatibility checks for POSIX:2001 functions,
11168         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
11169         winsz-ioctl, and winsz-termios into it.
11170         Add lchmod.
11171         Add top-level Misc section and put host-os, perl, and uptime
11172         into it.
11173
11174 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
11175
11176         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
11177         now assume the stdint module.  Do not include inttypes.h.
11178         * lib/fsusage.h: Likewise.
11179         * lib/getndelim2.c: Likewise.
11180         * lib/human.h: Likewise.
11181         * lib/inttostr.h: Likewise.
11182         * lib/obstack.c: Likewise.
11183         * lib/regex_internal.h: Likewise.
11184         * lib/tempname.c: Likewise.
11185         * lib/utimecmp.c: Likewise.
11186         * lib/xstrtol.h: Likewise.
11187
11188         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
11189
11190         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
11191         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
11192         * lib/xtime.h: Likewise.
11193
11194 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11195
11196         * modules/openat (Files): Add lib/fchmodat.c.
11197         Fixes problem reported by Jay Youngman.
11198
11199 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
11200
11201         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
11202         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
11203
11204 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
11205             Bruno Haible  <bruno@clisp.org>
11206
11207         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
11208         and is a script that invokes bison. Tighten the code. Add comments.
11209
11210 2006-08-18  Jim Meyering  <jim@meyering.net>
11211
11212         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
11213         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
11214         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
11215         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
11216
11217 2006-08-18  Bruno Haible  <bruno@clisp.org>
11218
11219         * modules/bison-i18n: New file.
11220         * MODULES.html.sh (Internationalization functions): Add it.
11221
11222 2006-08-18  Bruno Haible  <bruno@clisp.org>
11223
11224         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
11225         sys/statvfs.h. When getmntinfo was found, check its declaration and
11226         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
11227
11228 2006-08-18  Bruno Haible  <bruno@clisp.org>
11229
11230         * m4/bison-i18n.m4: New file, from bison.
11231
11232 2006-08-18  Bruno Haible  <bruno@clisp.org>
11233
11234         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
11235         (ME_DUMMY): Treat "kernfs" as a dummy.
11236         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
11237
11238 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11239
11240         Update from coreutils.
11241
11242         2006-08-15  Jim Meyering  <jim@meyering.net>
11243
11244         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
11245
11246         2006-01-17  Jim Meyering  <jim@meyering.net>
11247
11248         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
11249
11250         2006-01-11  Jim Meyering  <jim@meyering.net>
11251
11252         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
11253         Check for the lchmod function.
11254
11255 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
11256
11257         Update from coreutils.
11258
11259         * lib/__fpending.h: Add copyright notice.
11260         * lib/fprintftime.h: Likewise.
11261         * lib/savedir.c: Use (C) in copyright notice.
11262         * lib/savedir.h: Likewise.
11263
11264         2006-08-15  Jim Meyering  <jim@meyering.net>
11265
11266         * lib/at-func.c: New file, with the logic of all emulated at-functions.
11267         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
11268         in support of the EXPECTED_ERRNO macro.
11269         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
11270         definitions.  Instead, define the appropriate symbols and include
11271         "at-func.c".
11272         * lib/mkdirat.c (mkdirat): Likewise.
11273         * lib/fchmodat.c (fchmodat): Likewise.
11274         (ENOSYS): Remove definition.
11275         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
11276         it.  Don't include "unistd--.h" -- it wasn't ever used.
11277
11278         2006-01-17  Jim Meyering  <jim@meyering.net>
11279
11280         Rewrite fts.c not to change the current working directory,
11281         by using openat, fstatat, fdopendir, etc..
11282
11283         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
11284         (HAVE_OPENAT_SUPPORT): Define.
11285         [_LIBC] (fchdir): Don't undef or define; no longer used.
11286         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
11287         Now, this `function' always succeeds, and consumes its file descriptor
11288         parameter -- so callers must not close such FDs.  Update callers.
11289         (diropen_fd, opendirat, cwd_advance_fd): New functions.
11290         (diropen): Add parameter, SP.  Adjust all callers.
11291         Implement using diropen_fd, rather than open.
11292         (fts_open): Initialize new member, fts_cwd_fd.
11293         Remove fts_rft-setting code.
11294         (fts_close): Close fts_cwd_fd, if necessary.
11295         (__opendir2): Define in terms of opendir or opendirat,
11296         depending on whether the FST_NOCHDIR flag is set.
11297         (fts_build): Since fts_safe_changedir consumes its FD, and since
11298         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
11299         and close the dup'd file descriptor upon failure.
11300         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
11301         (fts_safe_changedir): Tweak semantics to reflect that this function
11302         now calls cwd_advance_fd and hence consumes its FD argument.
11303         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
11304         [struct FTS] (fts_rft): Remove now-unused member.
11305         [struct FTS] (fts_cycle.state): Improve comment.
11306
11307         * lib/openat.c (openat_needs_fchdir): New function.
11308         * lib/openat.h (openat_needs_fchdir): Declare it.
11309
11310 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
11311
11312         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
11313         Problem and fix reported by Pádraig Brady in
11314         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
11315
11316 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11317
11318         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
11319
11320 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11321
11322         * lib/memcoll.c (memcoll): Optimize for the common case where the
11323         arguments are bytewise equal.
11324
11325 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11326
11327         * doc/regexprops-generic.texi: Add a copyright notice.
11328
11329 2006-08-15  Bruno Haible  <bruno@clisp.org>
11330
11331         * modules/tmpdir (License): Change to LGPL.
11332
11333 2006-08-15  Bruno Haible  <bruno@clisp.org>
11334
11335         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
11336         module.
11337
11338 2006-08-14  Simon Josefsson  <jas@extundo.com>
11339
11340         * config/srclist.txt: Add gnupload.
11341
11342 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11343
11344         Change copyright notice from LGPL 2 to GPL 2, since that's the
11345         standard form used in the gnulib repository.
11346         * tests/test-lock.c: Likewise.
11347         * tests/test-stdint.c: Likewise.
11348         * tests/test-tls.c: Likewise.
11349
11350         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
11351         prelude-manager.  User shorter URLs for GNU projects, without '?'.
11352         Add copyright notice.
11353
11354         * check-module: Add copyright notice.  Output a copyright
11355         notice if "--version" is specified.
11356         * modules/COPYING: New file.
11357         * tests/test-getaddrinfo.c: Add copyright notice.
11358         * tests/test-verify.c: Likewise.
11359
11360 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11361
11362         Change copyright notice from LGPL 2 to GPL 2, since that's the
11363         standard form used in the gnulib repository.
11364         * lib/lock.c: LGPL -> GPL.
11365         * lib/lock.h: Likewise.
11366         * lib/strnlen1.c: Likewise.
11367         * lib/strnlen1.h: Likewise.
11368         * lib/tls.c: Likewise.
11369         * lib/tls.h: Likewise.
11370         * lib/tmpdir.c: Likewise.
11371
11372         * lib/TODO: Remove; this belongs only in coreutils.
11373
11374 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11375
11376         Add copyright notices to long-enough files that lack them, since
11377         otherwise the files aren't clearly free.  Use the same notice that
11378         getdate.texi already uses.
11379         * doc/alloca-opt.texi: Add copyright notice.
11380         * doc/alloca.texi: Likewise.
11381         * doc/ctime.texi: Likewise.
11382         * doc/functions.texi: Likewise.
11383         * doc/gcd.texi: Likewise.
11384         * doc/gnulib-tool.texi: Likewise.
11385         * doc/inet_ntoa.texi: Likewise.
11386         * doc/visibility.texi: Likewise.
11387
11388         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
11389         * doc/quote.texi: Add copyright notice.
11390
11391         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
11392         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
11393         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
11394         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
11395         is now obsolete, and give a pointer to the Sun list.
11396         Add copyright notice.
11397
11398 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
11399
11400         * config/srclistvars.sh: Add copyright notice.
11401
11402 2006-08-14  Eric Blake  <ebb9@byu.net>
11403
11404         Import the following change from libc:
11405
11406         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
11407
11408         Upstream bug 2997.
11409         * lib/misc/error.c: Add space between program name and message if file
11410         name is missing.
11411
11412 2006-08-12  Karl Berry  <karl@gnu.org>
11413
11414         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
11415         remove, these originate in gnulib now.
11416
11417 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11418
11419         * doc/Makefile (standards.info standards.html standards.dvi):
11420         Also depend on make-stds.texi.
11421
11422 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
11423
11424         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
11425         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
11426
11427         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
11428         in wchar_t.  Problem reported by Eric Blake.
11429
11430         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
11431         LEN is smaller than SIZE.  Suggested by Bruno Haible.
11432         Also, help the compiler to keep LEN in a register.
11433
11434 2006-08-11  Eric Blake  <ebb9@byu.net>
11435
11436         * users.txt: Sort.  Add tar.
11437
11438 2006-08-11  Bruno Haible  <bruno@clisp.org>
11439
11440         * users.txt: New file.
11441
11442 2006-08-11  Bruno Haible  <bruno@clisp.org>
11443
11444         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
11445         before <wchar.h>. Needed for OSF/1 and BSD/OS.
11446
11447 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
11448
11449         * modules/snprintf (Depends-on): Remove minmax.
11450         (Maintainer): Add self and Bruno.
11451
11452 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
11453
11454         * lib/.cppi-disable: Add snprintf.h, socket_.h.
11455         * lib/snprintf.c: Include <errno.h> and <limits.h>.
11456         (EOVERFLOW): Define if the system does not.
11457         Do not include "minmax.h"; it wasn't used.
11458         (snprintf): Don't assume size_t promotes to an unsigned type.
11459         Fix bug when generated string was too long for the buffer: the
11460         buffer's contents are supposed to be the initial prefix of the
11461         output.  Don't assume vasnprintf returns EOVERFLOW if the size
11462         exceeds INT_MAX; do the check ourselves.
11463
11464         Import the following changes from libc:
11465
11466         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
11467
11468         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
11469         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
11470         set wc to the byte which couldn't be converted.
11471         (re_string_reconstruct): Don't clear valid_raw_len before calling
11472         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
11473         tip_context using re_string_context_at.
11474
11475         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
11476
11477         * lib/posix/regex.h: g++ still cannot handled [restrict].
11478
11479         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
11480
11481         * lib/posix/regex.h: Remove special handling for VMS.
11482
11483 2006-08-10  Jim Meyering  <jim@meyering.net>
11484
11485         * modules/same-inode: New module.
11486         * modules/dev-ino: New module.
11487         * modules/cycle-check: Depend on these modules, rather than simply
11488         including their .h files.
11489         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
11490         required via m4/cycle-check.m4.
11491         * modules/same: Depend on new same-inode module, rather than
11492         including same-inode.h.
11493         * modules/chdir-safer: New file.
11494
11495         * modules/chown (Depends-on): Add stat-macros.
11496
11497 2006-08-10  Jim Meyering  <jim@meyering.net>
11498
11499         * m4/cycle-check.m4: New file.
11500         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
11501         * m4/dev-ino.m4, m4/same-inode.m4: New files.
11502
11503 2006-08-10  Eric Blake  <ebb9@byu.net>
11504
11505         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
11506         in from original proposal.
11507
11508 2006-08-10  Eric Blake  <ebb9@byu.net>
11509         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11510
11511         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
11512         namespace.
11513
11514 2006-08-10  Bruno Haible  <bruno@clisp.org>
11515
11516         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
11517         as well.
11518
11519 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11520
11521         Sync from coreutils.
11522
11523         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
11524
11525         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
11526         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
11527
11528 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11529
11530         * modules/restrict: Remove; no longer needed now that we assume
11531         Autoconf 2.59 or later.
11532         * MODULES.html.sh: Remove 'restrict'.
11533         * modules/argp (Depends-on): Remove 'restrict'.
11534         * modules/base64 (Depends-on): Likewise.
11535         * modules/gc (Depends-on): Likewise.
11536         * modules/getaddrinfo (Depends-on): Likewise.
11537         * modules/glob (Depends-on): Likewise.
11538         * modules/inet_ntop (Depends-on): Likewise.
11539         * modules/inet_pton (Depends-on): Likewise.
11540         * modules/memxor (Depends-on): Likewise.
11541         * modules/regex (Depends-on): Likewise.
11542         * modules/strtok_r (Depends-on): Likewise.
11543         * modules/time_r (Depends-on): Likewise.
11544
11545 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
11546
11547         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
11548         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
11549         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
11550         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
11551         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
11552         * m4/memxor.m4 (gl_MEMXOR): Likewise.
11553         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
11554         gl_C_RESTRICT replaced by AC_C_RESTRICT.
11555
11556         Merge from coreutils.
11557         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
11558         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
11559         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
11560         * m4/time_r.m4 (gl_TIME_R): Likewise.
11561
11562 2006-08-09  Karl Berry  <karl@gnu.org>
11563
11564         * config/srclist.txt: no more gettext-tools, per Bruno.
11565
11566 2006-08-08  Eric Blake  <ebb9@byu.net>
11567
11568         * modules/verror: New module.
11569         * MODULES.html.sh: Document it.
11570
11571 2006-08-08  Eric Blake  <ebb9@byu.net>
11572
11573         * lib/verror.h, lib/verror.c: New files.
11574
11575 2006-08-08  Eric Blake  <ebb9@byu.net>
11576
11577         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
11578         verror_at_line output complies with GNU Coding Standards even when
11579         file is NULL.
11580
11581 2006-08-07  Bruno Haible  <bruno@clisp.org>
11582
11583         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
11584         versions of AIX.
11585         Reported by Ralf Wildenhues.
11586
11587 2006-08-07  Bruno Haible  <bruno@clisp.org>
11588
11589         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
11590         in an AC_DEFUN. Needed so that the autoconf snippets can use
11591         AC_REQUIRE.
11592
11593 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11594
11595         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11596         Initialize pkgdata_DATA.
11597         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
11598         overriding it.
11599
11600 2006-08-06  Eric Blake  <ebb9@byu.net>
11601
11602         * lib/error.h: Fold in some upstream changes from glibc.
11603         * lib/error.c: Likewise.
11604
11605 2006-08-04  Bruno Haible  <bruno@clisp.org>
11606
11607         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11608         Make the mostlyclean-local rule depend on mostlyclean-generic.
11609         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
11610
11611 2006-07-31  Bruno Haible  <bruno@clisp.org>
11612
11613         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
11614         <stdlib.h>, <string.h>.
11615
11616 2006-07-30  Bruno Haible  <bruno@clisp.org>
11617
11618         * modules/readlink (License): Change to LGPL.
11619
11620 2006-07-30  Bruno Haible  <bruno@clisp.org>
11621
11622         * modules/javaversion (Makefile.am): Distribute javaversion.java and
11623         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
11624         set PKGDATADIR to point to it.
11625
11626 2006-07-30  Bruno Haible  <bruno@clisp.org>
11627
11628         * modules/csharpexec (configure.ac): Comment out macro invocation.
11629         * modules/javaexec (configure.ac): Likewise.
11630         * modules/javacomp-script (configure.ac): Likewise.
11631
11632         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
11633
11634 2006-07-30  Bruno Haible  <bruno@clisp.org>
11635
11636         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
11637         linked-list.
11638
11639 2006-07-30  Bruno Haible  <bruno@clisp.org>
11640
11641         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
11642
11643 2006-07-30  Bruno Haible  <bruno@clisp.org>
11644
11645         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11646         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
11647         get removed.
11648
11649 2006-07-29  Bruno Haible  <bruno@clisp.org>
11650
11651         Make it possible for gnulib-tool to work with locally modified or
11652         augmented gnulib repositories.
11653         * gnulib-tool (func_usage): Document --local-dir option.
11654         (local_gnulib_dir): New variable.
11655         Handle --local-dir option.
11656         (func_lookup_file): New function.
11657         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
11658         (func_get_description, func_get_filelist, func_get_description,
11659         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
11660         func_get_automake_snippet, func_get_include_directive,
11661         func_get_license, func_get_maintainer): Use func_lookup_file.
11662         (func_import, func_create_testdir): Use func_lookup_file.
11663
11664 2006-07-29  Bruno Haible  <bruno@clisp.org>
11665
11666         * modules/setenv (Depends-on): Add unistd.
11667
11668 2006-07-29  Bruno Haible  <bruno@clisp.org>
11669
11670         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
11671
11672 2006-07-29  Bruno Haible  <bruno@clisp.org>
11673
11674         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
11675
11676 2006-07-29  Bruno Haible  <bruno@clisp.org>
11677
11678         * gnulib-tool (import, update): If there is no Makefile.am, look at
11679         aclocal.m4, instead of bailing out.
11680
11681 2006-07-29  Bruno Haible  <bruno@clisp.org>
11682
11683         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
11684         Categorize the options by when they are useful.
11685
11686 2006-07-29  Bruno Haible  <bruno@clisp.org>
11687
11688         * gnulib-tool (func_usage): Document option --no-libtool.
11689         Handle option --no-libtool.
11690         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
11691         for changed semantics of $libtool variable.
11692         (func_import): Likewise. If libtool is not used, show this through
11693         an option --no-libtool.
11694         (func_create_testdir): Update.
11695
11696 2006-07-29  Bruno Haible  <bruno@clisp.org>
11697
11698         * gnulib-tool (func_import): Extend error message about missing
11699         --doc-base.
11700
11701 2006-07-29  Bruno Haible  <bruno@clisp.org>
11702
11703         * gnulib-tool (func_import): Don't create the $docbase directory if
11704         there is no file to store there.
11705
11706 2006-07-29  Bruno Haible  <bruno@clisp.org>
11707
11708         * gnulib-tool (autoconf_minversion): If a --dir option is given and
11709         relevant, look for configure.ac there, not in the current directory.
11710         Also use a simple search for AC_PREREQ, not "autoconf --trace".
11711
11712 2006-07-29  Bruno Haible  <bruno@clisp.org>
11713
11714         * gnulib-tool (SORT): New variable.
11715         (func_usage): Undocument --assume-autoconf option.
11716         Remove --assume-autoconf option handling.
11717         (autoconf_minversion): Determine from the contents of configure.ac.
11718         (func_import): Remove autoconf_minversion handling.
11719         Suggested by Eric Blake.
11720
11721 2006-07-29  Bruno Haible  <bruno@clisp.org>
11722
11723         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
11724
11725 2006-07-29  Bruno Haible  <bruno@clisp.org>
11726
11727         * config/srclist.txt (*setenv.[ch]): Remove rules.
11728
11729 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11730
11731         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
11732
11733 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11734
11735         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
11736         arpa/inet.h.
11737
11738 2006-07-28  Simon Josefsson  <jas@extundo.com>
11739
11740         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
11741         * modules/inet_pton (Depends-on): Likewise.
11742
11743 2006-07-28  Simon Josefsson  <jas@extundo.com>
11744
11745         * m4/netinet_in_h.m4: New file.
11746
11747 2006-07-28  Simon Josefsson  <jas@extundo.com>
11748
11749         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
11750         #include's.
11751
11752 2006-07-28  Simon Josefsson  <jas@extundo.com>
11753
11754         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
11755         #include's.
11756
11757 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
11758
11759         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
11760         setgid on directories only if they set these bits.
11761         * lib/modechange.h: Remove obsolete comment about masks.
11762
11763 2006-07-28  Eric Blake  <ebb9@byu.net>
11764
11765         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
11766         macro expansion.
11767
11768 2006-07-28  Bruno Haible  <bruno@clisp.org>
11769
11770         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
11771
11772 2006-07-28  Bruno Haible  <bruno@clisp.org>
11773
11774         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
11775
11776 2006-07-28  Bruno Haible  <bruno@clisp.org>
11777
11778         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
11779         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
11780         Define fallbacks.
11781         Avoids link error on FreeBSD 4.x.
11782         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11783
11784         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
11785         encoding.
11786         * lib/mbswidth.c (iswcntrl): Likewise.
11787
11788 2006-07-27  Bruno Haible  <bruno@clisp.org>
11789
11790         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
11791         test.
11792
11793 2006-07-27  Bruno Haible  <bruno@clisp.org>
11794
11795         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
11796         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
11797         defined.
11798
11799 2006-07-26  Eric Blake  <ebb9@byu.net>
11800
11801         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
11802
11803 2006-07-26  Eric Blake  <ebb9@byu.net>
11804
11805         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
11806         like mingw that lack mkstemp.
11807         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
11808         avoid compilation warning on mingw.
11809
11810 2006-07-26  Bruno Haible  <bruno@clisp.org>
11811
11812         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
11813         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
11814         INT_FAST*_MIN, INTPTR_MIN.
11815
11816 2006-07-25  Bruno Haible  <bruno@clisp.org>
11817
11818         * modules/version-etc (Depends-on): Add stdarg.
11819
11820 2006-07-25  Bruno Haible  <bruno@clisp.org>
11821
11822         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
11823         complex commands.
11824
11825 2006-07-25  Bruno Haible  <bruno@clisp.org>
11826
11827         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
11828         defined in <stdarg.h> or config.h.
11829
11830 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
11831
11832         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
11833         (gl_STDIO_SAFER): Remove.
11834
11835 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
11836
11837         * MODULES.html.sh (File stream based Input/Output):
11838         Add fopen-safer, tmpfile-safer; remove stdio-safer.
11839         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
11840         * modules/fopen-safer, modules/tmpfile-safer: New files.
11841         * modules/stdio-safer: Remove.
11842
11843 2006-07-24  Bruno Haible  <bruno@clisp.org>
11844
11845         * modules/tmpdir: New file.
11846         * MODULES.html.sh (File system functions): Add it.
11847
11848 2006-07-24  Bruno Haible  <bruno@clisp.org>
11849
11850         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
11851         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
11852
11853 2006-07-24  Bruno Haible  <bruno@clisp.org>
11854
11855         * modules/clean-temp: New file.
11856
11857 2006-07-24  Bruno Haible  <bruno@clisp.org>
11858
11859         * m4/tmpdir.m4: New file, from GNU gettext.
11860
11861 2006-07-24  Bruno Haible  <bruno@clisp.org>
11862
11863         * lib/tmpdir.h: New file, from GNU gettext.
11864         * lib/tmpdir.c: New file, from GNU gettext.
11865
11866 2006-07-24  Bruno Haible  <bruno@clisp.org>
11867
11868         * lib/clean-temp.h: New file, from GNU gettext.
11869         * lib/clean-temp.c: New file, from GNU gettext.
11870
11871 2006-07-23  Eric Blake  <ebb9@byu.net>
11872
11873         * modules/stdio-safer (Files): Add tmpfile-safer.c.
11874         (Depends-on): Add binary-io.
11875
11876 2006-07-23  Eric Blake  <ebb9@byu.net>
11877
11878         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
11879
11880 2006-07-23  Eric Blake  <ebb9@byu.net>
11881
11882         * lib/tmpfile-safer.c: New file.
11883         * lib/stdio-safer.h (fopen_safer): Add prototype.
11884         * lib/stdio--.h (tmpfile): Make safer.
11885
11886 2006-07-23  Bruno Haible  <bruno@clisp.org>
11887
11888         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
11889         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
11890         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
11891         gl_linked_remove_at): Use it.
11892
11893 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11894         and Simon Josefsson <jas@extundo.com>
11895
11896         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
11897
11898         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
11899
11900 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
11901
11902         * modules/close-stream: New file.
11903         * modules/closeout (Description): Make it clear that it exits
11904         with a diagnostic on error.
11905         (Depends-on): Add close-stream.  Remove fpending, stdbool.
11906         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
11907
11908 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
11909
11910         * m4/close-stream.m4: New file.
11911
11912 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
11913
11914         * lib/close-stream.c, lib/close-stream.h: New files.
11915
11916 2006-07-22  Bruno Haible  <bruno@clisp.org>
11917
11918         Merge from GNU gettext 0.15.
11919
11920         2006-05-01  Bruno Haible  <bruno@clisp.org>
11921
11922                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
11923
11924         2006-07-22  Bruno Haible  <bruno@clisp.org>
11925
11926                 * modules/javaversion: New file.
11927                 * MODULES.html.sh (Java): Add javaversion.
11928
11929         2006-03-12  Bruno Haible  <bruno@clisp.org>
11930
11931                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
11932
11933         2005-12-04  Bruno Haible  <bruno@clisp.org>
11934
11935                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
11936                 (untested).
11937
11938         2006-06-21  Bruno Haible  <bruno@clisp.org>
11939
11940                 Avoid warnings from recent versions of mcs.
11941                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
11942                 -o, -L, -r any more. Use options documented since mcs-1.0
11943                 instead. Similarly for -g.
11944
11945         2005-12-04  Bruno Haible  <bruno@clisp.org>
11946
11947                 * build-aux/csharpcomp.sh.in: Suffix for resources is
11948                 .resources, not .resource.
11949
11950         2005-07-09  Bruno Haible  <bruno@clisp.org>
11951
11952                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
11953                 add a .dll suffix.
11954                 Reported by Mark Junker <mjscod@gmx.de>.
11955
11956         2006-07-22  Bruno Haible  <bruno@clisp.org>
11957
11958                 * modules/gettext: Upgrade to gettext-0.15.
11959                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
11960                 m4/visibility.m4.
11961                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
11962
11963 2006-07-22  Bruno Haible  <bruno@clisp.org>
11964
11965         Merge from GNU gettext 0.15.
11966
11967         2006-03-25  Bruno Haible  <bruno@clisp.org>
11968
11969                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
11970
11971         2006-07-21  Bruno Haible  <bruno@clisp.org>
11972
11973                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
11974                 "1.1".
11975
11976         2006-05-09  Bruno Haible  <bruno@clisp.org>
11977
11978                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
11979                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
11980                 for the conftestver execution.
11981
11982         2006-05-01  Bruno Haible  <bruno@clisp.org>
11983
11984                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
11985                 optional target-version argument. Verify that the compiler
11986                 groks source of the specified source-version, or add -source
11987                 option as necessary. Verify that the compiler produces
11988                 bytecode in the specified target-version, or add -target and
11989                 -source options as necessary. Make the result of the test
11990                 available as variable CONF_JAVAC. Also log error output in
11991                 config.log.
11992
11993         2006-03-11  Bruno Haible  <bruno@clisp.org>
11994
11995                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
11996
11997         2006-05-09  Bruno Haible  <bruno@clisp.org>
11998
11999                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
12000                 CLASSPATH_SEPARATOR to a semicolon.
12001
12002         2006-03-12  Bruno Haible  <bruno@clisp.org>
12003
12004                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
12005                 available as variable CONF_JAVA, for subsequent autoconf
12006                 tests. Also log error output in config.log.
12007
12008         2006-07-19  Bruno Haible  <bruno@clisp.org>
12009
12010                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
12011                 that getline works on glibc2 systems. Needed to avoid trouble
12012                 in relocatable.c.
12013                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
12014
12015         2005-12-04  Bruno Haible  <bruno@clisp.org>
12016
12017                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
12018                 launcher (untested).
12019
12020         2005-12-04  Bruno Haible  <bruno@clisp.org>
12021
12022                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
12023
12024         2006-07-22  Bruno Haible  <bruno@clisp.org>
12025
12026                 * gettext.m4: Update from GNU gettext-0.15.
12027                 * nls.m4: Likewise.
12028                 * po.m4: Likewise.
12029                 * inttypes-pri.m4: Likewise.
12030                 * inttypes-h.m4: Renamed from inttypes.m4.
12031                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
12032
12033 2006-07-22  Bruno Haible  <bruno@clisp.org>
12034
12035         Merge from GNU gettext 0.15.
12036
12037         2005-07-05  Bruno Haible  <bruno@clisp.org>
12038
12039                 * printf-args.c (printf_fetchargs): Work around broken
12040                 definition of wint_t on mingw.
12041
12042         2005-02-12  Bruno Haible  <bruno@clisp.org>
12043
12044                 * xallocsa.h: Add extern "C" for C++.
12045
12046         2006-05-17  Bruno Haible  <bruno@clisp.org>
12047
12048                 Cygwin portability.
12049                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
12050
12051         2006-04-30  Bruno Haible  <bruno@clisp.org>
12052
12053                 * progreloc.c: Include <mach-o/dyld.h> if available.
12054                 (find_executable): Use _NSGetExecutablePath when possible.
12055
12056         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
12057
12058                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
12059                 function.
12060
12061         2005-12-29  Bruno Haible  <bruno@clisp.org>
12062
12063                 * progreloc.c (set_program_name_and_installdir): Fix
12064                 compilation error.
12065
12066         2005-12-04  Bruno Haible  <bruno@clisp.org>
12067
12068                 Cygwin portability.
12069                 * progreloc.c: Include <windows.h> also on Cygwin.
12070                 (find_executable): Add support for Cygwin.
12071                 (set_program_name_and_installdir): Handle also platforms with
12072                 nonempty EXEEXT.
12073
12074         2006-07-11  Bruno Haible  <bruno@clisp.org>
12075
12076                 * javacomp.c: Fix a comment.
12077                 Reported by Jim Meyering.
12078
12079         2006-04-30  Bruno Haible  <bruno@clisp.org>
12080
12081                 * javacomp.h (compile_java_class): Add source_version,
12082                 target_version arguments.
12083                 * javacomp.c: Rewritten to choose only a compiler that
12084                 respects the specified source_version and target_version.
12085
12086         2006-06-27  Bruno Haible  <bruno@clisp.org>
12087
12088                 Assume correct S_ISDIR macro.
12089                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
12090
12091         2006-07-22  Bruno Haible  <bruno@clisp.org>
12092
12093                 * javaversion.h: New file, from GNU gettext.
12094                 * javaversion.c: New file, from GNU gettext.
12095                 * javaversion.java: New file, from GNU gettext.
12096                 * javaversion.class: New file, from GNU gettext.
12097
12098         2006-05-17  Bruno Haible  <bruno@clisp.org>
12099
12100                 Cygwin portability.
12101                 * javaexec.c (execute_java_class): Test for jview program
12102                 also on Cygwin.
12103
12104         2006-04-09  Bruno Haible  <bruno@clisp.org>
12105
12106                 * fatal-signal.c: Don't include string.h.
12107                 (at_fatal_signal): Use a copying loop instead of memcpy.
12108
12109         2005-12-04  Bruno Haible  <bruno@clisp.org>
12110
12111                 * csharpexec.c: Add support for 'clix' launcher (untested).
12112                 (execute_csharp_using_sscli): New function.
12113                 (execute_csharp_program): Call it.
12114
12115         2006-06-21  Bruno Haible  <bruno@clisp.org>
12116
12117                 Avoid warnings from recent versions of mcs.
12118                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
12119                 -o, -L, -r any more. Use options documented since mcs-1.0
12120                 instead. Similarly for -g.
12121
12122         2005-07-09  Bruno Haible  <bruno@clisp.org>
12123
12124                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
12125                 add a .dll suffix.
12126                 Reported by Mark Junker <mjscod@gmx.de>.
12127
12128         2006-06-17  Bruno Haible  <bruno@clisp.org>
12129
12130                 * config.charset: Update for NetBSD 3.0.
12131
12132         2006-05-17  Bruno Haible  <bruno@clisp.org>
12133
12134                 Cygwin portability.
12135                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
12136
12137         2006-05-16  Bruno Haible  <bruno@clisp.org>
12138
12139                 * localcharset.c [CYGWIN]: Include <windows.h>.
12140                 (get_charset_aliases): For Cygwin, return the same CPxxx
12141                 aliases list as under WIN32.
12142                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
12143                 the environment variables. Fall back to GetACP().
12144
12145         2006-04-05  Bruno Haible  <bruno@clisp.org>
12146
12147                 * config.charset: Update Juan Manuel Guerrero's address.
12148
12149         2005-02-12  Bruno Haible  <bruno@clisp.org>
12150
12151                 * allocsa.h: Add extern "C" for C++.
12152
12153         2005-02-10  Bruno Haible  <bruno@clisp.org>
12154
12155                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
12156                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
12157
12158         2006-07-22  Bruno Haible  <bruno@clisp.org>
12159
12160                 * gettext.h: Update to GNU gettext-0.15.
12161
12162 2006-07-22  Bruno Haible  <bruno@clisp.org>
12163
12164         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
12165         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
12166         lib-prefix.m4, longdouble.m4, ssize_t.m4.
12167
12168 2006-07-21  Eric Blake  <ebb9@byu.net>
12169
12170         * modules/stdlib-safer: New file.
12171         * MODULES.html.sh (File stream based Input/Output): Add
12172         stdlib-safer.
12173
12174 2006-07-21  Eric Blake  <ebb9@byu.net>
12175
12176         * lib/stdlib-safer.h: New file from coreutils, required by
12177         stdlib--.h.
12178
12179 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
12180
12181         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
12182
12183 2006-07-20  Bruno Haible  <bruno@clisp.org>
12184
12185         * gnulib-tool: Recognize new option --assume-autoconf.
12186         (autoconf_minversion): New variable.
12187         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
12188
12189 2006-07-20  Bruno Haible  <bruno@clisp.org>
12190
12191         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
12192
12193 2006-07-19  Derek R. Price  <derek@ximbiot.com>
12194
12195         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
12196         Reindent and repaginate.
12197
12198 2006-07-19  Derek Price  <derek@ximbiot.com>
12199
12200         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
12201         Correct grammar.
12202
12203 2006-07-17  Bruno Haible  <bruno@clisp.org>
12204
12205         * modules/list: New file.
12206         * modules/array-list: New file.
12207         * modules/carray-list, modules/carray-list-tests: New files.
12208         * modules/linked-list, modules/linked-list-tests: New files.
12209         * modules/avltree-list, modules/avltree-list-tests: New files.
12210         * modules/rbtree-list, modules/rbtree-list-tests: New files.
12211         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
12212         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
12213         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
12214         * modules/oset: New file.
12215         * modules/array-oset: New file.
12216         * modules/avltree-oset, modules/avltree-oset-tests: New files.
12217         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
12218         * tests/test-carray_list.c: New file.
12219         * tests/test-linked_list.c: New file.
12220         * tests/test-avltree_list.c: New file.
12221         * tests/test-rbtree_list.c: New file.
12222         * tests/test-linkedhash_list.c: New file.
12223         * tests/test-avltreehash_list.c: New file.
12224         * tests/test-rbtreehash_list.c: New file.
12225         * tests/test-avltree_oset.c: New file.
12226         * tests/test-rbtree_oset.c: New file.
12227         * MODULES.html.sh (Container data structures): New section.
12228
12229 2006-07-17  Bruno Haible  <bruno@clisp.org>
12230
12231         * m4/gl_list.m4: New file.
12232
12233 2006-07-17  Bruno Haible  <bruno@clisp.org>
12234
12235         * lib/gl_list.h: New file.
12236         * lib/gl_list.c: New file.
12237         * lib/gl_array_list.h: New file.
12238         * lib/gl_array_list.c: New file.
12239         * lib/gl_carray_list.h: New file.
12240         * lib/gl_carray_list.c: New file.
12241         * lib/gl_linked_list.h: New file.
12242         * lib/gl_linked_list.c: New file.
12243         * lib/gl_anylinked_list1.h: New file.
12244         * lib/gl_anylinked_list2.h: New file.
12245         * lib/gl_avltree_list.h: New file.
12246         * lib/gl_avltree_list.c: New file.
12247         * lib/gl_anyavltree_list1.h: New file.
12248         * lib/gl_anyavltree_list2.h: New file.
12249         * lib/gl_rbtree_list.h: New file.
12250         * lib/gl_rbtree_list.c: New file.
12251         * lib/gl_anyrbtree_list1.h: New file.
12252         * lib/gl_anyrbtree_list2.h: New file.
12253         * lib/gl_anytree_list1.h: New file.
12254         * lib/gl_anytree_list2.h: New file.
12255         * lib/gl_linkedhash_list.h: New file.
12256         * lib/gl_linkedhash_list.c: New file.
12257         * lib/gl_anyhash_list1.h: New file.
12258         * lib/gl_anyhash_list2.h: New file.
12259         * lib/gl_avltreehash_list.h: New file.
12260         * lib/gl_avltreehash_list.c: New file.
12261         * lib/gl_rbtreehash_list.h: New file.
12262         * lib/gl_rbtreehash_list.c: New file.
12263         * lib/gl_anytreehash_list1.h: New file.
12264         * lib/gl_anytreehash_list2.h: New file.
12265
12266         * lib/gl_oset.h: New file.
12267         * lib/gl_oset.c: New file.
12268         * lib/gl_array_oset.h: New file.
12269         * lib/gl_array_oset.c: New file.
12270         * lib/gl_avltree_oset.h: New file.
12271         * lib/gl_avltree_oset.c: New file.
12272         * lib/gl_rbtree_oset.h: New file.
12273         * lib/gl_rbtree_oset.c: New file.
12274         * lib/gl_anytree_oset.h: New file.
12275
12276 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12277
12278         * m4/mkancesdirs.m4: New file.
12279         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
12280         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
12281         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
12282         it.
12283
12284 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12285
12286         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
12287         * lib/mkancesdirs.h: New files.
12288         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
12289         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
12290         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
12291         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
12292         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
12293         callers changed.  Revamp internals significantly, by not
12294         attempting to create directories that are temporarily more
12295         permissive than the final results.  Do not attempt to use
12296         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
12297         This removes some race conditions, fixes some bugs, and simplifies
12298         things.  Use new dirchownmod function to do owner and mode changes.
12299         * lib/mkdir-p.h: Likewise.
12300         * lib/modechange.c (octal_to_mode): New function.
12301         (struct mode_change): New member mentioned.
12302         (make_node_op_equals): New arg mentioned.  All callers changed.
12303         (mode_compile): Keep track of which mode bits the user has explicitly
12304         mentioned.
12305         (mode_adjust): New arg DIR, so that we implement the X op correctly.
12306         New arg PMODE_BITS, to keep track of which mode bits the user
12307         mentioned; it treats S_ISUID and S_ISGID speciall.
12308         All callers changed.
12309         * lib/modechange.h: Likewise.
12310
12311 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
12312
12313         * MODULES.html.sh: Add mkancestors.
12314         * modules/mkancesdirs: New module.
12315         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
12316         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
12317         The chdir-safer and afs files are now orphans; I'll remove them
12318         unless someone speaks up.
12319         Add lib/dirchownmod.c, lib/dirchownmod.h.
12320         (Depends-on): Remove alloca, chown, save-cwd, dirname.
12321         Add lchown, mkancesdirs.
12322         (Maintainer): Add self.
12323
12324 2006-07-15  Karl Berry  <karl@gnu.org>
12325
12326         * gnulib-tool: help message wording/arrangement.
12327
12328 2006-07-14  Simon Josefsson  <jas@extundo.com>
12329
12330         * doc/gnulib.texi (Libtool and Windows): New section.
12331
12332 2006-07-12  Simon Josefsson  <jas@extundo.com>
12333
12334         * modules/gendocs (License): Fix license, approved by Karl.
12335
12336 2006-07-12  Eric Blake  <ebb9@byu.net>
12337
12338         * MODULES.html.sh: Add gendocs.
12339
12340 2006-07-11  Eric Blake  <ebb9@byu.net>
12341
12342         * modules/fdl: New module, to install doc/fdl.texi.
12343         * MODULES.html.sh: Add new section for documentation modules.
12344         * gnulib-tool: Avoid space-tab.
12345         (--doc-base): New option, to manage files from doc.
12346
12347 2006-07-11  Eric Blake  <ebb9@byu.net>
12348
12349         * m4/absolute-header.m4: Fix comments to match recent change.
12350
12351 2006-07-11  Eric Blake  <ebb9@byu.net>
12352
12353         * gnulib-tool: List --doc-base before --tests-base.
12354
12355 2006-07-11  Derek R. Price  <derek@ximbiot.com>
12356
12357         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
12358
12359 2006-07-11  Bruno Haible  <bruno@clisp.org>
12360
12361         * README: Mention where to put documentation.
12362
12363 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12364
12365         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
12366
12367 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12368
12369         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
12370         to stdint.m4.
12371
12372 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
12373
12374         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
12375         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
12376         "no/such/file/stdint.h" when there is no such file, so that
12377         the resulting C code can be parsed by dodgy compilers.
12378         Problems reported by Bob Proulx.
12379
12380 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12381
12382         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
12383         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12384         macros into the GNU _D_EXACT_NAMLEN.
12385         * lib/savedir.c:  Likewise.
12386         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
12387
12388 2006-07-10  Derek R. Price  <derek@ximbiot.com>
12389         and Paul Eggert  <eggert@cs.ucla.edu>
12390
12391         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
12392         * m4/savedir.m4:
12393         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
12394         macros into the GNU _D_EXACT_NAMLEN.
12395
12396 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12397
12398         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
12399         around the absolute name, to work around a problem with the HP-UX
12400         11.23 native C compiler, reported by Bob Proulx.
12401
12402 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12403
12404         * doc/maintain.texi, make-stds.texi: Sync from
12405         <http://savannah.gnu.org/projects/gnustandards>.
12406
12407 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12408
12409         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
12410
12411 2006-07-09  Jim Meyering  <jim@meyering.net>
12412
12413         * m4/glob.m4: Remove a doubled word in a comment.
12414
12415 2006-07-09  Jim Meyering  <jim@meyering.net>
12416
12417         * lib/argp-pv.c: Remove a doubled word in a comment.
12418         * lib/check-version.c (check_version): Likewise.
12419         * lib/javacomp.c (compile_java_class): Likewise.
12420
12421 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12422
12423         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
12424         for the benefit of people using Autoconf 2.60.  If you want to
12425         support older Autoconf versions you can copy m4/onceonly_2_57.m4
12426         (or m4/onceonly.m4, if pre-2.57) manually.
12427
12428 2006-07-08  Jim Meyering  <jim@meyering.net>
12429
12430         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
12431         comment.
12432         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
12433         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
12434         comment.
12435
12436 2006-07-08  Jim Meyering  <jim@meyering.net>
12437
12438         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
12439
12440 2006-07-07  Simon Josefsson  <jas@extundo.com>
12441
12442         * tests/test-crc.c: Change expected crc value, the test vector
12443         were probably computed using the old broken crc.c?
12444
12445 2006-07-06  Simon Josefsson  <jas@extundo.com>
12446
12447         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
12448         now the canonical place for the M4 file).
12449
12450         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
12451         from the sys_socket dependency now.
12452
12453         * modules/inet_pton (Files): Ditto.
12454
12455         * modules/inet_ntop (Files): Ditto.
12456
12457 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12458
12459         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
12460         not gl_PREREQ_GETUSERSHELL.
12461
12462 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12463
12464         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
12465         with only one argument, for Autoconf 2.60.
12466         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
12467         expand to nothing, so add a shell command to avoid syntax error.
12468         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
12469
12470 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12471
12472         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
12473
12474 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12475
12476         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
12477         no longer needed.  Check for isblank decl.
12478         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
12479         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
12480         of existence.
12481
12482 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12483
12484         * lib/getloadavg.c: Use __VMS, not VMS.
12485         * lib/getopt.c: Likewise.
12486         * lib/getpagesize.h: Likewise.
12487         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
12488         and probably does not work.
12489
12490 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12491
12492         * lib/.cppi-disable: Add wcwidth.
12493         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
12494         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
12495         (ISGRAPH): Remove.  All uses changed to isgraph.
12496         (FOLD) [!defined _LIBC]: Remove special case.
12497         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
12498         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
12499         HAVE_ISBLANK.
12500         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
12501         case.
12502
12503 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
12504
12505         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
12506         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
12507         brackets.  Other minor changes to suppress some compiler
12508         warnings.
12509
12510 2006-07-06  Derek R. Price  <derek@ximbiot.com>
12511         and Paul Eggert  <eggert@cs.ucla.edu>
12512
12513         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
12514         of invoking obsolescent AC_HEADER_DIRENT macro.
12515         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
12516         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
12517         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
12518         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
12519         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
12520         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
12521         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
12522         * m4/readdir.m4: Remove; no longer needed.
12523
12524 2006-07-06  Derek R. Price  <derek@ximbiot.com>
12525         and Paul Eggert  <eggert@cs.ucla.edu>
12526
12527         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
12528         Don't worry about this obsolete case any more.
12529         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
12530         directories.
12531         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
12532         worry about this obsolete case any more.
12533         * lib/fts.c: Likewise.
12534         * lib/getcwd.c: Likewise.
12535         * lib/glob.h: Likewise.
12536         * lib/savedir.c: Likewise.
12537
12538 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12539
12540         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
12541         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
12542         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
12543         needed.
12544         All uses removed.
12545         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12546         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
12547         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
12548         needed.
12549         * m4/getdate.m4 (gl_GETDATE): Likewise.
12550         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
12551         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
12552         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
12553         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12554         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
12555         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
12556         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
12557         needed.
12558
12559 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12560
12561         * lib/memcasecmp.c: Include <limits.h>.
12562         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
12563         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
12564         Don't assume isdigit succeeds only on '0' through '9'.
12565
12566 2006-07-05  Eric Blake  <ebb9@byu.net>
12567
12568         * modules/getaddrinfo (Depends-on): Add snprintf.
12569
12570 2006-07-05  Eric Blake  <ebb9@byu.net>
12571
12572         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
12573         to avoid 'header present but could not be compiled' on cygwin.
12574
12575 2006-07-05  Eric Blake  <ebb9@byu.net>
12576
12577         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
12578         missing from netdb.h.
12579         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
12580
12581 2006-07-05  Derek R. Price  <derek@ximbiot.com>
12582
12583         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
12584         no longer needed.
12585         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
12586         * m4/getdate.m4 (gl_GETDATE): Likewise.
12587         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
12588         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
12589         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
12590         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
12591         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
12592
12593 2006-07-05  Derek R. Price  <derek@ximbiot.com>
12594
12595         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
12596         All uses of is_space replaced by isspace.
12597         * lib/exit.h: Don't talk about STDC_HEADERS.
12598         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
12599         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
12600         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
12601         replaced by isprint etc.
12602         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
12603         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
12604         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
12605         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
12606         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
12607         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
12608
12609 2006-07-05  Bruno Haible  <bruno@clisp.org>
12610
12611         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
12612         the function exists, before testing against AIX.
12613         Reported by Martin Lambers <marlam@marlam.de>.
12614
12615 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
12616
12617         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
12618         From Mark D. Baushke.
12619
12620 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
12621
12622         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
12623         to the absolute name, not just one, to bypass Sun C 5.8's
12624         "warning: #include of /usr/include/... may be non-portable".
12625
12626 2006-07-04  Eric Blake  <ebb9@byu.net>
12627
12628         * modules/dirname-tests: New test module.
12629         * tests/test-dirname.c: New file, replacing dirname.c
12630         TEST_DIRNAME section that was recently deleted.
12631
12632 2006-07-04  Bruno Haible  <bruno@clisp.org>
12633
12634         Assume ANSI C header files and <ctype.h> functions.
12635         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
12636         (mbsnwidth): Use isprint, iscntrl instead.
12637
12638 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12639
12640         Merge from coreutils.
12641         * MODULES.html.sh: Add xstrtold.
12642         * modules/xstrtold: New file.
12643         * modules/cycle-check (Files): Add lib/same-inode.h.
12644         * modules/dirname (Files): Add m4/double-slash-root.m4.
12645         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
12646         * modules/mkdir-p (Files): Add lib/same-inode.h.
12647         * modules/same (Files): Add lib/same-inode.h.
12648
12649 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12650
12651         * m4/absolute-header.m4: Renamed from full-header-path.m4.
12652         This is to keep the terminology clean; POSIX talks about
12653         "absolute pathnames", not "full pathnames", but the GNU
12654         Coding Standards say to use "path" for something else;
12655         so use "absolute" to keep both sides happy.
12656         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
12657         Set gl_absolute_header, not gl_full_header_path.
12658         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
12659         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
12660         All uses changed.
12661
12662         Merge from coreutils.
12663
12664         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
12665
12666         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
12667         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
12668         want to require the building of c-strtod.o.
12669         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
12670         needs -lm directly.
12671         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
12672
12673         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
12674
12675         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
12676         --as-needed option if available.  Problem reported by Albert Chin in
12677         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
12678         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
12679         cc merely issues a bunch of annoying warnings for --as-needed
12680         (this problem was reported by Bob Proulx).  Also, try linking with
12681         -lm to detect a bug in binutils 2.16 (this problem was reported
12682         by Ralf Wildenhues).
12683
12684         2006-06-18  Jim Meyering  <jim@meyering.net>
12685
12686         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
12687         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
12688         macro.
12689         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
12690         also check for glibc-2.4's abort-inducing bug.
12691
12692         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
12693         Low-probability clean-up should be to use rmdir to get rid of
12694         the just-created directory, not unlink.
12695
12696         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
12697         configure fail, and request a bug report to inform us about it.
12698         Add a comment that, barring reports to the contrary, in 2007 we'll
12699         assume ftruncate is universally available.
12700
12701         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
12702
12703         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
12704
12705         2006-03-12  Jim Meyering  <jim@meyering.net>
12706
12707         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
12708         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
12709         * m4/same.m4 (gl_SAME): Likewise.
12710         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
12711
12712         2006-03-11  Eric Blake  <ebb9@byu.net>
12713
12714         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
12715         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
12716         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
12717         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
12718
12719 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12720
12721         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
12722         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
12723         reported by Mark D. Baushke, one in
12724         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
12725
12726         Merge from coreutils.
12727
12728         * lib/.cppi-disable: Add stdint_.h.
12729         * lib/.cvsignore: Add stdint.h.
12730
12731         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
12732
12733         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
12734         both double and long double versions.
12735         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
12736         * lib/xstrtold.c: New file.
12737         * lib/xstrtod.h (xstrtold): New decl.
12738
12739         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
12740
12741         * lib/filemode.c (setst): Remove.
12742         (strmode): Rewrite to avoid setst.  This makes the code shorter,
12743         (arguably) clearer, and the generated code is a bit smaller on my
12744         Debian GNU/Linux stable x86 host.
12745
12746         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
12747
12748         * lib/filemode.c: Include "filemode.h" first, to test the interface.
12749         Assume that filemode.h includes sys/types.h and sys/stat.h.
12750         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
12751         (ftypelet): Reorder to put common cases first, for efficiency.
12752         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
12753         to do 'M'.
12754         (strmode): Renamed from mode_string, and now stores 12 bytes instead
12755         of 10, for compatibility with FreeBSD.  All callers changed.
12756         (filemodestring): Now stores 12 bytes instead of 10, and sets file
12757         types that can't be deduced solely from st_mode.  First arg is now a
12758         const pointer.
12759         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
12760         (strmode): Renamed from mode_string.
12761         (filemodestring): New decl.
12762         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
12763         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
12764         needed.
12765         (S_ISPORT, S_ISWHT): New macros, if not already defined.
12766
12767         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12768
12769         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
12770         fsusage.h now does that.  Include fsusage.h first, to test interface.
12771         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
12772         at most one method (the old code could have generated decls that
12773         didn't conform to C89, not that this was ever exercised).
12774         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
12775
12776         2006-03-19  Jim Meyering  <jim@meyering.net>
12777
12778         Work even in a chroot where d_ino values for entries in "/"
12779         don't match the stat.st_ino values for the same names.
12780         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
12781         number, iterate through all entries again, using lstat instead.
12782         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
12783         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
12784
12785         * lib/getcwd.c (__getcwd): Clarify a comment.
12786         Use memcpy in place of a call to strcpy.
12787
12788         2006-03-12  Jim Meyering  <jim@meyering.net>
12789
12790         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
12791         matches that of the current directory (which we're about to chdir ".."
12792         out of), then save the dev-ino of the parent, instead.
12793
12794         * lib/same-inode.h (SAME_INODE): New file/macro.
12795         * lib/chdir-safer.c (SAME_INODE): Remove definition.
12796         Include "same-inode.h", instead.
12797         * lib/same.c: Likewise.
12798         * lib/cycle-check.h: Include "same-inode.h".
12799         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
12800         * lib/cycle-check.c (SAME_INODE): Remove definition.
12801         * lib/root-dev-ino.h: Include "same-inode.h".
12802
12803         2006-03-11  Eric Blake  <ebb9@byu.net>
12804
12805         * lib/same.c (same_name): s/base_name/last_component/
12806         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
12807         * lib/filenamecat.c (file_name_concat): Likewise.
12808
12809         2006-03-11  Eric Blake  <ebb9@byu.net>,
12810                     Paul Eggert  <eggert@cs.ucla.edu>
12811
12812         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
12813         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
12814         drive prefix.
12815         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
12816         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
12817         (last_component): New method.
12818         * lib/dirname.c (dir_len): Determine when drive letters need a
12819         subsequent slash.  Preserve // when it is special.
12820         (dir_name): Don't append dot when drive letter is absolute.
12821         [TEST_DIRNAME]: Move into a full-blown gnulib test.
12822         * lib/basename.c (base_name): New semantics - malloc the result.
12823         Preserve // when it is special.  Preserve relative files that look
12824         like drive letters.
12825         (base_len): Preserve // when it is special.
12826         (last_component): New method, similar to old base_name semantics.
12827         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
12828         base_name.  Strip redundant slashes from ///.
12829
12830 2006-07-03  Jim Meyering  <jim@meyering.net>
12831
12832         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
12833         macro is used before the first cycle_check call.
12834
12835 2006-07-03  Eric Blake  <ebb9@byu.net>
12836
12837         * modules/dirname (Depends-on): Add xstrndup.
12838
12839 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
12840
12841         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
12842         test cases, so that config.log is a bit easier to follow.
12843
12844 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
12845
12846         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
12847         both are 64 bits, since this seems to be the tradition, and this
12848         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
12849         we ever run into a host that prefers long long to long in this
12850         case, we'll need another configure-time test.  Problem reported by
12851         Jim Meyering.
12852
12853 2006-07-02  Eric Blake  <ebb9@byu.net>
12854
12855         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
12856
12857 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12858
12859         * modules/inttypes (Depends-on): No longer depends on stdint.
12860         * modules/stdint (Description): Say more about assumptions.
12861         Say that the fast types might differ.  Say macros are used.
12862         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
12863         (Makefile.am): Revise list of substituted symbols to match
12864         new stdint.m4.
12865         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
12866         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
12867         * tests/test-stdint.c (verify_same_types)
12868         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
12869         the code conforms to C99/C89.
12870         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
12871         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
12872
12873 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12874
12875         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
12876         but fix a bug, by requiring at least 64 bits.
12877         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
12878         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
12879         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
12880         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
12881
12882         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
12883         changes.  Make 2.59 a prerequisite.  Check and substitute for
12884         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
12885         inttypes.h.  Do not use special include files; just use the
12886         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
12887         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
12888         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
12889         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
12890         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
12891         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
12892         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
12893         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
12894         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
12895         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
12896         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
12897         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
12898         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
12899         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
12900         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
12901         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
12902         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
12903         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
12904         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
12905         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
12906         WINT_MAX.  Check for C99 conformance more strictly, by detecting
12907         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
12908         not check for things that C99 does not require, e.g., int8_t.  If
12909         a test isn't needed unless <stdint.h> isn't working, and is
12910         unlikely to be needed for any other reason, then don't do it
12911         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
12912         size_t, since we assume C89 freestanding at least.  Do not check
12913         for sig_atomic_t, wchar_t, or wint_t, since the code now does
12914         the right thing even if the types are not defined.  Instead use:
12915         (gl_STDINT_TYPE_PROPERTIES): New macro.
12916         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
12917         testing whether <sys/types.h> clashes, as Autoconf does this for
12918         us now.  All uses removed.
12919         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
12920         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
12921         (gl_CHECK_TYPE_SAME):
12922         Remove; no longer needed.
12923         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
12924         exists, since we'll return 0 anyway in that case.
12925         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
12926
12927 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12928
12929         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
12930         possible collision with system files.
12931         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
12932         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
12933         WCHAR_MIN and WCHAR_MAX in this case.
12934         (<stddef.h>): Do not include; no longer needed.
12935         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
12936         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
12937         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
12938         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
12939         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
12940         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
12941         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
12942         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
12943         !defined(__c99))]: Include in this case too, since it's harmless
12944         now.
12945         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
12946         dangerous to do so.
12947         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
12948         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
12949         (_STDINT_MIN, _STDINT_MAX): New macros.
12950         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
12951         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
12952         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
12953         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
12954         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
12955         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
12956         macros, not typedefs; this simplifies things quite a bit.
12957         Use long int for all types narrower than int64_t.
12958         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
12959         Define in terms of long long int or int64_t or long int,
12960         not int64_t or int32_t.  This saves some compile-time testing.
12961         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
12962         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
12963         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
12964         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
12965         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
12966         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
12967         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
12968         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
12969         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
12970         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
12971         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
12972         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
12973         undef any previous version and define our own version, for
12974         simplicity and consistency with the new macros for types.
12975         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
12976         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
12977         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
12978         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
12979         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
12980         @WINT_T_SUFFIX@ to keep things simple here.
12981         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
12982         Simplify by assuming typical 8/16/32/64 host, since we're
12983         already doing that elsewhere anyway.
12984         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
12985         and assume long long int is 64 bits if available.  This
12986         speeds up 'configure'.
12987
12988 2006-07-01  Eric Blake  <ebb9@byu.net>
12989
12990         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
12991         Reported by Andreas Buening.
12992
12993 2006-07-01  Eric Blake  <ebb9@byu.net>
12994
12995         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
12996
12997 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
12998
12999         * lib/getaddrinfo.c: fixed typo
13000
13001 2006-06-29  Jim Meyering  <jim@meyering.net>
13002
13003         * modules/strftime (Maintainer): Add my name, since with the
13004         FPRINTFTIME changes strftime.c has forked from glibc.
13005
13006 2006-06-29  Eric Blake  <ebb9@byu.net>
13007
13008         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
13009
13010 2006-06-29  Eric Blake  <ebb9@byu.net>
13011
13012         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
13013
13014 2006-06-29  Eric Blake  <ebb9@byu.net>
13015
13016         * lib/stat_.h: New file.
13017
13018 2006-06-29  Eric Blake  <ebb9@byu.net>
13019
13020         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
13021         unused static function.
13022
13023 2006-06-29  Eric Blake  <ebb9@byu.net>
13024
13025         * doc/functions.texi (Function Portability): Document missing lstat
13026         on mingw.
13027
13028 2006-06-29  Eric Blake  <ebb9@byu.net>
13029
13030         * MODULES.html.sh: Add sys_stat.
13031         * modules/sys_stat: New module.
13032         * modules/mkstemp (Depends-on): Add sys_stat.
13033
13034 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13035
13036         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
13037
13038 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13039
13040         * m4/c-bs-a.m4: Removed.
13041
13042 2006-06-29  Derek R. Price  <derek@ximbiot.com>
13043
13044         * lib/strftime.c: Assume strftime() exists.
13045
13046 2006-06-29  Derek Price  <derek@ximbiot.com>
13047
13048         * modules/c-bs-a: Removed - \a is C89.
13049         * MODULES.html.sh: Remove c-bs-a.
13050
13051 2006-06-29  Bruno Haible  <bruno@clisp.org>
13052
13053         * modules/wcwidth (License): Change to LGPL.
13054
13055 2006-06-28  Simon Josefsson  <jas@extundo.com>
13056
13057         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
13058         on _WIN32.
13059
13060         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
13061         getnameinfo.
13062
13063 2006-06-28  Simon Josefsson  <jas@extundo.com>
13064
13065         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
13066
13067 2006-06-28  Simon Josefsson  <jas@extundo.com>
13068
13069         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
13070         functions there.  It will succeed on Windows XP, but on Windows
13071         2000 and (presumably) earlier, it will fail, and use the internal
13072         re-implementation.
13073         (use_win32_p): New function.
13074         (getaddrinfo): Use strtoul on servname, to support numeric ports.
13075         Support AI_NUMERICSERV to disable getservbyname.
13076         (getnameinfo): New function, only supports
13077         NI_NUMERICHOST|NI_NUMERICSERV for now.
13078
13079         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
13080         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
13081         getnameinfo.
13082
13083 2006-06-28  Eric Blake  <ebb9@byu.net>
13084
13085         * modules/wcwidth: New file.
13086         * modules/mbchar (Depends-on): Add wcwidth.
13087         * modules/mbswidth (Depends-on): Add wcwidth.
13088         * MODULES.html.sh: Add wcwidth.
13089
13090 2006-06-28  Eric Blake  <ebb9@byu.net>
13091
13092         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
13093         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
13094
13095 2006-06-28  Eric Blake  <ebb9@byu.net>
13096
13097         * lib/xvasprintf.h: Fix comments.
13098
13099 2006-06-28  Eric Blake  <ebb9@byu.net>
13100
13101         * lib/mbchar.h (wcwidth): Include wcwidth.h.
13102         * lib/mbswidth.c (wcwidth): Move from here...
13103         * lib/wcwidth.h: ...to this new file.
13104
13105 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13106
13107         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
13108
13109         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
13110         it's obsolete.
13111         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
13112
13113 2006-06-28  Derek R. Price  <derek@ximbiot.com>
13114
13115         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
13116         Autoconf 2.60 says this stuff was obsolete.
13117
13118 2006-06-28  Bruno Haible  <bruno@clisp.org>
13119
13120         * modules/wcwidth (Files): Add m4/wchar_t.m4.
13121
13122 2006-06-28  Bruno Haible  <bruno@clisp.org>
13123
13124         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
13125         gt_TYPE_WCHAR_T.
13126
13127 2006-06-28  Bruno Haible  <bruno@clisp.org>
13128
13129         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
13130         declaration for wcwidth.
13131         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
13132
13133 2006-06-28  Bruno Haible  <bruno@clisp.org>
13134
13135         * lib/mkdtemp.c [MINGW]: Include <io.h>.
13136         (mkdir): Define using _mkdir.
13137
13138 2006-06-28  Bruno Haible  <bruno@clisp.org>
13139
13140         * lib/getaddrinfo.h: Fix POSIX URL.
13141         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
13142         _WIN32.
13143         (use_win32_p): Make static.
13144         (getaddrinfo): Reject service name if it is empty or does not consist
13145         solely of decimal digits, or if its value is > 65535.
13146         (getnameinfo): Remove useless casts.
13147
13148 2006-06-27  Simon Josefsson  <jas@extundo.com>
13149
13150         * modules/sys_select: New file, suggested by Bruno Haible, Paul
13151         Eggert and Martin Lambers.
13152
13153 2006-06-27  Simon Josefsson  <jas@extundo.com>
13154
13155         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
13156         Eggert and Martin Lambers.
13157
13158 2006-06-27  Bruno Haible  <bruno@clisp.org>
13159
13160         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
13161         result to 0, not to empty.
13162         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
13163
13164 2006-06-27  Bruno Haible  <bruno@clisp.org>
13165
13166         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
13167
13168 2006-06-26  Simon Josefsson  <jas@extundo.com>
13169
13170         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
13171         present.
13172
13173 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
13174
13175         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
13176         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
13177         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
13178
13179 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
13180
13181         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
13182
13183 2006-06-26  Bruno Haible  <bruno@clisp.org>
13184
13185         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
13186
13187 2006-06-26  Bruno Haible  <bruno@clisp.org>
13188
13189         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
13190
13191 2006-06-26  Bruno Haible  <bruno@clisp.org>
13192
13193         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
13194         SGI C compiler in pre-C99 mode.
13195         Suggested by Mark D. Baushke and Larry Jones.
13196
13197 2006-06-26  Bruno Haible  <bruno@clisp.org>
13198
13199         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
13200         WCHAR_MAX.
13201         Reported by Mark D. Baushke and Larry Jones.
13202
13203 2006-06-26  Bruno Haible  <bruno@clisp.org>
13204
13205         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
13206         in pre-C99 mode.
13207         Suggested by Mark D. Baushke and Larry Jones.
13208
13209 2006-06-23  Simon Josefsson  <jas@extundo.com>
13210             Bruno Haible  <bruno@clisp.org>
13211
13212         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
13213         Emit mostlyclean-local rule.
13214         (func_emit_tests_Makefile_am): Likewise.
13215         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
13216
13217 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
13218
13219         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
13220
13221 2006-06-23  Bruno Haible  <bruno@clisp.org>
13222
13223         * tests/test-stdint.c: Update to match ISO C 99 Technical
13224         Corrigendum 1.
13225
13226 2006-06-23  Bruno Haible  <bruno@clisp.org>
13227
13228         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
13229
13230 2006-06-23  Bruno Haible  <bruno@clisp.org>
13231
13232         * lib/stdint_.h: Treat IRIX like OpenBSD.
13233
13234 2006-06-23  Bruno Haible  <bruno@clisp.org>
13235
13236         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
13237         ISO C 99 Technical Corrigendum 1.
13238
13239 2006-06-22  Simon Josefsson  <jas@extundo.com>
13240
13241         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
13242         MinGW.
13243
13244 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13245
13246         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
13247         needed.  Some compiler complained about some of them.  Problem reported
13248         by Larry Jones in
13249         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
13250
13251 2006-06-21  Simon Josefsson  <jas@extundo.com>
13252
13253         * tests/test-getaddrinfo.c: New file.
13254
13255         * modules/getaddrinfo-tests: New file.
13256
13257         * MODULES.html.sh: Add inet_pton.
13258
13259         * modules/inet_pton: New file.
13260
13261 2006-06-21  Simon Josefsson  <jas@extundo.com>
13262
13263         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
13264         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
13265         of using the (limited) gnulib implementation on Windows XP.
13266
13267         * m4/inet_pton.m4: New file.
13268
13269 2006-06-21  Simon Josefsson  <jas@extundo.com>
13270
13271         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
13272         variable.
13273
13274         * lib/socket_.h: Don't define WINVER.
13275
13276         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
13277         slightly modified to work in gnulib.
13278
13279 2006-06-21  Simon Josefsson  <jas@extundo.com>
13280
13281         * doc/gnulib.texi (Windows sockets): Add.
13282
13283 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
13284
13285         * lib/read-file.c (fread_file): Start with buffer allocation of
13286         0 bytes rather than 1 byte; this simplifies the code.
13287         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
13288         code to free buffer and save/restore errno.
13289         (internal_read_file): Remove unused local.
13290
13291 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
13292
13293         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
13294         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
13295         Problem reported by Denis Excoffier in
13296         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
13297
13298 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13299
13300         * modules/sys_socket, modules/socklen: Include sys/types since
13301         FreeBSD 4.x's sys/socket.h needs it.
13302
13303 2006-06-19  Simon Josefsson  <jas@extundo.com>
13304
13305         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
13306
13307 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
13308
13309         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
13310
13311 2006-06-19  Bruno Haible  <bruno@clisp.org>
13312
13313         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
13314         and FULL_PATH_INTTYPES_H in angle brackets.
13315         Reported by Mark D. Baushke <mdb@gnu.org>.
13316
13317 2006-06-17  Eric Blake  <ebb9@byu.net>
13318
13319         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
13320         errno.
13321
13322 2006-06-17  Bruno Haible  <bruno@clisp.org>
13323
13324         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
13325         <sys/inttypes.h>.
13326
13327 2006-06-17  Bruno Haible  <bruno@clisp.org>
13328
13329         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
13330         whether errno is declared. Assume <errno.h> declares errno.
13331
13332 2006-06-17  Bruno Haible  <bruno@clisp.org>
13333
13334         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
13335
13336 2006-06-17  Bruno Haible  <bruno@clisp.org>
13337
13338         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
13339         problem on Solaris 2.5.1.
13340
13341 2006-06-16  Eric Blake  <ebb9@byu.net>
13342
13343         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
13344         * lib/unicodeio.c [!defined errno]: Likewise.
13345         * lib/strtol.c [!defined errno]: Likewise.
13346         * lib/strtod.c [!defined errno]: Likewise.
13347
13348 2006-06-15  Eric Blake  <ebb9@byu.net>
13349
13350         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
13351
13352 2006-06-15  Eric Blake  <ebb9@byu.net>
13353
13354         * config/srclist.txt (ssize_t.m4): Lose sync.
13355
13356 2006-06-15  Bruno Haible  <bruno@clisp.org>
13357
13358         * modules/stdint (Files): Include m4/full-header-path.m4,
13359         m4/size_max.m4, m4/wchar_t.m4.
13360         (Makefile.am): Many more substitutions.
13361         * modules/stdint-tests: New file.
13362         * tests/test-stdint.c: New file.
13363
13364 2006-06-15  Bruno Haible  <bruno@clisp.org>
13365
13366         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
13367         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
13368         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
13369         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
13370         gl_CHECK_TYPE_SAME): New macros.
13371
13372 2006-06-15  Bruno Haible  <bruno@clisp.org>
13373
13374         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
13375
13376 2006-06-15  Bruno Haible  <bruno@clisp.org>
13377
13378         * lib/stdint_.h: Rewritten to be fully auto-configured.
13379         Fixes bug on HP-UX/IA64.
13380
13381 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
13382
13383         * lib/getdate.y (__attribute__): Don't define if already defined.
13384         Problem reported by Larry Jones.
13385         * lib/utimens.c (__attribute__): Likewise.
13386
13387 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
13388
13389         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
13390         reported by Andreas Schwab.
13391
13392 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13393             Bruno Haible  <bruno@clisp.org>
13394
13395         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
13396         check for the declaration of strnlen and a run test that exposes the
13397         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
13398         rpl_strndup.
13399
13400 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13401             Bruno Haible  <bruno@clisp.org>
13402
13403         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
13404
13405 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13406
13407         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
13408         compile test, for Tru64 4.0D.
13409
13410 2006-05-28  Karl Berry  <karl@gnu.org>
13411
13412         * config/srclist.txt (printf-args.c): lose sync.
13413
13414 2006-05-26  Martin Lambers  <marlam@marlam.de>
13415
13416         * lib/getpass.c: Updates the test for the native W32 API, and adds
13417         missing includes, thus fixing compilation warnings.
13418
13419 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
13420
13421         * lib/exclude.c (exclude_fnmatch): New function.
13422         (excluded_file_name): Call exclude_fnmatch.
13423         * lib/exclude.h (excluded_file_name): New prototype
13424
13425 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
13426
13427         * lib/tempname.c (small_open, large_open): New macros.
13428         (__open, __open64) [!_LIBC]: Remove.
13429         (__gen_tempname): Use small_open and large_open instead of __open
13430         and __open64.  This fixes a portability bug on HP-UX 11.11i
13431         reported by Simon Wing-Tang in
13432         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
13433
13434 2006-05-24  Bruno Haible  <bruno@clisp.org>
13435
13436         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
13437         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
13438         Reported by Thorsten Maerz <torte@netztorte.de> via
13439         Aaron Stone <aaron@serendipity.cx>.
13440
13441 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13442
13443         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
13444         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
13445         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
13446         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
13447         not really conditional on the cache.
13448         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
13449
13450 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
13451
13452         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
13453         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
13454         (my_usleep): Don't mishandle maximum value.
13455
13456 2006-05-19  Jim Meyering  <jim@meyering.net>
13457
13458         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
13459
13460 2006-05-17  Bruno Haible  <bruno@clisp.org>
13461
13462         Cygwin portability.
13463         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
13464
13465 2006-05-17  Bruno Haible  <bruno@clisp.org>
13466
13467         * lib/stdint_.h: Fix recognition of Cygwin.
13468
13469 2006-05-15  Bruno Haible  <bruno@clisp.org>
13470
13471         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
13472         on libtool patch by Ralf Wildenhues.
13473
13474 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13475
13476         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
13477         test for C99 conformance; (bool) 0.5 is an integer constant
13478         expression, but (bool) -0.5 is not.  Problem reported by Fedor
13479         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
13480
13481 2006-05-11  Simon Josefsson  <jas@extundo.com>
13482
13483         * m4/xvasprintf.m4: Fix obvious typo.
13484
13485 2006-05-11  Jim Meyering  <jim@meyering.net>
13486
13487         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
13488         James Lemley.
13489
13490 2006-05-10  Simon Josefsson  <jas@extundo.com>
13491
13492         * lib/md4.c: Typo fix, update copyright years.
13493         (K1, K2): Don't use L because it turn computations into 64-bit on
13494         64-bit platforms.
13495
13496 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
13497
13498         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
13499         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
13500         unwanted sign propagation, e.g., on hosts with 64-bit int.
13501         There still are some problems with reeelly weird theoretical hosts
13502         (e.g., 33-bit int) but it's not worth worrying about now.
13503         * lib/sha1.c (rol): Likewise.
13504         (K1, K2, K3, K4): Remove unnecessary L suffix.
13505
13506 2006-05-10  Bruno Haible  <bruno@clisp.org>
13507
13508         * lib/des.c: Cast to avoid warnings.
13509
13510 2006-05-09  Bruno Haible  <bruno@clisp.org>
13511
13512         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
13513         (Depends-on): Depend also on xsize, stdarg.
13514         (configure.ac): Add gl_XVASPRINTF.
13515
13516 2006-05-09  Bruno Haible  <bruno@clisp.org>
13517
13518         * m4/xvasprintf.m4: New file.
13519
13520 2006-05-09  Bruno Haible  <bruno@clisp.org>
13521
13522         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
13523         (EOVERFLOW): Define fallback value.
13524         (xstrcat): New function.
13525         (xvasprintf): Recognize the special case of a string concatenation.
13526
13527 2006-05-08  Eric Blake  <ebb9@byu.net>
13528
13529         * gnulib-tool (func_version): Base copyright year on CVS date.
13530         (func_emit_copyright_notice): New function.
13531         (func_emit_lib_Makefile_am): Use it.
13532         (func_emit_tests_Makefile_am): Likewise.
13533         (func_import): Likewise.
13534
13535 2006-05-08  Bruno Haible  <bruno@clisp.org>
13536
13537         * modules/stdarg: New file.
13538         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
13539
13540 2006-05-08  Bruno Haible  <bruno@clisp.org>
13541
13542         * m4/stdarg.m4: New file, from GNU gettext.
13543
13544 2006-05-08  Bruno Haible  <bruno@clisp.org>
13545
13546         * config/srclist.txt (build-aux/config.rpath): different from latest
13547         release.
13548
13549 2006-05-08  Bruno Haible  <bruno@clisp.org>
13550
13551         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
13552
13553 2006-05-05  Jim Meyering  <jim@meyering.net>
13554
13555         * m4/warning.m4: New file, derived from bison's file by the same name.
13556
13557 2006-05-03  Bruno Haible  <bruno@clisp.org>
13558
13559         * lib/stdint_.h: Shorter URL.
13560         * lib/inttypes.h: Likewise.
13561
13562 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13563
13564         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
13565
13566 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13567
13568         * lib/verify.h: Document the internals better.  Most of this change
13569         was written by Bruno Haible.
13570
13571 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
13572
13573         * doc/verify.texi: New file, partly based on a proposal by
13574         Bruno Haible.
13575
13576 2006-05-02  Bruno Haible  <bruno@clisp.org>
13577
13578         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
13579         test from here...
13580         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
13581
13582 2006-04-29  Bruno Haible  <bruno@clisp.org>
13583
13584         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
13585         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
13586
13587 2006-04-29  Bruno Haible  <bruno@clisp.org>
13588
13589         * gnulib-tool: Make --update option actually work.
13590
13591 2006-04-29  Bruno Haible  <bruno@clisp.org>
13592
13593         * doc/gcd.texi: New file.
13594         * doc/gnulib.texi: Include it.
13595
13596 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
13597
13598         * lib/getdate.y (get_date): When adding relative date, start with the
13599         initial time, not with the result of the first mktime call.
13600
13601 2006-04-25  Bruno Haible  <bruno@clisp.org>
13602
13603         * gnulib-tool (func_import): Output the include directives in three
13604         blocks, sorted separately.
13605         Reported by Ben Pfaff <blp@cs.stanford.edu>.
13606
13607 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
13608
13609         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
13610         to define main with arguments, for C++.  Reported by Eric Blake.
13611         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
13612         Prefer 'int main ()' to 'int main (void)', for C++.
13613         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
13614         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
13615         for 'main', for C99 and C++.
13616
13617 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
13618
13619         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
13620         Don't assume that exit status -1 is valid.
13621         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
13622         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
13623         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
13624         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
13625         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
13626         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
13627         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
13628         functions can be used without declaring them, or that you can
13629         exit with status -1.
13630         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
13631
13632 2006-04-24  Karl Berry  <karl@gnu.org>
13633
13634         * config/srclist.txt (longdouble.m4): sync lost.
13635
13636 2006-04-24  Eric Blake  <ebb9@byu.net>
13637
13638         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
13639
13640 2006-04-24  Bruno Haible  <bruno@clisp.org>
13641
13642         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
13643         poll() implementation in AIX.
13644         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
13645
13646 2006-04-24  Bruno Haible  <bruno@clisp.org>
13647
13648         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
13649         assigned exactly once.
13650
13651 2006-04-23  Claudio Fontana  <claudio@gnu.org>
13652             Bruno Haible  <bruno@clisp.org>
13653
13654         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
13655         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
13656         for AM_CPPFLAGS.
13657
13658 2006-04-23  Bruno Haible  <bruno@clisp.org>
13659
13660         * modules/copy-file: Depend on unistd.
13661         * modules/execute: Likewise.
13662         * modules/fatal-signal: Likewise.
13663         * modules/findprog: Likewise.
13664         * modules/mkdtemp : Likewise.
13665         * modules/pipe: Likewise.
13666         * modules/wait-process: Likewise.
13667
13668 2006-04-23  Bruno Haible  <bruno@clisp.org>
13669
13670         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
13671         condition was already detected.
13672         Reported by Ben Pfaff <blp@cs.stanford.edu>.
13673
13674 2006-04-23  Bruno Haible  <bruno@clisp.org>
13675
13676         * lib/copy-file.c: Include <unistd.h> unconditionally.
13677         * lib/execute.c: Likewise.
13678         * lib/fatal-signal.c: Likewise.
13679         * lib/findprog.c: Likewise.
13680         * lib/mkdtemp.c: Likewise.
13681         * lib/pipe.h: Likewise.
13682         * lib/pipe.c: Likewise.
13683         * lib/wait-process.h: Likewise.
13684
13685 2006-04-23  Bruno Haible  <bruno@clisp.org>
13686
13687         * gnulib-tool (func_usage): Fix --import description. Document
13688         --update.
13689         (func_import): Create temporary file in a temporary directory, if
13690         --dry-run is specified. Silence errors from 'grep' when there are no
13691         m4 files in $m4dir.
13692         (func_create_testdir): Silence errors from 'grep' when there are no
13693         m4 files in $m4dir.
13694         Reported by Karl Berry <karl@freefriends.org>.
13695
13696 2006-04-20  Bruno Haible  <bruno@clisp.org>
13697
13698         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
13699         one argument, so that the code will be portable to Autoconf 2.60.
13700         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
13701         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13702         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
13703
13704 2006-04-19  Derek Price  <derek@ximbiot.com>
13705             Eric Blake  <ebb9@byu.net>
13706
13707         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
13708         rather than "/full/path.h".  Update comment to match.  Shorten &
13709         generalize m4_translit call via AS_TR_CPP.
13710
13711 2006-04-19  Derek Price  <derek@ximbiot.com>
13712             Eric Blake  <ebb9@byu.net>
13713
13714         * lib/inttypes.h: Correct grammar in comment.
13715
13716 2006-04-18  Derek Price  <derek@ximbiot.com>
13717             Paul Eggert  <eggert@cs.ucla.edu>
13718
13719         * modules/inttypes: New file.
13720         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
13721
13722 2006-04-18  Derek Price  <derek@ximbiot.com>
13723             Paul Eggert  <eggert@cs.ucla.edu>
13724
13725         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
13726         New files.
13727
13728 2006-04-18  Derek Price  <derek@ximbiot.com>
13729             Paul Eggert  <eggert@cs.ucla.edu>
13730
13731         * lib/inttypes.h: New file.
13732         * lib/strtoimax.c: Assume <inttypes.h>.
13733
13734 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
13735
13736         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
13737         isn't mounted.  Problem reported by Kir Kolyshkin.
13738
13739 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13740
13741         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
13742         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
13743         Derek R. Price.
13744         * lib/regex.h (RE_DUP_MAX): Update comment to match current
13745         implementation.
13746
13747 2006-04-12  Eric Blake  <ebb9@byu.net>
13748
13749         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
13750         is now done automatically by the corresponding Autoconf macro.
13751
13752 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
13753
13754         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
13755         time_r.h.
13756
13757 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13758
13759         Merge regex changes from libc, removing some of our
13760         POSIX-conformance changes that were rejected and redoing them in a
13761         less-intrusive way.
13762
13763         * lib/regcomp.c (re_compile_internal, init_dfa):
13764         Length arg is now size_t, not Idx.  All uses changed.
13765         (peek_token): Forward decl now says internal_function.
13766         (__re_error_msgid, __re_error_msgid_idx):
13767         Now static rather than extern with attribute_hidden.
13768         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
13769         For some reason libc prefers K&R style defns for external functions.
13770         (regerror) [!defined _LIBC]: Likewise.
13771         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
13772         (seek_collating_symbol_entry, lookup_collation_sequence_value):
13773         (build_range_exp, build_collating_symbol):
13774         Use K&R-style defn.
13775         (re_compile_fastmap): Use '\0' to memset, not 0.
13776         (utf8_sb_map): Make the calculations more obvious.
13777         (init_dfa, parse_bracket_exp, build_charclass_op):
13778         Call calloc and cast result, as glibc does.
13779         (init_word_char, fetch_token, peek_token, peek_token_bracket):
13780         (build_range_exp, build_collating_symbol):
13781         Now internal functions.
13782
13783         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
13784
13785         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
13786         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
13787         Don't depend on VMS; depend on __VMS instead, for POSIX
13788         namespace cleanness.
13789         (regoff_t): Define to ssize_t, not long int.
13790
13791         Remove the REG_ macros named below.  Instead, make the old names
13792         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
13793         __USE_GNU_REGEX.
13794         (REG_BACKSLASH_ESCAPE_IN_LISTS):
13795         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
13796         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
13797         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
13798         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
13799         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
13800         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
13801         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
13802         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
13803         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
13804         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
13805         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
13806         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
13807         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
13808         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
13809         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
13810         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
13811         (REG_NREGS):
13812         Remove.  All uses replaced by the old RE_* names.
13813         (RE_BACKSLASH_ESCAPE_IN_LISTS):
13814         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
13815         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
13816         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
13817         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
13818         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
13819         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
13820         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
13821         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
13822         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
13823         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
13824         Don't bother having these macros be independent of each others'
13825         values, since they no longer exist in the POSIX name space.
13826
13827         Rename the following member names back to their old names,
13828         unless !__USE_GNU_REGEX.  All uses changed back.
13829         (buffer): Renamed from re_buffer.
13830         (allocated): Renamed from re_allocated.
13831         (used): Renamed from re_used.
13832         (syntax): Renamed from re_syntax.
13833         (fastmap): Renamed from re_fastmap.
13834         (translate): Renamed from re_translate.
13835         (can_be_null): Renamed from re_can_be_null.
13836         (regs_allocated): Renamed from re_regs_allocated.
13837         (fastmap_accurate): Renamed from re_fastmap_accurate.
13838         (no_sub): Renamed from re_no_sub.
13839         (not_bol): Renamed from re_not_bol.
13840         (not_eol): Renamed from re_not_eol.
13841         (newline_anchor): Renamed from re_newline_anchor.
13842         (num_regs): Renamed from rm_num_regs.
13843         (start): Renamed from rm_start.
13844         (end): Renamed from rm_end.
13845
13846         (free_state): Move up a bit.
13847
13848         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
13849         #define to be empty.
13850         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
13851         when that is what is intended.
13852         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
13853         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
13854         (MAX): New macro.
13855         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
13856         All uses changed back to re_malloc, etc.  It's now the caller's
13857         responsibility to check for overflow; all callers changed.
13858         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
13859         (re_x2nrealloc): Remove.
13860         (free_state): Remove decl.
13861
13862         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
13863         (re_set_registers, re_exec):
13864         Use K&R-style defn.
13865
13866         2006-01-31  Roland McGrath  <roland@redhat.com>
13867
13868         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
13869         Reported by Mike Frysinger <vapier@gentoo.org>.
13870
13871         2006-01-15  Andreas Jaeger  <aj@suse.de>
13872
13873         [BZ #1950]
13874         * lib/regex_internal.c (re_string_reconstruct): Adjust for
13875         build_wcs_upper_buffer change.
13876         (build_wcs_upper_buffer): Change return type.
13877
13878         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
13879
13880         * lib/regex_internal.h: Include <stdint.h> if available.
13881
13882         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
13883
13884         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
13885
13886         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
13887
13888         * lib/regcomp.c: Adjust for changed secondary hash function.
13889
13890         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
13891
13892         * lib/regex.h: Pretty printing.
13893         Clean up namespace a bit.
13894
13895         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
13896
13897         * lib/regexec.c (update_cur_sifted_state, check_arrival,
13898         check_arrival_add_next_nodes): Avoid using uninitialized variable.
13899
13900         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13901                     Ulrich Drepper  <drepper@redhat.com>
13902
13903         [BZ #1302]
13904         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
13905         changed.
13906         (bitset_word_t): Renamed from bitset_word.  All uses changed.
13907
13908         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
13909
13910         [BZ #281]
13911         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
13912         * lib/regcomp.c: Remove unnecessary uses of
13913         unsigned RE_TRANSLATE_TYPE.
13914         * lib/regex_internal.h: Likewise.
13915         * lib/regex_internal.c: Likewise.
13916         * lib/regexec.c: Likewise.
13917         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
13918
13919         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
13920
13921         * lib/regexec.c (find_recover_state): Remove unnecessary
13922         initialization.
13923         (transit_state_bkref): Make DFA a const pointer.
13924         (get_subexp): Likewise.
13925         (check_arrival): Likewise.
13926         (update_cur_sifted_state): Likewise.
13927         (re_search_internal): Likewise.
13928         (prune_impossible_nodes): Likewise.
13929         (acquire_init_state_context): Likewise.
13930         (proceed_next_node): Likewise.
13931         (set_regs): Likewise.
13932         (free_fail_stack_return): Likewise.
13933         (check_arrival_expand_ecl): Mark DFA parameter as const.
13934         (check_arrival_expand_ecl_sub): Likewise.
13935         (check_subexp_limits): Likewise.
13936         (sub_epsilon_src_nodes):  Likewise.
13937         (add_epsilon_src_nodes):  Likewise.
13938         (merge_state_array): Likewise.
13939         (update_regs): Likewise.
13940         (build_trtable): Likewise.
13941         (sift_states_backward): Mark MCTX parameter as const.
13942         (build_sifted_states): Likewise.
13943         (update_cur_sifted_state): Likewise.
13944         (sift_states_mkref): Likewise.
13945         (check_arrival_expand_ecl): Mark eclosure as const.
13946         (check_dst_limits_calc_pos_1): Likewise.
13947         * lib/regex_internal.h (re_match_context_t): Make dfa a const
13948         pointer.
13949
13950         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
13951
13952         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
13953         (transit_state_sb): Likewise.
13954         (transit_state_mb): Likewise.
13955         (sift_states_iter_mb): Likewise.
13956         (check_arrival_add_next_nodes): Likewise.
13957         (check_node_accept_bytes): Change first parameter to pointer-to-const.
13958         [_LIBC] (re_search_2_stub): Use mempcpy.
13959
13960         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
13961         mbrtowc for very simple UTF-8 case.
13962
13963         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
13964         a pointer-to-const.
13965         (re_acquire_state_context): Likewise.
13966         * lib/regex_internal.h: Adjust prototypes.
13967
13968         * lib/regex.c: Prevent using C++ compilers.
13969
13970         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
13971         (re_acquire_state_context): Likewise.
13972
13973 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13974
13975         * modules/regex (Depends-on): Add ssize_t.
13976
13977 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13978
13979         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
13980         translation table.
13981
13982 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
13983
13984         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
13985
13986 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
13987             Bruno Haible  <bruno@clisp.org>
13988
13989         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
13990         <sys/types.h> and <inttypes.h>.
13991
13992 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13993
13994         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
13995         `__error_t_defined', so argp.h will not typedef the former.
13996
13997 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
13998
13999         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
14000         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
14001         glibc names.  Even if glibc is changed to conform to POSIX, the
14002         traditional names will be available anyway, since regex depends on
14003         the extensions module.  Also, fix a longstanding typo in the
14004         implementation of Spencer ERE test #75 from grep 2.3.  Problems
14005         reported by Emanuele Giaquinta.  Also, change sense of cached
14006         variable, so that the message makes sense.
14007
14008 2006-03-24  Simon Josefsson  <jas@extundo.com>
14009
14010         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
14011         including some doc fixes.
14012         (base64_encode_alloc): Fix +1 bug on allocation failures.
14013
14014 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14015
14016         * lib/base64.c (base64_encode): Do not read past end of array with
14017         unsanitized input on systems with CHAR_BIT > 8.
14018
14019 2006-03-24  Eric Blake  <ebb9@byu.net>
14020
14021         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
14022
14023 2006-03-22  Karl Berry  <karl@gnu.org>
14024
14025         * config/srclist.txt (*setenv.[ch]): get from coreutils.
14026         * config/srclistvars.sh (COREUTILS): new var.
14027
14028 2006-03-17  Jim Meyering  <jim@meyering.net>
14029
14030         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
14031         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
14032
14033 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14034
14035         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
14036         no longer needs it.  Instead, check that regoff_t is as least
14037         as wide as ptrdiff_t.
14038
14039         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
14040         so that our regex.h stays compatible with the installed regex.
14041         This is helpful for installers who configure --without-included-regex.
14042         Problem reported by Emanuele Giaquinta.
14043
14044 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
14045
14046         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
14047         Typedef to long int, not to off_, as POSIX will likely change
14048         in that direction.
14049
14050 2006-03-15  Eric Blake  <ebb9@byu.net>
14051
14052         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
14053
14054 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14055
14056         * lib/argp-help.c (validate_uparams): Fix typo
14057         * lib/argp-parse.c (argp_default_options): Consistently begin help
14058         messages with a lowercase letter.
14059
14060 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
14061
14062         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
14063         overrun buffers and shouldn't be used (much as gets shouldn't be
14064         used).
14065         * lib/time_r.c (asctime_r, ctime_r): Likewise.
14066
14067 2006-03-08  Simon Josefsson  <jas@extundo.com>
14068
14069         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
14070         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14071
14072 2006-03-08  Simon Josefsson  <jas@extundo.com>
14073
14074         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
14075         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14076
14077 2006-03-08  Simon Josefsson  <jas@extundo.com>
14078
14079         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
14080         signal that configure disabled the device.
14081
14082 2006-03-08  Simon Josefsson  <jas@extundo.com>
14083
14084         * build-aux/maint.mk: Fix refresh-po, to handle no translated
14085         languages.
14086
14087 2006-03-07  Simon Josefsson  <jas@extundo.com>
14088
14089         * modules/getopt (Depends-on): Add unistd.
14090
14091         * modules/unistd: New file.
14092
14093 2006-03-07  Simon Josefsson  <jas@extundo.com>
14094
14095         * modules/gc-random: New file.
14096
14097 2006-03-07  Simon Josefsson  <jas@extundo.com>
14098
14099         * m4/unistd_h.m4: New file.
14100
14101 2006-03-07  Simon Josefsson  <jas@extundo.com>
14102
14103         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
14104         test to be side-effect free by storing the result in the cache
14105         variable gl_cv_lib_readline, and moving the assignment of
14106         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
14107         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14108
14109 2006-03-07  Simon Josefsson  <jas@extundo.com>
14110
14111         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
14112         error on missing devices (the functions will return an error).
14113
14114         * m4/gc.m4: Move random stuff to gc-random.m4
14115
14116 2006-03-07  Simon Josefsson  <jas@extundo.com>
14117
14118         * lib/unistd_.h: New file.
14119
14120 2006-03-07  Simon Josefsson  <jas@extundo.com>
14121
14122         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
14123
14124 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14125
14126         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
14127         Problem reported by Juan Manuel Guerrero.
14128
14129 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14130
14131         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
14132         the unistd module.
14133         * lib/getlogin_r.c: Likewise.
14134         * lib/getlogin_r.h: Likewise.
14135         * lib/glob.c: Likewise.
14136         * lib/pagealign_alloc.c: Likewise.
14137         * lib/unistd_.h: Remove; no longer needed.
14138
14139 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
14140
14141         * MODULES.html.sh (Support for systems lacking POSIX:2001):
14142         Add unistd.
14143         * modules/c-stack (Depends-on): Add unistd.
14144         * modules/getlogin_r: Likewise.
14145         * modules/glob: Likewise.
14146         * modules/pagealign_alloc: Likewise.
14147         * modules/unistd (Files): Remove lib/unistd_.h.
14148         (EXTRA_DIST): Remove.
14149         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
14150         need unistd_.h.
14151         (MOSTLYCLEANFILES): Remove unistd.h-t.
14152
14153 2006-03-03  Simon Josefsson  <jas@extundo.com>
14154
14155         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
14156
14157 2006-03-03  Simon Josefsson  <jas@extundo.com>
14158
14159         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
14160         libidn and bison.
14161
14162 2006-03-03  Simon Josefsson  <jas@extundo.com>
14163
14164         * build-aux/maint.mk: Add indent target.
14165
14166 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
14167
14168         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
14169         our replacement poll.h in any case, to avoid a differing
14170         declaration from a system header.  Seen on AIX.
14171
14172 2006-03-01  Simon Josefsson  <jas@extundo.com>
14173
14174         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
14175         <kasal@ucw.cz>.
14176
14177 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14178
14179         * modules/gettime (Depends-on): Add extensions module.
14180         * modules/nanosleep (Depends-on): Likewise.
14181         * modules/settime (Depends-on): Likewise.
14182
14183 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14184
14185         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
14186         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
14187         pedantically.
14188         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
14189         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
14190
14191         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
14192         not "==".  Reported by Ralf Wildenhues.
14193
14194 2006-03-01  Karl Berry  <karl@gnu.org>
14195
14196         * doc/Copyright/request-*: new files, synced from gnuorg.
14197
14198 2006-03-01  Karl Berry  <karl@gnu.org>
14199
14200         * config/srclist.txt (Copyright/*): new entries.
14201
14202 2006-02-28  Simon Josefsson  <jas@extundo.com>
14203
14204         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
14205
14206 2006-02-27  Simon Josefsson  <jas@extundo.com>
14207
14208         * lib/base64.h: Indent #define's.  From Jim Meyering
14209         <jim@meyering.net>.
14210
14211 2006-02-27  Jim Meyering  <jim@meyering.net>
14212
14213         Revert the change of 2006-02-24, so these files can continue
14214         to be sync'd from gettext.
14215         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
14216         of `config.h'.
14217
14218 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14219
14220         * modules/intprops: New file.
14221         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
14222         Add intprops.
14223         * modules/getloadavg (Files): Remove lib/intprops.h.
14224         (Depends-on): Add intprops.
14225         * modules/human: Likewise.
14226         * modules/inttostr: Likewise.
14227         * modules/openat: Likewise.
14228         * modules/sig2str: Likewise.
14229         * modules/userspec: Likewise.
14230         * modules/utimecmp: Likewise.
14231         * modules/xnanosleep: Likewise.
14232         * modules/xstrtol: Likewise.
14233
14234 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
14235
14236         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
14237         * modules/lock-tests (TESTS): Use $(EXEEXT).
14238         * modules/tls-tests: Likewise.
14239         * modules/argp-tests: Likewise.
14240         (check_PROGRAMS): New var, replacing...
14241         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
14242
14243 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14244
14245         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
14246         `config.h'.
14247
14248 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
14249
14250         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
14251
14252 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14253
14254         Sync from coreutils.
14255         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
14256         gl_CHDIR_SAFER.
14257
14258 2006-02-22  Jim Meyering  <jim@meyering.net>
14259
14260         Sync from coreutils.
14261         * m4/chdir-safer.m4: New file.
14262
14263 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
14264
14265         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
14266         AT_FDCWD exceeds INT_MAX.
14267         * lib/openat.h (AT_FDCWD): Likewise.
14268
14269 2006-02-17  Eric Blake  <address@hidden>
14270
14271         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
14272
14273 2006-02-16  Simon Josefsson  <jas@extundo.com>
14274
14275         * modules/getaddrinfo (Depends-on): Add sys_socket.
14276
14277 2006-02-15  Simon Josefsson  <jas@extundo.com>
14278
14279         * build-aux/maint.mk: Add dsyntax-check rule.
14280
14281 2006-02-15  Eric Blake  <ebb9@byu.net>
14282
14283         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
14284         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
14285         'present but cannot compile' warnings on cygwin.
14286         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
14287         use ws2tcpip.h if sys/socket.h works.
14288         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
14289         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
14290
14291 2006-02-14  Simon Josefsson  <jas@extundo.com>
14292
14293         * modules/maintainer-makefile (Files): Rename.
14294
14295         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
14296         and (the local) Makefile.cfg to maint-cfg.mk.
14297
14298         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
14299         to the latter.
14300
14301         * modules/maintainer-makefile: New module.
14302
14303         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
14304         severaly stripped to make it possible to build it up from scratch
14305         with reliable tests.
14306
14307         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
14308         fixes to permit overriding the default actions when configure and
14309         makefile are not available.
14310
14311 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
14312
14313         Sync from coreutils.
14314         * modules/lstat (Depends-on): Don't depend on xalloc.
14315         (License): Change from GPL to LGPL, since this is now simply a
14316         replacement for a libc function.
14317
14318 2006-02-14  Jim Meyering  <jim@meyering.net>
14319
14320         Sync from coreutils.
14321
14322         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
14323         failure on deficient systems, and simplify gnulib lgpl dependencies.
14324         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
14325         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
14326
14327         * lib/xalloc-die.c: Remove unused definition of N_.
14328
14329 2006-02-14  Jim Meyering  <jim@meyering.net>
14330
14331         Sync from coreutils.
14332         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
14333         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
14334         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
14335         double-quote uses of that variable, to accommodate the rare case in
14336         which getmntent is available in none of the libraries checked.  This
14337         happens at least on FreeBSD 5.0.
14338
14339 2006-02-13  Simon Josefsson  <jas@extundo.com>
14340
14341         * gnulib-tool (Usage): Fix --import, from
14342         karl@freefriends.org (Karl Berry).
14343
14344 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
14345
14346         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
14347
14348 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
14349
14350         * lib/argp-namefrob.h: Restore changes accidentally lost during the
14351         "autoupdate" on 2005-12-12.
14352
14353 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14354
14355         * modules/closeout (Depends-on): Remove atexit.
14356
14357 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
14358
14359         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
14360         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
14361
14362 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
14363
14364         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
14365         __EXTENSIONS__ if this causes compilation to fail.  Problem
14366         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
14367         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
14368
14369 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
14370
14371         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
14372         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
14373         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
14374         All uses changed.
14375
14376 2006-01-26  Simon Josefsson  <jas@extundo.com>
14377
14378         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
14379         prototype is visible on mingw32.
14380
14381         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
14382         for mingw32.
14383
14384         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
14385         mingw32).
14386
14387 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
14388
14389         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
14390         attempt to open for write; this always fails, at least on POSIX
14391         hosts.  This reinstates the 2006-01-09 change, which was
14392         inadvertently removed.
14393
14394 2006-01-26  Bruno Haible  <bruno@clisp.org>
14395
14396         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
14397         Reported by Paul Eggert.
14398
14399 2006-01-26  Bruno Haible  <bruno@clisp.org>
14400             Paul Eggert  <eggert@cs.ucla.edu>
14401
14402         * lib/stdbool_.h (_Bool)
14403         [(! (defined __cplusplus || defined __BEOS__)
14404           && !defined __GNUC__
14405           && !(defined __HP_cc || defined __xlc__
14406                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
14407                || defined __sgi))]:
14408         #define to signed char in these cases too; this simplifies
14409         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
14410         etc., separately) and makes it more conservative.
14411
14412 2006-01-25  Simon Josefsson  <jas@extundo.com>
14413
14414         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
14415         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
14416         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
14417
14418 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14419
14420         * lib/argp-namefrob.h: Bugfix. Remove stray #
14421
14422 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
14423
14424         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
14425         so that we test the test.
14426         Check for yet another HP-UX cc bug involving *bool |= bool.
14427
14428 2006-01-25  Karl Berry  <karl@gnu.org>
14429
14430         * config/srclist.txt (vasnprintf.c): sync lost.
14431
14432 2006-01-25  Jim Meyering  <jim@meyering.net>
14433
14434         Sync from the stable (b5) branch of coreutils:
14435
14436         * lib/fts.c (fts_children): Don't let close() clobber errno from
14437         failed fchdir().
14438
14439         * lib/fts.c (fts_stat): When following a symlink-to-directory,
14440         don't necessarily interpret stat-fails+lstat-succeeds as indicating
14441         a dangling symlink.  That can also happen at least for ELOOP.
14442         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
14443         FYI, this bug predates the inclusion of fts.c in coreutils.
14444
14445         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
14446         in their own block, so pre-c99 compilers don't object.
14447
14448         Avoid the double-free (first in fts_read, second in fts_close) that
14449         would occur when an `active' directory is made inaccessible (e.g.,
14450         via chmod a-x) during a traversal.
14451         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
14452         before returning.  Reproduce this failure by
14453         mkdir -p a/b; cd a; chmod a-x . b
14454         Reported by Stavros Passas.
14455
14456 2006-01-25  Jim Meyering  <jim@meyering.net>
14457
14458         * lib/fileblocks.c: Remove more useless parentheses.
14459         * lib/readutmp.h: Likewise.
14460
14461 2006-01-25  Bruno Haible  <bruno@clisp.org>
14462
14463         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
14464         warnings.
14465         Reported by Paul Eggert.
14466
14467 2006-01-25  Bruno Haible  <bruno@clisp.org>
14468
14469         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
14470         rid of a trap command. For Solaris sh.
14471         Reported by Mark D. Baushke <mdb@gnu.org>.
14472
14473 2006-01-24  Simon Josefsson  <jas@extundo.com>
14474
14475         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
14476         Bruno.
14477
14478 2006-01-24  Karl Berry  <karl@gnu.org>
14479
14480         * config/srclist.txt (argp-namefrob.h): sync lost.
14481
14482 2006-01-24  Jim Meyering  <jim@meyering.net>
14483
14484         * modules/openat (Files): Add lib/intprops.h.
14485         From Mark D. Baushke.
14486
14487 2006-01-24  Jim Meyering  <jim@meyering.net>
14488
14489         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
14490         Reported by Mark D. Baushke.
14491
14492 2006-01-24  Jim Meyering  <jim@meyering.net>
14493
14494         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
14495
14496 2006-01-24  Bruno Haible  <bruno@clisp.org>
14497
14498         * modules/strnlen (Maintainer): Change from glibc to all.
14499
14500 2006-01-24  Bruno Haible  <bruno@clisp.org>
14501
14502         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
14503         Patch by Paul Eggert.
14504
14505 2006-01-24  Bruno Haible  <bruno@clisp.org>
14506
14507         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
14508         already has it.
14509         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
14510         2005-11-26.
14511
14512         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
14513         'signed char' to avoid problems with the built-in _Bool type.
14514         Reported by Paul Eggert on 2005-11-26.
14515
14516 2006-01-24  Bruno Haible  <bruno@clisp.org>
14517
14518         * gnulib-tool (func_import): Avoid constructing complicated sed
14519         expressions inside backquote.
14520         Report and solution by Mark D. Baushke <mdb@gnu.org>.
14521
14522 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
14523
14524         These changes imported from libc.
14525         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
14526         test and two separate function calls.
14527         * lib/strndup.c (__strndup): Add libc_hidden_def.
14528
14529 2006-01-23  Simon Josefsson  <jas@extundo.com>
14530
14531         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
14532         Remove the test_*_SOURCES variable: automake infers it by default.
14533         * modules/tls-tests: Likewise.
14534
14535 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14536
14537         Work around porting bugs reported by Dieter in
14538         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
14539         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
14540         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
14541         Include "getopt.h" first, to check interface.
14542         (getenv): Declare only if defined HAVE_DECL_GETENV &&
14543         !HAVE_DECL_GETENV.
14544         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
14545         (__strndup): Revert to K&R-style function dfns, the glibc style.
14546         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
14547         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
14548         Include strnlen.h first, to get prototype properly.
14549         (strnlen): Renamed from __strnlen.
14550         Remove weak alias.
14551
14552 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14553
14554         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
14555
14556 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14557
14558         * config/srclist.txt: Adjust to reflect glibc reorganization.
14559         This affects only comments.
14560
14561 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14562
14563          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
14564          Reported by Bruce Korb <bkorb@gnu.org>.
14565
14566 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
14567
14568         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
14569         to pacify gcc -Wswitch-default.
14570
14571 2006-01-22  Bruno Haible  <bruno@clisp.org>
14572
14573         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
14574         temporary buffer for sprintf, take into account the precision also
14575         for 'd', 'i', 'u', 'o', 'x', 'X'.
14576
14577 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14578
14579         * modules/argp-tests: New module
14580         * tests/test-argp.c: New file
14581         * tests/test-argp-2.sh: New file
14582
14583 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
14584
14585         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
14586         (__argp_base_name): Removed
14587         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
14588         typo.
14589         (__argp_base_name): Provide macro definition or extern declaration
14590         depending on the configuration
14591
14592 2006-01-20  Simon Josefsson  <jas@extundo.com>
14593
14594         * modules/inet_ntop (Depends-on): Depend on sys_socket.
14595
14596 2006-01-20  Simon Josefsson  <jas@extundo.com>
14597
14598         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
14599
14600 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14601
14602         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
14603         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
14604         Suggested by Bruno Haible.
14605
14606 2006-01-20  Karl Berry  <karl@gnu.org>
14607
14608         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
14609         until changes propagate, I guess.
14610
14611 2006-01-19  Simon Josefsson  <jas@extundo.com>
14612
14613         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
14614
14615 2006-01-19  Simon Josefsson  <jas@extundo.com>
14616
14617         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
14618
14619 2006-01-19  Simon Josefsson  <jas@extundo.com>
14620
14621         * gnulib-tool: Set check_PROGRAMS.
14622
14623         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
14624         modules/des-tests, modules/gc-arcfour-tests,
14625         modules/gc-arctwo-tests, modules/gc-des-tests,
14626         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
14627         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
14628         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
14629         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
14630         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
14631         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
14632         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
14633         test_*_SOURCES.
14634
14635 2006-01-18  Simon Josefsson  <jas@extundo.com>
14636
14637         * modules/socklen (Depends-on): Depend on sys_socket.
14638
14639 2006-01-18  Simon Josefsson  <jas@extundo.com>
14640
14641         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
14642         modules/des-tests, modules/gc-arcfour-tests,
14643         modules/gc-arctwo-tests, modules/gc-des-tests,
14644         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
14645         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
14646         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
14647         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
14648         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
14649         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
14650         $(EXEEXT) to automake TESTS variable, for mingw32.
14651
14652 2006-01-17  Simon Josefsson  <jas@extundo.com>
14653
14654         * modules/socklen (Include): Need sys/socket.h.
14655
14656 2006-01-17  Bruno Haible  <bruno@clisp.org>
14657
14658         * modules/ssize_t (Include): Add <sys/types.h>.
14659
14660 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
14661
14662         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
14663         it's not portable and it doesn't work with cross-compiles.
14664         Problem reported by Bruno Haible.  Fix missing-$ typo in
14665         'test "gl_cv_ignore_unused_libraries" ...' that prevented
14666         -zignore from being used with Sun's C compiler.
14667
14668 2006-01-12  Simon Josefsson  <jas@extundo.com>
14669
14670         * lib/base64.c: Fix warning, reported by Bruno Haible
14671         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
14672
14673 2006-01-12  Bruno Haible  <bruno@clisp.org>
14674
14675         * modules/ldd: New file.
14676         * build-aux/ldd.sh.in: New file.
14677         * MODULES.html.sh (Support for building libraries and executables): Add
14678         ldd.
14679
14680 2006-01-12  Bruno Haible  <bruno@clisp.org>
14681
14682         * m4/ldd.m4: New file.
14683
14684 2006-01-12  Bruno Haible  <bruno@clisp.org>
14685
14686         * gnulib-tool (func_import, func_create_testdir): Don't go into an
14687         endless loop while replacing $auxdir with build-aux.
14688
14689 2006-01-11  Simon Josefsson  <jas@extundo.com>
14690
14691         * lib/stdint_.h (SIZE_MAX): Add missing (.
14692
14693 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
14694
14695         Sync from coreutils.
14696         * lib/md5.c: Fix commentary typos.
14697         (alignof, UNALIGNED_P): No need for a GCC-specific version.
14698         * lib/md5.h (__attribute__): Remove; unused.
14699         * lib/sha1.c: Fix commentary to match md5 better.
14700         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
14701         so that we don't need to worry about alignment.  All uses changed.
14702         This merges the 2005-10-28 md5 change into sha1.
14703
14704 2006-01-11  Jim Meyering  <jim@meyering.net>
14705
14706         Sync from coreutils.
14707         * lib/md5.c (OP): Fix spacing.
14708
14709 2006-01-11  Bruno Haible  <bruno@clisp.org>
14710
14711         Ensure automatic ordering between gl_LOCK and gl_ARGP.
14712         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
14713         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
14714
14715 2006-01-11  Bruno Haible  <bruno@clisp.org>
14716
14717         Ensure automatic ordering between gl_LOCK and gl_ARGP.
14718         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
14719         the "early" section as well.
14720
14721 2006-01-11  Bruno Haible  <bruno@clisp.org>
14722
14723         Avoid "ar: no archive members specified" error on MacOS X.
14724         * gnulib-tool (func_modules_add_dummy): New function.
14725         (func_import, func_create_testdir): Invoke it.
14726
14727 2006-01-11  Bruno Haible  <bruno@clisp.org>
14728
14729         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
14730         with $auxdir in AC_CONFIG_FILES statements.
14731
14732 2006-01-11  Bruno Haible  <bruno@clisp.org>
14733
14734         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
14735         Initialize also noinst_HEADERS to empty.
14736
14737 2006-01-11  Bruno Haible  <bruno@clisp.org>
14738
14739         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
14740         variables.
14741         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
14742         autoreconf.
14743
14744 2006-01-11  Bruno Haible  <bruno@clisp.org>
14745
14746         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
14747         overridable by the user.
14748         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
14749
14750 2006-01-10  Simon Josefsson  <jas@extundo.com>
14751
14752         * modules/sys_socket: New file.
14753
14754 2006-01-10  Simon Josefsson  <jas@extundo.com>
14755
14756         * m4/sys_socket_h.m4: New file.
14757
14758 2006-01-10  Simon Josefsson  <jas@extundo.com>
14759
14760         * lib/socket_.h: New file.
14761
14762 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
14763
14764         * modules/readutmp (Maintainer): Add myself.
14765
14766 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
14767
14768         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
14769         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
14770         People who are still concerned with buggy memcmp implementations
14771         can invoke gl_FUNC_MEMCMP themselves.
14772
14773 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
14774
14775         * lib/regex_internal.h (BITSET_WORD_BITS):
14776         Work around a bug in 64-bit PGC (before version 6.1-2), where the
14777         preprocessor mishandles large unsigned values as if they were signed.
14778         Problem reported by Claudio Fontana in
14779         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
14780
14781 2006-01-10  Jim Meyering  <jim@meyering.net>
14782
14783         Avoid the double-free (first in fts_read, second in fts_close) that
14784         would occur when an `active' directory is made inaccessible (e.g.,
14785         via chmod a-x) during a traversal.
14786         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
14787         before returning.  Reproduce this failure by
14788         mkdir -p a/b; cd a; chmod a-x . b
14789         Reported by Stavros Passas.
14790
14791         Sync from coreutils.
14792         * lib/sha1.c: Tweak grammar in a comment.
14793
14794 2006-01-10  Jim Meyering  <jim@meyering.net>
14795
14796         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
14797         Patch by Joerg Sonnenberger.
14798
14799 2006-01-10  Bruno Haible  <bruno@clisp.org>
14800
14801         * modules/readutmp: Depend on module free.
14802         * modules/strtok_r: Depend on module restrict.
14803
14804 2006-01-10  Bruno Haible  <bruno@clisp.org>
14805
14806         * modules/gettext (configure.ac): Add an invocation of
14807         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
14808
14809 2006-01-10  Bruno Haible  <bruno@clisp.org>
14810
14811         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
14812         Reported by Werner Lemberg <wl@gnu.org>.
14813
14814 2006-01-10  Bruno Haible  <bruno@clisp.org>
14815
14816         * lib/localcharset.c: Update from GNU gettext.
14817
14818 2006-01-10  Bruno Haible  <bruno@clisp.org>
14819
14820         * lib/argp.h (__const): Remove macro. Use const instead.
14821         * lib/argp-fmtstream.h (__const): Likewise.
14822         * lib/glob_.h (__const): Remove macro.
14823         * lib/glob-libc.h: Use const instead of __const.
14824
14825 2006-01-10  Bruno Haible  <bruno@clisp.org>
14826
14827         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
14828         variable.
14829         Needed to avoid an automake error regarding the 'gettext' module.
14830
14831 2006-01-09  Simon Josefsson  <jas@extundo.com>
14832
14833         * modules/inet_ntop (Depends-on): Add restrict.
14834
14835 2006-01-09  Simon Josefsson  <jas@extundo.com>
14836
14837         * modules/gc-rijndael-tests (License): Put under LGPL.
14838
14839         * modules/gc-des-tests (License): Likewise.
14840
14841         * modules/gc-arcfour-tests (License): Likewise.
14842
14843         * modules/gc-arctwo-tests (License): Likewise.
14844
14845         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
14846
14847         * modules/gc-hmac-sha1-tests (Files): Likewise.
14848
14849         * modules/gc-hmac-md5-tests (License): Likewise.
14850
14851         * modules/gc-sha1-tests (License): Likewise.
14852
14853         * modules/gc-md5-tests (License): Likewise.
14854
14855         * modules/gc-md4-tests (License): Likewise.
14856
14857         * modules/gc-md2-tests (License): Likewise.
14858
14859         * modules/gc-tests (License): Likewise.
14860
14861         * modules/des-tests (License): Likewise.
14862
14863         * modules/md4-tests (License): Likewise.
14864
14865         * modules/md2-tests (License): Likewise.
14866
14867 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14868
14869         Sync from coreutils:
14870
14871         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
14872         * modules/lib-ignore: New file.
14873         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
14874         chdir-safer.m4, lchmod.m4.
14875         * modules/openat: Add mkdirat.c, openat-priv.h.
14876
14877 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14878
14879         Sync from coreutils.
14880         * m4/lib-ignore.m4: New file.
14881         * m4/lchmod.m4: New file.
14882
14883 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14884
14885         Sync from coreutils.
14886         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
14887         for write access: POSIX says that must fail.
14888         * lib/fts.c (diropen): Likewise.
14889         * lib/save-cwd.c (save_cwd): Likewise.
14890         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
14891         well, for minor improvements on hosts that lack O_DIRECTORY.
14892         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
14893         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
14894         Fall back on chown if open failed with EACCES.
14895
14896         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
14897         Report an error at compile-time if only a 1-second nominal clock
14898         resolution is found.
14899
14900         * lib/lchmod.h: New file.
14901         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
14902         (make_dir_parents): Use lchown rather than chown, and
14903         lchmod rather than chmod.
14904
14905         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
14906         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
14907         "proc" reported by n0dalus.
14908
14909         * lib/mountlist.c: Include <limits.h>.
14910         (dev_from_mount_options)
14911         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
14912         New function.  It no longer assumes "dev=" has the System V meaning
14913         on Linux (since it doesn't).  It also parses "dev=" more carefully.
14914         (read_file_system_list)
14915         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
14916         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
14917         dev= in that case.
14918
14919         * lib/posixtm.h (PDS_PRE_2000): New macro.
14920         * lib/posixtm.c (year): Arg is now syntax_bits rather than
14921         allow_century.  All usages changed.  Reject dates outside the range
14922         1969-1999 if PDS_PRE_2000 is used.
14923
14924 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
14925
14926         Sync from coreutils.
14927         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
14928         (Time of day items): Mention the possibility of leap seconds.
14929         Problem reported by Dr. David Alan Gilbert.
14930
14931 2006-01-09  Jim Meyering  <jim@meyering.net>
14932
14933         Sync from coreutils.
14934
14935         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
14936
14937         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
14938
14939         * lib/modechange.c (mode_compile): Reject an invalid mode string
14940         that starts with an octal digit.  From Andreas Gruenbacher.
14941
14942         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
14943         and dup to open_safer and dup_safer, respectively.
14944         (openat_permissive): Fix typo in comment.
14945
14946         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
14947         "gettext.h"; either no longer needed or are guaranteed by openat.h.
14948         (_): Remove; no longer needed.
14949         (openat): Renamed from rpl_openat; no need for rpl_openat
14950         since openat.h renames openat for us.
14951         Replace most of the body with a call to openat_permissive,
14952         to avoid duplicate code.
14953         Port to (probably hypothetical) environments were mode_t is
14954         wider than int.
14955         (openat_permissive): Require mode arg, so that we can check
14956         types better.  Put it just after flags.  Change cwd failure
14957         indicator from pointer-to-bool to pointer-to-errno-value.
14958         All callers changed.
14959         Invoke openat_save_fail and/or openat_restore_fail if
14960         cwd_errno is null, so that openat can call us.
14961         (openat_permissive, fdopendir, fstatat, unlinkat):
14962         Simplify errno handling to avoid some duplicate code,
14963         as it's OK to set errno on success.
14964         * lib/openat.h: Revamp code so that function macros depend on
14965         __OPENAT_PREFIX only, not also on AT_FDCWD.
14966         (openat_ro): Remove.  Caller changed to use openat_permissive.
14967         (openat_permissive): Now a macro, if not a function.
14968         (openat_restore_fail, openat_save_fail): Now always functions,
14969         since mkdirat needs them even if __OPENAT_PREFIX is defined.
14970
14971         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
14972         and openat.c.
14973         * lib/mkdirat.c: Include openat-priv.h.
14974         Remove definitions of macros defined therein.
14975         * lib/openat.c: Likewise.
14976
14977         * lib/mkdirat.c (mkdirat): New file and function.
14978         * lib/openat.h (mkdirat): Declare.
14979
14980         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
14981
14982         * lib/openat.h (openat_permissive): Declare.
14983         (openat_ro): Define.
14984
14985         * lib/openat.c (EXPECTED_ERRNO): New macro.
14986         (openat_permissive): New function -- used in remove.c rewrite.
14987         (all functions): Set errno just before returning, only if there
14988         was an actual failure.
14989         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
14990
14991         Emulate openat-family functions using Linux's procfs, if possible.
14992         Idea and some code based on Ulrich Drepper's glibc changes.
14993
14994         * lib/openat.c: (BUILD_PROC_NAME): New macro.
14995         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
14996         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
14997         before falling back on save_cwd and restore_cwd.
14998         (fdopendir, fstatat, unlinkat): Likewise.
14999
15000         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
15001         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
15002
15003         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
15004         as second argument to va_arg.  Otherwise, some versions of gcc
15005         warn that `if this code is reached, the program will abort'.
15006
15007 2006-01-09  Jim Meyering  <jim@meyering.net>
15008
15009         Sync from coreutils.
15010         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
15011         Require openat-priv.h.
15012
15013 2006-01-09  Bruno Haible  <bruno@clisp.org>
15014
15015         * modules/strnlen (Include): Use strnlen.h.
15016
15017 2006-01-09  Bruno Haible  <bruno@clisp.org>
15018
15019         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
15020
15021 2006-01-09  Bruno Haible  <bruno@clisp.org>
15022
15023         * lib/sysexit_.h (EX_OK): New macro.
15024         Suggested by Martin Lambers <marlam@marlam.de>.
15025
15026 2006-01-09  Bruno Haible  <bruno@clisp.org>
15027
15028         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
15029         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
15030
15031 2006-01-09  Bruno Haible  <bruno@clisp.org>
15032
15033         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
15034         numbers.
15035
15036 2006-01-09  Bruno Haible  <bruno@clisp.org>
15037
15038         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
15039         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
15040         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
15041         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
15042
15043 2006-01-09  Bruno Haible  <bruno@clisp.org>
15044
15045         * build-aux/javacomp.sh.in: New file, moved from lib/.
15046         * modules/javacomp-script (Files): Update.
15047         (configure.ac): Add AC_CONFIG_FILES invocation.
15048         (EXTRA_DIST): Remove variable.
15049
15050         * build-aux/javaexec.sh.in: New file, moved from lib/.
15051         * modules/javaexec (Files): Update.
15052         (configure.ac): Add AC_CONFIG_FILES invocation.
15053         (EXTRA_DIST): Remove javaexec.sh.in.
15054
15055         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
15056         * modules/csharpcomp-script (Files): Update.
15057         (configure.ac): Add AC_CONFIG_FILES invocation.
15058         (EXTRA_DIST): Remove variable.
15059
15060         * build-aux/csharpexec.sh.in: New file, moved from lib/.
15061         * modules/csharpexec (Files): Update.
15062         (configure.ac): Add AC_CONFIG_FILES invocation.
15063         (EXTRA_DIST): Remove csharpexec.sh.in.
15064
15065 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15066
15067         Sync from coreutils.
15068
15069         Add POSIX ACL support
15070         * lib/acl.h (copy_acl, set_acl): Add declarations.
15071         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
15072         systems other than Linux.
15073         (chmod_or_fchmod): New function: use fchmod when possible,
15074         and chmod otherwise.
15075         (file_has_acl): Add a POSIX ACL implementation, with a
15076         Linux-specific subcase.
15077         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
15078         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
15079         acls are unsupported.
15080         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
15081         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
15082         are unsupported.
15083
15084 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
15085
15086         Sync from coreutils.
15087         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
15088
15089 2006-01-07  Bruno Haible  <bruno@clisp.org>
15090
15091         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
15092         gl_EARLY.
15093
15094 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15095
15096         * lib/strftime.c (tzname): Don't declare if it is already #defined.
15097         Problem reported for Mingw by Mark Junker.
15098
15099 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15100
15101         * README: Gnulib normally doesn't generate a tarball.
15102
15103 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
15104
15105         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
15106         long int, not int, for nanosecond counts, so that people who are
15107         used to POSIX struct timespec won't be surprised.  Reported by Jim
15108         Meyering.
15109
15110 2005-12-28  Bruno Haible  <bruno@clisp.org>
15111
15112         * build-aux/config.rpath: Update from GNU gettext.
15113
15114 2005-12-16  Jim Meyering  <jim@meyering.net>
15115
15116         * modules/fprintftime: New module.
15117         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
15118
15119 2005-12-16  Jim Meyering  <jim@meyering.net>
15120
15121         * m4/fprintftime.m4: New file.
15122
15123 2005-12-16  Jim Meyering  <jim@meyering.net>
15124
15125         * lib/fprintftime.c, lib/fprintftime.h: New files.
15126
15127 2005-12-15  Simon Josefsson  <jas@extundo.com>
15128
15129         * modules/socklen (configure.ac): Fix M4 macro name, to align with
15130         new m4/socklen.m4.
15131
15132 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15133
15134         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
15135         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
15136
15137 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
15138
15139         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
15140         * lib/argp-help.c (fill_in_uparams): Check if the constructed
15141         struct uparams is valid. Fall back to the default values if it is
15142         not.
15143
15144 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15145
15146         * modules/argp (Files): Add argp-pin.c
15147         (Depends-on): dirname
15148         (lib_SOURCES): Add argp-pin.c
15149
15150 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15151
15152         * m4/argp.m4:  Check if program_invocation_name and
15153         program_invocation_short_name are declared and define appropriate
15154         macros if they are not.
15155
15156 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15157
15158         * lib/argp-help.c (__argp_base_name): New function
15159         (__argp_short_program_name): Rewrite using __argp_base_name
15160         * lib/argp-namefrob.h: Define program_invocation_name and
15161         program_invocation_short_name if requested
15162         (__argp_base_name): Add prototype
15163         * lib/argp-parse.c (argp_def): Use gettext wrappers
15164         (argp_default_parser): Use __argp_base_name
15165         * lib/argp-pin.c: New file. Defines program_invocation_name and
15166         program_invocation_short_name on systems that lack them.
15167
15168 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15169
15170         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
15171         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15172         porting problem reported by Georg Schwarz in
15173         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15174
15175 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15176
15177         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
15178         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
15179         porting problem reported by Georg Schwarz in
15180         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
15181
15182 2005-12-05  Bruno Haible  <bruno@clisp.org>
15183
15184         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
15185         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
15186         Reported by Mark Junker <mjscod@gmx.de>.
15187
15188 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
15189
15190         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
15191         Use implementation from Albert Chin, with some
15192         comments/corrections by Stepan Kasal and myself.
15193
15194 2005-12-02  Bruno Haible  <bruno@clisp.org>
15195
15196         * gnulib-tool (func_import): Accept GPLed build tool modules when
15197         --lgpl is given.
15198         * modules/csharpcomp-script: New file.
15199         * modules/csharpcomp: Depend on it.
15200         * modules/javacomp-script: New file.
15201         * modules/javacomp: Depend on it.
15202         Suggested by Simon Josefsson.
15203
15204 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
15205
15206         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
15207         statement, to work around an HP-UX 10.20 compiler bug reported by
15208         Peter O'Gorman.
15209
15210 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15211
15212         * modules/savedir (Depends-on): Add openat.
15213
15214 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
15215
15216         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
15217         (uintmax_t) [defined uintmax_t]: Do not declare.
15218         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
15219         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
15220         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
15221         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
15222         sake of portability to weird hosts that C allows (though we don't
15223         know of any practical examples).
15224
15225         * lib/savedir.h (fdsavedir): New decl.
15226         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
15227         contains most of the former guts of savedir.
15228         (savedir): Use savedirstream.
15229         Include "openat.h".
15230
15231 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15232
15233         * modules/obstack (Files): Add m4/ulonglong.m4.
15234         Problem reported by Davide Angelocola.
15235
15236 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
15237
15238         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
15239         coreutils no longer futzes with rounding modes.
15240
15241 2005-11-14  Jim Meyering  <jim@meyering.net>
15242
15243         * lib/mkstemp-safer.c: Include <config.h>, required for possible
15244         replacement of mkstemp.
15245
15246 2005-11-10  Simon Josefsson  <jas@extundo.com>
15247
15248         * lib/readline.c: Remove EOL.
15249
15250 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15251
15252         * modules/gethrxtime (Depends-on): Add gettime.
15253
15254 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15255
15256         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
15257         or gettimeofday; no longer needed.
15258
15259 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15260
15261         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
15262         time business.
15263         (gethrxtime) [! (HAVE_NANOUPTIME
15264         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
15265         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
15266         our own approximation.
15267
15268 2005-11-08  Eric Blake  <ebb9@byu.net>
15269
15270         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15271
15272 2005-11-08  Eric Blake  <ebb9@byu.net>
15273
15274         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
15275
15276 2005-11-04  Bruno Haible  <bruno@clisp.org>
15277
15278         * gnulib-tool: Implement --update mode.
15279
15280 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15281
15282         Fix porting problem reported by Theodoros V. Kalamatianos.
15283         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
15284         Don't assume that futimes failing means we must fail.
15285
15286 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15287
15288         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
15289         variables to suggest the intended function of the PATH_MAX check.
15290
15291 2005-10-30  Kean Johnston  <jkj@sco.com>
15292
15293         Trivial changes to support SCO systems.
15294         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
15295         as PATH_MAX.
15296         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
15297         where __ptr is null when no I/O is pending.
15298
15299 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15300
15301         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
15302         leave errno alone.  Problem reported by Dmitry V. Levin.
15303
15304 2005-10-28  Simon Josefsson  <jas@extundo.com>
15305
15306         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
15307         Test more.
15308
15309         * tests/test-gc-md2.c, tests/test-md2.c: New files.
15310
15311         * modules/md2, modules/md2-tests: New files.
15312
15313 2005-10-28  Simon Josefsson  <jas@extundo.com>
15314
15315         * m4/inet_ntop.m4: More tests.
15316
15317         * m4/gc-md2.m4, md2.m4: New file.
15318
15319 2005-10-28  Simon Josefsson  <jas@extundo.com>
15320
15321         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
15322         "restrict" keywords, as per POSIX.  Protect the function
15323         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
15324         Don't use K&R prototypes.  Check the sprintf return values.
15325         Re-define EAFNOSUPPORT if not present.  Indent.
15326
15327         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
15328         suggested by Bruno Haible <bruno@clisp.org>.
15329
15330         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
15331
15332         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
15333
15334         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
15335         libgcrypt).
15336
15337         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
15338
15339         * lib/md2.h, lib/md2.c: New files.
15340
15341 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
15342
15343         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
15344         errno alone.  Problem reported by Frederic Jolliton.
15345
15346 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
15347
15348         * modules/verify (License): Change from GPL to LGPL.  This is a
15349         tiny module and there are apparently near-equivalents that are
15350         under the BSD license.
15351
15352 2005-10-24  Simon Josefsson  <jas@extundo.com>
15353
15354         * modules/sha1: Relicense to LGPL.
15355
15356 2005-10-24  Simon Josefsson  <jas@extundo.com>
15357
15358         * lib/md4.h: Shrink buffer size, now that we changed the type.
15359
15360 2005-10-23  Simon Josefsson  <jas@extundo.com>
15361
15362         * gnulib-tool (func_import): Fix --tests-base.
15363
15364 2005-10-22  Simon Josefsson  <jas@extundo.com>
15365
15366         * modules/arcfour (Depends-on): Need stdint.
15367
15368 2005-10-22  Simon Josefsson  <jas@extundo.com>
15369
15370         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
15371         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
15372
15373 2005-10-22  Simon Josefsson  <jas@extundo.com>
15374
15375         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
15376         suggested by Bruno Haible <bruno@clisp.org>.
15377
15378 2005-10-22  Simon Josefsson  <jas@extundo.com>
15379
15380         * lib/crc.h: Include stddef.h, for size_t.
15381
15382 2005-10-22  Simon Josefsson  <jas@extundo.com>
15383
15384         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
15385         arcfour_context struct (simplify test vector testing in GNU
15386         Shishi).
15387
15388 2005-10-21  Simon Josefsson  <jas@extundo.com>
15389
15390         * modules/des, modules/des-tests: New files.
15391
15392         * modules/gc-des, modules/gc-des-tests: New files.
15393
15394         * tests/test-des.c, tests/test-gc-des.c: New file.
15395
15396 2005-10-21  Simon Josefsson  <jas@extundo.com>
15397
15398         * modules/arctwo, modules/arctwo-tests: New files.
15399
15400         * tests/test-arctwo.c: New file.
15401
15402         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
15403
15404         * tests/test-gc-arctwo.c: New file.
15405
15406 2005-10-21  Simon Josefsson  <jas@extundo.com>
15407
15408         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
15409         Bruno Haible <bruno@clisp.org>.
15410
15411         * m4/gc-des.m4: New file.
15412
15413 2005-10-21  Simon Josefsson  <jas@extundo.com>
15414
15415         * m4/arctwo.m4: New file.
15416
15417         * m4/gc-arctwo.m4: New file.
15418
15419 2005-10-21  Simon Josefsson  <jas@extundo.com>
15420
15421         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
15422         block.
15423
15424 2005-10-21  Simon Josefsson  <jas@extundo.com>
15425
15426         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
15427         <bruno@clisp.org>.
15428
15429         * lib/hmac-sha1.c (hmac_sha1): Likewise.
15430
15431         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
15432         Bruno Haible <bruno@clisp.org>.
15433
15434         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
15435         <bruno@clisp.org>.
15436
15437 2005-10-21  Simon Josefsson  <jas@extundo.com>
15438
15439         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
15440
15441 2005-10-21  Simon Josefsson  <jas@extundo.com>
15442
15443         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
15444
15445 2005-10-21  Simon Josefsson  <jas@extundo.com>
15446
15447         * lib/des.h, lib/des.c: New files.
15448
15449         * lib/gc-gnulib.c: Support DES.c
15450
15451 2005-10-21  Simon Josefsson  <jas@extundo.com>
15452
15453         * lib/arctwo.h, lib/arctwo.c: New files.
15454
15455         * lib/gc-gnulib.c: Support ARCTWO.
15456
15457 2005-10-21  Simon Josefsson  <jas@extundo.com>
15458
15459         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
15460         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15461
15462 2005-10-21  Simon Josefsson  <jas@extundo.com>
15463
15464         * gnulib-tool (func_import, func_create_testdir): Define automake
15465         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
15466         Makefile.am snippet),
15467         suggested by Bruno Haible <bruno@clisp.org>.
15468
15469         * modules/gc (Makefile.am): Use it.
15470
15471 2005-10-21  Bruno Haible  <bruno@clisp.org>
15472
15473         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
15474         patch.
15475
15476 2005-10-19  Simon Josefsson  <jas@extundo.com>
15477
15478         * tests/test-gc-rijndael.c: New file.
15479
15480         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
15481
15482 2005-10-19  Simon Josefsson  <jas@extundo.com>
15483
15484         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
15485         interface too.
15486
15487 2005-10-19  Simon Josefsson  <jas@extundo.com>
15488
15489         * tests/test-gc-arcfour.c: New file.
15490
15491         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
15492
15493 2005-10-19  Simon Josefsson  <jas@extundo.com>
15494
15495         * modules/gc-md4, modules/gc-md4-tests: New file.
15496
15497         * tests/test-gc-md4.c: New file.
15498
15499 2005-10-19  Simon Josefsson  <jas@extundo.com>
15500
15501         * m4/gc-md4.m4: New file.
15502
15503 2005-10-19  Simon Josefsson  <jas@extundo.com>
15504
15505         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
15506         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
15507         <kasal@ucw.cz>.
15508
15509 2005-10-19  Simon Josefsson  <jas@extundo.com>
15510
15511         * m4/gc-arcfour.m4: New file.
15512
15513         * m4/gc-rijndael.m4: New file.
15514
15515 2005-10-19  Simon Josefsson  <jas@extundo.com>
15516
15517         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
15518
15519 2005-10-19  Simon Josefsson  <jas@extundo.com>
15520
15521         * lib/gc-gnulib.c: Support ARCFOUR.
15522
15523 2005-10-19  Simon Josefsson  <jas@extundo.com>
15524
15525         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
15526         support.
15527
15528         * lib/gc.h: Add ECB enum type.
15529
15530         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
15531
15532 2005-10-18  Simon Josefsson  <jas@extundo.com>
15533
15534         * tests/test-md5.c: New file.
15535
15536         * modules/md5-tests: New file.
15537
15538 2005-10-18  Simon Josefsson  <jas@extundo.com>
15539
15540         * tests/test-md4.c: New file.
15541
15542         * modules/md4, modules/md4-tests: New files.
15543
15544 2005-10-18  Simon Josefsson  <jas@extundo.com>
15545
15546         * m4/md4.m4: New file.
15547
15548 2005-10-18  Simon Josefsson  <jas@extundo.com>
15549
15550         * lib/md4.h, lib/md4.c: New files, based on md5.?.
15551
15552 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
15553
15554         * gnulib-tool (func_create_testdir): Omit the second check whether
15555         BUILT_SOURCES in nonempty.
15556
15557 2005-10-17  Simon Josefsson  <jas@extundo.com>
15558
15559         * tests/test-rijndael.c: New file.
15560
15561 2005-10-17  Simon Josefsson  <jas@extundo.com>
15562
15563         * modules/sha1: Depend on stdint instead of md5.
15564
15565         * modules/md5: Depend on stdint, remove uint32_t.
15566
15567 2005-10-17  Simon Josefsson  <jas@extundo.com>
15568
15569         * modules/gc-sha1-tests: New file.
15570
15571         * tests/test-gc-sha1.c: New file.
15572
15573 2005-10-17  Simon Josefsson  <jas@extundo.com>
15574
15575         * m4/md5.m4: Remove call to uint32_t.m4.
15576
15577 2005-10-17  Simon Josefsson  <jas@extundo.com>
15578
15579         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
15580
15581         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
15582         md5.h.
15583
15584         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
15585
15586         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
15587
15588 2005-10-17  Simon Josefsson  <jas@extundo.com>
15589
15590         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
15591
15592 2005-10-17  Simon Josefsson  <jas@extundo.com>
15593
15594         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
15595
15596 2005-10-17  Simon Josefsson  <jas@extundo.com>
15597
15598         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
15599
15600         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
15601
15602 2005-10-17  Bruno Haible  <bruno@clisp.org>
15603
15604         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
15605         that it can also be used in a test.
15606
15607 2005-10-16  Bruno Haible  <bruno@clisp.org>
15608
15609         * gnulib-tool (func_emit_tests_Makefile_am): Also define
15610         TESTS_ENVIRONMENT, so that individual tests can augment it.
15611
15612         * gnulib-tool (func_create_testdir): Use an intermediate target for
15613         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
15614         macros, like $(ALLOCA_H), which cannot be passed through the command
15615         line.
15616
15617 2005-10-15  Simon Josefsson  <jas@extundo.com>
15618
15619         * modules/rijndael-tests: New file.
15620
15621         * modules/rijndael: New file.
15622
15623 2005-10-15  Simon Josefsson  <jas@extundo.com>
15624
15625         * m4/rijndael.m4: New file.
15626
15627 2005-10-15  Simon Josefsson  <jas@extundo.com>
15628
15629         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
15630
15631         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
15632
15633 2005-10-14  Simon Josefsson  <jas@extundo.com>
15634
15635         * tests/test-arcfour.c: New file.
15636
15637         * modules/arcfour, modules/arcfour-tests: New files.
15638
15639 2005-10-14  Simon Josefsson  <jas@extundo.com>
15640
15641         * m4/arcfour.m4: New file.
15642
15643 2005-10-14  Simon Josefsson  <jas@extundo.com>
15644
15645         * lib/arcfour.h, lib/arcfour.c: New files.
15646
15647 2005-10-14  Roland McGrath  <roland@redhat.com>
15648
15649         Import from libc.  [BZ #1331]
15650         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
15651         macro argument.
15652         Reported by Matej Vela <vela@debian.org>.
15653
15654 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
15655
15656         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
15657         include <wchar.h>; no longer needed.
15658
15659 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
15662
15663 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
15664         and  Ulrich Drepper  <drepper@redhat.com>
15665
15666         Import from libc.
15667         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
15668         instead of inline stream orientation test and two separate
15669         function calls.  Pay no attention to USE_IN_LIBIO.
15670
15671 2005-10-13  Simon Josefsson  <jas@extundo.com>
15672
15673         * modules/gc-hmac-md5-tests: New file.
15674
15675         * tests/test-gc-hmac-sha1.c: New file.
15676
15677         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
15678
15679         * modules/gc-hmac-md5-tests: New file.
15680
15681         * tests/test-gc-md5.c: New file.
15682
15683         * modules/gc-md5-tests: New file.
15684
15685 2005-10-13  Simon Josefsson  <jas@extundo.com>
15686
15687         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
15688         Move memory allocation outside of loop.
15689
15690 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
15691
15692         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
15693         intermediate directory is in a read-only file system.  Problem
15694         reported by Eric Blake.
15695
15696 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
15697
15698         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
15699
15700 2005-10-12  Simon Josefsson  <jas@extundo.com>
15701
15702         * tests/test-hmac-sha1.c: New file.
15703
15704         * modules/hmac-sha1-tests: New file.
15705
15706         * modules/hmac-sha1: New file.
15707
15708 2005-10-12  Simon Josefsson  <jas@extundo.com>
15709
15710         * modules/gc-sha1: New file.
15711
15712 2005-10-12  Simon Josefsson  <jas@extundo.com>
15713
15714         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
15715
15716         * tests/test-gc-pbkdf2-sha1.c: New file.
15717
15718 2005-10-12  Simon Josefsson  <jas@extundo.com>
15719
15720         * modules/gc-md5, modules/gc-hmac-md5: New files.
15721
15722         * modules/gc (Files): Remove md5, memxor and hmac files.
15723
15724 2005-10-12  Simon Josefsson  <jas@extundo.com>
15725
15726         * m4/gc-pbkdf2-sha1.m4: New file.
15727
15728         * m4/gc-hmac-sha1.m4: New file.
15729
15730         * m4/gc-sha1: New file.
15731
15732         * m4/hmac-sha1.m4: New file.
15733
15734 2005-10-12  Simon Josefsson  <jas@extundo.com>
15735
15736         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
15737
15738         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
15739
15740 2005-10-12  Simon Josefsson  <jas@extundo.com>
15741
15742         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
15743         suggested by Bruno Haible <bruno@clisp.org>.
15744
15745 2005-10-12  Simon Josefsson  <jas@extundo.com>
15746
15747         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
15748
15749 2005-10-12  Simon Josefsson  <jas@extundo.com>
15750
15751         * lib/gc-pbkdf2-sha1.c: New file.
15752
15753         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
15754
15755 2005-10-12  Simon Josefsson  <jas@extundo.com>
15756
15757         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
15758
15759         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
15760
15761 2005-10-12  Simon Josefsson  <jas@extundo.com>
15762
15763         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
15764         GC_USE_HMAC_MD5, respectively.
15765
15766         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
15767         (gc_md5): Fix typo.
15768
15769         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
15770
15771         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
15772
15773         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
15774
15775 2005-10-12  Bruno Haible  <bruno@clisp.org>
15776
15777         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
15778         Reported by Stepan Kasal <kasal@ucw.cz>.
15779
15780 2005-10-11  Simon Josefsson  <jas@extundo.com>
15781
15782         * tests/test-crc.c: New file.
15783
15784         * modules/crc, modules/crc-tests: New files.
15785
15786 2005-10-11  Simon Josefsson  <jas@extundo.com>
15787
15788         * m4/crc.m4: New file.
15789
15790 2005-10-11  Simon Josefsson  <jas@extundo.com>
15791
15792         * lib/gc.h: Add gc_hash and gc_hash_buffer.
15793
15794         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
15795
15796         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
15797
15798 2005-10-11  Simon Josefsson  <jas@extundo.com>
15799
15800         * lib/crc.h, lib/crc.c: New files.
15801
15802         * lib/gc.h (gc_hash_buffer): Add doc.
15803
15804 2005-10-11  Bruno Haible  <bruno@clisp.org>
15805
15806         * modules/c-strcasestr: New file.
15807         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
15808
15809 2005-10-11  Bruno Haible  <bruno@clisp.org>
15810
15811         * modules/c-strcase: New file.
15812         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
15813
15814 2005-10-11  Bruno Haible  <bruno@clisp.org>
15815
15816         * lib/strcasecmp.c: Include limits.h.
15817         (strcasecmp): Avoid integer overflow on exotic platforms.
15818         * lib/strncasecmp.c: Include limits.h.
15819         (strncasecmp): Avoid integer overflow on exotic platforms.
15820         Reported by Paul Eggert.
15821
15822 2005-10-11  Bruno Haible  <bruno@clisp.org>
15823
15824         * lib/c-strcasestr.h: New file, from GNU gettext.
15825         * lib/c-strcasestr.c: New file, from GNU gettext.
15826
15827 2005-10-11  Bruno Haible  <bruno@clisp.org>
15828
15829         * lib/c-strcase.h: New file, from GNU gettext.
15830         * lib/c-strcasecmp.c: New file, from GNU gettext.
15831         * lib/c-strncasecmp.c: New file, from GNU gettext.
15832
15833 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15834
15835         * modules/mempcpy (License): GPL -> LGPL.
15836         * modules/strchrnul (License): Likewise.
15837         * modules/sysexits (License): Likewise.
15838
15839 2005-10-08  Simon Josefsson  <jas@extundo.com>
15840
15841         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
15842
15843 2005-10-07  Simon Josefsson  <jas@extundo.com>
15844
15845         * m4/memxor.m4: Remove gl_C_RESTRICT call.
15846
15847 2005-10-06  Simon Josefsson  <jas@extundo.com>
15848
15849         * tests/test-hmac-md5.c: New file.
15850
15851         * modules/hmac-md5-tests: New file.
15852
15853         * modules/hmac-md5: New file.
15854
15855 2005-10-06  Simon Josefsson  <jas@extundo.com>
15856
15857         * m4/hmac-md5.m4: New file.
15858
15859         * m4/memxor.m4: Require gl_C_RESTRICT.
15860
15861 2005-10-06  Simon Josefsson  <jas@extundo.com>
15862
15863         * lib/memxor.c (memxor): Avoid casts and warnings.
15864
15865 2005-10-06  Simon Josefsson  <jas@extundo.com>
15866
15867         * lib/hmac-md5.c: New file.
15868
15869         * lib/hmac.h: New file.
15870
15871 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15872
15873         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
15874         promotes to int, not unsigned int, to catch the AIX 5.3
15875         compiler bug.
15876
15877 2005-10-05  Simon Josefsson  <jas@extundo.com>
15878
15879         * modules/memxor: New file.
15880
15881         * modules/iconv (Files): Move config.rpath to havelib, it is used
15882         there.
15883
15884         * modules/havelib (Files): Add config.rpath.
15885
15886 2005-10-05  Simon Josefsson  <jas@extundo.com>
15887
15888         * m4/memxor.m4: New file.
15889
15890 2005-10-05  Simon Josefsson  <jas@extundo.com>
15891
15892         * lib/memxor.c (memxor): Fix compiler error.
15893
15894         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
15895         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
15896
15897         * lib/memxor.h, lib/memxor.c: New files.
15898
15899         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
15900         we assume all systems have it, suggested by Jim Meyering
15901         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
15902         any systems lack sys/socket.h; mingw32 is known to lack it, but we
15903         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
15904         same reasons.
15905
15906 2005-10-05  Simon Josefsson  <jas@extundo.com>
15907
15908         * config/srclist.txt: Add glibc bug 1423 for md5.h.
15909
15910 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
15911
15912         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
15913         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
15914         needed, since the source code now assumes these .h files.
15915
15916 2005-10-05  Derek Price  <derek@ximbiot.com>
15917
15918         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
15919
15920 2005-10-05  Bruno Haible  <bruno@clisp.org>
15921
15922         * modules/stdint (License): Change to LGPL.
15923
15924 2005-10-04  Simon Josefsson  <jas@extundo.com>
15925
15926         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
15927         D. Baushke" <mdb@gnu.org>.
15928
15929 2005-10-04  Bruno Haible  <bruno@clisp.org>
15930
15931         * lib/verify.h (verify_true): Provide alternative definition for C++.
15932
15933 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
15934
15935         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
15936         (SSIZE_MAX): New macro, if not already defined.
15937         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
15938         than 2 GiB.
15939
15940 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
15941
15942         Sync from coreutils.
15943         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
15944         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
15945         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
15946         ULLONG_MAX doesn't work with 2.7.2.1.
15947
15948 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
15949
15950         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
15951         From Ben Pfaff.
15952
15953         * modules/exclude (Depends-on): Depend on verify.
15954         * modules/strtoimax (Depends-on): Likewise.
15955         * modules/utimecmp (Depends-on): Likewise.
15956
15957 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
15958
15959         * lib/exclude.c: Include verify.h.
15960         (verify): Remove.  All callers changed to use verify.h's version.
15961         * lib/strtoimax.c: Likewise.
15962         * lib/utimecmp.c: Likewis.e
15963
15964         Sync from coreutils.
15965         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
15966         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
15967         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
15968         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
15969         bother returning ENOSYS if settimeofday or stime fails; just let
15970         them return whatever errno they want to return.
15971         * lib/utimens.c: Include unistd.h, for dup2.
15972         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
15973         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
15974
15975 2005-10-02  Jim Meyering  <jim@meyering.net>
15976
15977         Sync from coreutils.
15978         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
15979         from glibc-2.2.5 that fails for read-only files.
15980
15981 2005-10-02  Jim Meyering  <jim@meyering.net>
15982
15983         Sync from coreutils.
15984         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
15985         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
15986         `#if HAVE_CONFIG_H'.
15987         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
15988         Remove AT_FDCWD test.
15989         Do not consume the fd unless successful.
15990         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
15991         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
15992         block, so that we don't even try to compile it if settimeofday is
15993         available.  This works around a compilation failure on OSF1 V5.1,
15994         due to stime requiring a `long int*' while tv_sec is `int'.
15995
15996 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
15997
15998         Sync from coreutils.
15999         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
16000         against `yes', rather than just testing for nonempty.
16001
16002 2005-10-01  Simon Josefsson  <jas@extundo.com>
16003
16004         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
16005         and Darwin.
16006
16007         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
16008         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
16009         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
16010         freeaddrinfo and gai_strerror are declared by the POSIX headers.
16011         Check if struct addrinfo is declared.
16012
16013 2005-10-01  Simon Josefsson  <jas@extundo.com>
16014
16015         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
16016         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
16017         AI_* and EAI_* definitions.  Protect function declarations.
16018
16019 2005-10-01  Jim Meyering  <jim@meyering.net>
16020
16021         Sync from coreutils.
16022
16023         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
16024         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
16025         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
16026         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16027         in the inet and nsl libraries.  Required on Solaris 5.7.
16028
16029 2005-10-01  Jim Meyering  <jim@meyering.net>
16030
16031         Sync from coreutils.
16032         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
16033         in the inet and nsl libraries.  Required on Solaris 5.7.
16034
16035 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
16036
16037         * lib/getdelim.c (getdelim): Remove unused variables.
16038
16039 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
16040
16041         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
16042         so that the code works even with ancient cpp.  Portability problem
16043         with GCC 2.7.2.1 reported by Thomas M.Ott.
16044
16045 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
16046
16047         * modules/regex (Depends-on): Add strcase.
16048
16049         * modules/gethostname (Licence): Change from GPL to LGPL, since
16050         gethostname.c is a trivial implementation of a standard library
16051         function.
16052         * modules/poll (License): Change from GPL to LGPL, since it's
16053         derived from LGPL code.
16054
16055 2005-09-27  Jim Meyering  <jim@meyering.net>
16056
16057         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
16058         HAVE_CONFIG_H.
16059
16060         * lib/intprops.h (signed_type_or_expr__): Define.
16061         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
16062         for unsigned types.
16063
16064 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
16065
16066         * lib/verify.h (verify_expr): Remove, replacing with:
16067         (verify_true): New macro that returns true instead of void.
16068         (verify_type__): Remove.
16069         (verify): Use verify_true rather than verify_type__.
16070
16071 2005-09-26  Bruno Haible  <bruno@clisp.org>
16072
16073         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
16074         is necessary.
16075         (lib_SOURCES): Remove mbchar.c.
16076         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
16077         (Files): Add m4/mbrtowc.m4.
16078         * modules/mbiter: Likewise.
16079         * modules/mbuiter: Likewise.
16080
16081 2005-09-26  Bruno Haible  <bruno@clisp.org>
16082
16083         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
16084         compile mbchar.c if they are not both present.
16085         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
16086         * m4/mbiter.m4 (gl_MBITER): Likewise.
16087         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
16088         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
16089         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
16090
16091 2005-09-25  Jim Meyering  <jim@meyering.net>
16092
16093         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
16094         also uses socklen_t.
16095
16096 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
16097
16098         * lib/utimens.c (ENOSYS): Define if not already defined.
16099         (futimens): Support having a null PATH if the file descriptor
16100         is nonnegative.
16101
16102         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
16103         Remove.
16104         (__attribute): Define to empty unless GCC 3.1 or later.
16105         This works around a core dump on OpenBSD 3.4, which has GCC
16106         2.95.3, which dumps core when given __attribute__(()).  It also
16107         simplifies other tests, since we really don't want to bother with
16108         worrying about which ancient version of GCC supported what.
16109         Original problem reported by Yoann Vandoorselaere, with part of
16110         the fix suggested by Derek Price.
16111
16112 2005-09-24  Jim Meyering  <jim@meyering.net>
16113
16114         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
16115         so we can once again use a positive bitfield width of 1 -- now we
16116         don't have to explain why we were using a bitfield width of 2.
16117
16118 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16119
16120         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
16121         and similarly for the other external symbols.  Problem reported
16122         by James Gallager.
16123
16124         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
16125         bug reported by Jim Meyering.
16126
16127         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
16128         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
16129         not needed, since socklen is a prerequisite module.
16130
16131 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
16132
16133         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
16134         Problem reported by Eric Blake.
16135         (getaddrinfo): Initialize se so that it's not garbage.
16136         Redo internal storage allocation so that it doesn't make unportable
16137         assumptions about alignment.
16138         Fix a memory leak.
16139
16140         * lib/utimens.c (futimens): Use futimesat if available.
16141         Prefer it to futimes since it doesn't have the futimes bug.
16142
16143         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
16144         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
16145         Instead, declare a function that returns a pointer to an array,
16146         and use verify_type__ to declare the size of the array.
16147         Problem and germ of a solution reported by Bruno Haible.
16148         (verify_type__): Use 2, not 1, for bitfield size, to avoid
16149         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
16150
16151 2005-09-23  Jim Meyering  <jim@meyering.net>
16152
16153         Sync from coreutils.
16154         Correct build failure (socklen_t not defined) on at least
16155         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
16156         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
16157
16158 2005-09-23  Jim Meyering  <jim@meyering.net>
16159
16160         * modules/getaddrinfo (Depends-on): Add socklen.
16161
16162 2005-09-23  Bruno Haible  <bruno@clisp.org>
16163
16164         * tests/test-verify.c: New file.
16165
16166 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16167
16168         Sync from coreutils.
16169
16170         * modules/argmatch (Depends-on): Add verify.
16171         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
16172         unistd-safer.
16173         * modules/save-cwd (Depends-on): Likewise.
16174
16175         * modules/openat (Files): Add lib/openat-die.c.
16176         (Depends-on): Remove error, exitfail.
16177         Add dirname.
16178
16179         * modules/verify: New file.
16180         * MODULES.html.sh (Diagnostics <assert.h>): New section,
16181         with "verify" module.
16182
16183 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16184
16185         Sync from coreutils.
16186
16187         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
16188         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
16189         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
16190         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
16191         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
16192         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
16193         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
16194         Don't bother checking for string.h, stdlib.h, unistd.h.
16195         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
16196         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
16197         module's job.
16198         * m4/jm-macros.m4 (gl_MACROS): Likewise.
16199         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
16200
16201         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
16202         (gl_GETDATE): Use it.
16203
16204         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
16205
16206 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16207
16208         Sync from coreutils.
16209
16210         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
16211         stat-time.h.
16212         * lib/argmatch.h: Include verify.h
16213         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
16214         (ARGMATCH_ASSERT): Remove; unused.
16215         * lib/canonicalize.c: Assume STDC_HEADERS.
16216         * lib/exclude.c: Include "strcase.h".
16217         * lib/regex_internal.h [!defined _LIBC]: Likewise.
16218         * lib/getusershell.c: Include stdio--.h rather than stdio.h
16219         and stdio-safer.h.
16220         (getusershell): Call fopen, not fopen_safer.
16221         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
16222         Do not include unistd-safer.h.
16223         (save_cwd): Don't call fd_safer; no longer needed
16224         now that we include fcntl--.h.
16225
16226         * lib/getdate.y (relative_time): New type.
16227         (RELATIVE_TIME_0): New constant.
16228         (parser_control): Use relative_time instead of doing it ourselves.
16229         (%union): Add new relative_time rel member.
16230         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
16231         Now typeless.
16232         (relunit, relunit_snumber): Now of type rel.
16233         (zone, rel, relunit, get_date): Adjust to above changes.
16234
16235         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
16236         Do not include unistd-safer.h.
16237         (getloadavg): Don't call fd_safer; no longer needed
16238         now that we include fcntl--.h.
16239
16240         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
16241         (make_dir_parents): Treat ENOSYS like EEXIST.
16242
16243         Improve quality of diagnostics on restore_cwd failure.
16244         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
16245         (make_dir_parents): Last arg is now int * (for errno), not bool *.
16246         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
16247         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
16248         each time through the loop.  Do not diagnose restore_cwd failure;
16249         that is the caller's job (and perhaps the caller does not care).
16250
16251         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
16252         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
16253         If the file already exists but is not a directory, don't bother
16254         to try to make its parents.
16255         Close potential file descriptor leak if we can't chdir("/") (!).
16256         Don't always return true if chdir($PWD) fails; return true only
16257         if the requested action was done successfully (except for the
16258         chdir($PWD)).
16259         Don't log final directory unless we actually made it.
16260         Refactor to avoid duplicate code to fix up permissions.
16261         Don't attempt to fix up parent permissions if chdir($PWD) fails.
16262
16263         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
16264         to make it a bit faster and (I hope) clearer.
16265         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
16266         Fix bug in formats like %2N.
16267
16268         * lib/verify.h: New file.
16269
16270 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
16271
16272         Sync from coreutils.
16273         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
16274
16275 2005-09-22  Jim Meyering  <jim@meyering.net>
16276
16277         Sync from coreutils.
16278
16279         * m4/lstat.m4 (gl_FUNC_LSTAT):
16280         Use AC_LIBSOURCES to require lstat.c and lstat.h.
16281         Remove obsolete comment.
16282         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
16283         * m4/xstrtod.m4: Likewise.
16284
16285         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
16286
16287 2005-09-22  Jim Meyering  <jim@meyering.net>
16288
16289         Sync from coreutils.
16290
16291         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
16292
16293         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
16294         the .tm_year member, since otherwise gcc-4.0 would now warn about
16295         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
16296
16297         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
16298         order to avoid an unsuppressible warning from gcc on 64-bit systems.
16299
16300         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
16301         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
16302         when run in a time zone for which daylight savings time is in effect
16303         for the starting date.
16304
16305         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
16306         stop us from restricting permissions of just-created absolute-named
16307         directories.
16308         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
16309         to restore initial working directory.
16310         * lib/mkdir-p.c (make_dir_parents): New parameter:
16311         different_working_dir, to tell caller if/when we change the working
16312         directory and are unable to return to the initial one.
16313         * lib/mkdir-p.h (make_dir_parents): Update prototype.
16314         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
16315         `return false'.  This fixes a bug introduced on 2004-07-30.
16316
16317         * lib/openat.c (fdopendir): Be sure to close the supplied
16318         file descriptor before returning.  This makes our replacement
16319         implementation a little closer to Solaris's, where fdopendir
16320         ties the file descriptor to the returned DIR* pointer.
16321         * lib/openat.c (unlinkat): New function.
16322         * lib/openat.h (unlinkat): Add prototype.
16323         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
16324         (openat_restore_fail): Rename from openat_restore_die.
16325         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
16326
16327         Provide an alternative to exiting immediately upon save_cwd or
16328         restore_cwd failure.  Now, an application can arrange e.g.,
16329         to perform a longjump in that case.
16330         * lib/openat.c: Include dirname.h.
16331         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
16332         (rpl_openat, fdopendir, fstatat): Call openat_save_die
16333         and openat_restore_die rather than calling error directly.
16334         Don't include "error.h" or "exitfail.h"; they're no longer needed.
16335
16336         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
16337         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
16338         define.
16339
16340         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
16341         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
16342                             int utc, int nanoseconds);
16343         Background:
16344         date should not have to allocate a megabyte of virtual memory to
16345         handle a format argument like +%1048575T.  When implemented with
16346         strftime, it must allocate such a buffer, use strftime to fill it
16347         in, print it, then free it.
16348         With fprintftime, it simply prints everything and exits.
16349         With no need for memory allocation, that's one fewer way to fail.
16350         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
16351         optional field width, not before, so we accept %9:z, not %:9z.
16352         (my_strftime): Be sure to use L_('x') for literals.
16353
16354         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
16355         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
16356         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
16357         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
16358         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
16359         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
16360         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
16361         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
16362         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
16363         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
16364         * lib/xgethostname.c, lib/xreadlink.c:
16365         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
16366
16367         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
16368         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
16369         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
16370         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
16371         and don't include <sys/file.h>).
16372
16373 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
16374
16375         Sync from coreutils.
16376
16377         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
16378         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
16379         [!LDAV_DONE]: Avoid unused variable warning.
16380
16381 2005-09-21  Bruno Haible  <bruno@clisp.org>
16382
16383         * lib/unicodeio.h (unicode_to_mb): New declaration.
16384
16385 2005-09-20  Derek Price  <derek@ximbiot.com>
16386
16387         * lib/getaddrinfo.c: Don't include <netdb.h> included from
16388         getaddrinfo.h.
16389
16390 2005-09-20  Bruno Haible  <bruno@clisp.org>
16391
16392         * gnulib-tool: Remove trailing slashes from the values specified for
16393         --source-base, --m4-base, --tests-base, --aux-dir.
16394         Suggested by Simon Josefsson <jas@extundo.com>.
16395
16396 2005-09-20  Bruno Haible  <bruno@clisp.org>
16397
16398         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
16399         func_modules_to_filelist, func_import, func_create_testdir): Make all
16400         sorting results locale-independent, so that gnulib-cache.m4 doesn't
16401         change when gnulib-tool is invoked in a different locale.
16402
16403 2005-09-19  Simon Josefsson  <jas@extundo.com>
16404
16405         * m4/socklen.m4: Fix typo.
16406
16407 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
16408
16409         Use a consistent style for including <config.h>.
16410         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
16411         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
16412         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
16413         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
16414         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
16415         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
16416         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
16417         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
16418         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
16419         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
16420         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
16421         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
16422         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
16423         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
16424         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
16425         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
16426         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
16427         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
16428         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
16429         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
16430         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
16431         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
16432         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
16433         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
16434         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
16435         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
16436         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
16437         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
16438         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
16439         lib/xstrtoumax.c, lib/yesno.c:
16440         Standardize inclusion of config.h.
16441         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
16442         lib/inttostr.h:  Removed inclusion of config.h from header files.
16443         * lib/inttostr.c:  Adjusted in-tree users.
16444         * lib/timespec.h: Remove superfluous warning to include config.h.
16445         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
16446         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
16447         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
16448         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
16449         config.h with HAVE_CONFIG_H.
16450
16451 2005-09-19  Jim Meyering  <jim@meyering.net>
16452
16453         * modules/pathmax (License): Change to LGPL.
16454
16455 2005-09-19  Derek Price  <derek@ximbiot.com>
16456
16457         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
16458
16459 2005-09-19  Bruno Haible  <bruno@clisp.org>
16460
16461         * gnulib-tool (import): Provide default for --tests-base.
16462
16463 2005-09-19  Bruno Haible  <bruno@clisp.org>
16464
16465         * doc/quote.texi: New file, extracted from gnulib.texi.
16466         * doc/ctime.texi: New file, extracted from gnulib.texi.
16467         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
16468         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
16469         * doc/gnulib.texi: Include them.
16470
16471 2005-09-18  Bruno Haible  <bruno@clisp.org>
16472
16473         Portability fix.
16474         * gnulib-tool (func_readlink): New function.
16475         (func_ln_if_changed): Use it.
16476
16477 2005-09-18  Bruno Haible  <bruno@clisp.org>
16478
16479         * gnulib-tool: Support --with-tests also with --import.
16480         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
16481         (func_import): Use variables $testsbase and $inctests. Emit a
16482         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
16483         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
16484         SUBDIRS += $testsdir.
16485         (func_create_testdir): Update.
16486
16487 2005-09-18  Bruno Haible  <bruno@clisp.org>
16488
16489         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
16490         instead of $dry_run.
16491         (func_cp_if_changed, func_mv_if_changed): Remove functions.
16492         (func_ln_if_changed): Don't handle dry-run here.
16493         (func_import): In dry-run mode, detect more precisely which actions
16494         would be performed, and don't use "...ing" verbs.
16495
16496 2005-09-18  Bruno Haible  <bruno@clisp.org>
16497
16498         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
16499         (func_import): Use join on two temporary files instead of three nested
16500         loops, in order to determine which files are new or old.
16501
16502 2005-09-18  Bruno Haible  <bruno@clisp.org>
16503
16504         * gnulib-tool (func_import): Comment out code that spits out the
16505         new files with --dry-run.
16506
16507 2005-09-18  Bruno Haible  <bruno@clisp.org>
16508
16509         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
16510
16511 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16512
16513         * lib/stat-time.h: New file.
16514         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
16515         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
16516         in a different way.
16517         (timespec_cmp): New function.
16518         * lib/utimecmp.c: Include stat-time.h.
16519         (SYSCALL_RESOLUTION): Depend on whether various struct stat
16520         members exist, not on the obsolescent ST_MTIM_NSEC.
16521         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
16522
16523 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16524
16525         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
16526
16527 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
16528
16529         * MODULES.html.sh (File system functions): Add stat-time.
16530         * modules/stat-time: New file.
16531         * modules/timespec (Files): Remove m4/st_mtim.m4; this
16532         is now done in a different way, by the stat-time module.
16533         * modules/utimecmp (Depends-on): Add stat-time.
16534
16535 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
16536
16537         * m4/st_mtim.m4: Remove.  Superseded by...
16538         * m4/stat-time.m4: New file.
16539         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
16540         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
16541
16542 2005-09-15  Derek Price  <derek@ximbiot.com>
16543
16544         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
16545
16546 2005-09-15  Derek Price  <derek@ximbiot.com>
16547
16548         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
16549         * lib/regex_internal.c: Ditto, using this...
16550         (__GNUC_PREREQ): ...new macro.
16551         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
16552         using...
16553         (__GNUC_PREREQ): ...this new macro.
16554
16555         * lib/strstr.h: Include string.h. Define strstr as a macro here.
16556
16557 2005-09-15  Derek Price  <derek@ximbiot.com>
16558             Paul Eggert  <eggert@cs.ucla.edu>
16559
16560         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
16561         changes, consolidating in...
16562         * lib/regex_internal.h: ...this file.
16563
16564 2005-09-13  Jim Meyering  <jim@meyering.net>
16565
16566         * lib/canon-host.c: Filter through gnu indent and reword comments
16567         slightly.
16568         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
16569
16570 2005-09-13  Derek Price  <derek@ximbiot.com>
16571
16572         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
16573         failure.
16574         Reported by Jim Meyering  <jim@meyering.net>.
16575
16576 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16577
16578         * lib/base64.c: Typo.
16579         (base64_encode): Put b64str in initialized data section.
16580
16581 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
16582
16583         Merge glibc and coreutils changes into gnulib, plus a few
16584         extra fixes.
16585         * lib/md5.c: Use #error rather than a string.
16586         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
16587         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
16588         (__attribute__): Define to empty for non recent-GCC.
16589         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
16590         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
16591         Renamed from their non-__ counterparts, with new macros replacing
16592         them if not _LIBC.  Add __THROW attribute.
16593         (rol): Remove.
16594         (struct md5_ctx): Align buffer if using GCC.
16595         * lib/sha1.h (struct sha1_ctx): Likewise.
16596         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
16597         The old name was backwards.
16598         (NOTSWAP): Remove; not used.
16599         (rol): New macro, moved here from md5.h.
16600         (sha1_process_block): Remove a FIXME that doesn't make sense.
16601
16602 2005-09-12  Derek Price  <derek@ximbiot.com>
16603
16604         Return usable errors from canon-host.
16605         * lib/canon-host.h: New file.
16606         * lib/canon-host.c (canon_host): Wrap...
16607         (canon_host_r): ...this new function, which now relies exclusively on
16608         getaddrinfo.
16609         (ch_strerror): New function.
16610         (last_cherror): New global.
16611         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
16612         interface.
16613         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
16614         void *.
16615         (freeaddrinfo): Free ai->ai_canonname when set.
16616
16617 2005-09-12  Derek Price  <derek@ximbiot.com>
16618
16619         Make canon-host require getaddrinfo.
16620         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
16621         AC_LIBSOURCE canon-host.h.  Call...
16622         (gl_PREREQ_CANON_HOST): ...this new function, which requires
16623         gl_GETADDRINFO.
16624         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
16625
16626 2005-09-12  Derek Price  <derek@ximbiot.com>
16627
16628         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
16629         LGPL.
16630         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
16631
16632 2005-09-12  Derek Price  <derek@ximbiot.com>
16633
16634         * lib/gai_strerror.c: Include config.h when available.  Include
16635         getaddrinfo.h before other headers to test interface.
16636         Reported by Larry Jones <lawrence.jones@ugs.com>.
16637
16638 2005-09-12  Derek Price  <derek@ximbiot.com>
16639             Paul Eggert  <eggert@cs.ucla.edu>
16640
16641         * modules/glob (Files): Add glob-libc.h.
16642
16643 2005-09-12  Derek Price  <derek@ximbiot.com>
16644             Paul Eggert  <eggert@cs.ucla.edu>
16645
16646         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
16647         glob_.h, glob-libc.h.
16648         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
16649
16650 2005-09-12  Derek Price  <derek@ximbiot.com>
16651             Paul Eggert  <eggert@cs.ucla.edu>
16652
16653         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
16654         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
16655         protecting things that should be done only in gnulib contexts.
16656         * lib/glob_.h: New file, containing only the glob things needed for
16657         gnulib.
16658         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
16659         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
16660         (glob, globfree, glob_pattern_p): Now defined simply in terms of
16661         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
16662         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
16663         and to respect the namespace rules better.
16664
16665 2005-09-08  Simon Josefsson  <jas@extundo.com>
16666
16667         * modules/socklen: New file.
16668
16669 2005-09-08  Simon Josefsson  <jas@extundo.com>
16670
16671         * m4/socklen.m4: New file.
16672
16673 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
16674
16675         * modules/utimens (Files): Add m4/utimbuf.m4, since
16676         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
16677         Reported by Sergey Poznyakoff.
16678
16679 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
16680
16681         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
16682         definitions, since that's the preferred style in glibc.
16683         Fix a minor spacing issue, and update copyright notice to match
16684         glibc's.
16685
16686 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
16687
16688         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
16689
16690 2005-09-06  Simon Josefsson  <jas@extundo.com>
16691
16692         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
16693         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
16694
16695 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
16696
16697         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
16698         warning.
16699
16700 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
16701
16702         * config/srclist.txt: Add glibc bug 1302.
16703
16704 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
16705
16706         Change bitset word type from unsigned int to unsigned long int,
16707         as this has better performance on typical 64-bit hosts.
16708         Port bitset code to hosts with unusual word sizes.
16709         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
16710         (build_collating_symbol):
16711         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
16712         argument is a bitset.  This is merely a style issue, but it makes
16713         it clearer that an entire array is expected.
16714         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
16715         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
16716         Port to the case where bitset_word is not the same as unsigned int.
16717         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
16718         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
16719         Likewise.
16720         * lib/regexec.c (check_dst_limits_calc_pos_1,
16721         check_subexp_matching_top):
16722         (build_trtable, group_nodes_into_DFAstates):
16723         Likewise.
16724         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
16725         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
16726         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
16727         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
16728         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
16729         * lib/regcomp.c (optimize_subexps, lower_subexp):
16730         Work even if bitset_word has holes in its bitwise representation.
16731         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
16732         * lib/regexec.c (check_dst_limits_calc_pos_1,
16733         check_subexp_matching_top):
16734         Likewise.
16735         * lib/regex_internal.c (re_string_reconstruct):
16736         Don't assume UCHAR_MAX == 255.
16737         * lib/regex_internal.h (bitset_set_all): Likewise.
16738         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
16739         All uses changed.
16740         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
16741         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
16742         All uses changed.
16743         (BITSET_WORD_MAX): New macro.
16744         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
16745         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
16746         (bitset_empty, bitset_copy):
16747         Prefer sizeof (bitset) to multiplying it out ourselves.
16748         (bitset_not_merge): Remove; unused.
16749         (bitset_contain): Return bool, not unsigned int with one bit on.
16750         All callers changed.
16751         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
16752         alignment than re_node_set; do this by defining a new internal
16753         type struct dests_alloc and using it to allocate memory.
16754
16755 2005-09-05  Bruno Haible  <bruno@clisp.org>
16756
16757         * gnulib-tool (func_import): Fix comparison in handling of symbolic
16758         links.
16759
16760 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
16761
16762         * modules/size_max (Makefile.am): Add size_max.h
16763
16764 2005-09-04  Derek Price  <derek@ximbiot.com>
16765
16766         * gnulib-tool (func_import): Fix reversed $symbolic logic.
16767
16768 2005-09-03  Simon Josefsson  <jas@extundo.com>
16769
16770         * gnulib-tool: Fix typo.
16771
16772 2005-09-03  Simon Josefsson  <jas@extundo.com>
16773
16774         * config/srclist.txt: Add glibc bug 1293.
16775
16776 2005-09-03  Derek Price  <derek@ximbiot.com>
16777
16778         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
16779         From Larry Jones <lawrence.jones@ugs.com>.
16780
16781 2005-09-02  Simon Josefsson  <jas@extundo.com>
16782
16783         * modules/socklen: New file.
16784
16785 2005-09-02  Simon Josefsson  <jas@extundo.com>
16786
16787         * modules/havelib: New module.
16788
16789         * modules/gettext, modules/iconv, modules/lock, modules/readline:
16790         Use havelib.
16791
16792 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
16793
16794         Check for arithmetic overflow when calculating sizes, to prevent
16795         some buffer-overflow issues.  These patches are conservative, in the
16796         sense that when I couldn't determine whether an overflow was possible,
16797         I inserted a run-time check.
16798         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
16799         macros.
16800         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
16801         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
16802         (re_xnrealloc, re_x2nrealloc): New inline functions.
16803         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
16804         parse_bracket_exp):
16805         (build_equiv_class, build_charclass): Check for arithmetic overflow
16806         in size expression calculations.
16807         * lib/regex_internal.c (re_string_realloc_buffers):
16808         (build_wcs_upper_buffer, re_node_set_add_intersect):
16809         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
16810         (re_dfa_add_node, register_state): Likewise.
16811         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
16812         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
16813         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
16814         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
16815
16816 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
16817
16818         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16819         m4/ulonglong.m4.  Problem reported by Martin Lambers.
16820
16821 2005-09-02  Bruno Haible  <bruno@clisp.org>
16822
16823         Support for lib vs. lib64 distinction on biarch platforms.
16824         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
16825         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
16826         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
16827
16828 2005-09-02  Bruno Haible  <bruno@clisp.org>
16829
16830         * gnulib-tool (import): In the other first-use case, provide defaults
16831         as well.
16832
16833 2005-09-02  Bruno Haible  <bruno@clisp.org>
16834
16835         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
16836         patches not yet found in the latest gettext release.
16837
16838 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
16839
16840         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
16841         to avoid a collision with bits/local_lim.h in glibc.
16842         All uses changed.  Problem reported by Dmitry V. Levin in
16843         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
16844
16845         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
16846         bugs in int versus size_t comparisons.
16847         (re_string_context_at): Fix bug where the code assumed that
16848         Idx is signed.
16849
16850         Use bool where appropriate.
16851         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
16852         All callers changed.
16853         (calc_eclosure_iter): Likewise, for ROOT arg.
16854         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
16855         (build_charclass_op): Likewise, for NON_MATCH arg.
16856         * lib/regex_internal.c (re_string_allocate, re_string_construct):
16857         (re_string_construct_common): Likewise, for ICASE arg.
16858         * lib/regexec.c (re_search_2_stub, re_search_stub):
16859         Likewise, for RET_LEN arg.
16860         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
16861         (set_regs): Likewise, for FL_BACKTRACK arg.
16862         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
16863         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
16864         (calc_eclosure_iter, parse_bracket_exp):
16865         Use bool for internal variables that are booleans.
16866         * lib/regexec.c (re_search_internal, check_matching,
16867         proceed_next_node):
16868         (set_regs, build_sifted_states, sift_states_bkref):
16869         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
16870         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
16871         (find_collation_sequence_value):
16872         Likewise.
16873         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
16874         (re_node_set_compare):
16875         Return bool, not int. All callers changed.
16876         * lib/regexec.c (check_halt_node_context, check_dst_limits):
16877         (build_trtable, check_node_accept): Likewise.
16878         * lib/regex_internal.h: Include stdbool.h.
16879
16880         Fix bugs uncovered when converting to bool.
16881         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
16882         failure instead of charging ahead blindly.
16883         * lib/regex_internal.c (register_state): Likewise.
16884         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
16885         for freeing internal storage.
16886         (group_nodes_into_DFA_states): Use unsigned int, not int, for
16887         bitset pieces used as boolean, to avoid undefined behavior
16888         on hosts that do int overflow checking.
16889
16890 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
16891
16892         * config/srclist.txt: Add glibc bugs 1285-1287.
16893
16894 2005-09-01  Jim Meyering  <jim@meyering.net>
16895
16896         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
16897         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
16898         Require gl_STAT_MACROS, too.
16899
16900 2005-09-01  Bruno Haible  <bruno@clisp.org>
16901
16902         * gnulib-tool (import): In the first-use case, provide defaults.
16903
16904 2005-09-01  Bruno Haible  <bruno@clisp.org>
16905
16906         * gnulib-tool (func_import): Remove the .tmp files.
16907
16908 2005-09-01  Bruno Haible  <bruno@clisp.org>
16909
16910         * gnulib-tool (func_import): Fix handling of symbolic links.
16911
16912 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
16913
16914         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
16915         old glibc regex code mishandles strings longer than 2**31 bytes.
16916         This patch fixes this when the regex code is used in gnulib
16917         (i.e., outside glibc).
16918
16919         This patch should not affect the use of the regex code inside
16920         glibc.  No doubt this problem also needs to be handled for glibc
16921         as well, but the result will be an incompatible change to the
16922         glibc ABI, and the old ABI will have to be supported too.  That
16923         can be the the subject for another patch.
16924
16925         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
16926         governing whether the rest of this patch is active.  By default,
16927         the macro is disabled and the patch has no effect.
16928         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
16929         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
16930         (struct re_pattern_buffer, re_search, re_search_2, re_match):
16931         (re_match_2, re_set_registers): Use the new types.
16932         * lib/regex_internal.h (Idx, re_hashval_t): New types.
16933         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
16934         New macros.
16935         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
16936         (re_string_context_at, bin_tree_t, re_dfastate_t):
16937         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
16938         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
16939         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
16940         (re_string_char_size_at, re_string_wchar_at):
16941         (re_string_elem_size_at):
16942         Use the new types and macros to port to 64-bit hosts.
16943         Use unsigned types for internal values, so that the code
16944         mostly works even for arrays larger than SSIZE_MAX.
16945         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
16946         (search_duplicated_node, calc_eclosure_iter, fetch_number):
16947         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
16948         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
16949         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
16950         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
16951         (calc_inveclosure, parse_dup_op, build_range_exp):
16952         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
16953         (fetch_number, create_token_tree, mark_opt_subexp):
16954         Likewise.
16955         * lib/regex_internal.c (re_string_construct_common,
16956         create_ci_newstate):
16957         (create_cd_newstate, re_string_allocate, re_string_construct):
16958         (re_string_realloc_buffers, build_wcs_upper_buffer):
16959         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
16960         (re_string_reconstruct, re_string_peek_byte_case):
16961         (re_string_fetch_byte_case, re_string_context_at):
16962         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
16963         (re_node_set_init_copy, re_node_set_add_intersect):
16964         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
16965         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
16966         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
16967         (re_acquire_state, re_acquire_state_context, register_state):
16968         Likewise.
16969         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
16970         search_cur_bkref_entry):
16971         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
16972         (re_search_internal, re_search_2_stub, re_search_stub)
16973         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
16974         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
16975         (update_cur_sifted_state, check_dst_limits):
16976         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
16977         (check_subexp_limits, sift_states_bkref, merge_state_array):
16978         (check_subexp_matching_top, get_subexp, get_subexp_sub):
16979         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
16980         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
16981         (expand_bkref_cache, check_node_accept_bytes):
16982         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
16983         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
16984         (acquire_init_state_context, check_halt_node_context):
16985         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
16986         (sift_states_backward, clean_state_log_if_needed):
16987         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
16988         (find_recover_state, transit_state_sb, transit_state_mb):
16989         (transit_state_bkref, build_trtable, match_ctx_clean):
16990         Likewise.
16991         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
16992         to work around an assumption that REG_MISSING is negative.
16993
16994         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
16995         (seek_collating_symbol_entry) [defined _LIBC]:
16996         (lookup_collation_sequence_value) [defined _LIBC]:
16997         (build_range_exp, build_collating_symbol) [defined _LIBC]:
16998         Use prototypes rather than old-style function definitions.
16999         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
17000         (transit_state_sb) [0]:
17001         (find_collation_sequence_value) [defined _LIBC]: Likewise.
17002
17003         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
17004         rm_eo.
17005
17006         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
17007         (optimize_subexps, lower_subexp):
17008         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
17009         since the signed shift might overflow.  Use 1u<<31 instead.
17010         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
17011         Likewise.
17012         * lib/regexec.c (check_dst_limits_calc_pos_1,
17013         check_subexp_matching_top): Likewise.
17014
17015         * lib/regcomp.c (optimize_subexps, lower_subexp):
17016         Use CHAR_BIT rather than 8, for clarity.
17017         * lib/regexec.c (check_dst_limits_calc_pos_1):
17018         (check_subexp_matching_top): Likewise.
17019         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
17020         have to worry about portability issues when shifting it left.
17021         Remove no-longer-needed test for table_size > 0.
17022         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
17023         in a word, as the resulting behavior is undefined.
17024         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
17025         in one case, a <= should have been an <, and in another case the
17026         whole test was missing.
17027         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
17028         the standard name CHAR_BIT.
17029         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
17030         this is not true on one's complement and signed-magnitude hosts.
17031
17032         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
17033         next_last_offset.
17034         (struct re_dfa_t): Remove unused member states_alloc.
17035         * lib/regcomp.c (init_dfa): Don't initialize unused members.
17036
17037 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17038
17039         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
17040         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
17041         and large-file glibc and in 32-bit large-file Solaris.
17042
17043 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17044
17045         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
17046         lengths fit in regoff_t; this isn't true if regoff_t is the same
17047         width as size_t.
17048         * lib/regex.c (re_search_internal): 5th arg is LAST_START
17049         (= START + RANGE) instead of RANGE.  This avoids overflow
17050         problems when regoff_t is the same width as size_t.
17051         All callers changed.
17052         (re_search_2_stub): Check for overflow when adding the
17053         sizes of the two strings.
17054         (re_search_stub): Check for overflow when adding START
17055         to RANGE; if it occurs, substitute the extreme value.
17056
17057 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
17058
17059         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
17060
17061 2005-08-31  Jim Meyering  <jim@meyering.net>
17062
17063         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
17064         a pointer-to-const.
17065         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
17066         (register_state): Likewise.
17067         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
17068         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
17069         (group_nodes_into_DFAstates): Likewise.
17070
17071 2005-08-31  Jim Meyering  <jim@meyering.net>
17072
17073         * check-module: Add a FIXME comment.
17074
17075 2005-08-31  Eric Blake  <ebb9@byu.net>
17076
17077         * modules/unistd-safer (Files): Add unistd--.h.
17078         * modules/stdio-safer (Files): Add stdio--.h.
17079
17080 2005-08-31  Derek Price  <derek@ximbiot.com>
17081
17082         * lib/getdelim.c (getdelim): Return EOF on EOF.
17083         Reported by Larry Jones <lawrence.jones@ugs.com>.
17084
17085 2005-08-31  Bruno Haible  <bruno@clisp.org>
17086
17087         Avoid unnecessary diffs in the generated lib/Makefile.am.
17088         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
17089         the generated files.
17090         (func_import): Don't set cmd.
17091
17092 2005-08-31  Bruno Haible  <bruno@clisp.org>
17093
17094         * lib/strstr.c: Include <stddef.h>, for NULL.
17095         * lib/strcasestr.c: Likewise.
17096         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
17097
17098 2005-08-31  Bruno Haible  <bruno@clisp.org>
17099
17100         * gnulib-tool: New option --macro-prefix.
17101         (func_import): Use macro_prefix.
17102         (import): Handle option --macro-prefix.
17103
17104 2005-08-31  Bruno Haible  <bruno@clisp.org>
17105
17106         * gnulib-tool (import): Rename most ac_* variables to cached_*.
17107         Also use new variables cached_lgpl, cached_libtool.
17108
17109 2005-08-31  Bruno Haible  <bruno@clisp.org>
17110
17111         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
17112         always instantiating them.
17113
17114 2005-08-31  Bruno Haible  <bruno@clisp.org>
17115
17116         * gnulib-tool (func_import): Read the previous cached settings
17117         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
17118         earlier added by gnulib but are now dropped. Warn when a gnulib file
17119         overwrites a non-gnulib file.
17120
17121 2005-08-31  Bruno Haible  <bruno@clisp.org>
17122
17123         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
17124         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
17125         projects that don't keep autogenerated files in CVS. Put into
17126         actioncmd only the specified modules, not the transitive closure.
17127
17128 2005-08-31  Bruno Haible  <bruno@clisp.org>
17129
17130         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
17131         Create directories that shall be filled.
17132         (import): Don't look for gl_* macros in configure.ac. Recurse across
17133         all directories containing a gnulib-cache.m4 files, if meaningful.
17134
17135 2005-08-31  Bruno Haible  <bruno@clisp.org>
17136
17137         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
17138         (import): Set seen_libtool when we see gl_LIBTOOL.
17139
17140 2005-08-31  Bruno Haible  <bruno@clisp.org>
17141
17142         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
17143         declaration macro definitions from generated gnulib.m4.
17144
17145 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
17146
17147         * lib/iconvme.h: Add prototype for iconv_alloc.
17148
17149 2005-08-29  Simon Josefsson  <jas@extundo.com>
17150
17151         * lib/iconvme.c: Fix errno.
17152
17153 2005-08-29  Bruno Haible  <bruno@clisp.org>
17154
17155         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
17156         that it works when the directory contains spaces.
17157
17158 2005-08-29  Bruno Haible  <bruno@clisp.org>
17159
17160         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
17161
17162 2005-08-29  Bruno Haible  <bruno@clisp.org>
17163
17164         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
17165         Emit more advice.
17166
17167 2005-08-29  Bruno Haible  <bruno@clisp.org>
17168         and Stepan Kasal  <kasal@ucw.cz>
17169
17170         * check-module: If more parameters are given, check each of them
17171         separately; add more exceptions, as noted by Jim Meyering.
17172         (check_module): New procedure.
17173         (%exempt_header): Now contains all exceptions.
17174
17175 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
17176
17177         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
17178
17179 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17180
17181         * lib/iconvme.c: Split iconv_string into iconv_alloc.
17182
17183 2005-08-28  Bruno Haible  <bruno@clisp.org>
17184
17185         * m4/gnulib-tool.m4: New file.
17186
17187 2005-08-27  Jim Meyering  <jim@meyering.net>
17188
17189         * modules/unistd-safer (Files): Add pipe-safer.c.
17190         * modules/fcntl-safer (Files): Add creat-safer.c.
17191
17192 2005-08-27  Jim Meyering  <jim@meyering.net>
17193
17194         * m4/stdlib-safer.m4: New file.  From coreutils.
17195         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
17196         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
17197         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
17198         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
17199         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
17200
17201 2005-08-27  Jim Meyering  <jim@meyering.net>
17202
17203         * lib/fopen-safer.c: Merge minor changes from coreutils.
17204         * lib/dup-safer.c: Likewise.
17205         * lib/fd-safer.c: Likewise.
17206
17207         Merge from coreutils.
17208         * lib/stdio--.h: New file.
17209         * lib/stdlib--.h: New file.
17210         * lib/mkstemp-safer.c: New file.
17211
17212         GNU tar needs these.
17213         * lib/pipe-safer.c: New file.
17214         * lib/creat-safer.c: New file.
17215         * lib/fcntl--.h (creat): Define to creat_safer.
17216         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
17217         * lib/unistd--.h (pipe): Define to pipe_safer.
17218         * lib/unistd-safer.h: Declare pipe_safer.
17219
17220 2005-08-26  Simon Josefsson  <jas@extundo.com>
17221
17222         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
17223         Haible <bruno@clisp.org>.
17224
17225 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
17226
17227         * lib/regex_internal.h: Remove all references to
17228         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
17229         or better.
17230         (bitset_not, bitset_merge, bitset_not_merge):
17231         (bitset_mask, re_string_allocate, re_string_construct):
17232         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
17233         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
17234         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
17235         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
17236         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17237         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17238         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
17239         (re_acquire_state_context):
17240         Remove unnecessary forward decls.
17241         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
17242         Put __attribute at function definition,
17243         now that the function decl has been removed.
17244         * lib/regex_internal.c (re_string_peek_byte_case):
17245         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
17246         Likewise.
17247
17248 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
17249
17250         * m4/regex.m4: Add AC_PREREQ(2.50).
17251         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
17252
17253 2005-08-25  Simon Josefsson  <jas@extundo.com>
17254
17255         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
17256         __fsetlocking.
17257
17258 2005-08-25  Simon Josefsson  <jas@extundo.com>
17259
17260         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
17261         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
17262         GLIBC specific code.
17263
17264 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17265
17266         Make regex safe for g++.  This fixes one real bug (an "err"
17267         that should have been "*err").  g++ problem reported by
17268         Sam Steingold.
17269         * lib/regex_internal.h (re_calloc): New macro, consistent with
17270         re_malloc etc.  All callers of calloc changed to use re_calloc.
17271         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
17272         not int.  All callers changed.
17273         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
17274         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
17275         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
17276         (find_recover_state): Change "err" to "*err"; this fixes what
17277         appears to be a real bug.
17278         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
17279         versus int.
17280
17281 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17282
17283         * modules/regex (Depends-on): Add malloc, since the code
17284         assumes that !malloc(0) means failure.
17285
17286 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17287
17288         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
17289
17290         alloca modernization/simplification for regex.
17291         * lib/regex.c: Remove portability cruft for alloca.  This no longer
17292         needs to be at the start of the file, and can be moved into
17293         regex_internal.h and simplified.
17294         * lib/regex_internal.h: Include <alloca.h>.
17295         (__libc_use_alloca) [!defined _LIBC]: New macro.
17296         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
17297         now works outside glibc.
17298
17299 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
17300
17301         * config/srclist.txt: Add glibc bugs 1241, 1245.
17302
17303 2005-08-25  Jim Meyering  <jim@meyering.net>
17304
17305         * lib/open-safer.c: Include <config.h>.
17306         Otherwise, we'd lose LARGEFILE support in any file using
17307         e.g. "fcntl--.h"
17308
17309 2005-08-25  Bruno Haible  <bruno@clisp.org>
17310
17311         * m4/minmax.m4: Require autoconf 2.52.
17312         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
17313         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
17314         alternatives of translit over the alphabet.
17315         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
17316
17317 2005-08-24  Simon Josefsson  <jas@extundo.com>
17318
17319         * tests/test-getpass.c: New file.
17320
17321 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17322
17323         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
17324         for GNU regex features.
17325
17326 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17327
17328         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
17329         * lib/regex.h (regerror): Likewise.
17330
17331         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
17332         requires this.  (The code never needed it.)
17333
17334         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
17335         All uses of recently-renamed identifiers changed to use the new,
17336         POSIX-compliant names.  The code will build and run just fine
17337         without these changes, but it's better to eat our own dog food
17338         and use the standard-conforming names.
17339
17340         * lib/regex.h: Fix a multitude of POSIX name space violations.
17341         These changes have an effect only for programs that define
17342         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
17343         do not change anything for programs compiled in the normal way.
17344         Also, there is no effect on the ABI.
17345
17346         (_REGEX_SOURCE): New macro.
17347         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
17348         defined and _GNU_SOURCE is not; this fixes a name space violation.
17349
17350         Rename the following macros to obey POSIX requirements.
17351         The old names are still visible as macros if _REGEX_SOURCE is defined.
17352         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
17353         RE_BACKSLASH_ESCAPE_IN_LISTS.
17354         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
17355         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
17356         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
17357         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
17358         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
17359         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
17360         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
17361         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
17362         (REG_INTERVALS): renamed from RE_INTERVALS.
17363         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
17364         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
17365         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
17366         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
17367         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
17368         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
17369         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
17370         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
17371         RE_UNMATCHED_RIGHT_PAREN_ORD.
17372         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
17373         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
17374         (REG_DEBUG): renamed from RE_DEBUG.
17375         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
17376         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
17377         unusual, since we can't clash with the POSIX REG_ICASE.
17378         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
17379         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
17380         (REG_NO_SUB): renamed from RE_NO_SUB.
17381         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
17382         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
17383         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
17384         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
17385         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
17386         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
17387         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
17388         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
17389         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
17390         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
17391         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
17392         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
17393         RE_SYNTAX_POSIX_MINIMAL_BASIC.
17394         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
17395         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
17396         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
17397         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
17398         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
17399         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
17400         (REG_FIXED): Renamed from REGS_FIXED.
17401         (REG_NREGS): Renamed from RE_NREGS.
17402
17403         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
17404         of other REG_* macros, since POSIX says the user is allowed to
17405         #undef these macros selectively.
17406
17407         (reg_errcode_t): Update comment stating what other tables need
17408         to be consistent.
17409
17410         Rename the following enum values to obey POSIX requirements.
17411         The old names are still visible as macros.
17412         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
17413         is not defined, since GNU is supposed to be a superset of POSIX as
17414         much as possible, and since we want reg_errcode_t to be a signed
17415         type for implementation consistency.
17416         (_REG_NOERROR): Renamed from REG_NOERROR.
17417         (_REG_NOMATCH): Renamed from REG_NOMATCH.
17418         (_REG_BADPAT): Renamed from REG_BADPAT.
17419         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
17420         (_REG_ECTYPE): Renamed from REG_ECTYPE.
17421         (_REG_EESCAPE): Renamed from REG_EESCAPE.
17422         (_REG_ESUBREG): Renamed from REG_ESUBREG.
17423         (_REG_EBRACK): Renamed from REG_EBRACK.
17424         (_REG_EPAREN): Renamed from REG_EPAREN.
17425         (_REG_EBRACE): Renamed from REG_EBRACE.
17426         (_REG_BADBR): Renamed from REG_BADBR.
17427         (_REG_ERANGE): Renamed from REG_ERANGE.
17428         (_REG_ESPACE): Renamed from REG_ESPACE.
17429         (_REG_BADRPT): Renamed from REG_BADRPT.
17430         (_REG_EEND): Renamed from REG_EEND.
17431         (_REG_ESIZE): Renamed from REG_ESIZE.
17432         (_REG_ERPAREN): Renamed from REG_ERPAREN.
17433         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
17434         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
17435         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
17436         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
17437
17438         (_REG_RE_NAME, _REG_RM_NAME): New macros.
17439         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
17440         changed.  But support the old name if the new one is not defined
17441         and if _REGEX_SOURCE.
17442
17443         Change the following member names in struct re_pattern_buffer.
17444         The old names are still supported if !_REGEX_SOURCE.
17445         The new names are always supported, regardless of _REGEX_SOURCE.
17446         (re_buffer): Renamed from buffer.
17447         (re_allocated): Renamed from allocated.
17448         (re_used): Renamed from used.
17449         (re_syntax): Renamed from syntax.
17450         (re_fastmap): Renamed from fastmap.
17451         (re_translate): Renamed from translate.
17452         (re_can_be_null): Renamed from can_be_null.
17453         (re_regs_allocated): Renamed from regs_allocated.
17454         (re_fastmap_accurate): Renamed from fastmap_accurate.
17455         (re_no_sub): Renamed from no_sub.
17456         (re_not_bol): Renamed from not_bol.
17457         (re_not_eol): Renamed from not_eol.
17458         (re_newline_anchor): Renamed from newline_anchor.
17459
17460         Change the following member names in struct re_registers.
17461         The old names are still supported if !_REGEX_SOURCE.
17462         The new names are always supported, regardless of _REGEX_SOURCE.
17463         (rm_num_regs): Renamed from num_regs.
17464         (rm_start): Renamed from start.
17465         (rm_end): Renamed from end.
17466
17467         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
17468         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
17469         Prepend __ to parameter names.
17470
17471         Undo yesterday's changes.
17472
17473 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
17474
17475         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
17476         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
17477         lib/regex.c.
17478
17479 2005-08-24  Jim Meyering  <jim@meyering.net>
17480
17481         Sync from coreutils.
17482         * m4/fcntl-safer.m4: New file.
17483
17484         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
17485         and object files for this module.
17486
17487 2005-08-24  Jim Meyering  <jim@meyering.net>
17488
17489         Sync from coreutils.
17490         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
17491
17492 2005-08-24  Jim Meyering  <jim@meyering.net>
17493
17494         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
17495         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
17496
17497 2005-08-24  Jim Meyering  <jim@meyering.net>
17498
17499         * modules/fcntl-safer: New module.
17500         * modules/fts (Depends-on): Add fcntl-safer.
17501         * MODULES.html.sh (File descriptor based Input/Output):
17502         Add fcntl-safer.
17503
17504 2005-08-24  Bruno Haible  <bruno@clisp.org>
17505
17506         Support for unit test modules.
17507         * modules/README: Mention tests modules.
17508         * modules/TEMPLATE-TESTS: New file.
17509         * gnulib-tool: New options --extract-tests-module, --with-tests and
17510         --tests-base (unused for the moment).
17511         (testsbase, inctests): New variables.
17512         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
17513         (func_verify_module): Exclude TEMPLATE-TESTS.
17514         (func_verify_nontests_module, func_verify_tests_module): New functions.
17515         (func_get_dependencies): Add implicit dependency for tests modules.
17516         (func_get_tests_module): New function.
17517         (func_modules_transitive_closure): When --with-tests was specified,
17518         include the unit tests as well, unless explicitly avoided.
17519         (func_emit_lib_Makefile_am): Ignore the tests modules here.
17520         (func_emit_tests_Makefile_am): New function.
17521         (func_create_testdir): When --with-tests was specified, emit a
17522         tests/ directory.
17523         * MODULES.html.sh (Future developments): Update.
17524
17525 2005-08-24  Bruno Haible  <bruno@clisp.org>
17526
17527         * modules/tls-tests: New file.
17528         * tests/test-tls.c: New file, from GNU gettext.
17529
17530 2005-08-24  Bruno Haible  <bruno@clisp.org>
17531
17532         * modules/lock-tests: New file.
17533         * tests/test-lock.c: New file, from GNU gettext.
17534
17535 2005-08-24  Bruno Haible  <bruno@clisp.org>
17536
17537         * lib/lock.h: Add multiple inclusion guard.
17538         * lib/tls.h: Add multiple inclusion guard.
17539
17540 2005-08-24  Bruno Haible  <bruno@clisp.org>
17541
17542         * gnulib-tool: Add support for the --aux-dir option to
17543         --create-testdir, --create-megatestdir, --test, --megatest.
17544         (func_create_testdir, func_create_megatestdir): Optionally emit a
17545         AC_CONFIG_AUX_DIR directive.
17546         (create-testdir, create-megatestdir, test, megatest): Provide a
17547         default value for $auxdir.
17548
17549 2005-08-24  Bruno Haible  <bruno@clisp.org>
17550
17551         * gnulib-tool (import): Use compound statement instead of subshell
17552         where possible.
17553
17554 2005-08-24  Bruno Haible  <bruno@clisp.org>
17555
17556         * gnulib-tool (import): Change --aux-dir default to "build-aux".
17557
17558 2005-08-24  Bruno Haible  <bruno@clisp.org>
17559
17560         * gnulib-tool (func_version): Update.
17561
17562 2005-08-24  Bruno Haible  <bruno@clisp.org>
17563
17564         * gnulib-tool (func_import, func_create_testdir,
17565         func_create_megatestdir): Quote all autoconf macro arguments.
17566
17567 2005-08-24  Bruno Haible  <bruno@clisp.org>
17568
17569         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
17570         option --force, because --force causes the aclocal.m4 of each
17571         subdirectory to be newer than the corresponding config.h.in.
17572
17573 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17574
17575         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
17576         All contents moved to gl_REGEX.
17577         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
17578         assume that it does.
17579
17580 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17581
17582         * lib/regex.h (REG_NOSYS)
17583         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
17584         Define, since POSIX requires it as of 2001.
17585         (_REG_ENOSYS)
17586         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
17587         New private symbol, used to keep the enum signed in all cases.
17588         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
17589         Youngman in
17590         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
17591
17592         * lib/regex_internal.c (re_string_skip_chars, register_state):
17593         (calc_state_hash):
17594         Remove forward decls; no longer needed now that we use prototypes.
17595         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
17596         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
17597         (clean_state_log_if_needed): Likewise.
17598
17599 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
17600
17601         * config/srclist.txt: Add glibc bugs 1231-1233.
17602
17603 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17604
17605         Fix problems reported by Sam Steingold in
17606         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
17607         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
17608         assumed that reg_errcode_t is a signed type, which is not
17609         necessarily true if _XOPEN_SOURCE is not defined.
17610         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
17611         since some compilers warn about it otherwise.
17612
17613 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17614
17615         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
17616         (init_word_char, create_initial_state, duplicate_node_closure):
17617         (fetch_token, peek_token_bracket, build_range_exp):
17618         (build_collating_symbol): Remove forward decls; no longer needed
17619         now that we use prototypes.
17620
17621         * lib/regcomp.c:
17622         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
17623         (re_compile_fastmap_iter, regcomp, regerror, regfree):
17624         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
17625         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
17626         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
17627         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
17628         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
17629         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
17630         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
17631         (build_range_exp, build_collating_symbol, parse_bracket_exp):
17632         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
17633         (build_charclass, build_charclass_op, fetch_number, create_tree):
17634         (create_token_tree, mark_opt_subexp, duplicate_tree):
17635         Use prototypes rather than old-style definitions.
17636
17637         * lib/regex_internal.c:
17638         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
17639         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
17640         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
17641         (re_string_reconstruct, re_string_peek_byte_case):
17642         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
17643         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
17644         (re_node_set_init_copy, re_node_set_add_intersect):
17645         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
17646         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
17647         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
17648         (re_acquire_state, re_acquire_state_context, register_state):
17649         (create_ci_newstate, create_cd_newstate, free_state):
17650         Likewise.
17651         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
17652         re_search_2):
17653         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
17654         (re_search_internal, prune_impossible_nodes):
17655         (acquire_init_state_context, check_matching, static):
17656         (check_halt_node_context, check_halt_state_context, proceed_next_node):
17657         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
17658         (update_regs, sift_states_backward, build_sifted_states):
17659         (clean_state_log_if_needed, merge_state_array):
17660         (update_cur_sifted_state, add_epsilon_src_nodes):
17661         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
17662         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
17663         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
17664         (find_recover_state, check_subexp_matching_top, transit_state_mb):
17665         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
17666         (check_arrival, check_arrival_add_next_nodes):
17667         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
17668         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
17669         (check_node_accept_bytes, check_node_accept, extend_buffers):
17670         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
17671         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
17672         (sift_ctx_init):
17673         Likewise.
17674
17675         * lib/regex_internal.h:
17676         (re_string_allocate, re_string_construct, re_string_reconstruct):
17677         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
17678         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
17679         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
17680         (re_string_context_at, re_string_peek_byte_case):
17681         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
17682         is defined, since we now use prototypes always.
17683
17684         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
17685         C89 or better.  All uses removed.
17686
17687 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
17688
17689         * config/srclist.txt: Add glibc bugs 1220-1227.
17690
17691 2005-08-20  Jim Meyering  <jim@meyering.net>
17692
17693         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
17694         of unused local, dfa.
17695
17696 2005-08-20  Bruno Haible  <bruno@clisp.org>
17697
17698         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
17699
17700 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17701
17702         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
17703         (re_node_set_insert_last, re_dfa_add_node):
17704         Rename local variables to avoid GCC shadowing warnings.
17705
17706 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17707
17708         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
17709         [defined lint]: Suppress bogus uninitialized-variable warnings.
17710
17711         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
17712         and let the caller return REG_ESPACE if out of space.  This
17713         removes an uninitialied-variable warning with GCC 4.0.1, and also
17714         avoids taking the address of a local variable.  All callers
17715         changed.
17716
17717 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
17718
17719         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
17720         $LIBCSRC/posix/regexec.c.
17721         Add glibc bug 1217 for regcomp.c.
17722
17723 2005-08-19  Jim Meyering  <jim@meyering.net>
17724
17725         * lib/regexec.c (proceed_next_node): Redo local variables to
17726         avoid GCC shadowing warnings.
17727
17728 2005-08-18  Bruno Haible  <bruno@clisp.org>
17729
17730         * lib/strstr.c (strstr): Fix return value in multibyte case.
17731         * lib/strcasestr.c (strcasestr): Likewise.
17732
17733 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
17734
17735         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
17736
17737 2005-08-17  Jim Meyering  <jim@meyering.net>
17738
17739         Make the %s format (seconds since the epoch) work for a negative
17740         number and when used with a zero-padded field width, e.g. %015s.
17741
17742         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
17743         label so that it precedes the code to set `digits'.  Otherwise,
17744         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
17745         print `00-22'.  Now, it prints `-0022', as it should.
17746
17747 2005-08-17  Bruno Haible  <bruno@clisp.org>
17748
17749         * modules/strstr (Files): Add m4/mbrtowc.m4.
17750         (Depends-on): Add mbuiter.
17751
17752 2005-08-17  Bruno Haible  <bruno@clisp.org>
17753
17754         * modules/strcasestr: New file.
17755         * MODULES.html.sh (String handling, based on ANSI C 89): Add
17756         strcasestr.
17757
17758 2005-08-17  Bruno Haible  <bruno@clisp.org>
17759
17760         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
17761
17762 2005-08-17  Bruno Haible  <bruno@clisp.org>
17763
17764         * modules/mbuiter: New file.
17765         * MODULES.html.sh (Extended multibyte and wide character utilities):
17766         Add mbuiter.
17767
17768 2005-08-17  Bruno Haible  <bruno@clisp.org>
17769
17770         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
17771         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
17772
17773 2005-08-17  Bruno Haible  <bruno@clisp.org>
17774
17775         * m4/strcasestr.m4: New file.
17776
17777 2005-08-17  Bruno Haible  <bruno@clisp.org>
17778
17779         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
17780         * lib/strstr.c: Completely rewritten, with multibyte locale support.
17781
17782 2005-08-17  Bruno Haible  <bruno@clisp.org>
17783
17784         * lib/strcasestr.h: New file.
17785         * lib/strcasestr.c: New file.
17786
17787 2005-08-17  Bruno Haible  <bruno@clisp.org>
17788
17789         * lib/strcasecmp.c: Use mbuiter.h.
17790
17791 2005-08-17  Bruno Haible  <bruno@clisp.org>
17792
17793         * lib/mbuiter.h: New file.
17794
17795 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
17796
17797         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
17798         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
17799         and gl_GETOPT are both invoked via different paths (as happens
17800         with GNU tar CVS because it uses both argp and getopt), the former
17801         wins.
17802
17803 2005-08-16  Bruno Haible  <bruno@clisp.org>
17804
17805         * modules/tls: New file.
17806         * MODULES.html.sh (Multithreading): Add tls.
17807
17808 2005-08-16  Bruno Haible  <bruno@clisp.org>
17809
17810         * modules/strnlen1: New file.
17811         * MODULES.html.sh (String handling): Add strnlen1.
17812
17813 2005-08-16  Bruno Haible  <bruno@clisp.org>
17814
17815         * modules/strcase (Files): Add m4/mbrtowc.m4.
17816         (Depends-on): Add strnlen1, mbchar.
17817
17818 2005-08-16  Bruno Haible  <bruno@clisp.org>
17819
17820         * modules/mbiter: New file.
17821         * MODULES.html.sh (Extended multibyte and wide character utilities):
17822         Add mbiter.
17823
17824 2005-08-16  Bruno Haible  <bruno@clisp.org>
17825
17826         * modules/mbfile: New file.
17827         * MODULES.html.sh (Extended multibyte and wide character utilities):
17828         Add mbfile.
17829
17830 2005-08-16  Bruno Haible  <bruno@clisp.org>
17831
17832         * modules/mbchar: New file.
17833         * MODULES.html.sh (Extended multibyte and wide character utilities):
17834         New section.
17835
17836 2005-08-16  Bruno Haible  <bruno@clisp.org>
17837
17838         * m4/tls.m4: New file, from GNU gettext.
17839
17840 2005-08-16  Bruno Haible  <bruno@clisp.org>
17841
17842         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
17843         always.
17844         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
17845
17846 2005-08-16  Bruno Haible  <bruno@clisp.org>
17847
17848         * m4/mbiter.m4: New file.
17849
17850 2005-08-16  Bruno Haible  <bruno@clisp.org>
17851
17852         * m4/mbfile.m4: New file.
17853
17854 2005-08-16  Bruno Haible  <bruno@clisp.org>
17855
17856         * m4/mbchar.m4: New file.
17857
17858 2005-08-16  Bruno Haible  <bruno@clisp.org>
17859
17860         * lib/tls.h: New file, from GNU gettext.
17861         * lib/tls.c: New file, from GNU gettext.
17862
17863 2005-08-16  Bruno Haible  <bruno@clisp.org>
17864
17865         * lib/strnlen1.h: New file.
17866         * lib/strnlen1.c: New file.
17867
17868 2005-08-16  Bruno Haible  <bruno@clisp.org>
17869
17870         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
17871         (mbi_init): Update.
17872         (mbi_avail, mbi_advance): Let the iteration end before the terminating
17873         NUL byte, not after it.
17874
17875 2005-08-16  Bruno Haible  <bruno@clisp.org>
17876
17877         * lib/strcase.h (strcasecmp): Add note in comments.
17878         * lib/strncasecmp.c: Use code from strcasecmp.c.
17879         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
17880         (strcasecmp): Work correctly in multibyte locales.
17881
17882 2005-08-16  Bruno Haible  <bruno@clisp.org>
17883
17884         * lib/mbiter.h: New file.
17885
17886 2005-08-16  Bruno Haible  <bruno@clisp.org>
17887
17888         * lib/mbfile.h: New file.
17889
17890 2005-08-16  Bruno Haible  <bruno@clisp.org>
17891
17892         * lib/mbchar.h: New file.
17893         * lib/mbchar.c: New file.
17894
17895 2005-08-16  Bruno Haible  <bruno@clisp.org>
17896
17897         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
17898         the valid ones. Makes the comparison operations transitive:
17899         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
17900         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
17901
17902 2005-08-15  Simon Josefsson  <jas@extundo.com>
17903
17904         * modules/ssize_t (License): Change to 'unlimited'.
17905
17906         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
17907
17908 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
17909
17910         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
17911         Add comments for each pending glibc patch.
17912
17913 2005-08-15  Bruno Haible  <bruno@clisp.org>
17914
17915         * lib/regex.h (__restrict_arr): Don't define to __restrict if
17916         __cplusplus is defined.
17917
17918 2005-08-14  Jim Meyering  <jim@meyering.net>
17919
17920         Sync from coreutils.
17921
17922         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
17923         Use the hash-table-based cycle-detection code not just when
17924         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
17925         Reported by James Youngman in
17926         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
17927         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
17928         FTS_TIGHT_CYCLE_CHECK.
17929         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
17930         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
17931         once again.
17932         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
17933         * lib/fts.c (fd_safer): Remove decl.
17934         Include fcntl--.h rather than unistd-safer.h
17935         (fts_safe_changedir): Don't call fd_safer; no longer needed
17936         now that we include fcntl--.h.
17937
17938 2005-08-12  Simon Josefsson  <jas@extundo.com>
17939
17940         * modules/getndelim2: Use ssize_t module.
17941         * modules/getnline: Likewise.
17942         * modules/safe-read: Likewise.
17943         * modules/xreadlink: Likewise.
17944
17945         * modules/ssize_t: New file.
17946
17947 2005-08-12  Simon Josefsson  <jas@extundo.com>
17948
17949         * m4/readline.m4: Look for termcap, curses or ncurses if required.
17950
17951 2005-08-12  Simon Josefsson  <jas@extundo.com>
17952
17953         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17954         ssize_t.
17955
17956 2005-08-12  Simon Josefsson  <jas@extundo.com>
17957
17958         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
17959         readline, getdelim and check_version.
17960         (Support for systems lacking ISO C 99: Sizes of integer types):
17961         Add size_max.
17962
17963 2005-08-12  Bruno Haible  <bruno@clisp.org>
17964
17965         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
17966
17967 2005-08-11  Simon Josefsson  <jas@extundo.com>
17968
17969         * modules/readline: New file.
17970
17971         * modules/strnlen (Files): Add strnlen.h.
17972
17973 2005-08-11  Simon Josefsson  <jas@extundo.com>
17974
17975         * m4/readline.m4: New file.
17976
17977 2005-08-11  Simon Josefsson  <jas@extundo.com>
17978
17979         * lib/readline.h, readline.c: New file.
17980
17981 2005-08-11  Simon Josefsson  <jas@extundo.com>
17982
17983         * doc/gnulib.texi (Initial import, Finishing touches): Mention
17984         gl_AVOID.
17985
17986 2005-08-11  Bruno Haible  <bruno@clisp.org>
17987
17988         * lib/strnlen.h (strnlen): Change parameter name to match comment.
17989
17990 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
17991
17992         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
17993
17994 2005-08-10  Simon Josefsson  <jas@extundo.com>
17995
17996         * tests/test-iconvme.c: New file.
17997
17998 2005-08-10  Simon Josefsson  <jas@extundo.com>
17999
18000         * m4/strnlen.m4: New file.
18001
18002         * m4/strndup.m4: Don't check for strnlen declaration, done in
18003         strnlen.m4.
18004
18005 2005-08-10  Simon Josefsson  <jas@extundo.com>
18006
18007         * lib/strndup.c: Use strnlen.h.
18008
18009         * lib/strnlen.h: New file.
18010
18011 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18012
18013         * README: Typos.
18014
18015 2005-08-02  Simon Josefsson  <jas@extundo.com>
18016
18017         * modules/readline: New file.
18018
18019 2005-08-02  Simon Josefsson  <jas@extundo.com>
18020
18021         * modules/getdelim: New file.
18022
18023         * modules/getline: Rewrite, don't use getndelim2.
18024
18025 2005-08-02  Simon Josefsson  <jas@extundo.com>
18026
18027         * m4/getline.m4: Separate out getdelim stuff into separate module.
18028
18029         * m4/getdelim.m4: New file.
18030
18031 2005-08-02  Simon Josefsson  <jas@extundo.com>
18032
18033         * lib/getline.h, getline.c: Rewrite.
18034
18035         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
18036
18037 2005-07-31  Bruno Haible  <bruno@clisp.org>
18038
18039         * lib/lock.h (gl_lock_initializer): New macro.
18040         (gl_lock_define_initialized): Use it.
18041         (gl_rwlock_initializer): New macro.
18042         (gl_rwlock_define_initialized): Use it.
18043         (gl_recursive_lock_initializer): New macro.
18044         (gl_recursive_lock_define_initialized): Use it.
18045
18046 2005-07-30  Karl Berry  <karl@gnu.org>
18047
18048         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
18049         Report from Ben Pfaff, regarding getopt.
18050
18051 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
18052
18053         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
18054         normal way.
18055         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
18056         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
18057         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
18058         (gl_GETOPT): Use the new macros.  Most of the implementation
18059         is moved to the new macros.  This is for programs like Emacs
18060         that don't want all the functionality of gl_GETOPT.
18061
18062 2005-07-26  Bruno Haible  <bruno@clisp.org>
18063
18064         * m4/lock.m4: Update from GNU gettext.
18065
18066 2005-07-26  Bruno Haible  <bruno@clisp.org>
18067
18068         * lib/lock.h: Update from GNU gettext.
18069         * lib/lock.c: Update from GNU gettext.
18070
18071 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
18072
18073         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
18074         obsolescent AC_TRY_RUN.  Include the default includes files, for
18075         'exit'.
18076
18077 2005-07-24  Bruno Haible  <bruno@clisp.org>
18078
18079         * modules/visibility: New file.
18080         * MODULES.html.sh (Misc): Add visibility.
18081
18082 2005-07-24  Bruno Haible  <bruno@clisp.org>
18083
18084         * m4/visibility.m4: New file.
18085
18086 2005-07-24  Bruno Haible  <bruno@clisp.org>
18087
18088         * doc/visibility.texi: New file.
18089
18090 2005-07-22  Bruno Haible  <bruno@clisp.org>
18091
18092         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
18093         $(ALLOCA_H), redundant through BUILT_SOURCES.
18094         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
18095         redundant through BUILT_SOURCES.
18096         * modules/byteswap (Makefile.am): Remove explicit dependency on
18097         $(BYTESWAP_H), redundant through BUILT_SOURCES.
18098         * modules/fnmatch (Makefile.am): Remove explicit dependency on
18099         $(FNMATCH_H), redundant through BUILT_SOURCES.
18100         * modules/getopt (Makefile.am): Remove explicit dependency on
18101         $(GETOPT_H), redundant through BUILT_SOURCES.
18102         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
18103         redundant through BUILT_SOURCES.
18104         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
18105         redundant through BUILT_SOURCES.
18106         * modules/stdbool (Makefile.am): Remove explicit dependency on
18107         $(STDBOOL_H), redundant through BUILT_SOURCES.
18108         * modules/stdint (Makefile.am): Remove explicit dependency on
18109         $(STDINT_H), redundant through BUILT_SOURCES.
18110         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
18111         Remove explicit dependency on $(SYSEXITS_H).
18112         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
18113
18114 2005-07-18  Simon Josefsson  <jas@extundo.com>
18115
18116         * lib/check-version.c (check_version): Accept identical versions too.
18117
18118 2005-07-18  Bruno Haible  <bruno@clisp.org>
18119
18120         * modules/lock: New file.
18121         * MODULES.html.sh (Multithreading): New section.
18122
18123 2005-07-18  Bruno Haible  <bruno@clisp.org>
18124
18125         * m4/lock.m4: New file, from GNU gettext.
18126
18127 2005-07-18  Bruno Haible  <bruno@clisp.org>
18128
18129         * lib/lock.h: New file, from GNU gettext.
18130         * lib/lock.c: New file, from GNU gettext.
18131
18132 2005-07-18  Bruno Haible  <bruno@clisp.org>
18133
18134         * lib/lock.h (gl_once_t): New type.
18135         (gl_once_define, gl_once): New macros.
18136         * lib/lock.c (fresh_once): New variable.
18137         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
18138         functions.
18139
18140 2005-07-16  Simon Josefsson  <jas@extundo.com>
18141
18142         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
18143         workaround, suggested by Bruno.
18144
18145 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18146
18147         * modules/xalloc (Depends-on): Add xalloc-die.
18148         * modules/xvasprintf (Depends-on): Add xalloc-die.
18149
18150 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
18151
18152         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
18153         with a minor change.
18154
18155 2005-07-15  Bruno Haible  <bruno@clisp.org>
18156
18157         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
18158         When using lib/poll.c, define poll as rpl_poll.
18159
18160 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
18161
18162         * modules/argp (Depends-on): Remove unlocked-io.
18163
18164 2005-07-14  Derek Price  <derek@ximbiot.com>
18165
18166         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
18167         for glob symlink bug.
18168
18169 2005-07-14  Bruno Haible  <bruno@clisp.org>
18170
18171         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
18172         Instead, test for *_unlocked function declarations directly.
18173
18174 2005-07-11  Simon Josefsson  <jas@extundo.com>
18175
18176         * modules/size_max: New file.
18177
18178         * modules/xsize: Depend on size_max module for size_max.m4.
18179
18180 2005-07-11  Simon Josefsson  <jas@extundo.com>
18181
18182         * lib/size_max.h: New file.
18183
18184 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
18185
18186         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
18187         copyright symbol and the year.
18188         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
18189         (version_etc_va): Use parameterized copyright notice.
18190         Reword to conform to the current GNU coding standards.
18191
18192 2005-07-11  Karl Berry  <karl@gnu.org>
18193
18194         * doc/gnulib.texi (Quoting): new node.
18195         (Initial import): more info, from Patrice.
18196
18197 2005-07-11  Bruno Haible  <bruno@clisp.org>
18198
18199         * gnulib-tool (func_usage): Document option --avoid.
18200         (Command line options): Handle --avoid.
18201         (func_acceptable): New function.
18202         (func_modules_transitive_closure): Use it.
18203
18204 2005-07-11  Bruno Haible  <bruno@clisp.org>
18205
18206         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
18207         Reported by Jim Meyering.
18208
18209 2005-07-10  Bruno Haible  <bruno@clisp.org>
18210
18211         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
18212         Needed when size_t is smaller than 'unsigned int'.
18213         Reported by Paul Eggert.
18214
18215 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18216
18217         * modules/argp (Depends-on): Add unlocked-io
18218
18219 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
18220
18221         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
18222         block of defines.
18223
18224 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
18225
18226         * config/srclist.txt: Comment out regcomp.c, since we have a porting
18227         fix now.
18228
18229 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
18230         and Paul Eggert  <eggert@cs.ucla.edu>
18231
18232         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
18233         in wint_t, not wchar_t.  Remove now-unnecessary cast.
18234
18235 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18236
18237         * modules/regex (Files): Add lib/regex_internal.c,
18238         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
18239         (Depends-on): Add extensions.
18240         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
18241
18242 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18243
18244         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
18245         pathconf.
18246         * m4/same.m4 (gl_SAME): Likewise.
18247         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
18248
18249         * m4/regex.m4: Adjust to new libc regex implementation.
18250         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
18251         all the .c and .h parts of (the new) regex.
18252         Quote the m4 stuff better.
18253         Check for RE_ICASE bug of old gnulib.
18254         Check for REG_STARTEND of recent libc.
18255         Rename local variables from jm_* to gl_*.
18256         Quote operand of "test -f".
18257         Say "recent enough" version of libc, not "version 2".
18258         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
18259         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
18260         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
18261         Remove check for btowc, isascii.
18262         Require AM_LANGINFO_CODESET.
18263
18264 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18265
18266         * lib/regex.c, regex.h: Sync from libc.
18267         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
18268         * lib/regexec.c:
18269         New files, synced from libc, except that regex_internal.h
18270         currently has a small porting fix.
18271
18272 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
18273
18274         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
18275         regex_internal.c, regexec.c.
18276         Add regex_internal.h too, but as a comment, since the libc version
18277         is currently broken in gnulib mode.
18278
18279 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
18280
18281         Support programs like Emacs that use gnulib but not gettext.
18282         * MODULES.html.sh (Internationalization functions): Add gettext-h.
18283         * modules/gettext-h: New file.
18284         * modules/gettext (Files): Remove lib/gettext.h.
18285         (Depends-on): Add gettext-h.
18286         (Makefile.am): Remove lib_SOURCES.
18287         * modules/argmatch, modules/c-stack, modules/closeout:
18288         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
18289         * modules/execute, modules/file-type, modules/getaddrinfo:
18290         * modules/getopt, modules/human, modules/javacomp:
18291         * modules/javaexec, modules/mkdir-p, modules/obstack:
18292         * modules/openat, modules/pagealign_alloc, modules/pipe:
18293         * modules/quotearg, modules/regex, modules/rpmatch:
18294         * modules/unicodeio, modules/userspec, modules/version-etc:
18295         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
18296         * modules/xsetenv:
18297         Depend on gettext-h, not gettext.
18298
18299 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
18300
18301         * gnulib-tool (func_import): Add support for 'public domain' license.
18302         * modules/alloca, modules/atexit, modules/memmove:
18303         Now public domain, not GPL.
18304         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
18305         * modules/realloc, modules/strerror, modules/strtod:
18306         Now LGPL, not GPL.
18307
18308 2005-07-05  Bruno Haible  <bruno@clisp.org>
18309
18310         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
18311         autoconf CVS. Needed for mingw.
18312
18313 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18314
18315         Remove the dependency of the strftime module on the tzset module.
18316         * modules/strftime (Depends-on): Remove dependency on tzset.
18317
18318 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18319
18320         Remove the dependency of the strftime module on the tzset module.
18321         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
18322         gl_FUNC_TZSET_CLOBBER.
18323
18324 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
18325
18326         Remove the dependency of the strftime module on the tzset module.
18327         * lib/strftime.c (my_strftime)
18328         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
18329         Copy the input structure, to work around some of the bug with
18330         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
18331         Solaris releases, you should also use the tzset module, but we won't
18332         require it as a dependency any more since we don't want LGPLed code
18333         to depend on GPLed code.
18334
18335 2005-07-02  Jim Meyering  <jim@meyering.net>
18336
18337         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
18338         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
18339         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
18340         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
18341
18342 2005-07-02  Jim Meyering  <jim@meyering.net>
18343
18344         * lib/backupfile.c (backup_args): Change a `0' to NULL.
18345
18346 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
18347
18348         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
18349         declares only 'struct timespec;' (!).
18350
18351 2005-07-01  Jim Meyering  <jim@meyering.net>
18352
18353         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
18354         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
18355         * lib/save-cwd.c, tempname.c:
18356         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
18357         and don't include <sys/file.h>).
18358
18359 2005-06-29  Jim Meyering  <jim@meyering.net>
18360
18361         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
18362         type name.  Use the variable name instead.
18363         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
18364         Likewise.
18365
18366 2005-06-28  Simon Josefsson  <jas@extundo.com>
18367
18368         * modules/check-version (Files): Add check-version.m4.
18369
18370 2005-06-28  Simon Josefsson  <jas@extundo.com>
18371
18372         * m4/check-version.m4: New file, suggested by Jim Meyering
18373         <jim@meyering.net>.
18374
18375 2005-06-28  Simon Josefsson  <jas@extundo.com>
18376
18377         * lib/check-version.h, lib/check-version.c: New files.
18378
18379 2005-06-28  Simon Josefsson  <jas@extundo.com>
18380
18381         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
18382         collision with global variable.  Better indentation.  Don't
18383         increment buffer pointer beyond buffer end.  Based on comments
18384         from Paul Eggert <eggert@cs.ucla.edu>.
18385
18386         * lib/base64.h: Indent.
18387
18388 2005-06-28  Simon Josefsson  <jas@extundo.com>
18389
18390         * doc/gnulib.texi (Library version handling): New section.
18391
18392 2005-06-28  Jim Meyering  <jim@meyering.net>
18393
18394         * check-module (find_included_lib_files): Hard-code another
18395         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
18396         but modules/fts-lgpl (correctly) does not list those files.
18397
18398         * modules/canonicalize (Files): Add lib/pathmax.h.
18399
18400 2005-06-25  Simon Josefsson  <jas@extundo.com>
18401
18402         * modules/check-version: New file.
18403
18404 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
18405
18406         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
18407         initializer of struct addrinfo, as an indication that we don't
18408         care how many members the structure has.
18409
18410 2005-06-24  Derek Price  <derek@ximbiot.com>
18411         and Bruno Haible  <bruno@clisp.org>
18412
18413         Remove stat module & update lstat.
18414         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
18415         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
18416         * m4/stat.m4: Remove this file.
18417
18418 2005-06-24  Derek Price  <derek@ximbiot.com>
18419         and Bruno Haible  <bruno@clisp.org>
18420
18421         Remove stat module & update lstat.
18422         * lib/stat.c: Remove this file...
18423         (slash_aware_lstat): ...moving this content and its support...
18424         * lib/lstat.c (rpl_lstat): ...into here.
18425         * lib/lstat.h: New file.
18426
18427 2005-06-24  Derek Price  <derek@ximbiot.com>
18428         and Bruno Haible  <bruno@clisp.org>
18429
18430         Remove stat module & update lstat.
18431         * config/srclist.txt (libc sources): Remove stat.
18432
18433 2005-06-24  Derek Price  <derek@ximbiot.com>
18434         and Bruno Haible  <bruno@clisp.org>
18435
18436         Remove stat module & update lstat.
18437         * MODULES.html.sh (stat): Remove.
18438         * MODULES.html: Regenerated.
18439         * modules/lstat (Description): Correct function name.
18440         (Files): Add "lstat.h".
18441         (Depends-on): Remove stat, add xalloc, stat-macros.
18442         * modules/stat: Remove this file.
18443         (Include): Add "lstat.h", remove <sys/stat.h>.
18444
18445 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
18446
18447         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
18448         (ranged_convert): Don't save conversion in a temporary struct.
18449         This causes a warning with GCC 4.0.0, and anyway in the typical
18450         case it's not worth the extra 100 bytes or so of code.
18451         (ranged_convert, __mktime_internal): When calling a function via a
18452         pointer P, use P () rather than (*P) (), as we now assume C89 or
18453         better.
18454
18455 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18456
18457         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
18458         "who -r" failed to give output.  Problem reported by Tim Waugh.
18459
18460         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
18461         (xcalloc): Use it to avoid needless tests.
18462         Problem reported by Jim Meyering.
18463
18464 2005-06-20  Derek Price  <derek@ximbiot.com>
18465
18466         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
18467         unnecessary for Autoconfs > 2.59c.
18468
18469 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18470
18471         * lib/argp.h (__option_is_short): Check upper limit of
18472         __key. Isprint() requires its argument to have the value
18473         of an unsigned char or EOF.
18474
18475 2005-06-16  Jim Meyering  <jim@meyering.net>
18476
18477         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
18478         when either N or S is zero.
18479
18480 2005-06-16  Derek Price  <derek@ximbiot.com>
18481
18482         * m4/bison.m4: Declare YACC & YFLAGS precious.
18483
18484 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
18485
18486         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
18487         multibyte string or pattern, fall back on unibyte matching.
18488         Problem reported by James Youngman.
18489
18490 2005-06-08  Bruno Haible  <bruno@clisp.org>
18491
18492         * modules/csharpcomp: New file.
18493         * MODULES.html.sh (C#): Add csharpcomp.
18494
18495 2005-06-08  Bruno Haible  <bruno@clisp.org>
18496
18497         * m4/csharpcomp.m4: New file, from GNU gettext.
18498
18499 2005-06-08  Bruno Haible  <bruno@clisp.org>
18500
18501         * lib/csharpcomp.h: New file, from GNU gettext.
18502         * lib/csharpcomp.c: New file, from GNU gettext.
18503         * lib/csharpcomp.sh.in: New file, from GNU gettext.
18504
18505 2005-06-08  Bruno Haible  <bruno@clisp.org>
18506
18507         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
18508         warning on mingw.
18509
18510 2005-06-07  Derek Price  <derek@ximbiot.com>
18511
18512         Sync from CVS.
18513         * lib/glob_.h: Indent nested #ifdef.
18514
18515 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18516
18517         Sync from coreutils.
18518         Use "file name" when talking about file names, instead of "filename"
18519         or "path", as per the GNU coding standards.
18520         * lib/mkdir-p.c: Renamed from makepath.c.
18521         (make_dir_parents): Renamed from make_path.  All callers changed.
18522         * lib/mkdir-p.h: Likewise.  All includers changed.
18523         * lib/filenamecat.c: Renamed from path-concat.c.
18524         (file_name_concat): Renamed from path_concat.  All callers changed.
18525         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
18526         * lib/filenamecat.h: Likewise.  All includers changed.
18527         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
18528         in comments or local variable names.
18529         * lib/basename.c: Likewise.
18530         * lib/canonicalize.c, canonicalize.h: Likewise.
18531         * lib/dirname.c, dirname.h: Likewise.
18532         * lib/euidaccess.c: Likewise.
18533         * lib/exclude.c: Likewise
18534         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
18535         * lib/fsusage.c, fsuage.h: Likewise.
18536         * lib/fts.c, fts_.h: Likewise.
18537         * lib/getcwd.c: Likewise.
18538         * lib/getloadavg.c: Likewise.
18539         * lib/mkstemp.c: Likewise.
18540         * lib/mountlist.c, mountlist.h: Likewise.
18541         * lib/openat.c, openat.h: Likewise.
18542         * lib/readlink-stub.c: Likewise.
18543         * lib/readutmp.c, readutmp.h: Likewise.
18544         * lib/rename.c: Likewise.
18545         * lib/rmdir.c: Likewise.
18546         * lib/same.c: Likewise.
18547         * lib/savedir.c: Likewise.
18548         * lib/stripslash.c: Likewise.
18549         * lib/tempname.c: Likewise.
18550         * lib/xreadlink.c: Likewise.
18551         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
18552         All uses changed.
18553         * lib/exclude.h: Likewise.
18554
18555         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
18556         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18557         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
18558         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18559         * lib/pathmax.h: Include <limits.h> unconditionally, since other
18560         files have been getting away with it for years (MORE/BSD 4.3
18561         is extinct now).
18562         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
18563         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
18564
18565         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
18566         Define to 256, not 255, as per modern POSIX.
18567
18568 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18569
18570         Sync from coreutils.
18571         Use "file name" when talking about file names, instead of "filename"
18572         or "path", as per the GNU coding standards.
18573         * MODULES.html.sh: mkdir-p renamed from makepath.
18574         filenamecat renamed from path-concat.
18575         * modules/filenamecat: Renamed from modules/path-concat.
18576         (Files): filenamecat.h and filenamecat.c renamed from
18577         path-concat.h and path-concat.c.
18578         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
18579         (Include): filenamecat.h, not path-concat.h.
18580         * modules/mkdir-p: Renamed from modules/makepath.
18581         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
18582         makepath.c.
18583         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
18584         (Include): mkdir-p.h, not makepath.h.
18585
18586 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
18587
18588         Sync from coreutils.
18589         * m4/mkdir-p.m4: Renamed from makepath.m4.
18590         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
18591         Rename files from makepath.c to mkdir-p.c, and from
18592         makepath.h to mkdir-p.h.
18593         * m4/filenamecat.m4: Renamed from path-concat.m4.
18594         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
18595         Rename files from path-concat.c to filenamecat.c,
18596         and from path-concat.h to filenamecat.h.
18597         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
18598         "file name" in local variables or comments.
18599         * m4/rename.m4: Likewise.
18600
18601 2005-06-01  Bruno Haible  <bruno@clisp.org>
18602
18603         * modules/csharpexec: New file.
18604         * MODULES.html.sh (C#): New section.
18605
18606 2005-06-01  Bruno Haible  <bruno@clisp.org>
18607
18608         * m4/csharp.m4: New file, from GNU gettext.
18609         * m4/csharpexec.m4: New file, from GNU gettext.
18610
18611 2005-06-01  Bruno Haible  <bruno@clisp.org>
18612
18613         * lib/csharpexec.h: New file, from GNU gettext.
18614         * lib/csharpexec.c: New file, from GNU gettext.
18615         * lib/csharpexec.sh.in: New file, from GNU gettext.
18616
18617 2005-05-31  Derek Price  <derek@ximbiot.com>
18618             Paul Eggert  <eggert@cs.ucla.edu>
18619
18620         Sync from cvs.
18621         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
18622
18623 2005-05-31  Derek Price  <derek@ximbiot.com>
18624             Paul Eggert  <eggert@cs.ucla.edu>
18625
18626         Sync from cvs.
18627         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
18628
18629 2005-05-29  Derek Price  <derek@ximbiot.com>
18630
18631         * config/srclist.txt (glob_.h, glob.c): Add these files.
18632
18633 2005-05-29  Derek Price  <derek@ximbiot.com>
18634
18635         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
18636         * modules/glob: New file.
18637         * modules/getlogin_r: Add link to POSIX spec in description.
18638
18639 2005-05-29  Derek Price  <derek@ximbiot.com>
18640             Paul Eggert  <eggert@cs.ucla.edu>
18641
18642         * m4/glob.m4: New file.
18643
18644 2005-05-29  Derek Price  <derek@ximbiot.com>
18645             Paul Eggert  <eggert@cs.ucla.edu>
18646
18647         * lib/glob_.h, lib/glob.c: New files.
18648
18649 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18650
18651         * modules/fts (Files): Remove m4/inttypes-pri.m4.
18652         * modules/fts-lgpl (Depends-on): Remove gettext.
18653
18654 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18655
18656         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
18657         and don't require gt_INTTYPES_PRI.
18658
18659 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
18660
18661         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
18662
18663         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
18664         the configuration hassle isn't worth it.
18665         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
18666         (LONGEST_MODIFIER, PRIuMAX): Remove.
18667
18668 2005-05-27  Bruno Haible  <bruno@clisp.org>
18669
18670         * lib/getlogin_r.h: Remove second include of <stddef.h>.
18671
18672 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
18673
18674         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
18675         _POSIX_PTHREAD_SEMANTICS for Solaris.
18676
18677 2005-05-25  Derek Price  <derek@ximbiot.com>
18678
18679         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
18680
18681 2005-05-25  Derek Price  <derek@ximbiot.com>
18682             Paul Eggert  <eggert@cs.ucla.edu>
18683
18684         * modules/getlogin_r, m4/getlogin_r.m4: New files.
18685         * lib/getlogin_r.c, getlogin_r.h: New files.
18686
18687 2005-05-25  Bruno Haible  <bruno@clisp.org>
18688             Derek Price  <derek@ximbiot.com>
18689
18690         * lib/getlogin_r.h: Simplify API documentation.
18691
18692 2005-05-23  Derek Price  <derek@ximbiot.com>
18693
18694         * modules/minmax (Files): Add m4/minmax.m4.
18695         (configure.ac): Add gl_MINMAX.
18696
18697 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
18698
18699         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
18700         so that unistd-safer.h (GPL'ed code) need not be included.
18701
18702 2005-05-22  Bruno Haible  <bruno@clisp.org>
18703
18704         * m4/minmax.m4: New file.
18705         Based on a patch by Derek Price <derek@ximbiot.com>.
18706
18707 2005-05-22  Bruno Haible  <bruno@clisp.org>
18708
18709         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
18710         (INT64_MIN): Fix definition.
18711         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
18712
18713         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
18714         NEED_SIGNED_INT_TYPES.
18715
18716         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
18717         HAVE_SYSTEM_INTTYPES.
18718
18719 2005-05-22  Bruno Haible  <bruno@clisp.org>
18720
18721         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
18722         Also include <sys/param.h> if it defines MIN, MAX.
18723         Based on a patch by Derek Price <derek@ximbiot.com>.
18724
18725 2005-05-21  Jim Meyering  <jim@meyering.net>
18726
18727         * modules/fts (Files): Add m4/inttypes-pri.m4.
18728         (Depends-on): Add lstat and remove gettext.  Alphabetize.
18729
18730 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18731
18732         New fts module.
18733         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
18734         (setup_dir, free_dir): New functions.
18735         (enter_dir, leave_dir): Define trivial
18736         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
18737         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
18738         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
18739         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
18740         Move to fts-cycle.c.
18741         (fts_open): Use setup_dir.
18742         (fts_close): Use free_dir.
18743         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
18744         This adds a label and some gotos, but the alternatives were messier.
18745         Check for memory allocation failure when entering a dir.
18746         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
18747         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
18748         (FTS): New member fts_cycle, that is a union that contains the
18749         old active_dir_ht and cycle_state.  All uses changed to mention
18750         fts_cycle.ht and fts_cycle.state.
18751         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
18752         fts.c, with the following changes:
18753         (setup_dir, free_dir): New functions.
18754         (enter_dir): Now returns bool.  Return true if successful, false
18755         if memory exhausted.  All callers changed.
18756         Do not bother partly cleaning up on
18757         memory allocation failure; that is free_dir's job.
18758         However, free ad if hash_insert fails, to avoid memory leak.
18759         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
18760         fts->fts_options to see which union member to use.
18761
18762 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18763
18764         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
18765         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
18766
18767 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18768
18769         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
18770
18771 2005-05-20  Jim Meyering  <jim@meyering.net>
18772
18773         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
18774         Now a macro, to pacify GCC.
18775
18776 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
18777
18778         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
18779         of -1.
18780
18781 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
18782
18783         * lib/chown.c (rpl_chown): Return -1 on failure.
18784
18785 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
18786
18787         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
18788         Don't check for stddef.h.
18789         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
18790         don't use its results.
18791         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
18792         since we include them unconditionally.  Don't require
18793         AM_STDBOOL_H, since stdbool is a prerequisite.
18794         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
18795         since we assume C89 or better.
18796         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
18797         as we don't use their results.
18798         Don't check for fchdir, memmove, memset, strrchr, as we use
18799         them unconditionally.
18800         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
18801         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
18802
18803 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
18804
18805         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
18806         Include <stddef.h> unconditionally, since we assume C89 now.
18807         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
18808         * lib/fts.c: Include fts_.h first, to check interface.
18809         Do not include intprops.h; no longer needed.
18810         Include cycle-check.h and hash.h, since fts_.h no longer does.
18811         Remove unnecessary casts of closedir to void.
18812         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
18813         decide whether to decrement nlinks.
18814         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
18815         (FTS): Use struct hash_table * instead of Hash_table, so that
18816         we no longer need to include hash.h here.
18817
18818 2005-05-18  Jim Meyering  <jim@meyering.net>
18819
18820         * modules/dirfd (License): Change to LGPL.  Most of the code
18821         is already in the public domain.
18822
18823 2005-05-18  Jim Meyering  <jim@meyering.net>
18824
18825         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
18826         Reported by Yoann Vandoorselaere.
18827
18828 2005-05-17  Jim Meyering  <jim@meyering.net>
18829
18830         * m4/fts.m4: New file, from coreutils.
18831
18832 2005-05-17  Jim Meyering  <jim@meyering.net>
18833
18834         * lib/fts.c, lib/fts_.h: New files, from coreutils.
18835
18836 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
18837
18838         Sync from coreutils.
18839         * m4/unlinkdir.m4: New file.
18840
18841 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
18842
18843         Sync from coreutils.
18844         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
18845         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
18846         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
18847         White space changes only.
18848         * lib/makepath.c (make_path): Port to hosts where leading "//" is
18849         special.
18850         * lib/yesno.c: Include getline.h, not ctype.h.
18851         (yesno): Don't remove leading white space; POSIX doesn't allow it.
18852         Use getline to remove arbitrary restriction on response length.
18853
18854 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
18855
18856         * config/srclist-update: Spell out "Street" in FSF postal
18857         mail address; this is the style the FSF seems to prefer.
18858
18859         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
18860         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
18861         this updates FSF postal mail address.
18862
18863         Sync from coreutils.
18864         * modules/unlinkdir: New file.
18865         * modules/yesno (Depends-on): Add getline.
18866         * MODULES.html.sh (File system functions): Add unlinkdir.
18867
18868 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18869
18870         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
18871         lib/strsep.h:
18872         Change the initial comment to refer to GPL, not LGPL.
18873         gnulib-tool will change it to LGPL as needed.
18874
18875         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
18876         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
18877         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
18878         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
18879         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
18880         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
18881         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
18882         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
18883         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
18884         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
18885         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
18886         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
18887         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
18888         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
18889         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
18890         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
18891         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
18892         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
18893         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
18894         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
18895         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
18896         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
18897         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
18898         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
18899         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
18900         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
18901         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
18902         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
18903         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
18904         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
18905         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
18906         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
18907         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
18908         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
18909         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
18910         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
18911         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
18912         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
18913         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
18914         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
18915         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
18916         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
18917         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
18918         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
18919         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
18920         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
18921         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
18922         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
18923         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
18924         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
18925         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
18926         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
18927         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
18928         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
18929         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
18930         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
18931         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
18932         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
18933         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
18934         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
18935         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
18936         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
18937         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
18938         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
18939         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
18940         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
18941         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
18942         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
18943         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
18944         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
18945         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
18946         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
18947         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
18948         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
18949         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
18950         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
18951         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
18952         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
18953         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
18954         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
18955         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
18956         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
18957         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
18958         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
18959         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
18960         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
18961         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
18962         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
18963         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
18964         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
18965         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
18966         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
18967         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
18968         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
18969         lib/yesno.c, lib/yesno.h:
18970         Update FSF postal mail address.
18971
18972 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18973
18974         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
18975         tests/test-memmem.c, tests/test-stpncpy.c:
18976         Update FSF postal mail address.
18977
18978 2005-05-13  Bruno Haible  <bruno@clisp.org>
18979
18980         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
18981         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
18982         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
18983         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
18984         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
18985         Add support for 64-bit integers in the MSVC compiler.
18986
18987 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18988
18989         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
18990
18991 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
18992
18993         * gnulib-tool (func_import): Sort and uniquify recommended includes.
18994
18995 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
18996
18997         * doc/getdate.texi (General date syntax): Don't say that date
18998         date --iso-8601=ns generates acceptable dates; it doesn't yet.
18999         Problem reported by Nic Ferrier.
19000
19001 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19002
19003         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
19004         specified in ai_socktype. Fix invalid ai_protocol
19005         check. ai_protocol is usually set to 0 or depending on
19006         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
19007         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
19008         ai_socktype / ai_protocol in the returned addrinfo structure.
19009
19010 2005-05-10  Simon Josefsson  <jas@extundo.com>
19011
19012         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
19013         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
19014
19015 2005-05-10  Karl Berry  <karl@gnu.org>
19016
19017         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
19018         (from http://www.gnu.org/licenses).
19019         * doc/COPYING.LIB: also rename to COPYING.LESSER.
19020         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
19021         fdl.texi suffices.
19022
19023 2005-05-10  Karl Berry  <karl@gnu.org>
19024
19025         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
19026         (COPYING.DOC): remove.
19027
19028         * config/srclist-update: new FSF address.
19029
19030 2005-05-10  Derek Price  <derek@ximbiot.com>
19031
19032         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
19033         possible.
19034
19035 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19036             Bruno Haible  <bruno@clisp.org>
19037
19038         * modules/inet_ntop: New file.
19039         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19040         inet_ntop.
19041
19042 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19043             Bruno Haible  <bruno@clisp.org>
19044
19045         * m4/inet_ntop.m4: New file.
19046
19047 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
19048             Bruno Haible  <bruno@clisp.org>
19049
19050         * lib/inet_ntop.h: New file.
19051         * lib/inet_ntop.c: New file, from glibc with modifications.
19052
19053 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
19054
19055         * modules/time_r (License): Change to LGPL.
19056         * modules/extensions (License): Change to LGPL.  Actually,
19057         the license is more permissive than that, but currently gnulib-tool
19058         doesn't know how to handle more-permissive licenses.
19059
19060         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
19061         Problem reported by Dave Love.
19062
19063 2005-05-08  Jim Meyering  <jim@meyering.net>
19064
19065         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
19066         blank.
19067
19068 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
19069
19070         * modules/argmatch (Depends-on): Add stdbool.
19071         * modules/backupfile (Depends-on): Likewise.
19072         * modules/chdir-long (Depends-on): Likewise.
19073         * modules/closeout (Depends-on): Likewise.
19074         * modules/cycle-check (Depends-on): Likewise.
19075         * modules/dirname (Depends-on): Likewise.
19076         * modules/fnmatch (Depends-on): Likewise.
19077         * modules/fsusage (Depends-on): Likewise.
19078         * modules/fwriteerror (Depends-on): Likewise.
19079         * modules/getcwd (Depends-on): Likewise.
19080         * modules/getloadavg (Depends-on): Likewise.
19081         * modules/hard-locale (Depends-on): Likewise.
19082         * modules/makepath (Depends-on): Likewise.
19083         * modules/mountlist (Depends-on): Likewise.
19084         * modules/nanosleep (Depends-on): Likewise.
19085         * modules/posixtm (Depends-on): Likewise.
19086         * modules/quotearg (Depends-on): Likewise.
19087         * modules/readtokens (Depends-on): Likewise.
19088         * modules/readtokens0 (Depends-on): Likewise.
19089         * modules/readutmp (Depends-on): Likewise.
19090         * modules/save-cwd (Depends-on): Likewise.
19091         * modules/strftime (Depends-on): Likewise.
19092         * modules/userspec (Depends-on): Likewise.
19093         * modules/utimecmp (Depends-on): Likewise.
19094         * modules/xgetcwd (Depends-on): Likewise.
19095         * modules/xnanosleep (Depends-on): Likewise.
19096         * modules/xstrtod (Depends-on): Likewise.
19097         * modules/yesno (Depends-on): Likewise.
19098
19099 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
19100
19101         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
19102         needless checks.
19103
19104 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19105
19106         Merge from coreutils.  Among other things,
19107         add bulletproofing for cases where stdin, stdout, or stderr are closed.
19108         * lib/fd-safer.c: New file.
19109         * lib/fcntl-safer.h, open-safer.c: Remove.
19110         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
19111         * lib/dup-safer.c: Include unistd-safer.h first.
19112         Don't include errno.h.
19113         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
19114         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
19115         * lib/file-type.c: Rely on file-type.h change.
19116         * lib/getloadavg.c: Include unistd-safer.h.
19117         (getloadavg): Use safer open.
19118         * lib/getusershell.c: Include "stdio-safer.h".
19119         (getusershell): Use safer fopen.
19120         * lib/long-options.c (long_options): Use NULL rather than 0.
19121         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
19122         'free'.
19123         * lib/modechange.c: Likewise.
19124         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
19125         (MODE_DONE): New constant.
19126         (struct mode_change): Remove 'next' member.
19127         (make_node_op_equals): New function; like the old one of the
19128         same name, except it allocates an array.
19129         (mode_compile, mode_create_from_ref): Use it.
19130         (mode_compile): Allocate result as an array, not a linked list.
19131         Parse octal string ourself, so that we catch mistakes like "+0".
19132         (mode_adjust): Arg is an array, not a linked list.
19133         * lib/modechange.c: Include stat-macros.h, xalloc.h.
19134         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
19135         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
19136         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
19137         Remove.  This is now stat-macros.h's job.
19138         (talloc): Remove.  All callers replaced by xalloc, so that
19139         our invokers don't have to worry about reporting memory failures.
19140         (make_node_op_equals): Remove.
19141         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19142         New constants.
19143         (struct mode_change): Moved here from modechange.h.
19144         (mode_append_entry): Remove.
19145         (mode_compile): Remove MASKED_OPS arg, since it encouraged
19146         apps to have incorrect behavior.  Use simpler algorithm for head
19147         and tail.  Don't futz with umask; that's now the job of mode_adjust.
19148         Detect more invalid usages rather than having somewhat-random behavior.
19149         Don't insert an "a=" action, as that leads to incorrect behavior.
19150         (mode_compile, mode_create_from_ref): Return NULL on error instead
19151         of an enum, since now there's only one way to have an error.  All
19152         callers changed.
19153         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
19154         at the correct time.  Simplify calculation of "+u" and its ilk.
19155         Don't mishandle "+X".
19156         (mode_free): Remove "register" and localize decls.
19157         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
19158         (struct mode_change): Move to modechange.c; callers don't
19159         need to see this stuff.
19160         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
19161         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
19162         (mode_change, mode_adjust): Reflect the new signatures noted above.
19163         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
19164         that might redefine system include files.
19165         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
19166         (my_usleep): Use NULL rather than (void *) 0.
19167         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
19168         Use siginterrupt to specify that system calls should be interrupted.
19169         (rpl_nanosleep): Move initialization of suspended closer to call of
19170         my_usleep.
19171         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
19172         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
19173         (desirable_utmp_entry): New function.
19174         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
19175         using x2nrealloc, to simplify logic.
19176         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
19177         size calculation.  Do not assume utmp file is a regular file.
19178         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
19179         (READ_UTMP_CHECK_PIDS): New constant.
19180         * lib/save-cwd.c: Include unistd-safer.h.
19181         (save_cwd): Use fd_safer.
19182         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
19183         [!_LIBC] Include "stat-macros.h" instead.
19184         * lib/unistd-safer.h (fd_safer): New decl.
19185
19186 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19187
19188         * modules/getloadavg (Depends-on): Add unistd-safer.
19189         * modules/getusershell (Depends-on): Add stdio-safer.
19190         * modules/lstat (Depends-on): Remove xalloc.
19191         * modules/mkstemp (Depends-on): Add stat-macros.
19192         * modules/modechange (Depends-on): Remove xstrtol.
19193         Add stat-macros, xalloc.
19194         * modules/save-cwd (Depends-on): Add unistd-safer.
19195         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
19196         * modules/unistd-safer (Files): Add lib/fd-safer.c
19197         (Makefile.am): Remove lib_SOURCES.
19198
19199         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
19200         Remove fcntl-safer; unistd-safer supersedes it.
19201
19202 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19203
19204         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
19205         AC_HEADER_STAT.
19206         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
19207         (gl_PREREQ_CHOWN): Remove.
19208         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
19209         it.  Don't require AC_HEADER_STAT.
19210         (gl_PREREQ_LSTAT): Remove.
19211         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
19212         Don't require AC_HEADER_STAT.
19213         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
19214         (gl_PREREQ_RMDIR): Remove.
19215         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
19216         mention stat-macros.h or AC_HEADER_STAT, since we'll make
19217         the stat-macros module a prerequisite.
19218         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
19219         * m4/filemode.m4 (gl_FILEMODE): Likewise.
19220         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
19221         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
19222         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
19223         variable names.
19224         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
19225         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
19226         variable prefixes.
19227         * m4/fcntl-safer.m4: Remove.
19228         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
19229         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
19230         Invoke gl_PREREQ_FD_SAFER.
19231         (gl_PREREQ_FD_SAFER): New macro.
19232         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
19233         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
19234         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
19235         Remove duplicate call to AC_LIBOBJ(readutmp).
19236         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
19237
19238         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
19239         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
19240
19241 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
19242
19243         * MODULES.html.sh (Misc): Add byteswap.
19244
19245 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19246
19247         * modules/getcwd (Depends-on): Add extensions.
19248         * modules/openat (Depends-on): Likewise.
19249
19250 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19251
19252         * modules/byteswap: New file.
19253
19254 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19255
19256         * m4/byteswap.m4: New file.
19257
19258 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
19259
19260         * lib/byteswap_.h: New file.
19261
19262 2005-04-25  Karl Berry  <karl@gnu.org>
19263
19264         * m4/gettext.m4: Update from GNU gettext 0.14.4.
19265
19266 2005-04-25  Albert Chin  <china@thewrittenword.com>
19267
19268         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
19269         Toolkit C bug.
19270
19271 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
19272
19273         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
19274         (func_ln_if_changed) Remove forcibly for no error message
19275         in case file does not exist.
19276
19277 2005-04-19  Simon Josefsson  <jas@extundo.com>
19278
19279         * gnulib-tool (Options): Make --symlink mean --symbolic.
19280
19281 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
19282
19283         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
19284
19285 2005-04-16  Simon Josefsson  <jas@extundo.com>
19286
19287         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
19288
19289 2005-04-15  Simon Josefsson  <jas@extundo.com>
19290
19291         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
19292
19293 2005-04-15  Simon Josefsson  <jas@extundo.com>
19294
19295         * gnulib-tool: Rename --symlink to --symbolic.
19296
19297 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
19298
19299         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
19300         symbolic links to files instead of copying/moving.  Add --aux-dir,
19301         specifying directory relative --dir where auxiliary build tools
19302         are placed.
19303
19304 2005-04-14  Bruno Haible  <bruno@clisp.org>
19305
19306         * modules/allocsa (License): Change to LGPL.
19307         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
19308
19309 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
19310
19311         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
19312         that "UTC +1 second" continues to work.  Problem reported
19313         by Dmitry V. Levin.
19314         (relunit_snumber): New rule.
19315         (relunit): Use it.
19316
19317 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
19318
19319         * lib/getdate.y (universal_time_zone_table): New constant.
19320         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
19321         universal_time_zone_table.
19322         (lookup_zone): Prefer universal_time_zone_table to
19323         local_time_zone_table, so that "GMT" time stamps are allowed in
19324         London during the summer.  Problem reported by Ian Abbott.
19325
19326 2005-04-12  Jim Meyering  <jim@meyering.net>
19327
19328         * lib/human.c (humblock): Set *options even when returning due to
19329         xstrtoumax conversion failure.  Thanks to a used-uninitialized
19330         warning from gcc-4.
19331
19332 2005-04-09  Jim Meyering  <jim@meyering.net>
19333
19334         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
19335         -Wuninitialized: initialize tm0.tm_year.
19336
19337 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
19338
19339         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
19340         count, since there's no maximum.  All uses changed.
19341         Add member dsts_seen.
19342         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
19343         not being INT_MAX.
19344         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
19345         Use pc_rels_seen to decide whther a date is absolute.
19346
19347         * lib/getdate.y (number): Don't overwrite year.
19348         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
19349         check.
19350
19351 2005-04-02  Simon Josefsson  <jas@extundo.com>
19352
19353         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
19354         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
19355
19356 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
19357
19358         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
19359         where no absolute path name can be longer than PATH_MAX.
19360
19361 2005-03-27  Jim Meyering  <jim@meyering.net>
19362
19363         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
19364
19365 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
19366
19367         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
19368         "one's complement" -> "ones' complement" in comment, as per Knuth.
19369         "value of type" -> "type or expression" in comment.
19370         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
19371
19372 2005-03-26  Jim Meyering  <jim@meyering.net>
19373
19374         Comment nits.
19375         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
19376         Correct typos: s/or/of/.
19377
19378 2005-03-26  Jim Meyering  <jim@meyering.net>
19379
19380         * modules/check-include-files: Move to ../ and rename to...
19381         * check-module: ...this.
19382
19383 2005-03-25  Jim Meyering  <jim@meyering.net>
19384
19385         * modules/xvasprintf (Files): Add xalloc.h.
19386
19387 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
19388
19389         * modules/gettext (Files): config/config.rpath ->
19390         build-aux/config.rpath
19391         * modules/iconv (Files): Likewise.
19392         Problem reported by Oskar Liljeblad.
19393
19394 2005-03-23  Jim Meyering  <jim@meyering.net>
19395
19396         * modules/check-include-files: New script to check for
19397         missing dependencies, multiple includes, etc.
19398
19399         * modules/c-strtold (Depends-on): Add xalloc.
19400         * modules/c-strtod (Depends-on): Add xalloc.
19401         * modules/hash (Depends-on): Add xalloc.
19402         (Files): Remove lib/xalloc.h.
19403
19404         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
19405         * modules/userspec (Files): Add lib/inttostr.h.
19406
19407 2005-03-23  Jim Meyering  <jim@meyering.net>
19408
19409         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
19410
19411 2005-03-22  Jim Meyering  <jim@meyering.net>
19412
19413         * modules/stat-macros: New module.
19414         * modules/canonicalize, modules/euidaccess, modules/file-type,
19415         * modules/filemode, modules/lchown, modules/makepath,
19416         * modules/rmdir, modules/stat: Depend on new stat-macros module
19417         rather than listing lib/stat-macros.h manually.
19418         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
19419
19420 2005-03-22  Jim Meyering  <jim@meyering.net>
19421
19422         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
19423
19424 2005-03-22  Bruno Haible  <bruno@clisp.org>
19425
19426         * config/srclist.txt: Replace target directory 'config' with
19427         'build-aux'.
19428         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
19429         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
19430         ../build-aux/.
19431
19432 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
19433
19434         * modules/chdir-long (Depends-on): Add mempcpy.
19435
19436         * modules/acl, modules/backupfile, modules/c-strtod,
19437         modules/c-strtold, modules/canon-host, modules/canonicalize,
19438         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
19439         modules/exclude, modules/exitfail, modules/file-type,
19440         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
19441         modules/getdate, modules/getline, modules/getpagesize,
19442         modules/getpass, modules/getugroups, modules/group-member,
19443         modules/hard-locale, modules/hash, modules/human, modules/idcache,
19444         modules/inttostr, modules/long-options, modules/makepath,
19445         modules/md5, modules/memcasecmp, modules/memcoll,
19446         modules/modechange, modules/mountlist, modules/path-concat,
19447         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
19448         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
19449         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
19450         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
19451         modules/strftime, modules/strndup, modules/strverscmp,
19452         modules/timespec, modules/unlocked-io, modules/userspec,
19453         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
19454         modules/yesno:
19455         Remove lib_SOURCES line from Makefile.am section, as this is now
19456         done automatically by the corresponding Autoconf macro.
19457
19458 2005-03-21  Jim Meyering  <jim@meyering.net>
19459
19460         Changes imported from coreutils.
19461
19462         * lib/cycle-check.c: Don't include xalloc.h.
19463
19464         * lib/path-concat.c: Don't include assert.h.
19465         (path_concat): Remove assertion that would have triggered
19466         for ABASE starting with more than one slash.
19467         Reported by Andreas Schwab.
19468
19469         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
19470         properly when ABASE is an absolute file name.
19471         Correct the description of this function.
19472         Include <assert.h>.
19473         Add an assertion and a test driver.
19474         This fixes a bug introduced on 2004-07-02.
19475         Andreas Schwab reported the resulting failure of cp --parents:
19476         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
19477
19478 2005-03-21  Jim Meyering  <jim@meyering.net>
19479
19480         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
19481         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
19482
19483 2005-03-21  Jim Meyering  <jim@meyering.net>
19484         and  Paul Eggert  <eggert@cs.ucla.edu>
19485
19486         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
19487         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
19488         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
19489         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
19490         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
19491         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
19492         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
19493         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
19494         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
19495         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
19496         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
19497         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
19498         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
19499         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
19500         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
19501         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
19502         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
19503         for these modules.
19504
19505 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
19506
19507         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
19508         (which shouldn't happen), generate nothing instead of returning 0
19509         immediately, so that nstrftime (NULL, ...) doesn't return 0.
19510
19511 2005-03-16  Bruno Haible  <bruno@clisp.org>
19512
19513         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
19514         HAVE_LONGLONG_64BIT.
19515
19516 2005-03-16  Bruno Haible  <bruno@clisp.org>
19517
19518         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
19519         HAVE_LONGLONG_64BIT.
19520
19521 2005-03-16  Bruno Haible  <bruno@clisp.org>
19522
19523         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
19524         HAVE_LONGLONG_64BIT.
19525
19526 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
19527
19528         * lib/strftime.c (my_strftime): Prepend space to format so that we can
19529         reliably distinguish strftime failure from empty output on POSIX
19530         hosts.
19531
19532 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
19533
19534         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
19535         (iconv_string): Don't guess a size-zero buffer, as that might cause
19536         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
19537         result would be 'too large', where 'too large' is (heuristically)
19538         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
19539         overflow concerns.  This will prevent some unwanted malloc failures
19540         when the inputs are very large.
19541
19542 2005-03-15  Karl Berry  <karl@gnu.org>
19543
19544         * config/srclist.txt (config.rpath): from gettext.
19545         * config/config.rpath: update.
19546
19547 2005-03-15  Bruno Haible  <bruno@clisp.org>
19548
19549         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
19550         to 'negate'.
19551
19552         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
19553         variable.
19554
19555         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
19556         results.
19557
19558 2005-03-14  Simon Josefsson  <jas@extundo.com>
19559
19560         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
19561         <fx@gnu.org>.
19562
19563 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
19564
19565         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
19566         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
19567         intprops.h.
19568         * lib/strtol.c: Likewise.
19569
19570 2005-03-14  Jim Meyering  <jim@meyering.net>
19571
19572         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
19573         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
19574         to be nonzero so that we (and caller) can detect the difference
19575         between a valid zero-length expansion and an error return, even
19576         when the underlying strftime fails before writing anything into
19577         that location.
19578
19579 2005-03-14  Bruno Haible  <bruno@clisp.org>
19580
19581         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
19582         Update from GNU gettext 0.14.3.
19583
19584 2005-03-10  Jim Meyering  <jim@meyering.net>
19585
19586         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
19587
19588 2005-03-10  Jim Meyering  <jim@meyering.net>
19589
19590         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
19591         so that this module works on systems without fchdir.
19592
19593 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
19594
19595         Factor int-properties macros into a single file, except for
19596         glibc-related files.
19597         * lib/intprops.h: New file.
19598         * lib/getloadavg.c: Include it instead of limits.h.
19599         (INT_STRLEN_BOUND): Remove.
19600         * lib/human.c: Include intprops.h.
19601         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
19602         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
19603         302/1000.
19604         * lib/inttostr.h: Include intprops.h instead of limits.h.
19605         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
19606         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
19607         for consistency with intprops.h.
19608         (time_t_is_integer, twos_complement_arithmetic): Use them.
19609         * lib/sig2str.h: Include <signal.h>, intprops.h.
19610         (INT_STRLEN_BOUND): Remove.
19611         * lib/strftime.c (TYPE_SIGNED): Remove.
19612         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
19613         * lib/strtol.c: Adjust comments to match intprops.h.
19614         * lib/userspec.c: Include intprops.h.
19615         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
19616         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
19617         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
19618         instead of rolling our own expressions.
19619         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
19620
19621         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
19622         instead of int.
19623         (my_strftime): Do not mishandle years close to INT_MAX, by doing
19624         the right thing even if adding 1900 would overflow.  Similarly
19625         for tm_mon + 1 and tm_yday + 1.
19626         Make %Y always equivalent to %C%y, and similarly for %G and %g.
19627         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
19628         (DO_SIGNED_NUMBER): New macro.
19629         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
19630
19631 2005-03-07  Bruno Haible  <bruno@clisp.org>
19632
19633         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
19634
19635 2005-03-07  Bruno Haible  <bruno@clisp.org>
19636
19637         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
19638
19639 2005-03-04  Derek R. Price  <derek@ximbiot.com>
19640
19641         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
19642         (func_import): Only replace files via --import when they have actually
19643         changed.
19644
19645 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19646
19647         * m4/mmap-anon.m4: New file.
19648         * m4/pagealign_alloc.m4: New file.
19649
19650 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19651             Bruno Haible  <bruno@clisp.org>
19652
19653         * modules/pagealign_alloc: New file.
19654         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
19655
19656 2005-03-03  Derek R. Price  <derek@ximbiot.com>
19657             Bruno Haible  <bruno@clisp.org>
19658
19659         * lib/pagealign_alloc.h: New file.
19660         * lib/pagealign_alloc.c: New file.
19661
19662 2005-03-03  Bruno Haible  <bruno@clisp.org>
19663
19664         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
19665         Use an all-permissive copyright notice, recommended by RMS.
19666
19667 2005-03-02  Bruno Haible  <bruno@clisp.org>
19668
19669         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
19670         of AIX, the replacement has to be done only after <string.h> is
19671         included, therefore not in config.h. stpncpy.h does the replacement,
19672         and stpncpy.c uses it.
19673
19674 2005-03-02  Bruno Haible  <bruno@clisp.org>
19675
19676         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
19677         stpncpy.c uses it.
19678
19679 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
19680
19681         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
19682         The workaround isn't strictly needed for POSIX conformance, and
19683         it's too much of a pain to configure and maintain.  We'll ask
19684         people to fix their kernels instead.
19685         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
19686         (NANOSLEEP_BUG_WORKAROUND): Remove.
19687         (xnanosleep): Remove the workaround.
19688
19689 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
19690
19691         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
19692         Reported by Derek Price.
19693         (Include): Add "timespec.h".
19694
19695         * modules/xnanosleep (Depends-on): Remove gethrxtime.
19696
19697 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
19698
19699         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
19700         to detect nanosleep bug.
19701
19702 2005-03-01  Bruno Haible  <bruno@clisp.org>
19703
19704         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
19705
19706 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
19707
19708         * modules/gethrxtime: New file.
19709         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
19710         (Depends-on): Add gethrxtime.
19711         (configure.ac): Add gl_XNANOSLEEP.
19712         (Makefile.am): Remove lib_SOURCES line.
19713
19714 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
19715
19716         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
19717         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
19718
19719 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
19720
19721         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
19722         * lib/timespec.h (gettime): Return void, since it always
19723         succeeds now.  All uses changed.
19724         * lib/gettime.c (gettime) Likewise.
19725         [HAVE_NANOTIME]: Prefer nanotime.
19726         Assume gettimeofday succeeds, as POSIX requires.
19727         Assime time () succeeds, since other code already does.
19728         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
19729         (timespec_subtract): Remove.
19730         (NANOSLEEP_BUG_WORKAROUND): New constant.
19731         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
19732         things considerably.  Use it only on GNU/Linux hosts, since the
19733         workaround shouldn't be needed elsewhere.
19734
19735 2005-02-24  Bruno Haible  <bruno@clisp.org>
19736
19737         * modules/gettext (Files): Add m4/glibc2.m4.
19738
19739 2005-02-24  Bruno Haible  <bruno@clisp.org>
19740
19741         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
19742         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
19743         * m4/progtest.m4:
19744         Update from GNU gettext 0.14.2.
19745         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
19746
19747 2005-02-24  Bruno Haible  <bruno@clisp.org>
19748
19749         * lib/localcharset.c: Update from GNU gettext 0.14.2.
19750         * lib/config.charset: Update from GNU gettext 0.14.2.
19751
19752 2005-02-24  Bruno Haible  <bruno@clisp.org>
19753
19754         * lib/gettext.h: Update from GNU gettext 0.14.2.
19755
19756 2005-02-23  Simon Josefsson  <jas@extundo.com>
19757
19758         * m4/iconvme.m4: New file.
19759
19760 2005-02-23  Jim Meyering  <jim@meyering.net>
19761
19762         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
19763         change.
19764         Thanks to Bruno Haible for catching it.
19765
19766 2005-02-22  Simon Josefsson  <jas@extundo.com>
19767
19768         * modules/iconvme: New file.
19769
19770         * MODULES.html.sh: Add iconvme.
19771
19772 2005-02-22  Simon Josefsson  <jas@extundo.com>
19773
19774         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
19775
19776 2005-02-22  Simon Josefsson  <jas@extundo.com>
19777
19778         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
19779
19780 2005-02-22  Jim Meyering  <jim@meyering.net>
19781
19782         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
19783         s/ifndef/ifdef/.
19784
19785 2005-02-20  Neil Conway  <neilc@samurai.com>
19786
19787         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
19788         returned by OSX/Darwin if the specified buffer is not large
19789         enough for the hostname.
19790
19791 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19792
19793         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
19794         pass it to _help, otherwise the latter coredumps trying to
19795         dereference state.root_argp.
19796
19797 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
19798
19799         * modules/chdir-long (Depends-on): Add memrchr.
19800         * modules/memrchr (Files): Add lib/memrchr.h.
19801         (Include): "memrchr.h".
19802
19803 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
19804
19805         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
19806
19807 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
19808
19809         * lib/memrchr.h: New file.
19810         * lib/chdir-long.c: Include it.
19811         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
19812         Don't bother including stddef.h.
19813
19814 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
19815
19816         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
19817         inclusion.
19818         Include <sys/types.h>, for dev_t.
19819         (ME_DUMMY, ME_REMOTE): Move from here....
19820         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
19821         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
19822         Dmitry V. Levin.
19823         Include mountlist.h first, to test the interface.
19824
19825 2005-01-29  Bruno Haible  <bruno@clisp.org>
19826
19827         * lib/progname.c (program_name): Initialize.
19828         Needed when linking statically on MacOS X.
19829
19830 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
19831
19832         Sync from coreutils.
19833         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
19834         (Depends-on): Add c-strtod.
19835         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
19836
19837 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
19838
19839         Sync from coreutils.
19840         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
19841
19842         Remove files that are specific to coreutils.
19843         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
19844
19845 2005-01-28  Bruno Haible  <bruno@clisp.org>
19846
19847         * modules/javacomp: New file.
19848         * MODULES.html.sh (Java): Add javacomp.
19849
19850 2005-01-28  Bruno Haible  <bruno@clisp.org>
19851
19852         * m4/javacomp.m4: New file, from GNU gettext.
19853
19854 2005-01-28  Bruno Haible  <bruno@clisp.org>
19855
19856         * lib/javacomp.sh.in: New file, from GNU gettext.
19857         * lib/javacomp.h: New file, from GNU gettext.
19858         * lib/javacomp.c: New file, from GNU gettext.
19859
19860 2005-01-26  Simon Josefsson  <jas@extundo.com>
19861
19862         * lib/gai_strerror.c: Use GPL in header.
19863
19864 2005-01-26  Bruno Haible  <bruno@clisp.org>
19865
19866         * modules/javaexec: New file.
19867         * MODULES.html.sh (Java): Add javaexec.
19868
19869 2005-01-26  Bruno Haible  <bruno@clisp.org>
19870
19871         * m4/javaexec.m4: New file, from GNU gettext.
19872
19873 2005-01-26  Bruno Haible  <bruno@clisp.org>
19874
19875         * lib/javaexec.sh.in: New file, from GNU gettext.
19876         * lib/javaexec.h: New file, from GNU gettext.
19877         * lib/javaexec.c: New file, from GNU gettext.
19878
19879 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19880
19881         * modules/lchown (Depends-on): Remove lchown.h
19882
19883 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19884
19885         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
19886         must be defined if the header file was not found, in order
19887         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
19888
19889 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19890
19891         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
19892         initializers for struct pentry_state.
19893         (__argp_error): Check return value of __asprintf
19894         (__argp_failure): Translate error message
19895
19896         * lib/argp-parse.c: Removed braces around the expansion of N_()
19897
19898 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
19899
19900         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
19901         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
19902         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
19903         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
19904         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
19905         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
19906         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
19907         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
19908         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
19909         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
19910         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
19911         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
19912         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
19913         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
19914         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
19915         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
19916         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
19917         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
19918         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
19919         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
19920         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
19921         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
19922         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
19923         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
19924         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
19925         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
19926         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
19927         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
19928         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
19929         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
19930         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
19931         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
19932         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
19933         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
19934         xstrtol.m4, xstrtoumax.m4, yesno.m4:
19935         Use an all-permissive copyright notice, recommended by RMS.
19936
19937 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
19938
19939         * modules/chdir-long (Depends-on): Remove mempcpy.
19940
19941 2005-01-21  Jim Meyering  <jim@meyering.net>
19942
19943         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
19944         same value as for Solaris 9.
19945
19946         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
19947         component length.  This included changing the parameter to be
19948         of type `char *' rather than `char const *'.
19949         * lib/chdir-long.h (chdir_long): Update prototype.
19950
19951         * lib/openat.c (fdopendir, fstatat): New functions.
19952         * lib/openat.h: Include headers required for use of DIR and struct
19953         stat.
19954         [AT_SYMLINK_NOFOLLOW]: Define.
19955         (fdopendir, fstatat): Add prototypes.
19956
19957 2005-01-21  Bruno Haible  <bruno@clisp.org>
19958
19959         * modules/classpath: New file.
19960         * MODULES.html.sh (Java): Add classpath.
19961
19962 2005-01-21  Bruno Haible  <bruno@clisp.org>
19963
19964         * lib/classpath.h: New file, from GNU gettext.
19965         * lib/classpath.c: New file, from GNU gettext.
19966
19967 2005-01-20  Simon Josefsson  <jas@extundo.com>
19968
19969         * modules/version-etc-fsf: New file.
19970
19971 2005-01-20  Simon Josefsson  <jas@extundo.com>
19972
19973         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
19974         * lib/version-etc.c: Remove version_etc_copyright.
19975         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
19976         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
19977
19978 2005-01-20  Simon Josefsson  <jas@extundo.com>
19979
19980         * lib/base64.h (isbase64): Add.
19981
19982         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
19983         using a unsigned prototype, don't inline.
19984         (base64_decode): Use it.
19985
19986 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
19987
19988         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
19989         it.
19990
19991 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
19992
19993         * lib/save-cwd.c (save_cwd): Remove code to support the case
19994         where fchdir is missing or flaky.
19995
19996 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
19997
19998         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
19999
20000 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
20001
20002         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
20003         AC_LIBSOURCES now does this.
20004         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
20005         with new ullong_max module.
20006
20007 2005-01-19  Bruno Haible  <bruno@clisp.org>
20008
20009         * modules/sh-quote: New file.
20010         * MODULES.html.sh (Executing programs): Add sh-quote.
20011
20012 2005-01-19  Bruno Haible  <bruno@clisp.org>
20013
20014         * lib/sh-quote.h: New file, from GNU gettext.
20015         * lib/sh-quote.c: New file, from GNU gettext.
20016
20017 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20018
20019         Merge from coreutils.
20020         * m4/ullong_max.m4: New file.
20021         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
20022         (gl_MACROS): Assume localeconv exists.
20023
20024 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20025
20026         Merge changes from coreutils, as described below in several
20027         changelogs dated today.
20028
20029         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
20030         (O_DIRECTORY): Remove; not needed here, since "." must be
20031         a directory.  All uses removed.
20032         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
20033         universal on Suns, and we also need to test for IRIX.
20034         Revamp code to use 'if' rather than '#if'.
20035         Avoid unnecessary comparison of cwd->desc to 0.
20036
20037         * lib/utimens.c (futimens): Robustify the previous patch, by checking
20038         for known valid error numbers rather than observed invalid ones.
20039
20040 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
20041
20042         * modules/ullong_max: New file.
20043
20044         * modules/chdir-long, modules/openat: New files.
20045         * modules/save-cwd (Depends-on): Depend on chdir-long.
20046         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
20047
20048 2005-01-18  Jim Meyering  <jim@meyering.net>
20049
20050         Merge from coreutils.
20051         * m4/chdir-long.m4, m4/openat.m4: New files.
20052         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
20053         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
20054         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
20055         is sane and DOES follow symlinks.  Besides, testing 20 different
20056         systems found no broken chown implementations.
20057         Prompted by a change in rsync's copy of this macro.
20058         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
20059
20060         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
20061
20062         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
20063         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
20064         NULL-means-set-to-current-time semantics.
20065         Remove temporary file immediately, rather than waiting
20066         for configure's at-exit trap code to do it.
20067
20068 2005-01-18  Jim Meyering  <jim@meyering.net>
20069
20070         * lib/version-etc.c (version_etc_copyright): Update copyright date.
20071
20072         * lib/utimens.c (futimens): Account for the fact that futimes
20073         can also fail with errno == ENOSYS or errno == ENOENT.
20074         Patch from Dmitry V. Levin.
20075
20076         Change the name of the robust chdir function from chdir to chdir_long.
20077         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
20078         (restore_cwd): Use chdir_long, not chdir.
20079         * lib/chdir-long.c: Renamed from chdir.c.
20080         * lib/chdir-long.h: Renamed from chdir.h.
20081         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
20082         Hurd.
20083
20084 2005-01-18  Bruno Haible  <bruno@clisp.org>
20085
20086         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
20087         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
20088         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
20089         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
20090         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
20091         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
20092         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
20093         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
20094         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
20095         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
20096         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
20097         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
20098         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
20099         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
20100         Use an all-permissive copyright notice, recommended by RMS.
20101
20102 2005-01-18  Bob Proulx  <bob@proulx.com>
20103
20104         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
20105         simplify offsetof() macro construct to avoid compile failure with
20106         native HP-UX 11.0 ANSI C compiler.
20107
20108 2005-01-17  Bruno Haible  <bruno@clisp.org>
20109
20110         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
20111         redundant because stpncpy.m4 takes care of it.
20112
20113 2005-01-17  Bruno Haible  <bruno@clisp.org>
20114
20115         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
20116
20117 2005-01-17  Bruno Haible  <bruno@clisp.org>
20118
20119         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
20120         used.
20121
20122 2005-01-17  Bruno Haible  <bruno@clisp.org>
20123
20124         * lib/fwriteerror.h (fwriteerror): Change specification to include
20125         fclose.
20126         * lib/fwriteerror.c: Include <stdbool.h>.
20127         (fwriteerror): At the end, close the file stream. Record whether
20128         stdout was already closed.
20129
20130 2005-01-17  Bruno Haible  <bruno@clisp.org>
20131
20132         * lib/execute.c (environ): Declare if needed.
20133         * lib/pipe.c (environ): Likewise.
20134         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
20135
20136 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20137
20138         * modules/argp: Depend on vsnprintf
20139
20140 2005-01-10  Jim Meyering  <jim@meyering.net>
20141
20142         * modules/closeout (Depends-on): Add atexit.
20143
20144 2005-01-06  Bruno Haible  <bruno@clisp.org>
20145
20146         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
20147
20148 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
20149
20150         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
20151         definitions to be after all include files, to avoid collisions.
20152         Problem reported by Bob Proulx.
20153
20154 2005-01-04  Jim Meyering  <jim@meyering.net>
20155
20156         Changes imported from coreutils.
20157         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
20158         as the mkstemp template, use a temporary directory and an
20159         8.3-friendly template to avoid trouble on systems like DJGPP.
20160         Reported by Juan M. Guerrero via Stepan Kasal.
20161         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
20162         close. Remove the temporary directory right away, rather than waiting
20163         for configure's at-exit trap code to do it.
20164         Suggestion from Stepan Kasal.
20165
20166 2005-01-01  Simon Josefsson  <jas@extundo.com>
20167
20168         * gnulib-tool: Print #include directives when --import'ing.
20169
20170 2004-12-28  Simon Josefsson  <jas@extundo.com>
20171
20172         * tests/test-base64.c: Include required header files.  Remove
20173         unused variables.
20174
20175 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20176
20177         * modules/error (Depends-on): Remove gettext.
20178
20179 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
20180
20181         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
20182         not needed.  This removes a dependency on the gettext module.
20183         [defined _LIBC]: Do not include <libintl.h>; not needed.
20184
20185 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20186
20187         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
20188         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
20189
20190 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
20191
20192         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
20193         HAVE_DECL_STRTOLD.
20194
20195 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20196
20197         * modules/getdate (Depends-on): Remove alloca-opt.
20198
20199 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20200
20201         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
20202
20203 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
20204
20205         * lib/argp-parse.c: Include <stddef.h>.
20206         (alignof, alignto): New macros.
20207         (parser_init): Don't assume that void * is aligned sufficiently
20208         for struct option.
20209
20210         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
20211         need to extend the stack.
20212         (YYINITDEPTH): New macro, so that the initial stack isn't overly
20213         large.
20214
20215 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20216
20217         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
20218
20219 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20220
20221         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
20222         (2004-10-24) change.  Apparently this was a false alarm.
20223
20224         * modules/getdate: Depend on alloca-opt, not alloca.
20225
20226 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
20227
20228         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
20229         Remove now-obsolete comment about AIX.
20230         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
20231         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
20232         (YYMAXDEPTH): New macro.
20233
20234 2004-12-18  Simon Josefsson  <jas@extundo.com>
20235
20236         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
20237
20238 2004-12-18  Bruno Haible  <bruno@clisp.org>
20239
20240         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
20241
20242 2004-12-18  Bruno Haible  <bruno@clisp.org>
20243
20244         * lib/fatal-signal.c (fatal_signals): Make non-const.
20245         (init_fatal_signals): New function.
20246         (uninstall_handlers, install_handlers): Ignore signals that were set to
20247         SIG_IGN.
20248         (at_fatal_signal): Call init_fatal_signals.
20249         (init_fatal_signal_set): Likewise. Ignore signals that were set to
20250         SIG_IGN.
20251         Reported by Paul Eggert.
20252
20253 2004-12-18  Bruno Haible  <bruno@clisp.org>
20254
20255         * doc/alloca.texi: New file.
20256         * doc/alloca-opt.texi: New file.
20257
20258 2004-12-17  Jim Meyering  <jim@meyering.net>
20259
20260         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
20261         Otherwise, install-sh could exit with improper exit status when
20262         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
20263
20264 2004-12-16  Simon Josefsson  <jas@extundo.com>
20265
20266         * tests/test-base64.c: Add license.
20267
20268 2004-12-15  Stepan Kasal  <address@hidden>
20269
20270         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
20271
20272 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
20273
20274         * modules/getcwd (Files): Add m4/d-ino.m4.
20275         Suggested by Mark D. Baushke.
20276
20277 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20278
20279         * lib/getdate.y (textint): New member "negative".
20280         (time_zone_hhmm): New function.
20281         Expect 14 shift-reduce conflicts, not 13.
20282         (o_colon_minutes): New rule.
20283         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
20284         (yylex): Set the "negative" member of signed numbers.
20285
20286 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
20287
20288         * doc/getdate.texi (Time of day items, Time zone items):
20289         Describe new formats +00:00, UTC+00:00.
20290
20291 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
20292
20293         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
20294         spurious "-l"s.  Problem reported by Stepan Kasal.
20295
20296 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
20297
20298         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
20299         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
20300
20301 2004-12-04  Simon Josefsson  <jas@extundo.com>
20302
20303         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
20304         Vandoorselaere <yoann@prelude-ids.org>.
20305
20306 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20307
20308         Changes imported from coreutils.
20309         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
20310         exist.
20311         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
20312
20313 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20314
20315         Changes imported from coreutils.
20316         * lib/hard-locale.c: Assume <locale.h> exists.
20317         Include "strdup.h".
20318         (GLIBC_VERSION): New macro.
20319         (hard_locale): Assume setlocale exists.
20320         Rewrite to avoid #ifdef.
20321         Use strdup rather than malloc + strcpy.
20322         * lib/human.c: Assume <locale.h> exists.
20323         (human_readable): Assume localeconv exists.
20324
20325 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
20326
20327         * modules/hard-locale (Depends-on): Add strdup.
20328
20329 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
20330
20331         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
20332         convert T2, not T.  (Imported from libc.)
20333
20334 2004-11-30  Simon Josefsson  <jas@extundo.com>
20335
20336         * modules/restrict (License): Change to LGPL.
20337
20338 2004-11-30  Simon Josefsson  <jas@extundo.com>
20339
20340         * m4/restrict.m4: Add copyright and copying conditions.
20341
20342 2004-11-30  Simon Josefsson  <jas@extundo.com>
20343
20344         * m4/base64.m4: New file.
20345
20346 2004-11-30  Simon Josefsson  <jas@extundo.com>
20347
20348         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
20349         base64.
20350
20351         * tests/test-base64.c: New file.
20352
20353         * modules/base64: New file.
20354
20355 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20356
20357         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
20358         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
20359
20360         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
20361
20362 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
20363
20364         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
20365         (__getcwd.c): Don't restore errno; glibc doesn't.
20366         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
20367         first, falling back to our code only if its results look suspicious.
20368         Ensure that the resulting buffer is only as large as necessary.
20369
20370         * lib/readutmp.c: Include readutmp.h first.
20371         Include <errno.h>, since readutmp.h no longer does that.
20372         * lib/readutmp.h: Don't include <errno.h>,
20373         <sys/param.h>, <time.h>; not needed to establish interface.
20374         (errno): Remove decl.
20375         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
20376         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
20377         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
20378
20379 2004-11-28  Simon Josefsson  <jas@extundo.com>
20380
20381         * lib/base64.h, base64.c: New file.
20382
20383 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
20384
20385         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
20386
20387 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
20388
20389         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
20390         (Depends-on): Remove pathmax, same.  Add mempcpy.
20391         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
20392         (Makefile.am): Append getcwd.h to lib_SOURCES.
20393         (Include): Add getcwd.h.
20394         (Maintainer): Change from Jim Meyering to "all, glibc",
20395         since getdate now uses intended-for-glibc code.
20396         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
20397         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
20398
20399 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
20400
20401         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
20402         HP's ANSI C compiler.
20403         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
20404         Declaring int functions causes warnings on some modern systems and
20405         shouldn't be needed to compile on ancient ones.
20406         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
20407         defined.
20408
20409         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
20410         with the following changes.
20411         (__set_errno): Parenthesize properly.
20412         Include <stdbool.h>.
20413         (MIN, MAX, MATCHING_INO): New macros.
20414         (__getcwd): Define with prototype, not K&R form.
20415         Use heuristics to allocate default buffer on stack if possible.
20416         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
20417         behavior, and to avoid the PATH_MAX limit when computing
20418         ../../../../...
20419         Use MATCHING_INO to compare inode number to file.
20420         Check for arithmetic overflow in size calculations.
20421         Fix bug in reallocation of dot array that caused getcwd to fail
20422         on directories nested deeper than 75.
20423         Be more careful about saving errno on error.
20424         Do not use realloc; use only free+malloc, as this is a bit
20425         more flexible and avoids a needless copy operation.
20426         Do not inspect st_dev and st_ino for symbolic links; POSIX
20427         doesn't specify the latter.
20428         Check for closedir errors.
20429         Avoid needless casts.
20430         Use "#ifdef weak_alias" around weak_alias, to be like other
20431         glibc code.
20432         The following changes to getcwd.c have effect only when used in
20433         gnulib; they have no effect inside glibc proper.
20434         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
20435         as alloca isn't used.
20436         (alloca, __alloca): Likewise.
20437         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
20438         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20439         unconditionally, as gnulib assumes C89 or better.
20440         Do not include <sys/param.h>.
20441         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
20442         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
20443         better.
20444         (NULL) [!defined NULL]: Remove; we assume C89 or better.
20445         Include <dirent.h> in a way that is compatible with modern Autoconf.
20446         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
20447         New macros, if not already defined.
20448         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
20449         Use "_LIBC", not "defined _LIBC", for consistency.
20450         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
20451         a mempcpy module.
20452         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
20453         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
20454         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
20455         credit only to Jim Meyering and adjust the copyright dates.
20456         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
20457         <stdlib.h>, <unistd.h>, "pathmax.h".
20458         Instead, include "xgetcwd.h" (first) and "getcwd.h".
20459         (INITIAL_BUFFER_SIZE): Remove.
20460         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
20461
20462 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
20463
20464         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
20465         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
20466         Use the _ONCE methods, for efficiency.
20467         Check for fcntl.h.  In test program, include <errno.h>
20468         and <fcntl.h> if available.  Remove old K&R cruft from
20469         test program.  Check for common errors in GNU/Linux,
20470         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
20471         don't do AC_LIBOBJ, as that's getcwd.m4's job.
20472         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
20473         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
20474         name accordingly.
20475         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
20476         accommodate new getcwd.c.
20477         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
20478         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
20479         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
20480         that's all we need now.
20481
20482 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20483
20484         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
20485         argp-parse.c depends on getopt internals, that means we should
20486         always use our getopt, to be on the safe side.
20487         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
20488         order not to spoil the result of an eventual previous invocation
20489         of gl_GETOPT_SUBSTITUTE.
20490
20491 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20492
20493         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
20494         redefinition warnings. To avoid them, include the defines
20495         in `#if !defined __need_getopt ... #endif'. The only place
20496         where __getopt_argv_const is used is in definitions
20497         of getopt_long and getopt_long_only below, which are as well
20498         protected by `#ifndef __need_getopt'.
20499         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
20500         __need_getopt after including <stdio.h> and <unistd.h> These
20501         headers might have defined it.
20502
20503 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
20504
20505         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
20506
20507 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
20508
20509         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
20510         (futimens): New function, which uses futimes if available.
20511         (futimens, utimens): Support timespec==NULL, with same semantics
20512         as utime and utimens.
20513         * lib/utimens.h (futimens): New decl.
20514
20515 2004-11-23  Jim Meyering  <jim@meyering.net>
20516
20517         * lib/getopt_.h: Remove trailing blanks.
20518
20519 2004-11-23  Jim Meyering  <jim@meyering.net>
20520
20521         * lib/__fpending.c: Add comment.
20522
20523 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
20524
20525         * modules/canonicalize (Depends-on): Add xreadlink.
20526         Problem reported by James Youngman.
20527
20528 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
20529
20530         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
20531         New macros.
20532         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
20533         optopt): Use them instead of invoking ## directly; otherwise, the
20534         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
20535
20536 2004-11-19  Bruno Haible  <bruno@clisp.org>
20537
20538         * lib/strtok_r.c: Move comments from here...
20539         * lib/strtok_r.h: ... to here.
20540
20541 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
20542
20543         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
20544         implementations that mishandle size_t overflow.
20545
20546 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
20547
20548         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
20549         might fail.  Problem reported by Yoann Vandoorselaere.
20550         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
20551         implementations that mishandle size_t overflow.
20552
20553 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20554
20555         * modules/canon-host (Depends-on): Add strdup.
20556
20557 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20558
20559         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
20560
20561 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20562
20563         * lib/canon-host.c: Include "strdup.h".
20564         (canon_host): Use getaddrinfo if available, so that IPv6 works.
20565         Use strdup instead of malloc/strcpy to duplicate strings.
20566
20567         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
20568         (human_space_before_unit): New constant.
20569         * lib/human.c (human_readable): Support it.
20570
20571         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
20572         (xgetcwd): Set errno correctly when failing.
20573         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
20574         the failure is actually due to a PATH_MAX problem.
20575
20576         Further getopt changes to make it more likely that glibc will
20577         buy the changes back.
20578         * lib/getopt.c (POSIXLY_CORRECT): New constant.
20579         (getopt): Use it, so to preserve glibc semantic
20580         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
20581         when compiling for libc.
20582         * lib/getopt_.h (__getopt_argv_const): Bring it back.
20583         (getopt_long, getopt_long_only): Use it.
20584
20585         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
20586         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
20587         (getopt): Argv is now char * const *, as per standard.
20588         (_getopt_internal_r, _getopt_internal): Argv is now char **,
20589         not char *__getopt_argv_const *.
20590         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
20591         _getopt_long_only_r): Likewise.
20592         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
20593         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
20594         _getopt_long_r, _getopt_long_only_r): Likewise.
20595         * lib/getopt_.h (__getopt_argv_const): Remove.
20596         (getopt): Argv is now char * const *, as per standard.
20597
20598         * lib/getdate.y (tORDINAL): New token.
20599         (day, relunit): Allow it for relative times.
20600         (relative_time_table): Use tORDINAL for ordinals.
20601
20602 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
20603
20604         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
20605         Document that "second" isn't allowed as an ordinal number.
20606
20607 2004-11-16  Jim Meyering  <jim@meyering.net>
20608
20609         * modules/closeout (Depends-on): Add fpending.
20610
20611 2004-11-15  Jim Meyering  <jim@meyering.net>
20612
20613         * lib/closeout.c: Include "__fpending.h" once again.
20614         Include <stdbool.h>.
20615         (close_stdout): Don't fail just because stdout was closed initially,
20616         since some programs don't write to stdout in the normal course of
20617         operation (other than --version and --help), and we don't want this
20618         function to make e.g. `touch file >&-' fail.
20619         But do fail if it was closed and someone has tried to write to it.
20620         E.g., `printf foo >&-' must fail.
20621
20622 2004-11-13  Jim Meyering  <jim@meyering.net>
20623
20624         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
20625
20626 2004-11-12  Simon Josefsson  <jas@extundo.com>
20627
20628         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
20629         small doc fix is still pending.
20630
20631 2004-11-11  Simon Josefsson  <jas@extundo.com>
20632
20633         * modules/strtok_r: New file.
20634
20635         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20636         strtok_r.
20637
20638 2004-11-11  Simon Josefsson  <jas@extundo.com>
20639
20640         * m4/strtok_r.m4: New file.
20641
20642         * m4/getopt.m4: Replace opterr.
20643
20644 2004-11-11  Simon Josefsson  <jas@extundo.com>
20645
20646         * lib/strtok_r.h, strtok_r.c: New file.
20647
20648 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
20649
20650         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
20651         of replacing opterr, getopt, etc.  This should handle the
20652         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
20653
20654 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
20655
20656         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
20657         we can stop lying to compilers about the constness of argv when we
20658         are compiled outside glibc.
20659         (getopt, getopt_long, getopt_long_only): Use it.
20660         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
20661         _getopt_internal, getopt): Likewise.
20662         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
20663         _getopt_long_only_r): Likewise.
20664         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
20665         _getopt_long_r, _getopt_long_only_r): Likewise.
20666
20667         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
20668         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
20669         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
20670         the other external symbols.
20671         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
20672         declaration, since the above renaming now works around collisions.
20673
20674 2004-11-11  Jim Meyering  <jim@meyering.net>
20675
20676         * lib/linebreak.c: Remove trailing blanks.
20677         * lib/alloca_.h: Likewise.
20678         * lib/acosl.c: Likewise.
20679         * lib/euidaccess.c: Likewise.
20680         * lib/allocsa.h: Likewise.
20681
20682 2004-11-10  Simon Josefsson  <jas@extundo.com>
20683
20684         * m4/getaddrinfo.m4: New file.
20685
20686 2004-11-10  Simon Josefsson  <jas@extundo.com>
20687
20688         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
20689
20690 2004-11-10  Simon Josefsson  <jas@extundo.com>
20691
20692         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20693         getaddrinfo.
20694
20695         * modules/getaddrinfo: New file.
20696
20697 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
20698
20699         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
20700
20701 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
20702
20703         * lib/mktime.c (SHR): New macro, which is a portable
20704         substitute for >> that should work even on Crays.
20705         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
20706         Problem reported by Mark D. Baushke in
20707         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
20708         * lib/getdate.y (SHR): Likewise.
20709         (tm_diff): Use it.
20710         * lib/strftime.c (SHR): Likewise.
20711         (tm_diff): Use it.
20712         * lib/quotearg.c (struct quoting_options): Use unsigned int for
20713         quote_these_too, so that right shifts are well defined.  All uses
20714         changed.
20715
20716 2004-11-10  Jim Meyering  <jim@meyering.net>
20717
20718         Ensure that no close failure goes unreported.
20719         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
20720         return early when it seems there's nothing to flush.
20721         Don't include __fpending.h.
20722
20723 2004-11-10  Jim Meyering  <jim@meyering.net>
20724
20725         * modules/closeout (Depends-on): Remove fpending.
20726
20727 2004-11-10  Jim Meyering  <jim@meyering.net>
20728
20729         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
20730
20731 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
20732
20733         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
20734         gl_FUNC_STRFTIME.
20735         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
20736         and AC_REQUIRE when possible, to avoid duplicate checks.
20737         Check for <wchar.h>.
20738
20739 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
20740
20741         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
20742
20743 2004-11-09  Bruno Haible  <bruno@clisp.org>
20744
20745         * m4/sockpfaf.m4: New file.
20746
20747 2004-11-05  Bruno Haible  <bruno@clisp.org>
20748
20749         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
20750         Reported by Mark D. Baushke <mdb@cvshome.org>.
20751
20752 2004-11-04  Bruno Haible  <bruno@clisp.org>
20753
20754         2004-09-11  Bruno Haible  <bruno@clisp.org>
20755                 * allocsa.valgrind: New file.
20756         2004-02-06  Bruno Haible  <bruno@clisp.org>
20757                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
20758                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
20759                 Reported by Christopher Seip <chris.seip@hp.com>.
20760
20761 2004-11-04  Bruno Haible  <bruno@clisp.org>
20762
20763         * modules/allocsa (Files): Add lib/allocsa.valgrind.
20764         (Makefile.am): Distribute it.
20765
20766 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
20767
20768         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
20769         with errno == ERANGE if the buffer is too small.
20770         Problem reported by Mark D. Baushke.
20771
20772 2004-11-03  Albert Chin  <china@thewrittenword.com>
20773             Paul Eggert  <eggert@cs.ucla.edu>
20774
20775         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
20776         equivalent, substitute $ac_type for equivalent type rather than
20777         blindly using uint32_t *always* which won't work if uint32_t is not
20778         available.  Define _UINT32_T to work around typedef of uint32_t if
20779         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
20780         2.5.1.
20781
20782 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
20783
20784         * m4/jm-macros.m4: Sync from coreutils.
20785         (gl_MACROS): Check for mbrlen, for pathchk.
20786         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
20787
20788 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
20789
20790         * lib/xreadlink.c (MAXSIZE): New macro.
20791         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
20792         size does not exceed MAXSIZE.  Avoid cast.
20793         As suggested by Mark D. Baushke in
20794         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
20795         if readlink fails with buffer size just under MAXSIZE, try again
20796         with MAXSIZE.
20797
20798 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
20799
20800         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
20801
20802 2004-11-02  Derek R. Price  <derek@ximbiot.com>
20803         and  Paul Eggert  <eggert@cs.ucla.edu>
20804
20805         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
20806         (get_date): Overparenthesize to avoid GCC warning.
20807
20808 2004-11-02  Bruno Haible  <bruno@clisp.org>
20809
20810         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
20811         returns void.
20812
20813 2004-11-02  Bruno Haible  <bruno@clisp.org>
20814
20815         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
20816         function returns void.
20817
20818 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
20819
20820         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
20821         fflush_unlocked, flockfile, funlockfile, funlockfile,
20822         fputs_unlocked, putc_unlocked.
20823
20824 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
20825
20826         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
20827         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
20828         already declared.
20829
20830 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
20831
20832         * modules/getdate (Files): Add doc/getdate.texi.
20833         (Depends-on): Add setenv, xalloc.
20834
20835 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
20836
20837         * lib/getdate.y: Add support for TZ="foo" within a date string.
20838         Fix some bugs near time_t boundaries.  Reject dates with
20839         out-of-range components, e.g., "Sept 31".
20840         Include <stdlib.h>, "setenv.h", "xalloc.h".
20841         (ISDIGIT_LOCALE): Remove; unused.
20842         Note that the TZ and time functions used here are not reentrant.
20843         (mktime_ok, get_tz): New functions.
20844         (TZBUFSIZE): New constant.
20845         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
20846         This requires that we sometimes generate our own TZ="XXX..." setting.
20847
20848 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
20849
20850         * doc/getdate.texi: New file, from coreutils with modifications for
20851         the new TZ parsing.
20852
20853 2004-10-27  Derek R. Price  <derek@ximbiot.com>
20854
20855         * lib/mktime.c (not_equal_tm): Remove redundant check.
20856
20857 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
20858
20859         * modules/regex (lib_SOURCES): Add regex.c.
20860         Reported by James Youngman in
20861         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
20862
20863 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
20864
20865         * lib/getdate.y: Use Bison 1.875 features, and some minor
20866         code cleanups.  This change does not affect semantics.
20867         Don't include <stdlib.h>; no longer needed.
20868         Don't include unlocked-io.h; only the "#if TEST" code uses
20869         stdio, and performance isn't crucial there.
20870         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
20871         Bison 1.875 features as described below.
20872         All uses of "PC." replaced by "pc->".
20873         (YYSTYPE): Add a forward declaration.
20874         (yylex, yyerror): Use full prototypes in forward decls.
20875         Use "%pure-parser" rather than obsolescent "%pure_parser".
20876         Use %parse-param and %lex-param instead of obsolescent
20877         YYPARSE_PARAM and YYLEX_PARAM.
20878         (meridian_table, month_and_day_table, time_units_table,
20879         relative_time_table, time_zone_table, military_table,
20880         lookup_zone, lookup_word, get_date):
20881         Use NULL instead of 0 where appropriate.
20882         (to_hour): Avoid abort (), to avoid a dependency on
20883         stdlib.h.
20884         (yyerror, yylex): Now accepts parser_control * arg.
20885         (main) [TEST]: Use '\0' rather than 0 for char.
20886
20887 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20888
20889         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
20890
20891 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
20892
20893         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
20894         It's now the caller's responsibility to handle the case where
20895         !HAVE_GETPAGESIZE && !defined getpagesize.
20896
20897         * lib/mktime.c (leapyear): Arg is long int, not int.
20898
20899 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
20900
20901         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
20902
20903 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
20904
20905         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
20906         missing.  Problem reported by James Youngman.
20907
20908 2004-10-16  Simon Josefsson  <jas@extundo.com>
20909
20910         * gnulib-tool: Fix comments.  Fix parse problem.
20911         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
20912
20913 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
20914
20915         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
20916         implementation of getopt_long.  Problem reported by Alexander Taler in:
20917         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
20918
20919 2004-10-15  Bruno Haible  <bruno@clisp.org>
20920
20921         * gnulib-tool: Untabify. Initialize supplied_libname.
20922         (func_usage): More homogenous output.
20923         (func_modules_transitive_closure, func_modules_to_filelist,
20924         func_emit_lib_Makefile_am): New functions.
20925         (func_import): New function, extracted from big case statement. Use
20926         func_get_license, func_modules_transitive_closure,
20927         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
20928         opt_lgpl. Don't use test -a, as it's not portable.
20929         (func_create_testdir): Use func_modules_transitive_closure,
20930         func_modules_to_filelist, func_emit_lib_Makefile_am.
20931
20932 2004-10-15  Bruno Haible  <bruno@clisp.org>
20933
20934         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
20935
20936 2004-10-15  Bruno Haible  <bruno@clisp.org>
20937
20938         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
20939         the portions belonging to each module.
20940         Suggested by Derek Robert Price <derek@ximbiot.com>.
20941
20942 2004-10-12  Simon Josefsson  <jas@extundo.com>
20943
20944         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
20945         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
20946         to real functions.
20947
20948 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20949
20950         * modules/vsnprintf: New file.
20951
20952 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20953
20954         * m4/vsnprintf.m4: New file.
20955
20956 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
20957
20958         * lib/vsnprintf.h: New file.
20959         * lib/vsnprintf.c: New file.
20960
20961 2004-10-11  Bruno Haible  <bruno@clisp.org>
20962
20963         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
20964         vsnprintf.
20965
20966 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
20967
20968         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
20969
20970 2004-10-07  Bruno Haible  <bruno@clisp.org>
20971
20972         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
20973         fits into the provided buffer.
20974
20975 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
20976
20977         * lib/diacrit.c, diacrit.h: Add GPL notice.
20978
20979         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
20980         notice.
20981         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
20982         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
20983         This avoids a potential constant-folding bug.
20984
20985 2004-10-05  Bruno Haible  <bruno@clisp.org>
20986
20987         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
20988         for the declaration of strsep.
20989
20990 2004-10-05  Bruno Haible  <bruno@clisp.org>
20991
20992         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
20993
20994 2004-10-04  Simon Josefsson  <jas@extundo.com>
20995
20996         * modules/memmem: New file.
20997         * tests/test-memmem.c: New file.
20998         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
20999
21000 2004-10-04  Simon Josefsson  <jas@extundo.com>
21001
21002         * m4/memmem.m4: New file.
21003
21004 2004-10-04  Simon Josefsson  <jas@extundo.com>
21005
21006         * lib/memmem.h: New file.
21007         * lib/memmem.c: New file, taken from glibc.
21008
21009 2004-10-04  Simon Josefsson  <jas@extundo.com>
21010
21011         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
21012         '#ifdef USE_UNLOCKED_IO'.
21013
21014 2004-10-04  Simon Josefsson  <jas@extundo.com>
21015
21016         * config/srclist.txt: Add memmem from glibc.
21017
21018 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21019
21020         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
21021
21022         * modules/argmatch, modules/argp, modules/closeout, modules/error,
21023         modules/exclude, modules/getdate, modules/getline,
21024         modules/getndelim2, modules/getpass, modules/getpass-gnu,
21025         modules/getusershell, modules/linebuffer, modules/md5,
21026         modules/mountlist, modules/posixtm, modules/readtokens,
21027         modules/readutmp, modules/regex, modules/sha1,
21028         modules/version-etc, modules/yesno:
21029         Remove dependency on unlocked-io.
21030
21031 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21032
21033         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
21034
21035         * m4/unlocked-io.m4: Add copyright notice.
21036         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
21037
21038 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21039
21040         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
21041         * lib/xmalloc.c (xmemdup): Likewise.
21042         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
21043         XFREE): Remove these long-obsolescent macros.
21044         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
21045         * lib/xstrdup.c: Remove.
21046
21047         * lib/regex.c (re_comp): Cast gettext return value to char *,
21048         Problem reported by Martin Neitzel via Mark D. Baushke.
21049
21050 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
21051
21052         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
21053         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
21054         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
21055         regex.c, sha1.c, version-etc.c, yesno.c:
21056         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
21057         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
21058         the includer's responsibility.
21059
21060         Sync from coreutils.
21061
21062         * lib/modechange.c (mode_compile): Don't decrement a pointer that
21063         points to the start of a string, as the C Standard says the
21064         resulting behavior is undefined.
21065
21066         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
21067         simple -> simple_backups, numbered_existing ->
21068         numbered_existing_backups, numbered -> numbered_backups
21069         to avoid shadowing problems.  All uses changed.
21070         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
21071         * lib/backupfile.c (check_extension, numbered_backup):
21072         Rename locals to avoid shadowing 'basename'.
21073         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
21074         once.
21075
21076         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
21077         * lib/.cvsignore: Add getopt.h.
21078
21079 2004-10-04  Bruno Haible  <bruno@clisp.org>
21080
21081         * modules/README: New file.
21082         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
21083         not a module.
21084
21085 2004-10-02  Jim Meyering  <jim@meyering.net>
21086
21087         * lib/dirfd.h, getpagesize.h: Add copyright notice.
21088
21089 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21090
21091         * modules/strsep: New file.
21092
21093 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21094
21095         * m4/strsep.m4: New file.
21096
21097 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
21098
21099         * lib/strsep.h: New file.
21100         * lib/strsep.c: New file.
21101
21102 2004-10-01  Simon Josefsson  <jas@extundo.com>
21103
21104         * lib/snprintf.c (snprintf): Handle size==0.
21105
21106 2004-10-01  Simon Josefsson  <jas@extundo.com>
21107             Bruno Haible  <bruno@clisp.org>
21108
21109         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
21110         (snprintf): Declare 'args'.
21111
21112 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
21113
21114         * lib/snprintf.c: Remove comments as to why each header is needed.
21115
21116 2004-10-01  Bruno Haible  <bruno@clisp.org>
21117
21118         * MODULES.html.sh: Add strsep.
21119
21120 2004-09-30  Simon Josefsson  <jas@extundo.com>
21121
21122         * modules/snprintf: New file.
21123
21124 2004-09-30  Simon Josefsson  <jas@extundo.com>
21125
21126         * m4/snprintf.m4: New file.
21127
21128 2004-09-30  Simon Josefsson  <jas@extundo.com>
21129
21130         * lib/snprintf.h, lib/snprintf.c: New files.
21131
21132 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21133
21134         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
21135         (hol_entry_help): Never translate an empty string.
21136         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
21137         * lib/argp.h (OPTION_NO_TRANS): New option.
21138
21139 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21140
21141         * modules/argp (Maintainer): Replace Simon Josefsson
21142         by Sergey Poznyakoff.
21143
21144 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21145
21146         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
21147         changes merged back into glibc.
21148
21149 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
21150
21151         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
21152
21153 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
21154
21155         * lib/xvasprintf.c: Include xalloc.h.
21156         (xvasprintf): Use xalloc_die, not xmalloc_die.
21157
21158 2004-09-29  Bruno Haible  <bruno@clisp.org>
21159
21160         * modules/alloca-opt: New file, derived from modules/alloca.
21161         * modules/allocsa: Depend on alloca-opt instead of alloca.
21162         * modules/setenv: Likewise.
21163         * modules/vasnprintf: Likewise.
21164         * MODULES.html.sh: Add alloca-opt.
21165
21166 2004-09-28  Simon Josefsson  <jas@extundo.com>
21167
21168         * gnulib-tool: New parameter --lgpl, to asseert that modules are
21169         LGPL, and to replace license template from GPL to LGPL.
21170
21171 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21172
21173         * modules/dummy: Change license to LGPL.
21174
21175 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
21176
21177         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
21178
21179 2004-09-24  Simon Josefsson  <jas@extundo.com>
21180
21181         * modules/minmax (License): Change from GPL to LGPL.
21182
21183 2004-09-23  Simon Josefsson  <jas@extundo.com>
21184
21185         * gnulib-tool (--import): Typo.
21186
21187 2004-09-23  Simon Josefsson  <jas@extundo.com>
21188
21189         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
21190
21191 2004-09-22  Bruno Haible  <bruno@clisp.org>
21192
21193         * modules/*: Add 'License' field.
21194         * gnulib-tool: Accept --extract-license option.
21195         (func_get_license): New function.
21196
21197 2004-09-21  Bruno Haible  <bruno@clisp.org>
21198
21199         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
21200         Reported by Simon Josefsson.
21201
21202 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21203
21204         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
21205         gl_AC_TYPE_LONG_LONG.
21206
21207 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
21208
21209         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
21210
21211 2004-09-18  Simon Josefsson  <jas@extundo.com>
21212         and  Paul Eggert  <eggert@cs.ucla.edu>
21213
21214         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
21215         calls with autoreconf.  Define GL_LIB.
21216
21217 2004-09-14  Karl Berry  <karl@gnu.org>
21218
21219         * config/srclist.txt: unsync setenv.c, sigh.
21220
21221 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21222
21223         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
21224         Problem reported by Bruno Haible in:
21225         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
21226
21227 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
21228
21229         * config/srclist.txt: Comment out argp-pvh.c.
21230
21231 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
21232
21233         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
21234         in case some system header has #define'd it.  Problem reported by
21235         Soeren D. Schulze in
21236         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
21237
21238 2004-09-09  Karl Berry  <karl@gnu.org>
21239
21240         * regex.[ch]: delete from the root.  These were supposed to be
21241                 synced with emacs cvs, but this has not happened for about
21242                 a year, and anyway nothing else uses emacs regex.[ch].
21243                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
21244                 lib/regex[.ch] is untouched.
21245
21246 2004-09-09  Bruno Haible  <bruno@clisp.org>
21247
21248         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
21249
21250 2004-09-09  Bruno Haible  <bruno@clisp.org>
21251
21252         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
21253         modifications.
21254         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
21255
21256 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21257
21258         * modules/xvasprintf: New file.
21259         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
21260
21261 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
21262
21263         * lib/xvasprintf.h: New file.
21264         * lib/xvasprintf.c: New file.
21265         * lib/xasprintf.c: New file.
21266
21267 2004-09-08  Bruno Haible  <bruno@clisp.org>
21268
21269         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
21270
21271 2004-09-08  Bruno Haible  <bruno@clisp.org>
21272
21273         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
21274         length is > INT_MAX.
21275         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
21276         more.
21277
21278 2004-09-08  Bruno Haible  <bruno@clisp.org>
21279
21280         * lib/stdint_.h: New file, taken from GNU clisp.
21281
21282 2004-09-08  Bruno Haible  <bruno@clisp.org>
21283             Oskar Liljeblad  <oskar@osk.mine.nu>
21284
21285         * modules/stdint: New file.
21286         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
21287
21288 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21289
21290         Import from coreutils.
21291         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
21292         strings on unbounded length.  alloca's performance benefits aren't
21293         that important here.
21294         (V_STRDUP): Remove.
21295         (parse_with_separator): New function, with most of the internals
21296         of the old parse_user_spec.  Allow user to omit both user and group,
21297         for compatibility with FreeBSD.
21298         Clone only the user name, not the entire spec.
21299         Do not set *uid, *gid unless entirely successful.
21300         Avoid memory leak in some failing cases.
21301         Fix regression for USER.GROUP reported by Dmitry V. Levin in
21302         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
21303         (parse_user_spec): Rewrite to use parse_with_separator.
21304
21305 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21306
21307         * modules/userspec: Don't depend on alloca.
21308
21309 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
21310
21311         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
21312
21313 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
21314
21315         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
21316         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
21317         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
21318
21319 2004-08-16  Simon Josefsson  <jas@extundo.com>
21320
21321         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
21322         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
21323         Add --dry-run for --import.
21324         Let user provided command line parameters override configure.ac
21325         settings.
21326
21327 2004-08-12  Simon Josefsson  <jas@extundo.com>
21328
21329         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
21330         as discussed with Paul Eggert in threads rooted at
21331         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
21332         and
21333         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
21334         Before, the test was empty, and relied on ELIDE_CODE in source
21335         code.)
21336         (gl_PREREQ_GETOPT): New macro.
21337         (gl_GETOPT): Use them.
21338
21339 2004-08-12  Simon Josefsson  <jas@extundo.com>
21340
21341         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
21342         * lib/getopt_.h: Renamed from getopt.h.
21343
21344 2004-08-12  Simon Josefsson  <jas@extundo.com>
21345
21346         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
21347         Change default library name from libfoo to libgnu.
21348         Now, if you have a configure.ac that says:
21349                 gl_SOURCE_BASE(gl)
21350                 gl_M4_BASE(gl/m4)
21351                 gl_MODULES(error getopt etcetera)
21352                 gl_INIT
21353         you can import all you need by running:
21354                 ../gnulib/gnulib-tool --import
21355
21356         * modules/getopt (Files): Rename getopt.h to getopt_.h.
21357         (Makefile.am): Rewrite, use logic from argz.
21358         (Include): Use <getopt.h> instead of "getopt.h".
21359
21360 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21361
21362         * modules/argp (Files): Add m4/unlocked-io.m4.
21363         (Depends-on): Add extensions.
21364
21365 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21366
21367         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
21368         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
21369         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
21370         Check for program_invocation_name, program_invocation_short_name,
21371         flockfile, funlockfile, features.h, _getopt_long_only_r.
21372
21373 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21374
21375         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
21376         its complicated substitute.
21377         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
21378         and program_invocation_name.
21379         (__argp_basename) [!_LIBC]: Remove; the only use was
21380         replaced by its body.
21381         (__argp_short_program_name): Change condition from
21382         !defined __argp_short_program_name to
21383         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
21384         to match argp-namefrob.h.
21385         (__argp_failure): Don't assume strerror_r returns char *.
21386         * lib/argp-parse.c (N_): Define unconditionally.
21387         (argp_default_options): Fill out initializers with 0 to avoid
21388         gcc warnings.
21389
21390 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
21391
21392         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
21393         getopt1.c.
21394
21395 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21396
21397         Merge from coreutils.
21398
21399         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
21400
21401         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
21402         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
21403
21404 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21405
21406         Merge from coreutils.
21407
21408         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
21409         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
21410         for Reliant Unix 5.43.
21411
21412         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
21413         (union fooround): Use uintmax_t, not long int.
21414         The rest is a merge from libc:
21415         [defined _LIBC]: Include <shlib-compat.h>.
21416         (_obstack) [defined _LIBC]: Remove after 2.3.4.
21417
21418         * lib/settime.c (settime): Recode to avoid warning with
21419         Sun Forte C 6U2.
21420
21421         * lib/strverscmp.c: Convert to UTF-8.
21422
21423 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
21424
21425         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
21426         m4/uintmax_t.m4.
21427
21428 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21429
21430         * modules/xalloc-die: New file.
21431         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
21432
21433         * modules/md5 (Files): Add m4/uint32_t.m4.
21434         * modules/sha1: Renamed from modules/sha.
21435         (Files):
21436         Rename lib/sha.h to lib/sha1.h.
21437         Rename lib/sha.c to lib/sha1.c.
21438         Rename m4/sha.m4 to m4/sha1.m4.
21439         (lib_SOURCES): Likewise.
21440         (configure.ac): Rename gl_SHA to gl_SHA1.
21441         (Include): sha.h -> sha1.h.
21442
21443 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21444
21445         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
21446         * m4/sha1.m4: Renamed from sha.m4.
21447         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
21448
21449 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
21450
21451         * lib/obstack.h (obstack_empty_p):
21452         Don't assume that chunk->contents is suitably aligned.
21453         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
21454         Likewise. Problem reported by Benno in
21455         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
21456
21457         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
21458         readable.  This could be improved further but it'd take some work.
21459
21460 2004-08-08  Simon Josefsson  <jas@extundo.com>
21461
21462         * modules/xgethostname (Depends-on): Remove exit and error (not
21463         used).
21464
21465         * modules/getpass-gnu: Add getpass.h.
21466         (Depends-on): Add stdbool.
21467         * modules/getpass: Add getpass.h.
21468
21469 2004-08-08  Simon Josefsson  <jas@extundo.com>
21470
21471         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
21472         Check getpass declaration.
21473
21474 2004-08-08  Simon Josefsson  <jas@extundo.com>
21475
21476         * lib/xgethostname.c: Don't include error.h (not used).
21477
21478         * lib/getpass.h: Add.
21479         * lib/getpass.c: Include getpass.h first.
21480
21481 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
21482
21483         * lib/xalloc-die.c: New file.
21484         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
21485         All uses removed.
21486         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
21487         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
21488         xalloc-die.c.
21489         (_, N_, xalloc_die): Move to xalloc-die.c.
21490         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
21491         so that we needn't mess with xalloc_msg_memory_exhausted.
21492
21493         * lib/sha1.h: Renamed from sha.h.
21494         (SHA1_H): Renamed from _SHA_H.
21495         (sha1_ctx): Renamed from sha_ctx.
21496         (sha1_init_ctx): Renamed from sha_init_ctx.
21497         (sha1_process_block): Renamed from sha_process_block.
21498         (sha1_process_bytes): Renamed from sha_process_bytes.
21499         (sha1_finish_ctx): Renamed from sha_finish_ctx.
21500         (sha1_read_ctx): Renamed from sha_read_ctx.
21501         (sha1_stream): Renamed from sha_stream.
21502         (sha1_buffer): Renamed from sha_buffer.
21503         * lib/sha1.c: Likewise; renamed from sha.c.
21504         Do not include <sys/types.h>.
21505         Include <stddef.h> rather than <stdlib.h>.
21506
21507 2004-08-08  Bruno Haible  <bruno@clisp.org>
21508
21509         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
21510         FILESYSTEM_PREFIX_LEN.
21511         * lib/progreloc.c: Likewise.
21512         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
21513
21514 2004-08-06  Simon Josefsson  <jas@extundo.com>
21515
21516         * modules/progname (Depends-on): Don't depend on stdbool.
21517
21518 2004-08-06  Simon Josefsson  <jas@extundo.com>
21519
21520         * modules/getsubopt: New file.
21521         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
21522         getsubopt.
21523
21524 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21525
21526         More merge from coreutils.
21527
21528         * m4/utimens.m4, m4/utimecmp.m4: New files.
21529         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
21530         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
21531         prereq.m4, sha.m4: Import changes from coreutils.
21532
21533 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21534
21535         More merge from coreutils.
21536         * modules/raise, modules/readtokens0, modules/utimens:
21537         * modules/utimecmp, module/xnanosleep: New files.
21538         * modules/strftime: Add lib/strftime.h.
21539         Change include from <time.h> to "strftime.h".
21540         * modules/yesno: Add lib/yesno.h.
21541         * modules/backupfile: Remove lib/addext.c.
21542         * modules/euidaccess: Add stat-macros.h.
21543         * modules/canonicalize, modules/euidaccess,
21544         modules/filemode, modules/lchown, modules/makepath,
21545         modules/rmdir, modules/stat: Likewise.
21546
21547 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
21548
21549         Merge from tar.
21550         * lib/argp-help.c (make_hol, hol_append): Don't assume that
21551         SIZE_MAX is a valid preprocessor constant.
21552         (__argp_basename): Change from "#ifndef _LIBC"
21553         to "#ifndef __argp_short_program_name", so that
21554         we don't compile these functions for tar.
21555
21556         More merges from coreutils.
21557         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
21558         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
21559         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
21560         * lib/addext.c: Remove; no longer needed.
21561         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
21562         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
21563         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
21564         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
21565         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
21566         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
21567         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
21568         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
21569         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
21570         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
21571         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
21572         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
21573         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
21574         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
21575         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
21576         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
21577         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
21578         Import changes from coreutils.
21579
21580 2004-08-05  Simon Josefsson  <jas@extundo.com>
21581
21582         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
21583
21584 2004-08-05  Simon Josefsson  <jas@extundo.com>
21585
21586         * m4/getsubopt.m4: New file.
21587
21588 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21589
21590         Merge from coreutils.
21591
21592         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
21593         * m4/getcwd-path-max.m4: New files.
21594
21595         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
21596         FILESYSTEM_PREFIX_LEN ->
21597         FILE_SYSTEM_PREFIX_LEN.
21598         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
21599         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
21600         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
21601         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
21602
21603         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
21604         prerequisite modules now handle the DOS stuff.
21605         Don't check for unistd.h.
21606
21607 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21608
21609         Merge from coreutils.
21610
21611         * lib/.gdb-history: Remove; this doesn't belong here.
21612
21613         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
21614         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
21615         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
21616         * lib/getcwd.c: New files.
21617
21618         * lib/dirname.h: Include <stdbool.h>.
21619         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
21620         for consistency with POSIX terminology.  All uses changed.
21621         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
21622         (strip_trailing_slashes): Use bool for booleans.
21623         * lib/stripslash.c (strip_trailing_slashes): Likewise.
21624
21625         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
21626         sometimes returns a positive errno value even when it succeeds.
21627         (print_errno_message) [!LIBC]: Fall back on strerror if
21628         __strerror_r fails.
21629
21630         * lib/path-concat.c (mempcpy): Don't define if a system header defines
21631         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
21632         (longest_relative_suffix): New function.
21633         (path_concat): Use it.  Assume first argument is not NULL.
21634         Port to DOS.  Omit redundant separators.
21635         Report an error instead of returning NULL.
21636         Use mempcpy instead of memcpy.
21637         (xpath_concat): Remove: not declared or used.
21638
21639         * lib/same.h: Include <stdbool.h>
21640         (same_name): Return bool, not int.
21641         * lib/same.c (same_name): Likewise.
21642         (errno): Don't declare; we assume C89 or better now.
21643
21644         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
21645         if not already defined.
21646
21647         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
21648         * lib/dup-safer.c (errno): Likewise.
21649
21650 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
21651
21652         Merge from coreutils.
21653         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
21654         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
21655         * modules/path-concat: Don't depend on strdup.
21656
21657 2004-08-03  Simon Josefsson  <jas@extundo.com>
21658
21659         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
21660         * lib/progname.h: Don't include stdbool.h.
21661
21662 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
21663
21664         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
21665         * MODULES.html.sh (func_all_modules): Remove fatal.
21666
21667 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
21668
21669         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
21670
21671 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
21672
21673         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
21674         working.
21675
21676 2004-08-02  Simon Josefsson  <jas@extundo.com>
21677
21678         * lib/getsubopt.h: New file, with comments from Bruno Haible.
21679         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
21680         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
21681
21682 2004-08-01  Simon Josefsson  <jas@extundo.com>
21683
21684         * lib/xgetdomainname.c: Include stdlib.h, for free().
21685
21686 2004-07-19  Bruno Haible  <bruno@clisp.org>
21687
21688         * MODULES.html.sh (func_all_modules): Add dummy.
21689
21690 2004-07-16  Simon Josefsson  <jas@extundo.com>
21691
21692         * modules/dummy: New file.
21693
21694 2004-07-16  Simon Josefsson  <jas@extundo.com>
21695
21696         * lib/dummy.c: New file.
21697
21698 2004-07-16  Bruno Haible  <bruno@clisp.org>
21699
21700         * lib/backupfile.h: Add extern "C" for C++.
21701         * lib/closeout.h: Likewise.
21702         * lib/copy-file.h: Likewise.
21703         * lib/findprog.h: Likewise.
21704         * lib/full-write.h: Likewise.
21705         * lib/pathname.h: Likewise.
21706         * lib/progname.h: Likewise.
21707         * lib/stpcpy.h: Likewise.
21708         * lib/stpncpy.h: Likewise.
21709         * lib/strcase.h: Likewise.
21710         * lib/strstr.h: Likewise.
21711         * lib/xalloc.h: Likewise.
21712
21713         * lib/mbswidth.h: Add extern "C" for C++.
21714         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
21715
21716 2004-07-13  Robert Millan  <robertmh@gnu.org>
21717
21718         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
21719
21720 2004-07-09  Simon Josefsson  <jas@extundo.com>
21721
21722         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
21723         failed without this.)
21724
21725 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
21726
21727         * modules/chown (Files): Add lib/fchown-stub.c, since
21728         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
21729
21730 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
21731
21732         * lib/fchown-stub.c: New file.
21733
21734 2004-06-24  Jim Meyering  <jim@meyering.net>
21735
21736         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
21737
21738 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21739
21740         * modules/argz: Omit "#include".
21741
21742         * MODULES.html.sh (func_all_modules): Add calloc, to match
21743         2004-06-01 addition of calloc module.
21744
21745 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21746
21747         * m4/argz.m4: New file, which is autoupdated from libtool.
21748
21749 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21750
21751         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
21752         libtool.
21753
21754 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
21755
21756         * config/srclist-update: Don't insist on "USA." before the
21757         close-comment, as libtool omits the period and puts the */ on a
21758         separate line.
21759         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
21760         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
21761
21762 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
21763
21764         * modules/argz: New file.
21765         * MODULES.html.sh (func_all_modules): Add argz.
21766
21767 2004-06-12  Jim Meyering  <jim@meyering.net>
21768         and  Paul Eggert  <eggert@cs.ucla.edu>
21769
21770         * modules/hash (Files): Add lib/xalloc.h.
21771         * modules/pipe (Depends-on): Add wait-process.
21772         * modules/stat (Depends-on): Add xalloc.
21773         * modules/userspec (Files): Add lib/userspec.h.
21774         * modules/xstrto
21775
21776         Upgrade from gettext-0.13.
21777         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
21778         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
21779         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
21780
21781 2004-06-10  Jim Meyering  <jim@meyering.net>
21782
21783         * lib/calloc.c: New file.
21784
21785 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
21786
21787         * lib/getdate.y (yylex): Allow space between sign and number.
21788         Problem reported by Dan Jacobson.
21789
21790 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
21791
21792         Merge from coreutils CVS.
21793
21794         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
21795         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
21796         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
21797         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
21798         xstrtol.m4: Fix copyright date and/or serial number.
21799
21800         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
21801         See if we need an fchown replacement.
21802         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
21803         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
21804         and use the replacement function if we detect either defect.
21805
21806         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
21807         gl_UTIMECMP.
21808
21809 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
21810         and  Jim Meyering  <jim@meyering.net>
21811
21812         Merge from coreutils CVS.
21813
21814         * lib/stat-macros.h: New file, with contents from file-type.h
21815         and coreutils' system.h.
21816         * lib/file-type.c: Include "stat-macros.h".
21817         * lib/file-type.h (file_type): Move all macro definitions to new file,
21818         stat-macros.h.
21819
21820         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
21821         Wrap old code with this conditional.
21822         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
21823         function that does not dereference symlinks.
21824         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
21825
21826         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
21827         dependency problems.
21828         (xreadlink): Accept new arg SIZE, for efficiency.
21829         All decls and uses changed.
21830         * lib/xreadlink.h: Include <stddef.h>, for size_t.
21831
21832         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
21833         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
21834
21835         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
21836         sysexits.h.
21837
21838 2004-06-01  Jim Meyering  <jim@meyering.net>
21839
21840         * m4/calloc.m4: New file.
21841
21842 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
21843
21844         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
21845         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
21846         Also, fix a typo in a diagnostic.
21847
21848 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
21849
21850         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
21851         or AC_FUNC_REALLOC.
21852
21853 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
21854
21855         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
21856         macros to be defined.
21857         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
21858         the allocator returns NULL because the requested size is zero.
21859
21860 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
21861
21862         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
21863         var.  Add comment explaining why libc still defines it.  This
21864         merges the following patch from glibc:
21865         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
21866
21867 2004-05-20  Andreas Schwab  <schwab@suse.de>
21868
21869         * m4/free.m4: Replace free if it not known to work, not the other
21870         way round.
21871
21872 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
21873
21874         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
21875         present in glibc since revision 1.1 of this file.
21876         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
21877         obstack_alignment_mask, obstack_alloc, obstack_base,
21878         obstack_blank, obstack_blank_fast, obstack_chunk_size,
21879         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
21880         obstack_grow0, obstack_init, obstack_int_grow,
21881         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
21882         obstack_next_free, obstack_object_size, obstack_ptr_grow,
21883         obstack_ptr_grow_fast, obstack_room): Remove declarations of
21884         nonexistent functions.
21885
21886 2004-05-18  Karl Berry  <karl@gnu.org>
21887
21888         * config/srclist.txt: break link for vasnprintf.c.
21889
21890 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
21891
21892         Port obstack to the AS/400, where pointers are 16 bytes wide and
21893         you cannot cast an integer to a valid pointer.  This patch is
21894         currently waiting to be integrated into glibc; see
21895         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
21896
21897         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
21898         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
21899         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
21900         (struct obstack): temp member is now a union of a pointer and
21901         an integer, instead of an integer.  All integer uses changed.
21902         This does not affect the physical layout of struct obstack,
21903         except on hosts (like the AS/400) where the size or alignment of
21904         void * is greater than that of ptrdiff_t.
21905         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
21906         __STDC__)]: Store temporary in pointer member of union, not
21907         integer member.
21908         * lib/obstack.c: Include <stddef.h>, for offsetof.
21909         (struct fooalign): Remove; it doesn't need a name.
21910         (union fooround): Change double to long double, and add void *.
21911         (DEFAULT_ALIGNMENT): Use offsetof to compute.
21912         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
21913         not a macro.  Hence the values are always int; so remove all
21914         casts-to-int in uses.
21915
21916 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
21917
21918         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
21919         we can get this patch merged into glibc.
21920
21921 2004-05-17  Derek R. Price  <derek@ximbiot.com>
21922             Paul Eggert  <eggert@cs.ucla.edu>
21923
21924         * m4/argp: Depend on alloca.
21925
21926 2004-05-17  Derek R. Price  <derek@ximbiot.com>
21927             Paul Eggert  <eggert@cs.ucla.edu>
21928
21929         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
21930         freecoding.
21931
21932 2004-05-17  Bruno Haible  <bruno@clisp.org>
21933
21934         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
21935         precision that consists of a '.' followed by an empty digit string.
21936         Patch by Tor Lillqvist <tml@iki.fi>.
21937
21938 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
21939
21940         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
21941         for backward compatibility with older code.  We need our own
21942         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
21943         it under some other name, and our alloca.h will define it.
21944
21945 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
21946             Derek Price  <derek@ximbiot.com>
21947
21948         * lib/alloca.c: Include <alloca.h>, to get our interface.
21949         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
21950         include <alloca.h> first.  Use C89 prototype for alloca; this
21951         requires including <stddef.h> for size_t.  Use extern "C" if C++.
21952         Use #elif for simplicity, since we can assume C89 now.
21953         Don't try to source the system alloca.h since it will not be found
21954         and to prevent recursively including its replacement.
21955         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
21956         * lib/regex.c: Likewise.
21957
21958 2004-05-16  Derek Price  <derek@ximbiot.com>
21959             Paul Eggert  <eggert@cs.ucla.edu>
21960
21961         getline cleanup.  This changes the getndelim2 API: both order of
21962         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
21963         no delimiter).
21964
21965         * lib/getline.c: Don't include stddef.h or stdio.h, since our
21966         interface does that.
21967         (getline): Always use getdelim, so that we don't have two
21968         copies of this code.
21969         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
21970         if available.
21971         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
21972         (GETNDELIM2_MAXIMUM): New macro.
21973         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
21974         instead of the old practice of delim2==0.  All callers changed.
21975         Return -1 on overflow, instead of returning junk.
21976         Do not set *linesize unless allocation succeeds.
21977         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
21978         that we include sys/types.h.
21979         * lib/getnline.h: Likewise.
21980         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
21981         (getndelim2): Reorder arguments.
21982         * lib/getnline.c (getnline, getndelim):
21983         Don't discard the NMAX argument.
21984         (getnline): Invoke getndelim, to avoid code duplication.
21985         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
21986         of (size_t) -1 by callers of the getnline family.
21987
21988 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
21989
21990         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
21991         Check for gettimeofday.
21992         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
21993         Check for settimeofday, stime.
21994
21995 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
21996
21997         * lib/nanosleep.c (suspended): Change its type from int to
21998         sig_atomic_t volatile.
21999         (first_call): Make it private to rpl_nanosleep, and have it
22000         be zero initially as that's a bit faster.
22001         (my_usleep): Round up fractional times instead of truncating them,
22002         as this is the usual meaning for 'sleep'.
22003
22004         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
22005         doesn't work.
22006         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
22007         (ENOSYS): Define if not defined.
22008         (settime): Fall back on stime if it exists and settimeofday fails.
22009         But don't bother with fallbacks if a method fails with errno == EPERM.
22010
22011 2004-05-11  Jim Meyering  <jim@meyering.net>
22012
22013         Prior to this change, the save_cwd caller required read access to the
22014         current directory on most systems (ones with the fchdir function).
22015
22016         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
22017         fails, try write-only, and finally, resort to using xgetcwd.
22018
22019 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
22020
22021         * lib/obstack.c, obstack.h: Import changes from libc.
22022
22023 2004-04-28  Bruno Haible  <bruno@clisp.org>
22024
22025         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
22026         also implicitly appends .exe to executables.
22027         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
22028         accepts Windows pathnames.
22029         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22030         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22031         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
22032         Treat Cygwin like Windows, since it now accepts Windows pathnames.
22033         Reported by Derek Robert Price <derek@ximbiot.com>.
22034
22035 2004-04-21  Karl Berry  <karl@gnu.org>
22036
22037         * config/srclist.txt (localcharset.c): break sync.
22038
22039 2004-04-20  Paul Eggert  <eggert@twinsun.com>
22040
22041         * m4/host-os.m4: Add a copyright notice.
22042
22043 2004-04-20  Jim Meyering  <jim@meyering.net>
22044
22045         Change UTILS_ to gl_ in AC_DEFINE'd names.
22046         Change utils_- and jm_-prefixed variables, too.
22047         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
22048         UTILS_FUNC_MKDIR_TRAILING_SLASH.
22049         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
22050
22051         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
22052         Don't emit trailing blanks.
22053         Also rename jm_-prefixed variables to have gl_ prefix.
22054
22055         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
22056         Also rename jm_-prefixed variables to have gl_ prefix.
22057
22058         * m4/jm-macros.m4: Reflect the renamings.
22059         * m4/prereq.m4: Likewise.
22060
22061 2004-04-20  Jim Meyering  <jim@meyering.net>
22062
22063         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
22064         memory.
22065
22066 2004-04-20  Jim Meyering  <jim@meyering.net>
22067             Bruno Haible  <bruno@clisp.org>
22068
22069         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
22070         memory when realloc fails.
22071
22072 2004-04-19  Jim Meyering  <jim@meyering.net>
22073
22074         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
22075         now that readutmp.c may call `free (0)'.
22076
22077 2004-04-19  Bruno Haible  <bruno@clisp.org>
22078
22079         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
22080         * m4/inttypes_h.m4: Likewise.
22081         * m4/stdint_h.m4: Likewise.
22082         * m4/intmax_t.m4: Likewise.
22083         * m4/uintmax_t.m4: Likewise.
22084
22085 2004-04-18  Jim Meyering  <jim@meyering.net>
22086
22087         * m4/prereq.m4: Don't forbid jm_ prefix.
22088
22089         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
22090         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
22091         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
22092         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
22093         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
22094         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
22095         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
22096         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
22097         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
22098         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
22099         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
22100         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
22101         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
22102         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
22103         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
22104         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
22105         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
22106         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
22107         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
22108
22109 2004-04-18  Jim Meyering  <jim@meyering.net>
22110
22111         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
22112         failure, don't leak memory and do call END_UTMP_ENT.
22113
22114 2004-04-16  Jim Meyering  <jim@meyering.net>
22115
22116         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
22117         coreutils' stat program.
22118         (gl_PREREQ): Don't require jm_PREREQ_STAT.
22119
22120 2004-04-11  Paul Eggert  <eggert@twinsun.com>
22121
22122         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
22123         C89.
22124         (CHAR_BIT): Remove, since we assume C89.
22125         Include <stdint.h> if available, as per current Autoconf CVS advice.
22126
22127 2004-03-31  Jim Meyering  <jim@meyering.net>
22128
22129         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
22130         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
22131         * m4/xalloc.m4: Likewise.
22132
22133 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22134
22135         Merge from coreutils.
22136
22137         * m4/inttostr.m4: New file.
22138         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
22139         Require AM_STDBOOL_H and gl_TIMESPEC instead.
22140         Require gl_CLOCK_TIME.
22141         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
22142
22143 2004-03-30  Paul Eggert  <eggert@twinsun.com>
22144
22145         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
22146         not bool, to be more consistent with Unix conventions.
22147         Suggested by Bruno Haible.
22148
22149         Merge from coreutils.
22150
22151         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
22152         * lib/umaxtostr.c: New files.
22153
22154         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
22155         the usual <time.h> dance.
22156         (get_date): Change signature to support fractional time stamps.
22157         All callers changed.
22158         * lib/getdate.y: Include "getdate.h" first, as we can now
22159         assume C89 and don't need to worry about 'const'.
22160         Similarly, include "unlocked-io.h" near start, not in middle.
22161         Include <limits.h>.
22162         (textint.value): Use long int rather than int.
22163         (textint.digits): Use size_t rather than int.
22164         (BILLION, LOG10_BILLION): New constants.
22165         (parser_control): New member rel_ns.  Members day_ordinal,
22166         time_zone, month, day, hour, minutes, rel_year, rel_month,
22167         rel_day, rel_hour, rel_minutes, rel_seconds
22168         are now long int, not int.  Member seconds is now struct timespec,
22169         not int.  New member timespec_seen.  Members dates_seen, days_seen,
22170         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
22171         not int.
22172         (%union.intval): Now long int, not int.
22173         New member timespec.
22174         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
22175         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
22176         (spec): Now is a timespec or an item list.
22177         (timespec, items): New nonterminals.
22178         (time, rel, relunit, number, get_date):
22179         Add support for fractional seconds.
22180         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
22181         (gmtime, localtime, mktime): Remove decls; not needed with C89.
22182         (to_hour): First arg is now long int, not int.
22183         (to_year): Returns long int, not int.
22184         Don't treat year -70 like 70.
22185         (tm_diff): Returns long int, not int.
22186         (lookup_word): Use bool instead of int when appropriate.
22187         (yylex): Use size_t for count, not int.
22188         Detect overflow when parsing large integer constants.
22189         Add support for fractions.
22190         (get_date): Make pointers 'const' if possible.
22191         Use more-portable code to detect integer overflow.
22192         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
22193         Don't use ctime; it's not reliable if the year has >4 digits.
22194
22195         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
22196         This is for compatibility with BSD.
22197
22198         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
22199         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
22200         From coreutils' system.h.
22201
22202         * lib/userspec.c: Don't include "posixver.h".
22203         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
22204         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
22205         compatible extension.  Simplify code by removing a boolean int
22206         that was always nonzero if a string was nonnull.
22207
22208 2004-03-30  Jim Meyering  <jim@meyering.net>
22209
22210         Merge from coreutils.
22211
22212         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
22213         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
22214         on some systems one must include <grp.h> before it.
22215         Reported by Christian Krackowizer.
22216
22217 2004-03-30  Jim Meyering  <jim@meyering.net>
22218
22219         Merge from coreutils.
22220
22221         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
22222
22223         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
22224         an empty input stream.
22225
22226         * lib/readtokens.c: Include <stdbool.h>.
22227         (readtoken): Use `size_t' rather than int/long.
22228         All callers adjusted.
22229         Use `bool' rather than `int' where appropriate.
22230         Use memset rather than an explicit loop.
22231         Use x2nrealloc rather than xrealloc.
22232         Allow the use of `\0' as a delimiter.
22233         (readtokens): Likewise.
22234         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
22235
22236 2004-03-30  Jim Meyering  <jim@meyering.net>
22237
22238         * m4/realloc.m4: Remove file, since now it does no more than
22239         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
22240         the `configure.ac' section of module/realloc.
22241         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
22242
22243 2004-03-30  Bruno Haible  <bruno@clisp.org>
22244
22245         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
22246         nonnull.
22247
22248 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22249
22250         Merge changes to getloadavg.c from coreutils and Emacs.
22251
22252         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
22253         Define to an expression, not to the empty string.
22254         Include cloexec.h and xalloc.h.
22255         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
22256         Use set_cloexec_flag rather than rolling our own.
22257         * lib/cloexec.c, lib/cloexec.h: New files.
22258
22259 2004-03-29  Paul Eggert  <eggert@twinsun.com>
22260
22261         * m4/cloexec.m4: New file.
22262
22263 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22264
22265         * lib/getopt.h: Sync with libc CVS.
22266
22267 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22268             Bruno Haible  <bruno@clisp.org>
22269
22270         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
22271         mbswidth.
22272
22273 2004-03-18  Paul Eggert  <eggert@twinsun.com>
22274             Bruno Haible  <bruno@clisp.org>
22275
22276         * lib/mbswidth.h: Include <wchar.h> only if
22277         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
22278         <wchar.h>.
22279         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
22280
22281 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22282
22283         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
22284         Sync with libc CVS.
22285         * lib/getopt_int.h: New file, also synced from libc.
22286
22287 2004-03-09  Paul Eggert  <eggert@twinsun.com>
22288
22289         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
22290         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
22291         Bring back getopt.c, getopt.h, getopt1.c.
22292
22293 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22294
22295         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
22296         All uses changed.  Check for sa_sigaction member; this fixes
22297         a bug first reported by Jason Andrade in
22298         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22299
22300 2004-03-07  Paul Eggert  <eggert@twinsun.com>
22301
22302         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
22303         '#if' expressions.  Unlike the code it replaces, it does not
22304         depend on (defined _SC_PAGESIZE).  However, it does depend on
22305         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
22306         first reported by Jason Andrade in
22307         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
22308
22309 2004-02-25  Simon Josefsson  <jas@extundo.com>
22310
22311         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
22312
22313 2004-02-25  Simon Josefsson  <jas@extundo.com>
22314
22315         * lib/strdup.h: New file.
22316         * lib/strdup.c: Include it.
22317         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
22318         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
22319
22320 2004-02-23  Karl Berry  <karl@gnu.org>
22321
22322         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
22323         (from fencepost.gnu.org:/gd/gnuorg).
22324
22325 2004-02-23  Karl Berry  <karl@gnu.org>
22326
22327         * config/srclistvars.sh (GNUORG) [karl]: redefine.
22328         * config/srclist.txt: add maintain/standards documents.
22329
22330 2004-02-18  Bruno Haible  <bruno@clisp.org>
22331
22332         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
22333         Reported by Derek Robert Price <derek@ximbiot.com>.
22334
22335 2004-02-16  Karl Berry  <karl@gnu.org>
22336
22337         * config/mkinstalldirs, install-sh: update from automake.
22338
22339 2004-02-06  Karl Berry  <karl@gnu.org>
22340
22341         * m4/po.m4: update from gettext 0.14.1.
22342
22343 2004-02-06  Karl Berry  <karl@gnu.org>
22344
22345         * lib/config.charset: update from gettext 0.14.1.
22346
22347 2004-02-05  Paul Eggert  <eggert@twinsun.com>
22348
22349         Add comments and code, prompted by suggestions from Bruno Haible
22350         for sh-quote.
22351         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
22352         describing the enum quoting_style values.
22353         * lib/quotearg.c (quotearg_alloc): New function.
22354         (quotearg_buffer_restyled): Treat lone { and } as special.
22355         Treat = as special.  Work around bug with older shells
22356         that "see" a '\' that is really the 2nd byte of a multibyte char.
22357         Quote empty string with shell_quoting_style.
22358
22359 2004-02-03  Bruno Haible  <bruno@clisp.org>
22360
22361         * m4/pipe.m4: New file, from GNU gettext.
22362
22363 2004-02-03  Bruno Haible  <bruno@clisp.org>
22364
22365         * lib/pipe.h: New file, from GNU gettext.
22366         * lib/pipe.c: New file, from GNU gettext.
22367
22368 2004-01-27  Bruno Haible  <bruno@clisp.org>
22369
22370         * m4/execute.m4: New file, from GNU gettext.
22371
22372 2004-01-27  Bruno Haible  <bruno@clisp.org>
22373
22374         * lib/execute.h: New file, from GNU gettext.
22375         * lib/execute.c: New file, from GNU gettext.
22376         * lib/w32spawn.h: New file, from GNU gettext.
22377
22378 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22379
22380         Merge from diffutils.
22381
22382         * lib/file-type.c (file_type): Add typed memory objects.
22383         * lib/file-type.h (S_TYPEISTMO): New macro.
22384
22385         * lib/c-stack.h (c_stack_action): Remove argv argument.
22386         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
22387         (die): Don't calculate message unless segv_action returns.
22388         (get_stack_location, min_address_from_argv, max_address_from_argv,
22389         volatile stack_base, volatile_stack_size): Remove.
22390         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
22391         that every segmentation violation is a stack overflow.  (Ouch!)
22392         See Debian bug 136249 (still outstanding) for more info about why
22393         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
22394
22395 2004-01-24  Paul Eggert  <eggert@twinsun.com>
22396
22397         Exit-status fix from coreutils.
22398
22399         Use exit_failure consistently in place of EXIT_FAILURE,
22400         so that program exit statuses are consistent on failure.
22401
22402         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
22403         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
22404         * lib/argmatch.h: Comment fix to match the above.
22405         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
22406         Now a macro referring to exit_failure, instead of a separate
22407         variable.  Include "exitfail.h" to get it.
22408         * lib/xstrtol.h: Include "exitfail.h".
22409         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
22410
22411         * lib/long-options.c (parse_long_options): Use prototype
22412         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
22413         for clarity.
22414
22415 2004-01-21  Jim Meyering  <jim@meyering.net>
22416
22417         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
22418         so as not to conflict with a different-sized __mktime_internal
22419         function in GNU libc.
22420         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
22421         Problem building statically-linked `ls' reported by Michael Brunnbauer.
22422
22423 2004-01-20  Karl Berry  <karl@gnu.org>
22424
22425         * config/config.guess: update from config.
22426
22427         * config/srclistvars.sh: GNUWWWLICENSES for karl.
22428
22429 2004-01-20  Bruno Haible  <bruno@clisp.org>
22430
22431         Safer stack allocation.
22432         * lib/setenv.c: Include allocsa.h.
22433         (alloca): Remove fallback definition.
22434         (freea): Remove macro.
22435         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
22436         instead of freea.
22437
22438 2004-01-20  Bruno Haible  <bruno@clisp.org>
22439
22440         * m4/eealloc.m4: New file, from GNU gettext.
22441
22442 2004-01-20  Bruno Haible  <bruno@clisp.org>
22443
22444         * m4/allocsa.m4: New file, from GNU gettext.
22445
22446 2004-01-20  Bruno Haible  <bruno@clisp.org>
22447
22448         * lib/xallocsa.h: New file, from GNU gettext.
22449         * lib/xallocsa.c: New file, from GNU gettext.
22450
22451 2004-01-20  Bruno Haible  <bruno@clisp.org>
22452
22453         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
22454
22455 2004-01-20  Bruno Haible  <bruno@clisp.org>
22456
22457         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
22458         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
22459         specially.
22460
22461 2004-01-20  Bruno Haible  <bruno@clisp.org>
22462
22463         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
22464         patch.
22465
22466 2004-01-20  Bruno Haible  <bruno@clisp.org>
22467
22468         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
22469
22470 2004-01-20  Bruno Haible  <bruno@clisp.org>
22471
22472         * lib/eealloc.h: New file.
22473
22474 2004-01-20  Bruno Haible  <bruno@clisp.org>
22475
22476         * lib/binary-io.h: Avoid warnings on Cygwin.
22477
22478 2004-01-20  Bruno Haible  <bruno@clisp.org>
22479
22480         * lib/allocsa.h: New file, from GNU gettext.
22481         * lib/allocsa.c: New file, from GNU gettext.
22482
22483 2004-01-18  Karl Berry  <karl@gnu.org>
22484
22485         * doc/gpl.texi, doc/lgpl.texi: new files.
22486
22487 2004-01-18  Karl Berry  <karl@gnu.org>
22488
22489         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
22490         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
22491
22492 2004-01-15  Paul Eggert  <eggert@twinsun.com>
22493
22494         Merge from coreutils.
22495
22496         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
22497         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
22498         (gl_DEFAULT_POSIX2_VERSION): Move
22499         the documentation from 'configure' into 'config.hin',
22500         so that 'configure --help' isn't burdened by it and
22501         we don't have to worry about its formatting there.
22502         Reword the documentation so that it's more succinct
22503         and can be run together into a single paragraph.
22504         * m4/same.m4 (gl_SAME): Check for pathconf.
22505
22506 2004-01-15  Paul Eggert  <eggert@twinsun.com>
22507
22508         Merge from coreutils.
22509
22510         * lib/posixver.c: Include posixver.h.
22511
22512         * lib/same.c: Include <stdbool.h>, <limits.h>.
22513         (_POSIX_NAME_MAX): Define if not defined.
22514         (MIN): New macro.
22515         (same_name): If file names are silently truncated, report
22516         that the file names are the same if they are the same after
22517         the silent truncation.
22518
22519         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
22520         conversion function.
22521         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
22522         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
22523         longer needed.
22524
22525 2004-01-15  Jim Meyering  <jim@meyering.net>
22526
22527         Merge from coreutils.
22528
22529         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
22530         if no library is required.
22531         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
22532         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
22533         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
22534         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
22535         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
22536         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
22537         value, $ac_cv_search_crypt, if it's "none required".
22538         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
22539         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
22540         not gl_FUNC_GETLOADAVG.
22541         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
22542         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
22543
22544 2004-01-15  Jim Meyering  <jim@meyering.net>
22545
22546         Merge from coreutils.
22547
22548         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
22549         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
22550         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
22551
22552         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
22553         optional configure-time default.
22554
22555         * lib/version-etc.c (version_etc_copyright): Update copyright date.
22556
22557         * lib/xreadlink.c (xreadlink): Correct outdated comment.
22558
22559 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
22560
22561         Merge from coreutils.
22562
22563         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
22564         value, $ac_cv_search_nanosleep, if it's "none required".
22565
22566 2004-01-14  Paul Eggert  <eggert@twinsun.com>
22567
22568         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
22569         with like-named macro in fnmatch.c.
22570         (EXT): Use an internal constant instead.
22571
22572         Merge fnmatch patches from glibc.
22573         * lib/fnmatch.c (mbsinit): Remove define.
22574         Add libc_hidden_ver (__fnmatch, fnmatch).
22575         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
22576         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
22577
22578 2004-01-14  Karl Berry  <karl@gnu.org>
22579
22580         * config/install-sh: update from automake.
22581
22582 2004-01-13  Karl Berry  <karl@gnu.org>
22583
22584         * config/install-sh: update from automake.
22585
22586 2004-01-09  Karl Berry  <karl@gnu.org>
22587
22588         * config/install-sh: update from automake.
22589
22590 2004-01-05  Karl Berry  <karl@gnu.org>
22591
22592         * config/config.{sub,guess}: update from config.
22593
22594 2003-12-31  Karl Berry  <karl@gnu.org>
22595
22596         * config/depcomp: update from automake.
22597
22598 2003-12-14  Karl Berry  <karl@gnu.org>
22599
22600         * lib/config.charset: update from gettext-runtime.
22601
22602 2003-12-03  Paul Eggert  <eggert@twinsun.com>
22603
22604         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
22605         Bug reported by Alfred M. Szmidt.
22606
22607 2003-12-03  Bruno Haible  <bruno@clisp.org>
22608
22609         * m4/gettext.m4: Upgrade from gettext-0.13.
22610         * m4/po.m4: Upgrade from gettext-0.13.
22611         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
22612         * m4/intmax.m4: New file, from gettext-0.13.
22613         * m4/printf-posix.m4: New file, from gettext-0.13.
22614
22615 2003-11-29  Karl Berry  <karl@gnu.org>
22616
22617         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
22618
22619 2003-11-25  Paul Eggert  <eggert@twinsun.com>
22620             Bruno Haible  <bruno@clisp.org>
22621
22622         * lib/printf-parse.h: Don't include sys/types.h.
22623         (ARG_NONE): New macro.
22624         (char_directive): Change type of *arg_index fields to size_t.
22625         * lib/printf-parse.c: Don't include sys/types.h.
22626         (SSIZE_MAX): Remove macro.
22627         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
22628         Remove unnecessary overflow check.
22629         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
22630         fields.
22631
22632 2003-11-25  Bruno Haible  <bruno@clisp.org>
22633
22634         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
22635
22636 2003-11-25  Bruno Haible  <bruno@clisp.org>
22637
22638         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
22639         gt_TYPE_SSIZE_T.
22640
22641 2003-11-24  Paul Eggert  <eggert@twinsun.com>
22642
22643         * modules/alloca: Remove dependency on xalloc.
22644
22645 2003-11-24  Paul Eggert  <eggert@twinsun.com>
22646
22647         * lib/alloca.c: Remove dependency on xalloc module.
22648         (xalloc_die): Remove.
22649         (memory_full) [!defined emacs]: New macro.
22650         [!defined emacs]: Don't include xalloc.h.
22651         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
22652         address arithmetic overflows.  Change datatypes a bit to avoid
22653         unnecessary casts.
22654
22655 2003-11-22  Jim Meyering  <jim@meyering.net>
22656
22657         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
22658         s/size/size_t/.
22659
22660 2003-11-21  Karl Berry  <karl@gnu.org>
22661
22662         * config/config.{sub,guess}: update from config.
22663
22664 2003-11-18  Karl Berry  <karl@gnu.org>
22665
22666         * config/config.{sub,guess}: update from config.
22667
22668         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
22669
22670 2003-11-17  Paul Eggert  <eggert@twinsun.com>
22671
22672         * README: Mention that S+T cannot overflow if S is the size of
22673         an existing object and T is sufficiently small.
22674
22675 2003-11-17  Jim Meyering  <jim@meyering.net>
22676
22677         On systems without utime and without a utimes function capable of
22678         dealing with a NULL struct utimbuf* argument, this utime replacement
22679         could -- in unusual circumstances -- leak a file descriptor.
22680         * lib/utime.c: Include <unistd.h> and <errno.h>.
22681         (utime_null): Be sure to close `fd' and to preserve errno.
22682         Reported by Geoff Collyer via Arnold Robbins.
22683
22684 2003-11-17  Bruno Haible  <bruno@clisp.org>
22685
22686         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
22687         (Depends-on): Add xsize.
22688
22689 2003-11-17  Bruno Haible  <bruno@clisp.org>
22690
22691         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
22692
22693 2003-11-17  Bruno Haible  <bruno@clisp.org>
22694
22695         * lib/vasnprintf.c (alloca): Remove fallback definition.
22696         (freea): Remove definition.
22697         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
22698         Reported by Paul Eggert.
22699
22700 2003-11-16  Paul Eggert  <eggert@twinsun.com>
22701             Bruno Haible  <bruno@clisp.org>
22702
22703         Protect against address arithmetic overflow.
22704         * lib/printf-args.h: Include stddef.h.
22705         (arguments): Change type of field 'count' to size_t.
22706         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
22707         'unsigned int' where appropriate.
22708         * lib/printf-parse.h: Include sys/types.h.
22709         (char_directive): Change type of *arg_index fields to ssize_t.
22710         (char_directives): Change type of fields 'count', max_*_length to
22711         size_t.
22712         * lib/printf-parse.c: Include sys/types.h and xsize.h.
22713         (SSIZE_MAX): Define fallback value.
22714         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
22715         instead of 'int' where appropriate. Check a_allocated, d_allocated
22716         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
22717         * lib/vasnprintf.c: Include xsize.h.
22718         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
22719         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
22720         overflow. Avoid wraparound when converting a width or precision from
22721         decimal to binary.
22722
22723 2003-11-16  Bruno Haible  <bruno@clisp.org>
22724
22725         Update from GNU gettext.
22726         * lib/printf-parse.c: Generalize to it can be compiled for wide
22727         strings.
22728         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
22729         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
22730         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
22731         SNPRINTF): New macros.
22732         Don't include <alloca.h> if the file is used inside libintl.
22733         (local_wcslen): New function, for Solaris 2.5.1.
22734         (VASNPRINTF): Use it instead of wcslen.
22735
22736 2003-11-16  Bruno Haible  <bruno@clisp.org>
22737
22738         * lib/xsize.h (xmax): New function.
22739         (xsum, xsum3, xsum4): Declare as "pure" functions.
22740
22741 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22742
22743         * modules/xalloc (Files): Undo latest change, since xalloc.h
22744         no longer needs SIZE_MAX or PTRDIFF_MAX.
22745
22746 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22747
22748         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
22749         gl_PTRDIFF_MAX.
22750
22751 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22752
22753         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
22754         "return", to pacify some unknown compiler.  Problem reported
22755         by Joerg Schilling.
22756
22757 2003-11-12  Paul Eggert  <eggert@twinsun.com>
22758
22759         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
22760         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
22761         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
22762         heuristic is just as accurate as far as we know, and it removes a
22763         dependency on size_max.m4 and ptrdiff_max.m4.
22764
22765 2003-11-11  Bruno Haible  <bruno@clisp.org>
22766
22767         * modules/xsize (Files): Add m4/size_max.m4.
22768         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
22769
22770 2003-11-11  Bruno Haible  <bruno@clisp.org>
22771
22772         * m4/size_max.m4: New file.
22773         * m4/ptrdiff_max.m4: New file.
22774         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
22775         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
22776         (gl_XALLOC): Invoke it.
22777
22778 2003-11-11  Bruno Haible  <bruno@clisp.org>
22779
22780         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
22781         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
22782         defined.
22783
22784 2003-11-10  Paul Eggert  <eggert@twinsun.com>
22785
22786         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
22787         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
22788         rejected some allocations of exactly SIZE_MAX - 2 bytes.
22789         From Bruno Haible.
22790         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
22791         not (size_t) -1, since it's defined here.
22792
22793 2003-11-09  Karl Berry  <karl@gnu.org>
22794
22795         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
22796
22797 2003-11-06  Paul Eggert  <eggert@twinsun.com>
22798
22799         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
22800         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
22801         Reject sizes of exactly SIZE_MAX bytes.
22802         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
22803         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
22804
22805 2003-11-05  Bruno Haible  <bruno@clisp.org>
22806
22807         * lib/xsize.h: Include limits.h, to avoid a possible collision with
22808         SIZE_MAX defined in <limits.h> on Solaris.
22809
22810 2003-11-04  Jim Meyering  <jim@meyering.net>
22811
22812         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
22813         variable names, rather than @VAR@.
22814         * modules/poll: Likewise.
22815
22816 2003-11-04  Bruno Haible  <bruno@clisp.org>
22817
22818         * modules/xsize: New file.
22819         * modules/linebreak: Depend on xsize.
22820         * MODULES.html.sh (func_all_modules): Add xsize.
22821
22822 2003-11-04  Bruno Haible  <bruno@clisp.org>
22823
22824         * m4/xsize.m4: New file.
22825
22826 2003-11-04  Bruno Haible  <bruno@clisp.org>
22827
22828         * lib/xsize.h: New file.
22829         * lib/linebreak.c: Include xsize.h.
22830         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
22831         argument for overflow.
22832         Suggested by Paul Eggert.
22833
22834 2003-11-03  Karl Berry  <karl@gnu.org>
22835
22836         * config/config.{guess,sub}: update from config.
22837
22838 2003-11-03  Jim Meyering  <jim@meyering.net>
22839
22840         * modules/userspec (lib_SOURCES): Add userspec.h.
22841         (Include): Add "userspec.h".
22842         Improve description.
22843
22844 2003-11-03  Jim Meyering  <jim@meyering.net>
22845
22846         * lib/userspec.c: Include "userspec.h".
22847         * lib/userspec.h: New file.
22848
22849 2003-11-03  Bruno Haible  <bruno@clisp.org>
22850
22851         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
22852
22853 2003-11-03  Bruno Haible  <bruno@clisp.org>
22854
22855         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
22856         available, to avoid (extremely rare) race condition.
22857         Suggested by Paul Eggert.
22858
22859 2003-11-02  Karl Berry  <karl@gnu.org>
22860
22861         * config/srclist.txt (vasprintf.c): sync broken, sigh.
22862
22863 2003-10-31  Paul Eggert  <eggert@twinsun.com>
22864
22865         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
22866         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
22867         (read_filesystem_list): Set and use me_type_malloced.
22868         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
22869         whatever the type happens to be), for brevity and consistency.
22870         Check for size calculation overflow on Alphas running OSF/1.
22871
22872 2003-10-31  Jim Meyering  <jim@meyering.net>
22873
22874         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
22875
22876         * lib/linebuffer.c: Include <string.h> for declaration of memset.
22877
22878 2003-10-30  Paul Eggert  <eggert@twinsun.com>
22879             Bruno Haible  <bruno@clisp.org>
22880
22881         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
22882         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
22883
22884 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
22885
22886         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
22887         netbsd*-gnu*.  Suggested by Robert Millan.
22888
22889 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22890
22891         * modules/group-member: Depend on stdbool.
22892
22893 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22894
22895         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
22896
22897 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22898
22899         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
22900         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
22901         after the 'gnu' in these cases.  This fixes some bugs in the
22902         previous change, and is based on suggestions by Robert Millan.
22903
22904 2003-10-29  Paul Eggert  <eggert@twinsun.com>
22905
22906         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
22907         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
22908         no longer needed.
22909         * lib/quotearg.c (quotearg_n_options): Use it.
22910         * lib/group-member.c: Include <stdbool.h>.
22911         (free_group_info): Arg is now const *; don't free arg.
22912         (get_group_info): Now returns bool and accepts struct group_info *,
22913         rather than returning a malloc'ed struct group_info *.
22914         All uses changed.  Check for overflow in internal size calculation.
22915
22916         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
22917         rather than xmalloc/xrealloc.
22918         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
22919         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
22920         conformance bug: the old code used a pointer after freeing the
22921         storage that it addressed.
22922         * lib/hash.c (hash_initialize): Simplify the code by using
22923         xalloc_oversized rather than doing it by hand.
22924         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
22925         the buffer preserved.  Use free and xmalloc instead.
22926         * lib/quotearg.c (quotearg_n_options): Likewise.
22927         Use a simpler test for size overflow.  Don't use xalloc_oversized
22928         because unsigned int might be wider than size_t (!); this suggests
22929         that we should switch from unsigned int to size_t for slot numbers.
22930
22931 2003-10-28  Paul Eggert  <eggert@twinsun.com>
22932
22933         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
22934         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
22935         NetBSD kernels.  Requested by Richard Stallman.
22936
22937 2003-10-27  Paul Eggert  <eggert@twinsun.com>
22938
22939         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
22940         to allocate the returned structure.  Do not allocate a subarray,
22941         as x2nrealloc will do that.
22942         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
22943         instead of xnrealloc.
22944         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
22945
22946 2003-10-27  Bruno Haible  <bruno@clisp.org>
22947
22948         * lib/stdbool_.h: Better support for BeOS.
22949
22950 2003-10-26  Paul Eggert  <eggert@twinsun.com>
22951
22952         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
22953         now uses inline.
22954
22955 2003-10-26  Paul Eggert  <eggert@twinsun.com>
22956
22957         * lib/xalloc.h (xalloc_oversized): New static inline function, for
22958         callers that want to do their own size-overflow checking.  Include
22959         <stdbool.h>, since xalloc_oversized returns bool.
22960         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
22961         to use xalloc_oversized.
22962
22963         Add two functions x2realloc, x2nrealloc, for programs that grow
22964         arrays dynamically by doubling their sizes.
22965         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
22966         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
22967         New functions.
22968
22969         Port to C99 semantics for 'inline' of external functions.
22970         Bug reported by Bruno Haible.
22971         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
22972         with the old contents of xnmalloc.
22973         (xnmalloc, xmalloc): Use it.
22974         (xnrealloc_inline): New static inline function,
22975         with the old contents of xnrealloc.
22976         (xnrealloc, xrealloc): Use it.
22977
22978         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
22979         that.
22980
22981 2003-10-26  Karl Berry  <karl@gnu.org>
22982
22983         * config/srclist.txt (COPYING.DOC): no longer available from
22984         /gd/gnuorg; don't know where the ultimate source is.
22985
22986 2003-10-25  Paul Eggert  <eggert@twinsun.com>
22987
22988         Fix several address-calculation bugs in the hash modules,
22989         plus some minor code cleanup.
22990
22991         * lib/hash.h: Include <stdbool.h>, for bool.
22992         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
22993         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
22994         hash_get_n_entries, hash_get_max_bucket_length,
22995         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
22996         hash_rehash): Use size_t rather than unsigned.
22997         * lib/hash.c (struct hash_table, hash_get_n_buckets,
22998         hash_get_n_buckets_used, hash_get_n_entries,
22999         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
23000         hash_get_entries, hash_do_for_each, hash_string, is_prime,
23001         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
23002         Likewise.
23003         (SIZE_MAX): Define if not defined.
23004         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
23005         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
23006         hash_print):
23007         Use const * when possible.
23008         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
23009         (check_tuning): Fix bug: if tuning parameters were very close to
23010         0 or 1, rounding errors could have caused subscript violations.
23011         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
23012         (hash_initialize): Add 'fail:' label
23013         to free table and return NULL, and use it to simplify code.
23014         Use calloc rather than clearing the storage ourself.
23015         (hash_initialize, hash_rehash): Check for arithmetic overflow in
23016         buffer size calculations.
23017         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
23018         Include <stddef.h>, for size_t.
23019         * lib/hash-pjw.c (hash_pjw): Likewise.
23020         Switch to method described by Bruno Haible.
23021         Include <limits.h>, for CHAR_BIT.
23022         (SIZE_BITS): New macro.
23023
23024 2003-10-23  Paul Eggert  <eggert@twinsun.com>
23025
23026         * m4/getline.m4 (AM_FUNC_GETLINE):
23027         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
23028         hosts.  Problem reported by Derek Robert Price in
23029         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
23030         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
23031         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
23032
23033 2003-10-21  Paul Eggert  <eggert@twinsun.com>
23034
23035         * lib/getndelim2.c (getndelim2): When size calculation overflows,
23036         ceiling the allocation at NMAX bytes rather than silently
23037         discarding input bytes before NMAX is reached.  This makes
23038         a difference only if NMAX exceeds SIZE_MAX / 2.
23039
23040         * lib/obstack.c: Merge from glibc.
23041         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
23042         Add libc_hidden_def (_obstack_newchunk).
23043         (_obstack_free) [! defined _LIBC]: Remove.
23044         [defined _LIBC]: Make a strong alias from obstack_free, rather than
23045         a clone of the function body.
23046         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
23047         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
23048
23049         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
23050         glibc.
23051         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
23052         arg to memcpy.
23053
23054         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
23055         (obstack_ptr_grow_fast, obstack_int_grow_fast):
23056         Don't use lvalue casts, as GCC plans to remove support for them
23057         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
23058         was also present in the non-GCC version, indicating that this
23059         code had always been buggy and had never been widely used.
23060         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
23061         Use the fast variant of each macro, rather than copying the
23062         definiens of the fast variant; that way, we'll be more likely to
23063         catch future bugs in the fast variants.
23064
23065 2003-10-20  Bruno Haible  <bruno@clisp.org>
23066
23067         * modules/wait-process: New file.
23068         * MODULES.html.sh (func_all_modules): Add wait-process.
23069
23070 2003-10-20  Bruno Haible  <bruno@clisp.org>
23071
23072         * m4/wait-process.m4: New file.
23073
23074 2003-10-20  Bruno Haible  <bruno@clisp.org>
23075
23076         * lib/wait-process.h: New file, from GNU gettext.
23077         * lib/wait-process.c: New file, from GNU gettext.
23078
23079 2003-10-19  Jim Meyering  <jim@meyering.net>
23080
23081         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
23082         HPUX 10.20.
23083
23084 2003-10-18  Karl Berry  <karl@gnu.org>
23085
23086         * config/config.guess: update from config.
23087
23088 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23089
23090         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
23091         (getgroups): First arg is int, not size_t.
23092         Don't let 'free' mangle errno.
23093
23094 2003-10-16  Paul Eggert  <eggert@twinsun.com>
23095
23096         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
23097
23098 2003-10-16  Karl Berry  <karl@gnu.org>
23099
23100         * config/config.{guess,sub}: update from config.
23101
23102 2003-10-16  Jim Meyering  <jim@meyering.net>
23103
23104         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
23105         memcpy.
23106
23107 2003-10-15  Paul Eggert  <eggert@twinsun.com>
23108
23109         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
23110         (SIZE_MAX): Remove.
23111         (new_exclude, add_exclude_file): Initial size no longer needs to
23112         be a power of 2.
23113         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
23114         our own address arithmetic overflow checking.
23115
23116         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
23117         (fnmatch): Do not alloca more than 2000 wide characters;
23118         instead, use malloc for large buffers.
23119         Check for address arithmetic overflow, and return -1
23120         with errno set to ENOMEM in that case.
23121         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
23122         (NEW_PATTERN): Do not alloca more than 8000 bytes;
23123         instead, return -1.  Check for address arithmetic overflow.
23124
23125 2003-10-14  Paul Eggert  <eggert@twinsun.com>
23126
23127         Handle invalid suffixes and overflow independently, so that
23128         callers can treat them independently as needed.  Fix some bugs in
23129         suffix handling, e.g., "100k@" was not diagnosed as an invalid
23130         suffix for a human-readable blocksize.  The major caller-visible
23131         change is the addition of a new
23132         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
23133         that both overflow and suffix chars were found.
23134
23135         * lib/human.c (humblock): Don't check separately for invalid suffix
23136         char; that is xstrtoumax's job (now that its bug is fixed).
23137         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
23138         INTMAX_MAX]: New macros.
23139         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
23140         TYPE_MAXIMUM): New macros.
23141         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
23142         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
23143         if overflow occurs, as it's what __strtol does and it's more useful
23144         in practice.
23145         (__xstrtol): If __strtol reports some error other than ERANGE,
23146         reflect it to the caller as LONGINT_INVALID.  If it reports
23147         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
23148         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
23149         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
23150         value.
23151         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
23152         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
23153         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
23154         [defined UINTMAX_MAX]: New macros.
23155
23156 2003-10-14  Bruno Haible  <bruno@clisp.org>
23157
23158         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
23159
23160 2003-10-14  Bruno Haible  <bruno@clisp.org>
23161
23162         * m4/sig_atomic_t: New file, from GNU gettext.
23163         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
23164
23165 2003-10-14  Bruno Haible  <bruno@clisp.org>
23166
23167         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
23168         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
23169         Also use volatile where needed.
23170
23171 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23172
23173         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
23174         Change maintainer from Bruno Haible to 'all'.
23175
23176 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23177
23178         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
23179
23180 2003-10-12  Paul Eggert  <eggert@twinsun.com>
23181
23182         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
23183         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
23184         and define in terms of the other primitives.
23185         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
23186         (SIZE_MAX): Define if not already defined.
23187         (array_size_overflow): New function.
23188         (xalloc_die): Abort instead of exiting if 'error' returns.
23189         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
23190         (xmalloc, xrealloc): Use them.
23191         (xcalloc): Check for address arithmetic overflow.
23192         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
23193         a bit faster than strcpy.
23194
23195 2003-10-10  Simon Josefsson  <jas@extundo.com>
23196
23197         * modules/argp (Depends-on): Add restrict and strcase.
23198
23199 2003-10-10  Simon Josefsson  <jas@extundo.com>
23200
23201         * m4/argp.m4: Add AC_C_INLINE.
23202
23203 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23204
23205         Merge getpass from libc, plus a few fixes.
23206
23207         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
23208         Include <stdbool.h>.
23209         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
23210         __fsetlocking to empty.
23211         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
23212         do include <bits/libc-lock.h>.
23213         Do not include <fcntl.h>; not needed.
23214         [_LIBC]: Include <wchar.h>.
23215         (NOTCANCEL_MODE): New macro.
23216         (flockfile, funlockfile) [_LIBC]: New macros.
23217         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
23218         [!_LIBC]: New macros.
23219         (call_fclose): New function.
23220         (getpass): Use it.  Save tty stream separately; this simplifies the
23221         code and makes it more reliable if stdin happens to equal stdout.
23222         Invoke __fsetlocking on tty.
23223         Handle thread cancellation if needed.
23224         Namespace cleanup (use __tcgetattr, __getline).
23225         Use bool for Booleans.
23226         [USE_IN_LIBIO]: Handle wide streams.
23227         [!_LIBC]: Unconditionally do the fseek, since we don't know what
23228         stream might go where.
23229
23230         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
23231         doesn't have to include <stdio.h> before us.
23232         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
23233         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
23234         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
23235         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
23236         if not declared, so that we can use getpass.c code from libc without
23237         rewriting it.
23238         (flockfile, ftrylockfile, funlockfile): New macros.
23239
23240 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23241
23242         * modules/getpass: Depend on stdbool.
23243
23244 2003-10-08  Paul Eggert  <eggert@twinsun.com>
23245
23246         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
23247
23248 2003-10-07  Karl Berry  <karl@gnu.org>
23249
23250         * config/config.{guess,sub}: update from config.
23251
23252 2003-10-06  Jim Meyering  <jim@meyering.net>
23253             Bruno Haible  <bruno@clisp.org>
23254
23255         This lets translators provide better translations for the
23256         "Written by ..." part of --version output.
23257         * lib/version-etc.h: Include stdarg.h.
23258         (version_etc_copyright): Declare as readonly.
23259         (version_etc): Make this function variadic with a NULL-terminated list
23260         of author name strings.
23261         (version_etc_va): New declaration.
23262         * lib/version-etc.c: Include stdarg.h, stdlib.h.
23263         (version_etc_copyright): Declare as readonly.
23264         (version_etc_va): New function. Provide a different translatable string
23265         for each possible number of authors < 10. Abbreviate when there are 10
23266         authors or more.
23267         (version_etc): Make this function variadic. Call version_etc_va.
23268         Suggestion from Gary V. Vaughan.
23269
23270         * lib/long-options.h (parse_long_options): Change prototype: the
23271         authors string is moved to the end and becomes variadic.
23272         * lib/long-options.c: Include stdarg.h.
23273         (parse_long_options): Make this function variadic, too.
23274         Call version_etc_va, not version_etc.
23275
23276 2003-10-06  Bruno Haible  <bruno@clisp.org>
23277
23278         * modules/version-etc-2: Remove file.
23279         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
23280
23281 2003-10-06  Bruno Haible  <bruno@clisp.org>
23282
23283         * modules/fatal-signal: New file.
23284         * MODULES.html.sh (func_all_modules): Add fatal-signal.
23285
23286 2003-10-06  Bruno Haible  <bruno@clisp.org>
23287
23288         * m4/fatal-signal.m4: New file.
23289         * m4/signalblocking.m4: New file, from GNU gettext.
23290
23291 2003-10-06  Bruno Haible  <bruno@clisp.org>
23292
23293         * lib/version-etc-2.h: Remove file.
23294         * lib/version-etc-2.c: Remove file.
23295
23296 2003-10-06  Bruno Haible  <bruno@clisp.org>
23297
23298         * lib/fatal-signal.h: New file, from GNU gettext.
23299         * lib/fatal-signal.c: New file, from GNU gettext.
23300
23301 2003-10-05  Paul Eggert  <eggert@twinsun.com>
23302
23303         * README: Rework advice for preventing empty .o files.
23304         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
23305         not <sys/types.h>.
23306
23307 2003-10-04  Karl Berry  <karl@gnu.org>
23308
23309         * lib/argp*: update from libc.
23310
23311 2003-10-04  Karl Berry  <karl@gnu.org>
23312
23313         * config/config.{guess,sub}: update from config.
23314
23315 2003-10-02  Bruno Haible  <bruno@clisp.org>
23316
23317         * modules/lchown (Include): Add lchown.h.
23318         * modules/time_r (Include): Use "..." syntax.
23319         * modules/xgetdomainname (Include): Add xgetdomainname.h.
23320
23321 2003-10-01  Simon Josefsson  <jas@extundo.com>
23322
23323         * MODULES.html.sh (func_all_modules): Move gethostname from section
23324         'based on' to section 'lacking' POSIX:2001.
23325
23326 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
23327
23328         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
23329         to output mode on the same stream.
23330
23331 2003-09-29  Paul Eggert  <eggert@twinsun.com>
23332
23333         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
23334         Fix arg typo in previous patch.
23335
23336 2003-09-28  Jim Meyering  <jim@meyering.net>
23337
23338         * lib/error.c: Correct cpp indentation.
23339
23340 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23341
23342         * modules/free: New file.
23343
23344 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23345
23346         * m4/free.m4: New file.
23347
23348 2003-09-27  Paul Eggert  <eggert@twinsun.com>
23349
23350         * lib/minmax.h (MIN, MAX)
23351         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
23352         Omit the special code that used __typeof__, since we worry that
23353         it could be more trouble than it's worth.  See:
23354         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
23355         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
23356
23357         * lib/free.c: New file.
23358
23359 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
23360
23361         Trivial fixes to Makefile.am parts of module listings.
23362         * modules/strstr: Append strstr.h to lib_SOURCES.
23363         * modules/strcase: Likewise, for strcase.h.
23364
23365 2003-09-27  Karl Berry  <karl@gnu.org>
23366
23367         * config/mkinstalldirs: update from automake.
23368
23369 2003-09-26  Paul Eggert  <eggert@twinsun.com>
23370
23371         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
23372         (error_tail): Do not loop, reallocating temporary buffer, since
23373         the output cannot contain more wide characters than the input
23374         contains bytes, the size must be big enough already.  This avoids
23375         one potential size overflow calculation.  Check for size overflow
23376         when calculating temporary buffer size.  Free temporary buffer
23377         when done, if it was allocated with malloc; this plugs a memory
23378         leak.  Remove casts from void * to pointers, that are no longer
23379         needed now that we're assuming C89 or better.
23380
23381         Merge error changes from glibc.
23382
23383         * lib/error.c, error.h: Update copyright notice header to match glibc.
23384         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
23385         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
23386         Disable cancellation while printing error.
23387         * lib/error.h: Prepend __ to parameter names.
23388
23389 2003-09-26  Jim Meyering  <jim@meyering.net>
23390
23391         * lib/error.c (error_tail): Move some declarations
23392         into inner scope where the local variables are used.
23393
23394 2003-09-26  Bruno Haible  <bruno@clisp.org>
23395
23396         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
23397         stpncpy().
23398         Don't define stpncpy through config.h; it's now done through stpncpy.h.
23399
23400 2003-09-26  Bruno Haible  <bruno@clisp.org>
23401
23402         * lib/stpncpy.h (gnu_stpncpy): New declaration.
23403         (stpncpy): Define as alias for gnu_stpncpy.
23404         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
23405
23406 2003-09-25  Simon Josefsson  <jas@extundo.com>
23407
23408         * lib/xgetdomainname.h: New file.
23409         * lib/xgetdomainname.c: New file.
23410
23411 2003-09-25  Simon Josefsson  <jas@extundo.com>
23412             Bruno Haible  <bruno@clisp.org>
23413
23414         * modules/getdomainname: New file.
23415         * modules/xgetdomainname: New file.
23416         * MODULES.html.sh (func_all_modules): Add getdomainname,
23417         xgetdomainname.
23418
23419 2003-09-25  Simon Josefsson  <jas@extundo.com>
23420             Bruno Haible  <bruno@clisp.org>
23421
23422         * m4/getdomainname.m4: New file.
23423
23424 2003-09-25  Simon Josefsson  <jas@extundo.com>
23425             Bruno Haible  <bruno@clisp.org>
23426
23427         * lib/getdomainname.h: New file.
23428         * lib/getdomainname.c: New file.
23429
23430 2003-09-25  Karl Berry  <karl@gnu.org>
23431
23432         * lib/argp-fmtstream.c, argp-help.c: update from libc.
23433
23434 2003-09-25  Karl Berry  <karl@gnu.org>
23435
23436         * config/install-sh: update from automake.
23437
23438 2003-09-25  Bruno Haible  <bruno@clisp.org>
23439
23440         * modules/version-etc-2: New file, from modules/version-etc with
23441         modifications.
23442         * MODULES.html.sh (func_all_modules): Add version-etc-2.
23443
23444 2003-09-25  Bruno Haible  <bruno@clisp.org>
23445
23446         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
23447         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
23448
23449 2003-09-24  Simon Josefsson  <jas@extundo.com>
23450
23451         * modules/xgethostname: Add xgethostname.h.
23452
23453 2003-09-24  Paul Eggert  <eggert@twinsun.com>
23454
23455         * lib/linebuffer.c (freebuffer): Don't free the argument, just
23456         the buffer associated with the argument.  Bug reported by
23457         Simon Josefsson.
23458
23459 2003-09-24  Paul Eggert  <eggert@twinsun.com>
23460
23461         * README: Document assumptions that 'int' is at least 32 bits
23462         wide, that integer arithmetic is 2's complement without overflow,
23463         that there are no holes in integer values, that adding sizes of
23464         two nonoverlapping objects can't overflow, and that all-bits-zero
23465         yields scalar zero.  Fix spelling and capitalization typos.
23466
23467 2003-09-19  Karl Berry  <karl@gnu.org>
23468
23469         * lib/argp.h: update from libc.
23470
23471 2003-09-17  Paul Eggert  <eggert@twinsun.com>
23472
23473         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
23474         to avoid spurious warnings like "AC_RUN_IFELSE was called before
23475         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
23476
23477 2003-09-17  Paul Eggert  <eggert@twinsun.com>
23478
23479         * gnulib-tool: Use "test -h", not "test -L", for portability
23480         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
23481         (tags_regexp): Remove, since \| doesn't conform to POSIX.
23482         (sed_extract_prog): Issue s commands one-by-one, rather than
23483         using \| in one s command.
23484
23485 2003-09-16  Paul Eggert  <eggert@twinsun.com>
23486
23487         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
23488         input error, instead of returning NULL the next time we are called
23489         (and therefore losing track of errno).
23490
23491 2003-09-16  Bruno Haible  <bruno@clisp.org>
23492
23493         * gnulib-tool (func_create_testdir): Warn about duplicated
23494         dependencies.
23495
23496 2003-09-15  Paul Eggert  <eggert@twinsun.com>
23497
23498         * modules/argmatch, modules/fatal, modules/obstack,
23499         modules/xalloc, modules/xgethostname: Sort dependencies by
23500         importance, not alphabetically.
23501
23502 2003-09-15  Paul Eggert  <eggert@twinsun.com>
23503
23504         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
23505         fails, so that the caller gets the proper errno.
23506
23507         * lib/readutmp.c (read_utmp): Likewise.
23508         Check for fstat error.  Close stream and free storage
23509         when failing.
23510
23511 2003-09-14  Karl Berry  <karl@gnu.org>
23512
23513         * config/srclist.txt (strdup.c): disable for c89 changes.
23514
23515 2003-09-14  Jim Meyering  <jim@meyering.net>
23516
23517         * lib/getloadavg.c: Correct cpp indentation.
23518         * lib/strdup.c: Likewise.
23519         * lib/vasnprintf.c: Likewise.
23520
23521 2003-09-14  Bruno Haible  <bruno@clisp.org>
23522
23523         * modules/fwriteerror: New file.
23524         * MODULES.html.sh (func_all_modules): Add fwriteerror.
23525
23526 2003-09-14  Bruno Haible  <bruno@clisp.org>
23527
23528         * lib/fwriteerror.h: New file.
23529         * lib/fwriteerror.c: New file.
23530
23531 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23532
23533         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
23534         modules/xgethostname, modules/xalloc: Depend on exit.
23535
23536 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23537
23538         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
23539
23540         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
23541         and AC_MINIX, too, so that their extensions are available.
23542
23543         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
23544         This macro has been superseded by gl_BACKUPFILE.
23545
23546         More patches to assume C89 or better.
23547
23548         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
23549
23550         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
23551         unconditionally.
23552         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
23553         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
23554         Include <string.h>, <stdlib.h> unconditionally.
23555         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
23556         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
23557         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
23558         headers or for string.h.
23559         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
23560         or strtoul.
23561
23562         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
23563         headers.
23564         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
23565         * m4/userspec.m4 (gl_USERSPEC): Likewise.
23566         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
23567         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
23568         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
23569         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
23570         memcpy, memset.
23571         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
23572         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
23573         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
23574         strtol.
23575         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
23576         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
23577         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
23578         strtoul.
23579
23580 2003-09-12  Paul Eggert  <eggert@twinsun.com>
23581
23582         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
23583         * lib/obstack.c [!defined _LIBC]: Likewise.
23584         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
23585         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
23586         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
23587
23588         More changes to assume C89 or better.
23589
23590         * lib/error.c (error_tail): Assume vprintf.
23591
23592         * lib/argmatch.c (getenv): Remove decl.
23593         * lib/progreloc.c (get_full_program_name): Define via prototype.
23594         * lib/setenv.c (clearenv): Likewise.
23595         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
23596         needed.
23597         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
23598         (malloc, memcpy): Remove decls.
23599         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
23600         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
23601         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
23602         (memcpy): Remove macro.
23603         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
23604         (__P): Remove.  All uses removed.
23605         (PTR): Remove.  All uses changed to void *.
23606         (CHAR_BIT, NULL): Remove.
23607         (spaces, zeros, memset_space, memset_zero)
23608         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
23609         Remove.
23610         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
23611         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
23612         Define with prototype.
23613         Remove now-unnecessary prototype decl.
23614         (extra_args_spec): Assume ANSI C.  All uses changed.
23615         (extra_args_spec_iso): Remove.
23616         (my_strftime, emacs_strftimeu): Define via prototype.
23617         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
23618         unconditionally.
23619         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
23620         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
23621         (strtoul, strtol): Remove decls.
23622         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
23623         LONG_MAX): Remove.
23624         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
23625         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
23626         (LOCALE_PARAM_PROTO): New macro.
23627         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
23628         (INTERNAL (strtol), strtol): Define with a prototype.
23629         (PARAMS): Remove.  All uses removed.
23630         * lib/tempname.c: Include <string.h> unconditionally.
23631         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
23632         * lib/xgethostname.c (main): Define with a prototype.
23633         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
23634         Include <stdlib.h> unconditionally.
23635         (calloc, malloc, realloc, free): Remove decls.
23636         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
23637         Include <stdlib.h> unconditionally.  Sort include file names.
23638         (strtod): Remove.
23639         (xstrtod): Define with a prototype.
23640         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
23641         (strtol, strtoul): Remove decls.
23642
23643 2003-09-11  Paul Eggert  <eggert@twinsun.com>
23644
23645         More patches to assume C89 or better.
23646         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
23647         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
23648         string.h, memchr, STDC_HEADERS.
23649
23650 2003-09-11  Paul Eggert  <eggert@twinsun.com>
23651
23652         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
23653         Include <stdlib.h>, <string.h> unconditionally.
23654         Remove now-unnecessary cast to char *.
23655         * lib/strnlen.c: Include <string.h> unconditionally.
23656         * lib/yesno.c (yesno): Define with a prototype.
23657
23658 2003-09-11  Bruno Haible  <bruno@clisp.org>
23659
23660         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
23661
23662 2003-09-10  Jim Meyering  <jim@meyering.net>
23663
23664         * lib/error.c: Correct indentation of cpp directives.
23665
23666 2003-09-10  Bruno Haible  <bruno@clisp.org>
23667
23668         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
23669         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
23670         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
23671         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
23672         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
23673         <stdlib.h> and <string.h> checks.
23674         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
23675         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
23676
23677 2003-09-10  Bruno Haible  <bruno@clisp.org>
23678
23679         * lib/strcspn.c: Include <string.h> unconditionally.
23680         * lib/strpbrk.c: Include <string.h> unconditionally.
23681         * lib/strstr.c: Include <string.h> unconditionally.
23682         * lib/unicodeio.c: Include <string.h> unconditionally.
23683         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
23684         * lib/unsetenv.c: Likewise.
23685         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
23686         * lib/yesno.c: Include <stdlib.h> unconditionally.
23687         (rpmatch): Add prototype.
23688
23689 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23690
23691         More patches to assume C89 or better.
23692         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
23693         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
23694         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
23695         or for string.h.
23696         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
23697         stdlib.h.
23698         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
23699         C headers.
23700         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
23701         string.h.
23702         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
23703         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
23704         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
23705         or for string.h.
23706         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
23707         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
23708         C headers.
23709         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
23710         memcpy.
23711         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
23712         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
23713         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
23714         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
23715         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
23716         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
23717         string.h, free.
23718         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
23719         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
23720         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
23721         C headers, or for string.h.
23722         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
23723         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
23724         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
23725         headers, memory.h, stdlib.h, string.h, strings.h.
23726         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
23727         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
23728         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
23729         strchr.
23730         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
23731         headers, memory.h, string.h.
23732         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
23733         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
23734         free.
23735         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
23736         headers.
23737         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
23738         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
23739         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
23740         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
23741         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
23742
23743 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23744
23745         More K&R removal.
23746
23747         * lib/acosl.c (main): Use a prototype.
23748         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
23749         tanl.c: Likewise.
23750
23751         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
23752
23753         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
23754         (getopt, etopt_long, getopt_long_only, _getopt_internal)
23755         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
23756         with a prototype.
23757         * lib/getopt.c (const): Remove macro.
23758         Include <string.h> unconditionally.
23759         (my_index): Remove; all uses changed to strchr.
23760         (strlen): Remove decl.
23761         (exchange): Remove forward decl; no longer needed.
23762         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
23763         Define with prototype.
23764         * lib/getopt1.c (const): Remove macro.
23765         (getopt_long, getopt_long_only, main): Define with prototype.
23766
23767         * lib/getugroups.c: Include <string.h> unconditionally.
23768
23769         * lib/getusershell.c: Include <stdlib.h> unconditionally.
23770         (getusershell, setusershell, endusershell, readname, main):
23771         Define with prototypes.
23772
23773         * lib/group-member.c: Include group-member.h first.
23774         Include <stdlib.h> unconditionally.
23775
23776         * lib/hard-locale.c: Include hard-locale.h first.
23777         Include <stdlib.h>, <string.h> unconditionally.
23778
23779         * lib/hash.c (free, malloc): Remove decls.
23780         Include <stdlib.h> unconditionally.
23781
23782         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
23783         (getenv): Do not declare.
23784
23785         * lib/idcache.c: Include <string.h> unconditionally.
23786
23787         * lib/long-options.c: Include long-options.h first, to test interface.
23788         Include <stdlib.h> unconditionally.
23789
23790         * lib/makepath.c: Include makepath.h first, to test interface.
23791         Include <stdlib.h> and <string.h> unconditionally.
23792
23793         * lib/linebuffer.c: Include <stdlib.h>.
23794         (free): Remove decl.
23795
23796         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
23797         stddef.h. rpl_malloc returns void *, not char *.
23798         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
23799         prototype.
23800
23801         * lib/md5.h: Include <limits.h> unconditionally.
23802         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
23803         (__P): Remove; all uses removed.
23804         * lib/md5.c: Include "md5.h" first.
23805         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
23806         md5_buffer, md5_process_bytes, md5_process_block):
23807         Define with prototypes.
23808         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
23809         * lib/sha.c: Include "sha.h" first.
23810         Include <stdlib.h>, <string.h> unconditionally.
23811
23812         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
23813         * lib/memcmp.c (__ptr_t): Likewise.
23814         * lib/memrchr.c (__ptr_t): Likewise.
23815         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
23816         Include <string.h> unconditionally.
23817         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
23818         * lib/memchr.c: Include <stdlib.h> unconditionally.
23819         * lib/memchr.c (LONG_MAX): Remove.
23820         * lib/memrchr.c (LONG_MAX): Likewise.
23821         * lib/memchr.c (__memchr): Define via a prototype.
23822         * lib/memrchr.c (__memrchr): Likewise.
23823         * lib/memcmp.c (__P): Remove, and remove all uses.
23824         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
23825         Remove forward decls; no longer needed.
23826         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
23827         Use types required by C89 in prototype.
23828
23829         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
23830         * lib/savedir.c: Likewise.
23831         * lib/mkdir.c (free): Remove decl.
23832         * lib/rmdir.c (rmdir): Define with a prototype.
23833         * lib/savedir.c: Include savedir.h first, to test interface.
23834
23835         * lib/mktime.c (STDC_HEADERS): Remove.
23836         Include <stdlib.h>, <string.h> unconditionally.
23837
23838         * lib/modechange.c: Include <stdlib.h> unconditionally.
23839         (malloc): Remove decl.
23840
23841         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
23842         (free): Remove decl.
23843
23844         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
23845         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
23846         (This type really should be intptr_t, but that's a C99ism.)
23847         (_obstack_memcpy): Remove: all uses changed to memcpy.
23848         Include <string.h> unconditionally.
23849         (struct obstack): Assume __STDC__ for types of members
23850         chunkfun, freefun, extra_arg.
23851         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
23852         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
23853         obstack_begin, obstack_specify_allocation,
23854         obstack_specify_allocation_with_arg, obstack_chunkfun,
23855         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
23856         Remove unprototyped decls and the macros that use them.
23857         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
23858         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
23859         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
23860         (defined __STDC__ && __STDC__)]:
23861         Remove nonprototyped code.
23862         Include <stdlib.h> unconditionally.
23863         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
23864         _obstack_allocated_p, _obstack_free, obstack_free,
23865         _obstack_memory_used, print_and_abort):
23866         Define using prototypes.
23867         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
23868         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
23869         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
23870         obstack_next_free, obstack_object_size, obstack_room) [0]:
23871         Remove unused, unprototyped code.
23872
23873         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
23874
23875         * lib/physmem.c (physmem_total, physmem_available, main): Define
23876         with prototypes.
23877
23878         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
23879         (main): Define with a prototype.
23880
23881         * lib/posixver.c (getenv): Remove decl.
23882
23883         * lib/putenv.c (malloc): Returns void *, not char *.
23884         Include <string.h> unconditionally.
23885         (strchr, memcpy, NULL): Do not define.
23886
23887         * lib/readtokens.c: Include readtokens.h first, to test interface.
23888         Include <stdlib.h>, <string.h> unconditionally.
23889         (init_tokenbuffer): Define with a prototype.
23890
23891         * lib/regex.c (PARAMS): Remove.  All uses removed.
23892         All uses of _RE_ARGS removed, too.
23893         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
23894         unconditionally.
23895         (bzero): Assume memset exists.
23896         (memcmp, memcpy, NULL): Remove.
23897         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
23898         char, or assignments to local vars of type signed char.
23899         (init_syntax_once, PREFIX(extract_number_and_incr),
23900         PREFIX(print_partial_compiled_pattern),
23901         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
23902         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
23903         PREFIX(regex_grow_registers), PREFIX(regex_compile),
23904         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
23905         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
23906         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
23907         wcs_compile_range, byte_compile_range, truncate_wchar,
23908         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
23909         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
23910         count_mbs_length, wcs_re_match_2_internal,
23911         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
23912         PREFIX(alt_match_null_string_p),
23913         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
23914         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
23915         regfree, PREFIX(extract_number)): Define with prototype.  Remove
23916         now-unnecessary declaration, if any.
23917         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
23918         regcomp, regexec):
23919         Remove now-unnecessary casts among pointer types.
23920         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
23921
23922         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
23923         (free): Remove decl.
23924
23925         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
23926
23927         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
23928         (free): Remove decl.
23929
23930         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
23931         * lib/xgetcwd.c: Likewise.
23932
23933         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
23934         (free): Remove decl.
23935
23936         * lib/strchrnul.c (strchrnul): Define with a prototype.
23937         Fix bug: c_in was not converted to char before searching.
23938
23939         The following changes are not K&R related:
23940
23941         * lib/group-member.h: Include <sys/types.h>, so that this file is
23942         self-contained.
23943         * lib/makepath.h: Likewise.
23944
23945         * lib/getusershell.c (readname, default_index, line_size, readname):
23946         Use size_t, not int, for sizes.
23947         (readname): If the size overflows, report an error instead of
23948         looping forever.
23949
23950 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23951
23952         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
23953         libc.
23954
23955 2003-09-09  Paul Eggert  <eggert@twinsun.com>
23956
23957         * README: New section: portability guidelines.
23958
23959 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
23960
23961         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
23962         C89 spec.
23963
23964 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
23965
23966         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
23967
23968 2003-09-08  Paul Eggert  <eggert@twinsun.com>
23969
23970         Assume C89 or better; remove K&R cruft.
23971         A few of these changes were first proposed by Derek Robert Price
23972         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
23973
23974         * lib/addext.c: Include <string.h> unconditionally.
23975         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
23976         Don't declare getenv or malloc.
23977
23978         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
23979         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
23980         (NULL): Remove.
23981         (find_stack_direction, alloca): Use prototypes.
23982
23983         * lib/atexit.c (atexit): Define using a prototype.
23984
23985         * lib/basename.c, dirname.c, stripslash.c:
23986         Include <string.h> unconditionally.
23987
23988         * lib/bcopy.c: Include <stddef.h>.
23989         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
23990
23991         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
23992
23993         * lib/error.h (error, error_at_line, error_print_progname)
23994         [! (defined (__STDC__) && __STDC__)]: Remove decls.
23995         * lib/error.c: Include error.h first, to check interface.
23996         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
23997         (VA_START): Remove; all uses changeed to va_start.
23998         (exit, strerror): Remove decls.
23999         (error_print_progname): Prototype uncondionally.
24000         Don't include <errno.h>; no longer needed.
24001         (private_strerror): Remove.
24002         (error_tail): Always define.
24003         (error, error_at_line): Assume C89 or better; always use prototypes.
24004         * lib/fatal.c: Include "fatal.h" first, to test interface.
24005         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
24006         (VA_START): Remove; all uses changed to va_start.
24007         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
24008         this case.
24009         (exit): Remove decl.
24010         (fatal): Prototype unconditionally.  Assume va_start works.
24011         Abort at end, to pacify gcc.
24012
24013         * lib/euidaccess.c (main): Define with a prototype.
24014
24015         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
24016
24017         * lib/exitfail.c: Include <stdlib.h> unconditionally.
24018
24019         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
24020         prototypes.
24021         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
24022         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
24023         (getenv): Remove decl.
24024         (fnmatch): Define using a prototype.
24025         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
24026         (FCT): Define using a prototype.
24027
24028         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
24029
24030         * lib/gethostname.c: Include <stddef.h>.
24031         (gethostname): Define with prototype.  Length is size_t, not int.
24032
24033 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24034
24035         Assume C89 or better; remove K&R cruft.
24036         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
24037         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
24038         string.h, getenv, malloc.
24039         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
24040         headers.
24041         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
24042         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
24043         do not check for strerror.
24044         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
24045         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
24046         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
24047         do not check for doprnt or vprintf.
24048         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
24049         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
24050
24051 2003-09-08  Paul Eggert  <eggert@twinsun.com>
24052
24053         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
24054         getversion.c should have been removed then, but was accidentally
24055         preserved.
24056
24057         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
24058         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
24059
24060 2003-09-08  Karl Berry  <karl@gnu.org>
24061
24062         * config/config.sub, config.guess, srclistvars.sh: update from savannah
24063                 config, forget about prep.
24064
24065         * config/depcomp, missing: update from automake.
24066
24067 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24068
24069         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
24070         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24071
24072 2003-09-07  Paul Eggert  <eggert@twinsun.com>
24073
24074         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
24075         copy_tm_result.  Bug reported by Simon Josefsson in
24076         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
24077
24078 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24079
24080         * m4/time_r.m4: New file.
24081         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
24082         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
24083         is. Check for timegm declaration.
24084         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
24085         Do not check for gmtime_r.
24086         Replace mktime if __mktime_internal does not exist and if mktime
24087         hasn't been replaced already.
24088
24089 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24090
24091         * lib/time_r.c, lib/time_r.h: New files.
24092
24093         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
24094         __localtime_r.
24095         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
24096         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
24097
24098         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
24099         __gmtime_r.
24100         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
24101         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
24102         Include <time_r.h>.
24103
24104         * lib/timegm.c: Switch to glibc implementation, with the following
24105         changes:
24106         [defined HAVE_CONFIG_H]: Include <config.h>.
24107         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
24108         (__mktime_internal) [!defined _LIBC]: New decl.
24109         (__gmtime_r) [!defined _LIBC]: New macro and function.
24110         (timegm): Use a prototype, since gnulib assumes C89.
24111         Do not bother declaring tmp to be const, as it's not really usefu.
24112         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
24113         (timegm): Declare only if HAVE_DECL_TIMEGM.
24114
24115 2003-09-06  Paul Eggert  <eggert@twinsun.com>
24116
24117         * MODULES.html.sh (func_all_modules): Add time_r.
24118         * modules/time_r: New file.
24119         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
24120         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
24121
24122 2003-09-03  Paul Eggert  <eggert@twinsun.com>
24123
24124         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
24125         Bug reported by Lute Kamstra in
24126         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
24127
24128         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
24129         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
24130         course with correspondingly smaller numbers for tomorrow and
24131         yesterday.  From Tadayoshi Funaba.  Originally installed into
24132         sh-utils on 1999-08-07, but the patch got lost (I guess during the
24133         coreutils merge?).
24134
24135 2003-08-31  Simon Josefsson  <jas@extundo.com>
24136
24137         * modules/timegm: New file.
24138         * MODULES.html.sh (func_all_modules): Add timegm.
24139
24140 2003-08-31  Simon Josefsson  <jas@extundo.com>
24141
24142         * m4/timegm.m4: New file.
24143
24144 2003-08-31  Simon Josefsson  <jas@extundo.com>
24145
24146         * lib/timegm.h: New file.
24147         * lib/timegm.c: New file.  Based on
24148         wget-1.8.2/src/http.c:mktime_from_utc.
24149
24150 2003-08-31  Karl Berry  <karl@gnu.org>
24151
24152         * lib/argp.h: update from libc.
24153
24154 2003-08-28  Bruno Haible  <bruno@clisp.org>
24155
24156         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
24157         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
24158         followed by '#define fnmatch fnmatch_posix' gives an error.
24159
24160 2003-08-28  Bruno Haible  <bruno@clisp.org>
24161
24162         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
24163         warning on QNX, which defines O_BINARY to 000000.
24164
24165 2003-08-27  Jim Meyering  <jim@meyering.net>
24166
24167         * m4/mkstemp.m4: Require that the system mkstemp be able to create
24168         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
24169         would fail after 32.  Reported by Danny Levinson.  Details here:
24170         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
24171
24172 2003-08-24  Bruno Haible  <bruno@clisp.org>
24173
24174         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
24175         MSVC7 <stdio.h> is included later.
24176
24177 2003-08-22  Simon Josefsson  <jas@extundo.com>
24178
24179         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
24180
24181 2003-08-20  Karl Berry  <karl@gnu.org>
24182
24183         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
24184
24185 2003-08-20  Bruno Haible  <bruno@clisp.org>
24186
24187         * modules/progname: New file.
24188         * MODULES.html.sh (func_all_modules): Add progname.
24189
24190 2003-08-20  Bruno Haible  <bruno@clisp.org>
24191
24192         * lib/progname.h: New file, from GNU gettext.
24193         * lib/progname.c: New file, from GNU gettext.
24194         * lib/progreloc.c: New file, from GNU gettext.
24195
24196 2003-08-19  Jim Meyering  <jim@meyering.net>
24197
24198         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
24199         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
24200
24201 2003-08-19  Bruno Haible  <bruno@clisp.org>
24202
24203         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
24204         more.
24205
24206 2003-08-19  Bruno Haible  <bruno@clisp.org>
24207
24208         * lib/xstrdup.c: Assume <string.h> exists.
24209
24210 2003-08-18  Paul Eggert  <eggert@twinsun.com>
24211
24212         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
24213         in makefile rules.
24214
24215 2003-08-18  Jim Meyering  <jim@meyering.net>
24216
24217         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
24218         * m4/lib-ld.m4: Likewise.
24219
24220 2003-08-18  Jim Meyering  <jim@meyering.net>
24221
24222         * lib/setenv.h: Indent nested cpp directive.
24223         * lib/vasnprintf.c: Remove trailing blanks.
24224
24225 2003-08-17  Simon Josefsson  <jas@extundo.com>
24226
24227         * modules/xstrndup: New file.
24228         * MODULES.html.sh (func_all_modules): Add xstrndup.
24229
24230 2003-08-17  Simon Josefsson  <jas@extundo.com>
24231
24232         * modules/argp: Fix autoconf macro name. Add more dependencies.
24233
24234 2003-08-17  Simon Josefsson  <jas@extundo.com>
24235
24236         * m4/xstrndup.m4: New file.
24237
24238 2003-08-17  Simon Josefsson  <jas@extundo.com>
24239
24240         * m4/argp.m4: New file.
24241
24242 2003-08-17  Simon Josefsson  <jas@extundo.com>
24243             Bruno Haible  <bruno@clisp.org>
24244
24245         * lib/xstrndup.h: New file.
24246         * lib/xstrndup.c: New file.
24247
24248 2003-08-17  Bruno Haible  <bruno@clisp.org>
24249
24250         * modules/strndup (Files, Include): Add lib/strndup.h.
24251
24252 2003-08-17  Bruno Haible  <bruno@clisp.org>
24253
24254         * modules/euidaccess (Files): Add lib/euidaccess.h.
24255
24256 2003-08-17  Bruno Haible  <bruno@clisp.org>
24257
24258         * lib/strndup.h: New file.
24259
24260 2003-08-17  Bruno Haible  <bruno@clisp.org>
24261
24262         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
24263         like AC_GNU_SOURCE.
24264         * modules/extensions (configure.ac): Comment out the invocation of
24265         gl_USE_SYSTEM_EXTENSIONS.
24266
24267 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24268
24269         Merges from coreutils, etc.
24270         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
24271         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
24272         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
24273         fixing a typo.
24274         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
24275         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
24276
24277 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24278
24279         Document merge from coreutils.
24280         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
24281         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
24282         * modules/utime: Add m4/utimes-null.m4.
24283
24284 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24285
24286         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
24287         space, undoing this 2003-08-12 change:
24288         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24289
24290 2003-08-16  Paul Eggert  <eggert@twinsun.com>
24291
24292         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
24293         strtoul.c from libc, undoing this 2003-08-12 change:
24294         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
24295
24296 2003-08-16  Jim Meyering  <jim@meyering.net>
24297
24298         Merges from coreutils.
24299         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
24300         prefix.  Adjust cache variables similarly.  Create 500 rather than
24301         just 300 files, to exercise bug on Darwin6.5, too.
24302         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
24303         $missing_dir.
24304         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
24305         AM_SYS_POSIX_TERMIOS.
24306         Reported by mkc@mathdogs.com.
24307         Also change use of $am_cv_sys_posix_termios
24308         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
24309         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
24310         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
24311         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
24312         in /proc/mounts until it finds one with matching device number.  This
24313         is unnecessary when the FILE argument *is* a mount point.  No stat call
24314         is necessary in that case.  So, disable the statvfs-testing code on
24315         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
24316         as RedHat bug# 84846.
24317         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24318         to 1MB, so as not to render systems with no stack size limit (e.g.,
24319         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24320         Include <unistd.h>.  On some systems,
24321         it is required for the definition of _SC_PAGESIZE.
24322
24323 2003-08-16  Jim Meyering  <jim@meyering.net>
24324
24325         Merge from coreutils.
24326         * lib/xstrtoimax.c: #else #if -> #elif.
24327         * lib/xstrtoumax.c: Likewise.
24328
24329 2003-08-16  Jim Meyering  <jim@meyering.net>
24330
24331         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
24332         * m4/utimes.m4: Removed.
24333         * m4/utimes-null.m4: Renamed from utimes.m4.
24334
24335         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
24336         to 1MB, so as not to render systems with no stack size limit (e.g.,
24337         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
24338         Include <unistd.h>.  On some systems,
24339         it is required for the definition of _SC_PAGESIZE.
24340
24341 2003-08-16  Jim Meyering  <jim@meyering.net>
24342         and Paul Eggert  <eggert@cs.ucla.edu>
24343
24344         Merges from coreutils, etc.
24345
24346         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
24347         using the latest version from cvs.  This avoids problems with #line
24348         directives using a vendor (Sun) compiler.
24349         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
24350         Don't set GETGROUPS_LIB here; now it's
24351         done via getgroups.m4's wrapper function.
24352         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
24353         rather than just in sh-util/configure.in, so that the
24354         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
24355         same.
24356         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
24357         AC_FUNC_GETLOADAVG where to find getloadavg.c.
24358         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
24359         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
24360         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
24361         Remove code that is now done by the newly-required macros.
24362         Append $(EXEEXT) to DF_PROG.
24363         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
24364         Do not invoke or require the following here,
24365         since prereq.m4 or some gnulib .m4 now does this for us:
24366         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
24367         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
24368         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
24369         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
24370         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
24371         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
24372         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
24373         AC_FUNC_OBSTACK.
24374         Do not replace the following functions, as this is now the job
24375         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
24376         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
24377         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
24378         atexit getpass, strdup, getpagesize.
24379         Replace 'raise'.
24380         Do not check for the following functions, as this is now the job
24381         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
24382         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
24383         setregid.
24384         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
24385         Check for sys/sysctl.h.
24386         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
24387         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
24388         of checking for ssize_t ourselves.
24389
24390         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
24391         Require every macro that gnulib/modules/* suggests for us.
24392         (jm_PREREQ_ADDEXT): New macro.
24393         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
24394         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
24395
24396         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
24397         (gl_PHYSMEM): Use it.
24398         Also check for `table' function.
24399         Check for new headers and functions.
24400         Add check for sys/sysmp.h.
24401         With suggestions from Kaveh Ghazi.
24402         Ignore headers that are present but cannot be compiled.  This
24403         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
24404         C 5.4.
24405
24406 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24407
24408         Document merge from coreutils.
24409         * modules/userspec: Depend on posixver.
24410         * modules/strftime: Depend on tzset.
24411
24412 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24413
24414         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
24415         rather than tab, after '#' in shell-script copyright notices.
24416         Suggested by Bruno Haible.
24417
24418 2003-08-15  Paul Eggert  <eggert@twinsun.com>
24419
24420         * config/srclist-update: Use three spaces, rather than tab, after '#'
24421         in shell-script copyright notices.  Suggested by Bruno Haible.
24422         Remove unnecessary parenthesization in regular expression.
24423
24424 2003-08-15  Jim Meyering  <jim@meyering.net>
24425
24426         Merge from coreutils.
24427         * lib/xgethostname.c: Include <stdlib.h>.
24428         (xghostname): Don't exit for anything other than memory-related
24429         failure; just return NULL.
24430         * lib/userspec.c: Include "posixver.h".
24431         (parse_user_spec): Accept `.' as a separator only
24432         in pre-POSIX-200112 mode.
24433         * lib/strtoimax.c: Use #elif rather than #else #if.
24434         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
24435         Remove function, now that we can rely on a working tzset function.
24436         [!_LIBC]: Ensure that the required autoconf test has been run.
24437         [!defined _NL_CURRENT && HAVE_STRFTIME]:
24438         Use underlying_strftime for %r.
24439         * lib/sha.c: Merge in some clean-up and optimization changes from
24440         glibc.
24441         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
24442         Ensure that it is a multiple of 64.
24443         Rearrange loop exit tests so as to avoid performing an
24444         additional fread after encountering an error or EOF.
24445         * lib/realloc.c: Update copyright date.
24446
24447 2003-08-15  Jim Meyering  <jim@meyering.net>
24448         and Paul Eggert  <eggert@twinsun.com>
24449
24450         Merge from coreutils.
24451         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
24452         member but strut utmpx does not.  Needed for AIX 4.3.3.
24453         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
24454
24455 2003-08-15  Jim Meyering  <jim@meyering.net>
24456         and Paul Eggert  <eggert@cs.ucla.edu>
24457
24458         Merges from coreutils, etc.
24459         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
24460         Require gl_FUNC_TZSET_CLOBBER.
24461         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
24462         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
24463         members.
24464
24465 2003-08-14  Paul Eggert  <eggert@twinsun.com>
24466
24467         Help the merge from coreutils.
24468         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
24469         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
24470         * m4/tzset.m4: Use it too.
24471
24472 2003-08-14  Paul Eggert  <eggert@twinsun.com>
24473
24474         * modules/tzset: New file.
24475
24476 2003-08-14  Jim Meyering  <jim@meyering.net>
24477
24478         Merges from coreutils.
24479         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
24480         variable names, rather than @FNMATCH_H@.
24481         * modules/alloca: Likewise for $(ALLOCA_H).
24482
24483         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
24484         the three copies of the literal target, `fnmatch.h'.
24485         * modules/alloca (alloca.h): Likewise.
24486
24487 2003-08-14  Jim Meyering  <jim@meyering.net>
24488
24489         Merge from coreutils.
24490         * m4/tzset.m4: New file.
24491         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
24492         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
24493         otherwise, AIX 5.1 systems would end up using the latter.
24494         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
24495         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
24496         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
24497         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
24498
24499 2003-08-14  Jim Meyering  <jim@meyering.net>
24500
24501         Merge from coreutils.
24502         * lib/obstack.h: Whitespace changes.
24503         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
24504         and xcalloc return values.
24505         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
24506         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
24507         hang on OSF/1 5.1 for DIR on both local and remote file systems.
24508         Reported by (and fix confirmed by) Nelson H. F. Beebe.
24509         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
24510         error from mntctl.
24511         Use mntctl's return value to drive the entry-processing loop, since
24512         we can't rely on the value of the vmt_length member in the last
24513         entry.  On some systems doing so could result in exhausting
24514         virtual memory.  Based in part on a patch from Mike Jetzer.
24515
24516 2003-08-14  Jim Meyering  <jim@meyering.net>
24517         and Paul Eggert  <eggert@twinsun.com>
24518
24519         Merges from coreutils, plus other fixes.
24520         * lib/physmem.c: Merge in portability changes from gcc/libiberty
24521         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
24522         for credits and details.  Thanks to Kaveh Ghazi for helping
24523         to keep these files in sync.
24524         (ARRAY_SIZE): Define it.
24525         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
24526         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
24527         (memcasecmp): Don't assume size_t fits in unsigned int.
24528         Remove casts and duplicate code.
24529         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
24530         (memcpy): Remove definition.
24531         Merge in some clean-up and optimization changes from glibc.
24532         [BLOCKSIZE]: Move definition to top of file.
24533         Ensure that it is a multiple of 64.
24534         Rearrange loop exit tests so as to avoid performing an
24535         additional fread after encountering an error or EOF.
24536         * lib/md5.h (md5_uintptr): Define.
24537         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
24538         return to the initial working directory.  Preserve errno
24539         for caller.
24540         * lib/idcache.c: Include "xalloc.h".
24541         (xmalloc, xrealloc): Remove decls.
24542         (getuser): Remove casts no longer required in C89.
24543         * lib/human.c: Include stdio.h, for sprintf.
24544         * lib/group-member.c: Include "xalloc.h".
24545         (xmalloc, xrealloc): Remove decls.
24546         (get_group_info): Remove casts no longer required in C89.
24547         * lib/getusershell.c (readname): Remove casts no longer required in
24548         C89.
24549         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
24550         * lib/getline.c: Whitespace fix, from coreutils.
24551
24552 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24553
24554         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
24555         Check for isascii.
24556
24557         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
24558         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
24559         Undo previous (whitespace-only) change.
24560
24561 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24562
24563         * lib/exclude.c: Include <ctype.h>
24564         (IN_CTYPE_DOMAIN): New macro.
24565         (is_space): New fn.
24566         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
24567         and empty lines.
24568
24569         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
24570         Undo previous (whitespace-only) change.
24571
24572 2003-08-13  Paul Eggert  <eggert@twinsun.com>
24573
24574         * config/srclist-update: Change update back to the old behavior,
24575         leaving whitespace alone.  Use one 'sed' command rather than a
24576         pipeline.
24577         (fixlicense): Now a variable, not a function.
24578         (remove_trailing_blanks): Remove.
24579         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
24580         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
24581         Undo previous (whitespace-only) change.
24582
24583 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24584
24585         Merge from coreutils.
24586         * modules/euidaccess: Add lib_SOURCES, include for new
24587         file euidaccess.h
24588
24589 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24590
24591         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
24592         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
24593         Normalize leading white space and remove trailing white space.
24594
24595         Merge from coreutils
24596         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
24597
24598         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
24599         0.12.1.  These files are now being upgraded automatically by
24600         ../config/srclist-update.
24601
24602 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24603
24604         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
24605         Normalize leading white space and remove trailing white space.
24606         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
24607         notice, as per ../config/srclist-update.
24608
24609         Merge from coreutils.
24610         * lib/euidaccess.h: New file.
24611         * lib/euidaccess.c: Include it.
24612         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
24613         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
24614         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
24615
24616 2003-08-12  Paul Eggert  <eggert@twinsun.com>
24617
24618         * config/srclist-update: Add copyright notice.
24619         (remove_id_lines, remove_trailing_blanks): New constants.
24620         (fixfile): Use them to normalize spacing a bit in copied files.
24621         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
24622         Normalize leading white space and remove trailing white space.
24623
24624         * config/texinfo.tex: Sync with texinfo.
24625
24626         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
24627         strtoul.c from libc, to merge coreutils whitespace changes.
24628
24629         * config/srclist.txt: Get the following m4 files from gettext:
24630         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
24631         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
24632         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
24633         wint_t.m4.
24634
24635 2003-08-12  Karl Berry  <karl@gnu.org>
24636
24637         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
24638         been made.
24639
24640 2003-08-11  Paul Eggert  <eggert@twinsun.com>
24641
24642         * modules/gnu-source, m4/gnu-source.m4:
24643         Remove; we're assuming Autoconf 2.54 or later now.
24644         Suggested by Bruno Haible.
24645         * MODULES.html.sh (func_all_modules): Remove gnu-source.
24646
24647 2003-08-11  Bruno Haible  <bruno@clisp.org>
24648
24649         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
24650
24651 2003-08-11  Bruno Haible  <bruno@clisp.org>
24652
24653         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
24654         (vasnprintf): Use it instead of wcslen.
24655
24656 2003-08-11  Bruno Haible  <bruno@clisp.org>
24657
24658         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
24659         value to ensure that _Bool promotes to int. Use #define for _Bool when
24660         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
24661
24662 2003-08-10  Karl Berry  <karl@gnu.org>
24663
24664         * lib/regex.h: update from libc (whitespace fix).
24665
24666 2003-08-09  Paul Eggert  <eggert@twinsun.com>
24667
24668         Merge some files from coreutils.  These changes were
24669         originally made by Jim Meyering.
24670         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
24671         many older Unixes require this.
24672         * lib/alloca.c (alloca): Remove cast to argument of free;
24673         no longer needed in C89.
24674         * lib/alloca_.h, regex.h: Fix white space to match
24675         what GNU indent does.
24676
24677 2003-08-09  Paul Eggert  <eggert@twinsun.com>
24678
24679         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
24680         apparently Emacs's Unicode mode got confused before my 2003-08-05
24681         checkin.
24682
24683 2003-08-08  Paul Eggert  <eggert@twinsun.com>
24684
24685         * m4/extensions.m4: New file.
24686         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
24687         Require gl_USE_SYSTEM_EXTENSIONS.
24688         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
24689         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
24690
24691 2003-08-08  Paul Eggert  <eggert@twinsun.com>
24692
24693         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
24694         * modules/extensions, modules/gnu-source: New files.
24695         * modules/timespec, modules/unlocked-io: Depend on extensions.
24696
24697 2003-08-07  Paul Eggert  <eggert@twinsun.com>
24698
24699         * modules/restrict: New file.
24700         * MODULES.html.sh (func_all_modules): Add restrict.
24701         * modules/regex: Depend on restrict.
24702
24703 2003-08-07  Paul Eggert  <eggert@twinsun.com>
24704
24705         * m4/restrict.m4: New file.
24706         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
24707
24708 2003-08-07  Bruno Haible  <bruno@clisp.org>
24709
24710         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
24711         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
24712
24713 2003-08-07  Bruno Haible  <bruno@clisp.org>
24714
24715         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
24716         makes the module 'getndelim2' compatible with the module 'getline'.
24717
24718 2003-08-05  Paul Eggert  <eggert@twinsun.com>
24719
24720         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
24721         byte with "\201" to avoid glitches when editing that source file
24722         with multi-gnome-terminal.
24723
24724 2003-08-05  Paul Eggert  <eggert@twinsun.com>
24725
24726         * lib/bumpalloc.h: Remove.
24727
24728 2003-08-05  Paul Eggert  <eggert@twinsun.com>
24729
24730         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
24731         * modules/bumpalloc: Remove.
24732
24733 2003-08-04  Paul Eggert  <eggert@twinsun.com>
24734
24735         * lib/getloadavg.c: Change copyright notice and spacing to conform to
24736         GNU coding style.
24737
24738         Merge from coreutils.
24739         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
24740         1. From glibc.
24741         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
24742         from Karl Berry, implemented by Jim Meyering.
24743         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
24744         from Dmitry V. Levin.
24745         Remove anachronistic cast of xrealloc.
24746         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
24747         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
24748         type. Otherwise, it wouldn't compile with at least /bin/cc on
24749         ymp-cray-unicos9.0.2.X.
24750         Combine two mostly-identical uses of alloca into one.
24751         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
24752
24753 2003-08-04  Dave Love  <d.love@dl.ac.uk>
24754
24755         [From Emacs.]
24756
24757         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
24758         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
24759         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
24760         obsolete NLIST_NAME_UNION.
24761         [__GNU__]: Undef BSD and FSCALE.
24762         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
24763
24764 2003-08-03  Paul Eggert  <eggert@twinsun.com>
24765
24766         * lib/stdbool_.h (_Bool): Make it signed char, instead of
24767         an enum type, so that it's guaranteed to promote to int.  See:
24768         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
24769
24770 2003-08-03  Karl Berry  <karl@gnu.org>
24771
24772         * config/depcomp: update from automake.
24773
24774 2003-07-31  Paul Eggert  <eggert@twinsun.com>
24775
24776         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
24777         (strerror): Don't assume that a printable int fits in 14 bytes.
24778
24779 2003-07-31  Bruno Haible  <bruno@clisp.org>
24780
24781         * modules/getpass-gnu: New file.
24782         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
24783
24784 2003-07-31  Bruno Haible  <bruno@clisp.org>
24785
24786         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
24787
24788 2003-07-24  Karl Berry  <karl@gnu.org>
24789
24790         * config/missing: update from automake.
24791
24792 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
24793             Bruno Haible  <bruno@clisp.org>
24794
24795         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
24796         * lib/getline.c (getline, getdelim): Likewise.
24797         Remove _GNU_SOURCE define; now it's defined in config.h through
24798         m4/getline.m4.
24799
24800 2003-07-23  Karl Berry  <karl@gnu.org>
24801
24802         * config/config.sub: update from prep.
24803
24804 2003-07-22  Paul Eggert  <eggert@twinsun.com>
24805
24806         * modules/xalloc (Depends-on): Add exitfail.
24807         * modules/xmemcoll: Likewise.
24808
24809 2003-07-22  Paul Eggert  <eggert@twinsun.com>
24810
24811         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
24812         over-parenthesization in macros.
24813
24814         Sync with coreutils.
24815
24816         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
24817         required by C99.
24818
24819         Use `exit_failure' for xalloc and xmemcoll instead of their own
24820         private exit-failure variables.
24821         * lib/xalloc.h (xalloc_exit_failure): Remove.
24822         * lib/xmalloc.c: Likewise.  Include exitfail.h.
24823         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
24824         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
24825         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
24826         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
24827
24828 2003-07-20  Jim Meyering  <jim@meyering.net>
24829
24830         * modules/closeout (Depends-on): Add exitfail.
24831         Suggestion from Bruno Haible.
24832
24833 2003-07-19  Karl Berry  <karl@gnu.org>
24834
24835         * config/config.sub: update from prep.
24836
24837 2003-07-18  Paul Eggert  <eggert@twinsun.com>
24838
24839         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
24840         Remove.
24841         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
24842         to test that it can stand by itself.  Include "exitfail.h".
24843         Clients should set exit_failure instead.
24844         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
24845
24846 2003-07-18  Bruno Haible  <bruno@clisp.org>
24847
24848         * modules/getndelim2: New file.
24849         * modules/getline: Share files with module getndelim2.
24850         * modules/getnline: Depend on getndelim2 instead of sharing files with
24851         it. Add getnline.c to lib_SOURCES.
24852         * MODULES.html.sh (func_all_modules): Add getndelim2.
24853
24854 2003-07-18  Bruno Haible  <bruno@clisp.org>
24855
24856         * m4/getndelim2.m4: New file.
24857         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
24858         invoke gl_PREREQ_GETNDELIM2.
24859         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
24860         gl_PREREQ_GETNDELIM2.
24861         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
24862         gl_GETNDELIM2.
24863
24864 2003-07-18  Bruno Haible  <bruno@clisp.org>
24865
24866         * lib/getndelim2.h: New file.
24867         * lib/getndelim2.c: Make into a module of its own. Include config.h,
24868         getndelim2.h.
24869         (getndelim2): Make non-static. Change return type to ssize_t.
24870         * lib/getline.h: Change argument names.
24871         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
24872         * lib/getnline.c: Include getndelim2.h.
24873
24874 2003-07-18  Andreas Schwab  <schwab@suse.de>
24875
24876         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
24877
24878 2003-07-17  Karl Berry  <karl@gnu.org>
24879
24880         * config/config.sub: update from prep.
24881
24882 2003-07-17  Bruno Haible  <bruno@clisp.org>
24883
24884         * modules/getnline: New file.
24885         * modules/getline: Add lib/getndelim2.c to source file list.
24886         * MODULES.html.sh (func_all_modules): Add getnline.
24887
24888 2003-07-17  Bruno Haible  <bruno@clisp.org>
24889
24890         * m4/getnline.m4: New file.
24891
24892 2003-07-17  Bruno Haible  <bruno@clisp.org>
24893
24894         * m4/Makefile.am.in: Remove file.
24895         * m4/Makefile.am: Remove file.
24896         * m4/Makefile.in: Remove file.
24897
24898 2003-07-17  Bruno Haible  <bruno@clisp.org>
24899
24900         * lib/getnline.h: New file.
24901         * lib/getnline.c: New file.
24902         * lib/getndelim2.c: New file, extracted from getline.c.
24903         (getndelim2): Renamed from getdelim2, with added nmax argument.
24904         * lib/getline.c: Include getndelim2.c.
24905         (getdelim2): Moved out to getndelim2.c.
24906         (getline, getdelim): Update.
24907
24908 2003-07-17  Bruno Haible  <bruno@clisp.org>
24909
24910         * lib/Makefile.am: Remove file.
24911         * lib/Makefile.in: Remove file.
24912
24913 2003-07-17  Bruno Haible  <bruno@clisp.org>
24914
24915         * configure.in: Remove file.
24916         * Makefile.in: Remove file.
24917
24918 2003-07-17  Bruno Haible  <bruno@clisp.org>
24919
24920         * MODULES.html.sh: Put the </BODY> right before </HTML>.
24921
24922 2003-07-16  Karl Berry  <karl@gnu.org>
24923
24924         * config/srclist-update: was running fixlicense twice, which caused
24925                 texinfo.tex to be nullified for some reason.  Simplify,
24926                 $gplsrc is no longer needed as far as I can see?
24927
24928 2003-07-16  Jim Meyering  <jim@meyering.net>
24929
24930         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
24931
24932 2003-07-15  Paul Eggert  <eggert@twinsun.com>
24933
24934         * config/srclist.txt: Get the following files from gettext-runtime/intl
24935         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
24936         ref-del.sin.  From Bruno Haible.
24937         * config/srclist-update (fixfile): Change grep pattern again, since the
24938         previous fix didn't work (there was another trailing $).  Use
24939         '[$]' to escape the $s.
24940
24941 2003-07-15  Karl Berry  <karl@gnu.org>
24942
24943         * lib/vasnprintf.c: update from gettext.
24944
24945 2003-07-15  Karl Berry  <karl@gnu.org>
24946
24947         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
24948         gets expanded when surrounded by '$'.
24949
24950 2003-07-15  Jim Meyering  <jim@meyering.net>
24951
24952         * modules/save-cwd: Don't depend on error.  From Derek Price.
24953
24954 2003-07-15  Jim Meyering  <jim@meyering.net>
24955
24956         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
24957
24958 2003-07-14  Simon Josefsson  <jas@extundo.com>
24959
24960         * modules/mempcpy: New file.
24961         * MODULES.html.sh (func_all_modules): Add mempcpy.
24962
24963 2003-07-14  Simon Josefsson  <jas@extundo.com>
24964
24965         * m4/mempcpy.m4: New file.
24966
24967 2003-07-14  Simon Josefsson  <jas@extundo.com>
24968
24969         * lib/mempcpy.h: New file.
24970         * lib/mempcpy.c: New file.
24971
24972 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24973
24974         * modules/getdate, modules/posixtm: Depend on mktime.
24975
24976 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24977
24978         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
24979         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
24980         unicodeio.c, unicodeio.h, unlocked-io.h:
24981         Switch from LGPL to GPL.
24982
24983 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24984
24985         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
24986         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
24987         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
24988         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
24989         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
24990         updated automatically by ../config/srclist-update.  This changes
24991         their license from LPGL to GPL.
24992
24993 2003-07-14  Paul Eggert  <eggert@twinsun.com>
24994
24995         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
24996         assumed to refer to the root of the most recent stable gettext version.
24997         * config/srclistvars.sh: Add defaults for eggert.
24998         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
24999         Match "This program" as well as "The program".  This is needed
25000         for gettext.
25001
25002 2003-07-14  Jim Meyering  <jim@meyering.net>
25003
25004         Don't emit diagnostics.  Let callers do that.
25005         * lib/save-cwd.c: Don't include "error.h".
25006         (save_cwd): Don't call error.  Ensure that errno is valid
25007         when returning nonzero.
25008
25009         * lib/save-cwd.h (restore_cwd): Update prototype.
25010         * lib/save-cwd.c (restore_cwd): Remove two parameters.
25011         Simplify.  Don't call error upon failure.  Let callers do that.
25012         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
25013         when auditing is enabled.  But don't bother updating the #if.
25014
25015 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
25016
25017         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
25018         it breaks C++ compilation.
25019         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
25020
25021 2003-07-10  Simon Josefsson  <jas@extundo.com>
25022
25023         * modules/strchrnul (Makefile.am): Add strchrnul.h.
25024
25025 2003-07-10  Jim Meyering  <jim@meyering.net>
25026
25027         * m4/clock_time.m4: Remove trailing blank.
25028         * m4/intmax_t.m4: Likewise.
25029
25030 2003-07-10  Jim Meyering  <jim@meyering.net>
25031
25032         * lib/vasnprintf.c: Remove trailing blanks.
25033         Make cpp indentation consistent.
25034
25035 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25036
25037         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
25038         posixver.c, strftime.c, strnlen.c, strverscmp.c:
25039         Switch from LGPL to GPL.
25040
25041 2003-07-09  Paul Eggert  <eggert@twinsun.com>
25042
25043         * config/srclist.txt: Sort sublists.  Add
25044         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
25045         that differ from gnulib for one reason or another; we'd like this list
25046         to be smaller but for now let's document what we have.
25047
25048 2003-07-08  Paul Eggert  <eggert@twinsun.com>
25049
25050         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
25051         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
25052         and sweeter "eval x=$x".
25053         * config/srclist.txt: Get lib/argp* from glibc.
25054
25055 2003-07-07  Paul Eggert  <eggert@twinsun.com>
25056
25057         * lib/mktime.c: Fix some boundary cases and remove need for floating
25058         point.
25059
25060         Issue a compile-time diagnostic if time_t is floating point, or if
25061         two's complement arithmetic is not in effect, or if arithmetic
25062         right shift does not propagate the sign.  These assumptions were
25063         all in the original code but they weren't checked.
25064
25065         (TIME_T_MIDPOINT, verify): New macros.
25066         (__isleap): Remove; it has integer overflow problems.
25067         (leapyear): New function, without those problems.
25068         (ydhms_tm_diff): Remove; splitting into two parts.
25069         (ydhms_diff): New function, containing the arithmetic part of
25070         the old ydhms_tm_diff function.  Issue a compile-time
25071         diagnostic if we are not using C99 integer division.
25072         Avoid casts when possible.
25073         (guess_time_tm): New function, containing the checking part of
25074         the old ydhms_tm_diff function.  Return the new value, rather than
25075         the difference between it and the old.  Accept a new argument T
25076         so that *T specifies the old value.  Check for overflow in the result.
25077
25078         (__mktime_internal): Use a time_t offset, not a long int offset.
25079         This undoes the 2003-06-04 change, which is no longer needed now
25080         that we have better overflow checking.
25081         (localtime_offset): Likewise.
25082
25083         (__mktime_internal): Avoid harmful overflow on hosts where time_t
25084         and long are 64-bit but int is only 32-bit.
25085         (ydhms_diff): Use long int to store year1 and yday1.
25086         Issue a compile-time diagnostic if long int is not wide enough.
25087
25088         (__mktime_internal): Use long int to store adjusted year and yday.
25089         Use plain C rather than preprocessor commands, if that doesn't
25090         affect efficiency.
25091         Check for overflow (and try to repair) after each probe
25092         rather than checking only at the very end.  This avoids some bugs
25093         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
25094         does not equal GMT offset at maximum time).
25095         Use integer to check for overflow rather than floating point; this
25096         is more portable to non-IEEE hosts, and is a tad faster.
25097         When we detect that we are oscillating between two values,
25098         don't check whether tm_isdst has the requested value, since
25099         we already know the answer.  When tm_isdst has the wrong value,
25100         use a different heuristic to find the right one, based on the
25101         extreme values actually observed in practice in tz2003a,
25102         rather than the (overly optimistic) "previous 3 calendar quarters".
25103
25104         (not_equal_tm, print_tm, check_result): Use "const T" rather than
25105         "T const" to accommodate glibc style.
25106         (check_result): Use less-confusing report format.  "long" -> "long int.
25107         (main): Likewise.
25108         Don't loop if the iteration overflows time_t.
25109         Allow a negative step in the iteration.
25110
25111 2003-07-06  Karl Berry  <karl@gnu.org>
25112
25113         * config/depcomp: update from automake.
25114         * config/config.sub: update from prep.
25115
25116 2003-07-03  Karl Berry  <karl@gnu.org>
25117
25118         * config/config.guess: update from prep.
25119
25120 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25121
25122         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
25123         xreadlink.c now includes it unconditionally.
25124
25125 2003-07-01  Paul Eggert  <eggert@twinsun.com>
25126
25127         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
25128         having it depend on HAVE_SYS_TYPES_H.
25129
25130 2003-07-01  Bruno Haible  <bruno@clisp.org>
25131
25132         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
25133         <sys/types.h> should be sufficient.
25134         Reported by Paul Eggert.
25135
25136 2003-06-26  Karl Berry  <karl@gnu.org>
25137
25138         * config/depcomp: update from automake.
25139
25140 2003-06-26  Bruno Haible  <bruno@clisp.org>
25141
25142         * modules/human: Depend on module stdbool.
25143
25144 2003-06-25  Bruno Haible  <bruno@clisp.org>
25145
25146         * modules/readlink: New file.
25147         * modules/xreadlink: Depend on it.
25148         * MODULES.html.sh (func_all_modules): Add readlink.
25149
25150 2003-06-25  Bruno Haible  <bruno@clisp.org>
25151
25152         * m4/readlink.m4: New file.
25153
25154 2003-06-25  Bruno Haible  <bruno@clisp.org>
25155
25156         * lib/readlink.c: New file.
25157
25158 2003-06-22  Karl Berry  <karl@gnu.org>
25159
25160         * config/srclist.txt: update mkinstalldirs from automake.
25161         * config/mkinstalldirs: update.
25162
25163 2003-06-22  Bruno Haible  <bruno@clisp.org>
25164
25165         Portability to mingw32.
25166         * m4/ssize_t.m4: New file, from GNU gettext.
25167         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
25168         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
25169
25170 2003-06-22  Bruno Haible  <bruno@clisp.org>
25171
25172         * modules/safe-read: Add m4/ssize_t.m4.
25173         * modules/xreadlink: Add m4/ssize_t.m4.
25174
25175 2003-06-20  Bruno Haible  <bruno@clisp.org>
25176
25177         Assume C89, so PARAMS isn't needed.
25178         * lib/unicodeio.h (PARAMS): Remove.
25179         * lib/unicodeio.c: Don't use PARAMS.
25180
25181 2003-06-18  Karl Berry  <karl@gnu.org>
25182
25183         * config/config.{guess,sub}: update from prep.
25184
25185 2003-06-18  Jim Meyering  <jim@meyering.net>
25186
25187         Merge changes from coreutils.
25188         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
25189         Remove explicit declarations of xmalloc and realloc.
25190         Include xalloc.h.
25191         (read_utmp): Remove anachronistic cast of xmalloc.
25192
25193 2003-06-17  Paul Eggert  <eggert@twinsun.com>
25194
25195         Assume C89, so PARAMS isn't needed.
25196         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
25197         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
25198         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
25199         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
25200         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
25201         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
25202         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
25203         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
25204         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
25205         lib/xstrtod.h, lib/xstrtol.h: Likewise.
25206         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
25207         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
25208         no longer needed. Anyway, config.h should always be included before any
25209         other file.
25210
25211 2003-06-11  Simon Josefsson  <jas@extundo.com>
25212
25213         * modules/sysexits: New file.
25214         * MODULES.html.sh (func_all_modules): Add sysexits.
25215
25216 2003-06-11  Simon Josefsson  <jas@extundo.com>
25217
25218         * lib/sysexit_.h: New file.
25219
25220 2003-06-11  Derek Price  <derek@ximbiot.com>
25221
25222         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
25223         necessary.
25224
25225 2003-06-11  Bruno Haible  <bruno@clisp.org>
25226
25227         * m4/sysexits.m4: New file.
25228
25229 2003-06-10  Simon Josefsson  <jas@extundo.com>
25230
25231         * lib/argp.h: New file, from glibc.
25232         * lib/argp-ba.c: New file, from glibc.
25233         * lib/argp-eexst.c: New file, from glibc.
25234         * lib/argp-fmtstream.c: New file, from glibc.
25235         * lib/argp-fmtstream.h: New file, from glibc.
25236         * lib/argp-fs-xinl.c: New file, from glibc.
25237         * lib/argp-help.c: New file, from glibc.
25238         * lib/argp-namefrob.h: New file, from glibc.
25239         * lib/argp-parse.c: New file, from glibc.
25240         * lib/argp-pv.c: New file, from glibc.
25241         * lib/argp-pvh.c: New file, from glibc.
25242         * lib/argp-xinl.c: New file, from glibc.
25243
25244 2003-06-10  Simon Josefsson  <jas@extundo.com>
25245
25246         * modules/strchrnul: New file.
25247
25248 2003-06-10  Simon Josefsson  <jas@extundo.com>
25249
25250         * modules/argp: New file.
25251
25252 2003-06-10  Simon Josefsson  <jas@extundo.com>
25253
25254         * m4/strchrnul.m4: New file.
25255
25256 2003-06-10  Simon Josefsson  <jas@extundo.com>
25257
25258         * lib/strchrnul.h: New file.
25259         * lib/strchrnul.c: New file.
25260
25261 2003-06-10  Bruno Haible  <bruno@clisp.org>
25262
25263         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
25264
25265 2003-06-07  Karl Berry  <karl@gnu.org>
25266
25267         * config/config.{guess,sub}: update from prep.
25268
25269 2003-06-07  Jim Meyering  <jim@meyering.net>
25270
25271         * modules/strtod: Use $(...) notation, not @...@ for
25272         AC_REPLACE'd variables.
25273         * modules/localcharset: Likewise.
25274
25275 2003-06-07  Jim Meyering  <jim@meyering.net>
25276
25277         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
25278         in place of my name in the copyright comment.
25279         Remove definition and uses of __P.
25280
25281         From coreutils.
25282         * lib/stat.c: Don't declare xmalloc explicitly.
25283         Instead, include "xalloc.h".
25284         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
25285         xrealloc, and xcalloc return values.
25286         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
25287         Improve comment.
25288         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
25289
25290 2003-06-07  Bruno Haible  <bruno@clisp.org>
25291
25292         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
25293         avoid AC_CONFIG_LINKS.
25294         * modules/fnmatch (Makefile.am): Use explicit creation rule for
25295         fnmatch.h, to avoid AC_CONFIG_LINKS.
25296         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
25297
25298 2003-06-07  Bruno Haible  <bruno@clisp.org>
25299
25300         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
25301         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
25302         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25303         directory.
25304         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
25305         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
25306         directory.
25307
25308 2003-06-06  Jim Meyering  <jim@meyering.net>
25309
25310         Merge from coreutils.
25311         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
25312         Consolidate declarations and initializations of *_base* locals.
25313
25314         Merge from coreutils.
25315         This avoids a core dump on systems without GNU putenv,
25316         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
25317         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
25318         (unsetenv): New static function, from GNU libc.
25319         (rpl_putenv): Use it.
25320
25321         * lib/modechange.c: Remove trailing blanks.
25322
25323         Merge from coreutils.
25324         * lib/fsusage.c: Remove declaration of statfs.
25325         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
25326
25327         * lib/posixtm.c: Include <stdbool.h> unconditionally.
25328
25329 2003-06-06  Jim Meyering  <jim@meyering.net>
25330
25331         * lib/stdbool_.h: Renamed from stdbool.h.in.
25332
25333 2003-06-06  Jim Meyering  <jim@meyering.net>
25334             Bruno Haible  <bruno@clisp.org>
25335
25336         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
25337         Adjust Makefile.am snippet not to redirect directly to target.
25338         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
25339
25340 2003-06-05  Paul Eggert  <eggert@twinsun.com>
25341
25342         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
25343         mismatch, look in future quarters as well as past.  This fixes a
25344         bug when processing fall-backwards gaps immediately after a long
25345         period of daylight-saving time.
25346
25347         * lib/mktime.c: Assume freestanding C89 or better.
25348         (HAVE_LIMITS_H): Remove.  Assume it's 1.
25349         (__P): Remove; not used.
25350         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
25351         (mktime, not_equal_tm, print_tm, check_result,
25352         main): Use prototypes.  Use const * where appropriate.
25353         (main): Fix typo in testing code that uncovered by above changes.
25354         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
25355
25356 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25357
25358         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
25359         locale.h, localeconv.  This merges changes from coreutils.
25360
25361         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
25362         It can be removed after the next Autoconf is released.
25363         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
25364         needed.
25365
25366 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25367
25368         * lib/mktime.c: Fix Debian bug 177940
25369         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
25370         (localtime_offset): Now long int, not time_t, because we want it
25371         to be guaranteed to be signed.  All uses changed.
25372         (__mktime_internal): If overflow would occur when adding offset,
25373         don't add it.
25374
25375         Merge 'human' changes from coreutils.  Rewrite to support
25376         locale-specific notations like thousands separators.
25377         * lib/human.c: Simplify authorship notice.
25378         Include human.h immediately after config.h.
25379         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
25380         <limits.h>: Do not include, since human.h does.
25381         (SIZE_MAX, UINTMAX_MAX): New macros.
25382         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
25383         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
25384         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
25385         (power_letter): Renamed from suffixes.
25386         (generate_suffix_backwards): Remove.
25387         (adjust_value): Now takes int style (because of human.h changes)
25388         and long double value (for greater precision on some platforms).
25389         (group_number): New function.
25390         (human_readable): Use it.  Use integer options, not enum.
25391         Put the options before the sizes in the arg list.
25392         Support all the new options.
25393         The old human_readable function has been removed;
25394         use inttostr.h instead.
25395         (human_readable, default_block_size, humblock):
25396         Use uintmax_t, not int, for block sizes.
25397         (human_readable_inexact, block_size_types): Remove.
25398         (block_size_opts): New constant.
25399         (human_options): Renamed from human_block_size, with new signature
25400         that allows block sizes up to UINTMAX_MAX.  All callers changed.
25401         * lib/human.h: Add copyright and authorship notice.
25402         Include <limits.h> and <stdbool.h> unconditionally.
25403         (PARAMS): Remove.  All uses removed.
25404         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
25405         (enum human_inexact_style): Remove tag; now a nameless enum.
25406         (human_floor, human_ceiling, human_round_to_even): Now have
25407         values 2, 0, 1 rather than -1, 1, 0.
25408         (human_group_digits, human_suppress_point_zero, human_autoscale,
25409         human_base_1024, human_SI, human_B): New constants.
25410         (human_readable_inexact, human_block_size): Remove.
25411         (human_readable): Size args are now uintmax_t, not int.
25412         (human_options): New decl.
25413
25414         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
25415         unnecessary now that we assume C89 or better.  This change
25416         imported from coreutils.
25417
25418         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
25419         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
25420         in the 2003-05-30 sync from glibc.
25421
25422         .h files should stand alone, but we shouldn't include <sys/types.h>
25423         if we can get away with just <stddef.h>.
25424
25425         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
25426         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
25427         rather than <sys/types.h>, as we merely need size_t.
25428         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
25429         to get size_t.
25430         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
25431         Include <stdio.h>, to get FILE.
25432         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
25433         memcasecmp.h has included <stddef.h> and all we need is size_t.
25434         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
25435         our interface, instead of including <sys/types.h>
25436
25437 2003-06-04  Paul Eggert  <eggert@twinsun.com>
25438
25439         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
25440         now, as glibc mktime is buggy on non-glibc systems.
25441
25442 2003-06-03  Karl Berry  <karl@gnu.org>
25443
25444         * config/config.sub: update from prep.
25445
25446 2003-06-02  Paul Eggert  <eggert@twinsun.com>
25447
25448         [from coreutils]
25449         Fix some minor time-related bugs with POSIX time arguments.
25450         Some valid time stamps were being rejected (notably -1, and
25451         time stamps before 1900 on 64-bit hosts).  And some invalid
25452         time stamps were being accepted, e.g. September 31.
25453
25454         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
25455         that we can return (time_t) -1 successfully.
25456         * lib/posixtm.c: Likewise.
25457         [HAVE_STDBOOL_H]: Include <stdbool.h>.
25458         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
25459         (t): Remove static var.
25460         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
25461         of static var.  All uses changed.
25462         (year): Do not reject years before 1900; they can occur with
25463         64-bit time_t.
25464         (posix_time_parse): Do not check for out-of-range components;
25465         that is now the caller's responsibility, since our checks were
25466         only approximations.
25467         (posixtime): Use mktime to check for out-of-range components,
25468         since it knows them exactly.
25469         If mktime returns (time_t) -1, check whether an error actually occurred
25470         by invoking localtime on -1.
25471         (main) [TEST_POSIXTIME]: Check for input data errors, and report
25472         posixtime failures better.
25473         Improve the test data (in comments only).
25474
25475 2003-06-02  Karl Berry  <karl@gnu.org>
25476
25477         * config/mkinstalldirs (version): new variable.
25478         (--version): new option.
25479         (usage): improve message.
25480
25481 2003-05-30  Karl Berry  <karl@gnu.org>
25482
25483         * lib/mktime.c: update from libc.
25484
25485 2003-05-30  Bruno Haible  <bruno@clisp.org>
25486
25487         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
25488         * config/config.rpath: Upgrade to gettext-0.12.1.
25489
25490 2003-05-30  Bruno Haible  <bruno@clisp.org>
25491
25492         * m4/gettext.m4: Upgrade to gettext-0.12.1.
25493         * m4/nls.m4: New file, from gettext-0.12.1.
25494         * m4/po.m4: New file, from gettext-0.12.1.
25495         * m4/progtest.m4: Upgrade to gettext-0.12.1.
25496
25497 2003-05-30  Bruno Haible  <bruno@clisp.org>
25498
25499         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
25500         * lib/localcharset.h: Likewise.
25501         * lib/localcharset.c: Likewise.
25502
25503 2003-05-29  Karl Berry  <karl@gnu.org>
25504
25505         * config/config.rpath: update from gettext.
25506
25507 2003-05-28  Paul Eggert  <eggert@twinsun.com>
25508
25509         Assume the headers required for C89 freestanding compilers.
25510         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
25511         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
25512         * m4/human.m4 (gl_HUMAN): Likewise.
25513         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
25514         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
25515         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25516         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
25517         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25518         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
25519
25520 2003-05-28  Paul Eggert  <eggert@twinsun.com>
25521
25522         Assume the headers required for C89 freestanding compilers.
25523         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
25524         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
25525         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
25526         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
25527         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
25528         define, since <limits.h> is guaranteed to do that.
25529         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
25530         * lib/exclude.c: Include <stdbool.h> unconditionally.
25531         * lib/tempname.c: Include <stddef.h> unconditionally.
25532         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
25533         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
25534         <stddef.h> does that.
25535         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
25536         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
25537         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
25538         needed.
25539         * lib/xstrtol.c: Likewise.
25540         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
25541         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
25542
25543         * lib/addext.c (addext): Use assignment rather than cast, to avoid
25544         warnings on some platforms.
25545
25546         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
25547         arbitrarily.
25548
25549 2003-05-26  Jim Meyering  <jim@meyering.net>
25550
25551         Merge in a change from coreutils:
25552         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
25553         that is guaranteed to be `no'.  Use `no_such_member' to indicate
25554         that condition, rather than `-1' which is slightly misleading.
25555         Change the name of the cache variable to have the gl_ prefix.
25556         Prompted by a patch from Richard Dawe for DJGPP.
25557
25558 2003-05-24  Karl Berry  <karl@gnu.org>
25559
25560         * config/config.guess: update from prep.
25561
25562 2003-05-22  Karl Berry  <karl@gnu.org>
25563
25564         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
25565
25566 2003-05-20  Karl Berry  <karl@gnu.org>
25567
25568         * config/config.guess: update from prep.
25569
25570 2003-05-18  Karl Berry  <karl@gnu.org>
25571
25572         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
25573         might actually be set by the user.
25574
25575         * config/depcomp, install-sh, mdate-sh: update from automake.
25576
25577 2003-05-17  Bruno Haible  <bruno@clisp.org>
25578
25579         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
25580         invalid expansion for AC_EGREP_CPP.
25581         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
25582         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
25583         Suggested by Akim Demaille <akim@epita.fr> in
25584         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
25585
25586 2003-05-12  Jim Meyering  <jim@meyering.net>
25587
25588         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
25589         the space-padded-by-default conversion specifiers, %e, %k, %l.
25590
25591 2003-05-12  Bruno Haible  <bruno@clisp.org>
25592
25593         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
25594         the string is longer than 4 KB.
25595
25596 2003-05-11  Karl Berry  <karl@gnu.org>
25597
25598         * config/config.{guess,sub}: update from prep.
25599
25600 2003-05-09  Bruno Haible  <bruno@clisp.org>
25601
25602         * modules/error: Add m4/strerror_r.m4 to file list.
25603
25604 2003-05-03  Bruno Haible  <bruno@clisp.org>
25605
25606         Upgrade to Unicode-4.0.
25607         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
25608         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
25609         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
25610         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
25611         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
25612         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
25613         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
25614         Change width of U+E0100..U+E01EF from 1 to 0.
25615
25616 2003-04-25  Jim Meyering  <jim@meyering.net>
25617
25618         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
25619         of type size_t, not int.
25620
25621 2003-04-25  Bruno Haible  <bruno@clisp.org>
25622
25623         * lib/copy-file.c: Include <stddef.h>, for size_t.
25624
25625 2003-04-21  Paul Eggert  <eggert@twinsun.com>
25626
25627         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
25628         code which expansion is under static control.  Patch imported from
25629         Akim Demaille's patch to Bison; see
25630         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
25631
25632 2003-04-14  Bruno Haible  <bruno@clisp.org>
25633
25634         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
25635
25636 2003-04-11  Jim Meyering  <jim@meyering.net>
25637
25638         Merge changes from Coreutils.
25639
25640         2003-03-22  Jim Meyering  <jim@meyering.net>
25641
25642         * lib/strftime.c (widen): Cast alloca return value to proper type.
25643
25644         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
25645
25646         From GNU libc.
25647         * lib/strftime.c (my_strftime): Handle very large width
25648         specifications for numeric values correctly.  Improve checks for
25649         overflow.
25650
25651         2003-01-19  Jim Meyering  <jim@meyering.net>
25652
25653         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
25654         definitions.
25655         (nl_get_alt_digit) [! defined my_strftime]: Define.
25656         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
25657         _nl_get_alt_digit and _nl_get_walt_digit.
25658
25659         * lib/strftime.c (my_strftime): Merge in locale-related changes from
25660         libc. These changes have no effect outside of _LIBC.
25661
25662 2003-04-10  Bruno Haible  <bruno@clisp.org>
25663
25664         * modules/findprog: New file.
25665         * MODULES.html.sh (func_all_modules): Add it.
25666
25667 2003-04-10  Bruno Haible  <bruno@clisp.org>
25668
25669         * m4/findprog.m4: New file.
25670         * m4/eaccess.m4: New file.
25671
25672 2003-04-10  Bruno Haible  <bruno@clisp.org>
25673
25674         * lib/findprog.h: New file, from GNU gettext.
25675         * lib/findprog.c: New file, from GNU gettext.
25676
25677 2003-04-05  Jim Meyering  <jim@meyering.net>
25678
25679         Merge changes from Coreutils.
25680
25681         * lib/exclude.h (PARAMS): Remove definition and uses.
25682         * lib/exclude.c: Remove uses of `PARAMS'.
25683
25684         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
25685         Add test-cases for DOS filenames. Declare program_name.
25686         (main): Set up program_name.  Patch by Rich Dawe.
25687
25688         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
25689         error from mntctl.
25690         Use mntctl's return value to drive the entry-processing loop, since
25691         we can't rely on the value of the vmt_length member in the last
25692         entry.  On some systems doing so could result in exhausting
25693         virtual memory.  Based in part on a patch from Mike Jetzer.
25694
25695 2003-04-04  Bruno Haible  <bruno@clisp.org>
25696
25697         * modules/linebreak: New file.
25698         * MODULES.html.sh (func_all_modules): Add it.
25699
25700 2003-04-04  Bruno Haible  <bruno@clisp.org>
25701
25702         * m4/linebreak.m4: New file.
25703
25704 2003-04-04  Bruno Haible  <bruno@clisp.org>
25705
25706         * lib/linebreak.h: New file, from GNU gettext.
25707         * lib/linebreak.c: New file, from GNU gettext with slight
25708         modifications.
25709         * lib/lbrkprop.h: New file, from GNU gettext.
25710
25711 2003-04-03  Bruno Haible  <bruno@clisp.org>
25712
25713         * modules/utf8-ucs4: New file.
25714         * modules/utf16-ucs4: New file.
25715         * modules/ucs4-utf8: New file.
25716         * modules/ucs4-utf16: New file.
25717         * MODULES.html.sh (func_all_modules): Add them.
25718
25719 2003-04-03  Bruno Haible  <bruno@clisp.org>
25720
25721         * m4/utf-ucs4.m4: New file.
25722         * m4/ucs4-utf.m4: New file.
25723
25724 2003-04-03  Bruno Haible  <bruno@clisp.org>
25725
25726         * lib/utf8-ucs4.h: New file, from GNU gettext.
25727         * lib/utf16-ucs4.h: New file, from GNU gettext.
25728         * lib/ucs4-utf8.h: New file, from GNU gettext.
25729         * lib/ucs4-utf16.h: New file, from GNU gettext.
25730
25731 2003-04-02  Bruno Haible  <bruno@clisp.org>
25732
25733         * modules/binary-io: New file.
25734         * MODULES.html.sh (func_all_modules): Add it.
25735
25736 2003-04-02  Bruno Haible  <bruno@clisp.org>
25737
25738         * lib/binary-io.h: New file, from GNU gettext.
25739
25740 2003-04-01  Bruno Haible  <bruno@clisp.org>
25741
25742         * modules/pathname: New file.
25743         * MODULES.html.sh (func_all_modules): Add it.
25744
25745 2003-04-01  Bruno Haible  <bruno@clisp.org>
25746
25747         * lib/pathname.h: New file, from GNU gettext.
25748         * lib/concatpath.c: New file, from GNU gettext.
25749
25750 2003-03-30  Bruno Haible  <bruno@clisp.org>
25751
25752         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
25753
25754 2003-03-30  Bruno Haible  <bruno@clisp.org>
25755
25756         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
25757         function chown() doesn't exist.
25758
25759 2003-03-28  Bruno Haible  <bruno@clisp.org>
25760
25761         * modules/copy-file: New file.
25762         * MODULES.html.sh (func_all_modules): Add it.
25763
25764 2003-03-28  Bruno Haible  <bruno@clisp.org>
25765
25766         * m4/copy-file.m4: New file.
25767
25768 2003-03-28  Bruno Haible  <bruno@clisp.org>
25769
25770         * lib/copy-file.h: New file, from GNU gettext.
25771         * lib/copy-file.c: New file, from GNU gettext.
25772
25773 2003-03-18  Jim Meyering  <jim@meyering.net>
25774
25775         * lib/quote.c (quote_n): Fix typo in comment.
25776
25777 2003-03-18  Bruno Haible  <bruno@clisp.org>
25778
25779         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
25780         checking.
25781         * m4/onceonly_2_57.m4: Likewise.
25782
25783 2003-03-17  Bruno Haible  <bruno@clisp.org>
25784
25785         * m4/onceonly.m4: Require autoconf 2.54 or newer.
25786         (m4_quote): Remove macro.
25787         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
25788
25789 2003-03-14  Jim Meyering  <jim@meyering.net>
25790
25791         Merge changes from Coreutils.
25792         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
25793         to be const, in order to avoid warnings.
25794         (obstack_room): Likewise.
25795         (obstack_empty_p): Likewise.
25796
25797 2003-03-14  Bruno Haible  <bruno@clisp.org>
25798
25799         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
25800         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
25801
25802 2003-03-13  Paul Eggert  <eggert@twinsun.com>
25803
25804         Merge changes from Bison.
25805         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
25806         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
25807         when compiling Bison 1.875's `bitset bset = obstack_alloc
25808         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
25809         * lib/hash.c: Include <stdbool.h> unconditionally.
25810
25811 2003-03-13  Paul Eggert  <eggert@twinsun.com>
25812
25813         * m4/onceonly.m4 (m4_quote): New macro.
25814         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
25815         Quote AC_FOREACH variable-expansions properly.
25816
25817 2003-03-13  Paul Eggert  <eggert@twinsun.com>
25818
25819         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
25820
25821 2003-03-09  Paul Eggert  <eggert@twinsun.com>
25822
25823         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
25824         Reported by Bruce Becker; see:
25825         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
25826
25827 2003-03-03  Paul Eggert  <eggert@twinsun.com>
25828             Bruno Haible  <bruno@clisp.org>
25829
25830         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
25831         Reported by John Hughes, see
25832         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
25833
25834 2003-02-20  Bruno Haible  <bruno@clisp.org>
25835
25836         * MODULES.html.sh (func_all_modules): Add poll.
25837
25838 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
25839
25840         * modules/poll: New file.
25841
25842 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
25843
25844         * lib/poll_.h: New file.
25845         * lib/poll.c: New file.
25846
25847 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
25848
25849         * m4/poll.m4: New file.
25850
25851 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
25852
25853         * modules/mathl: New file.
25854
25855 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
25856
25857         * lib/mathl.h: New file.
25858         * lib/acosl.c: New file.
25859         * lib/asinl.c: New file.
25860         * lib/atanl.c: New file.
25861         * lib/ceill.c: New file.
25862         * lib/cosl.c: New file.
25863         * lib/expl.c: New file.
25864         * lib/floorl.c: New file.
25865         * lib/frexpl.c: New file.
25866         * lib/ldexpl.c: New file.
25867         * lib/logl.c: New file.
25868         * lib/sincosl.c: New file.
25869         * lib/sinl.c: New file.
25870         * lib/sqrtl.c: New file.
25871         * lib/tanl.c: New file.
25872         * lib/trigl.c: New file.
25873         * lib/trigl.h: New file.
25874
25875 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
25876
25877         * m4/mathl.m4: New file.
25878
25879 2003-02-18  Bruno Haible  <bruno@clisp.org>
25880
25881         * MODULES.html.sh (func_all_modules): Add mathl.
25882
25883 2003-02-17  Bruno Haible  <bruno@clisp.org>
25884
25885         * modules/mkdtemp: New module.
25886         * MODULES.html.sh (func_all_modules): Add it.
25887
25888 2003-02-17  Bruno Haible  <bruno@clisp.org>
25889
25890         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
25891
25892 2003-02-17  Bruno Haible  <bruno@clisp.org>
25893
25894         * lib/mkdtemp.h: New file, from GNU gettext.
25895         * lib/mkdtemp.c: New file, from GNU gettext.
25896
25897 2003-02-02  Jim Meyering  <jim@meyering.net>
25898
25899         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
25900         e.g. glibc-2.2.93.
25901
25902 2003-01-31  Bruno Haible  <bruno@clisp.org>
25903
25904         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
25905         'rpl_rename'.
25906         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
25907         'rpl_strnlen'.
25908         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
25909         'rpl_strtod'.
25910         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
25911         'rpl_utime'.
25912
25913 2003-01-31  Bruno Haible  <bruno@clisp.org>
25914
25915         * lib/rename.c: #undef rename before defining rpl_rename.
25916         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
25917
25918 2003-01-30  Bruno Haible  <bruno@clisp.org>
25919
25920         * modules/vasnprintf, modules/vasprintf: New modules.
25921         * MODULES.html.sh (func_all_modules): Add them.
25922
25923 2003-01-30  Bruno Haible  <bruno@clisp.org>
25924
25925         * m4/signed.m4: New file, from GNU gettext.
25926         * m4/longdouble.m4: New file, from GNU gettext.
25927         * m4/wchar_t.m4: New file, from GNU gettext.
25928         * m4/wint_t.m4: New file, from GNU gettext.
25929         * m4/vasnprintf.m4: New file.
25930         * m4/vasprintf.m4: New file.
25931
25932 2003-01-30  Bruno Haible  <bruno@clisp.org>
25933
25934         * lib/printf-args.h: New file, from GNU gettext.
25935         * lib/printf-args.c: New file, from GNU gettext.
25936         * lib/printf-parse.h: New file, from GNU gettext.
25937         * lib/printf-parse.c: New file, from GNU gettext.
25938         * lib/vasnprintf.h: New file, from GNU gettext.
25939         * lib/vasnprintf.c: New file, from GNU gettext.
25940         * lib/asnprintf.c: New file, from GNU gettext.
25941         * lib/vasprintf.h: New file, from GNU gettext with modifications.
25942         * lib/vasprintf.c: New file, from GNU gettext.
25943         * lib/asprintf.c: New file, from GNU gettext.
25944
25945 2003-01-29  Bruno Haible  <bruno@clisp.org>
25946
25947         * modules/stpncpy: New module.
25948         * MODULES.html.sh (func_all_modules): Add it.
25949
25950 2003-01-29  Bruno Haible  <bruno@clisp.org>
25951
25952         * m4/stpncpy.m4: New file.
25953
25954 2003-01-29  Bruno Haible  <bruno@clisp.org>
25955
25956         * lib/stpncpy.h: New file, from GNU gettext with modifications.
25957         * lib/stpncpy.c: New file, from GNU gettext with modifications.
25958
25959 2003-01-28  Bruno Haible  <bruno@clisp.org>
25960
25961         * modules/c-ctype: New module.
25962         * MODULES.html.sh (func_all_modules): Add it.
25963
25964 2003-01-28  Bruno Haible  <bruno@clisp.org>
25965
25966         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
25967         Paul Eggert.
25968         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
25969         Paul Eggert.
25970
25971 2003-01-27  Bruno Haible  <bruno@clisp.org>
25972
25973         * modules/xsetenv: New module.
25974         * MODULES.html.sh (func_all_modules): Add it.
25975
25976 2003-01-27  Bruno Haible  <bruno@clisp.org>
25977
25978         * lib/xsetenv.h: New file, from GNU gettext.
25979         * lib/xsetenv.c: New file, from GNU gettext.
25980
25981 2003-01-23  Jim Meyering  <jim@meyering.net>
25982
25983         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
25984         from working on systems without dirfd (at least Irix and OSF1/Tru64).
25985
25986 2003-01-23  Bruno Haible  <bruno@clisp.org>
25987
25988         * modules/minmax: New module.
25989         * MODULES.html.sh (func_all_modules): Add it.
25990
25991 2003-01-23  Bruno Haible  <bruno@clisp.org>
25992
25993         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
25994         Eggert.
25995
25996 2003-01-22  Bruno Haible  <bruno@clisp.org>
25997
25998         * modules/exit: New module.
25999         * MODULES.html.sh (func_all_modules): Add it.
26000
26001 2003-01-22  Bruno Haible  <bruno@clisp.org>
26002
26003         * lib/exit.h: New file, from GNU gettext.
26004
26005 2003-01-19  Bruno Haible  <bruno@clisp.org>
26006
26007         * gnulib-tool: Recognize option --extract-maintainer.
26008         (func_get_maintainer): New function.
26009         * modules/*: Add Maintainer entry.
26010
26011 2003-01-16  Jim Meyering  <jim@meyering.net>
26012
26013         * m4/regex.m4: The `regex' struct is both input and output.
26014         Initialize it before each use.  Patch by Tim Waugh.
26015
26016 2003-01-16  Bruno Haible  <bruno@clisp.org>
26017
26018         * MODULES.html.sh: Add a table of contents. Add the module name as
26019         leftmost column. Add hyperlinks.
26020
26021 2003-01-15  Bruno Haible  <bruno@clisp.org>
26022
26023         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
26024
26025 2003-01-15  Bruno Haible  <bruno@clisp.org>
26026
26027         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
26028         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
26029         suffix.
26030
26031 2003-01-15  Bruno Haible  <bruno@clisp.org>
26032
26033         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
26034
26035 2003-01-15  Bruno Haible  <bruno@clisp.org>
26036
26037         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
26038         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
26039
26040 2003-01-14  Jim Meyering  <jim@meyering.net>
26041
26042         * lib/same.c (same_name): Tweak a comment.
26043
26044 2003-01-14  Bruno Haible  <bruno@clisp.org>
26045
26046         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
26047         when a string comparison is sufficient.
26048
26049 2003-01-14  Bruno Haible  <bruno@clisp.org>
26050
26051         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
26052         'unsigned int'.
26053
26054 2003-01-14  Bruno Haible  <bruno@clisp.org>
26055
26056         * lib/hash-pjw.c: Add comment about low quality of this function.
26057
26058 2003-01-13  Bruno Haible  <bruno@clisp.org>
26059
26060         * modules/stpcpy: Distribute lib/stpcpy.h.
26061         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
26062
26063 2003-01-13  Bruno Haible  <bruno@clisp.org>
26064
26065         * modules/*: Add a description.
26066         * modules/strpbrk: Fix Makefile.am snippet.
26067         * modules/strtoimax: Fix dependencies.
26068         * modules/strtoumax: Likewise.
26069
26070 2003-01-13  Bruno Haible  <bruno@clisp.org>
26071
26072         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
26073         * modules/alloca (Makefile.am): All object files depend on alloca.h.
26074         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
26075
26076 2003-01-13  Bruno Haible  <bruno@clisp.org>
26077
26078         * gnulib-tool (func_create_testdir): Store config/* files in the main
26079         directory.
26080         * config.rpath: Move to ...
26081         * config/config.rpath: ... here.
26082         * modules/gettext: Contains config/config.rpath, not config.rpath.
26083         * modules/iconv: Likewise.
26084
26085 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26086
26087         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26088         to avoid collisions with libcurses and libreadline.
26089
26090         * m4/getstr.m4: Remove.
26091         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
26092
26093 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26094
26095         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26096         to avoid collisions with libcurses and libreadline.
26097
26098         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
26099         * lib/getstr.h, getstr.c: Remove.
26100         * lib/getline.c: Include "getline.h", to check interface.
26101         Move body of old getstr.c here: this defines MIN_CHUNK and
26102         declares getdelim2, which is renamed from getstr.
26103         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
26104
26105         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
26106         All uses changed.
26107         * lib/linebuffer.h: Likewise.
26108         (readline): Remove backward-compatibility macro.
26109
26110 2003-01-12  Paul Eggert  <eggert@twinsun.com>
26111
26112         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
26113         to avoid collisions with libcurses and libreadline.
26114         * getstr: Remove.
26115         * MODULES.html.sh: Remove getstr.
26116         * modules/getline: Depend on unlocked-io, not getstr.
26117
26118 2003-01-12  Jim Meyering  <jim@meyering.net>
26119
26120         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
26121
26122 2003-01-10  Bruno Haible  <bruno@clisp.org>
26123
26124         * modules/alloca: Change Makefile.am requirements. Simplify Include
26125         requirements. Add lib/alloca_.h to file list.
26126
26127 2003-01-10  Bruno Haible  <bruno@clisp.org>
26128
26129         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
26130
26131 2003-01-10  Bruno Haible  <bruno@clisp.org>
26132
26133         * lib/alloca_.h: New file.
26134         * lib/getdate.y: Unconditionally include alloca.h.
26135         * lib/makepath.c: Likewise.
26136         * lib/setenv.c: Likewise.
26137         * lib/userspec.c: Likewise.
26138
26139 2003-01-09  Karl Berry  <karl@gnu.org>
26140
26141         * MODULES.html.sh: include `dirname $0` in PATH, to find
26142         gnulib-tool.
26143
26144 2003-01-09  Bruno Haible  <bruno@clisp.org>
26145
26146         * modules/stdbool: Change configure.ac, Makefile.am requirements.
26147         Simplify Include requirements. Add lib/stdbool.h.in to file list.
26148
26149 2003-01-09  Bruno Haible  <bruno@clisp.org>
26150
26151         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
26152
26153 2003-01-09  Bruno Haible  <bruno@clisp.org>
26154
26155         * lib/stdbool.h.in: New file.
26156
26157 2003-01-09  Bruno Haible  <bruno@clisp.org>
26158
26159         * gnulib-tool (func_all_modules): Ignore files ending in ~.
26160         * MODULES.html.sh: Likewise.
26161
26162 2003-01-08  Jim Meyering  <jim@meyering.net>
26163
26164         * lib/full-write.c: Undefine and define-away `const' after inclusion
26165         of errno.h, not before.  Suggestion from Bruno Haible.
26166
26167 2003-01-08  Bruno Haible  <bruno@clisp.org>
26168
26169         * modules/full-read: Depend on full-write.
26170
26171 2003-01-08  Bruno Haible  <bruno@clisp.org>
26172
26173         * lib/safe-read.c: Include specification header first, to ensure its
26174         selfcontainedness.
26175         * lib/full-write.c: Likewise.
26176
26177 2003-01-07  Jim Meyering  <jim@meyering.net>
26178
26179         * lib/full-write.c: Rework so that it may serve to define full_read,
26180         too.
26181         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
26182
26183 2003-01-07  Bruno Haible  <bruno@clisp.org>
26184
26185         * lib/strtoimax.c: Include <stdint.h> as an alternative to
26186         <inttypes.h>.
26187         * lib/xstrtol.h: Likewise.
26188         * lib/xstrtoimax.c: Likewise.
26189         * lib/xstrtoumax.c: Likewise.
26190         * lib/human.h: Likewise.
26191
26192         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
26193         on systems that have <inttypes.h> but not <stdint.h>.
26194
26195 2003-01-07  Bruno Haible  <bruno@clisp.org>
26196
26197         * MODULES.html.sh: Add copyright notice.
26198         (missed_files): Omit CVS directory entries.
26199         (func_module): Make it work with sed-3.02.
26200         * MODULES.txt: Remove file.
26201
26202 2003-01-06  Jim Meyering  <jim@meyering.net>
26203
26204         * lib/version-etc.c: Update year in translatable copyright string.
26205
26206 2003-01-03  Karl Berry  <karl@gnu.org>
26207
26208         * config/config.{guess,sub}: update from prep.
26209
26210 2003-01-02  Karl Berry  <karl@gnu.org>
26211
26212         * doc/COPYING.DOC: belatedly updated to 1.2.
26213
26214 2003-01-01  Karl Berry  <karl@gnu.org>
26215
26216         * gnulib-tool (func_verify_module): report module name $module in
26217         error message, not $1.
26218         * gnulib-tool (create-testdir): don't complain if destdir couldn't
26219         be created, only if it doesn't exist.
26220         * gnulib-tool (last_checkin_date): don't expand the $Date here.
26221
26222 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26223
26224         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
26225
26226 2002-12-31  Paul Eggert  <eggert@twinsun.com>
26227
26228         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
26229         memcmp if strcoll doesn't work.
26230
26231 2002-12-31  Bruno Haible  <bruno@clisp.org>
26232
26233         * lib/utime.c (utime_null): No need to call ftruncate if the file was
26234         nonempty.
26235
26236 2002-12-31  Bruno Haible  <bruno@clisp.org>
26237
26238         * lib/memcoll.c (STRCOLL): New macro.
26239         (memcoll): Use it.
26240
26241 2002-12-31  Bruno Haible  <bruno@clisp.org>
26242
26243         * lib/localcharset.h: New file.
26244         * lib/localcharset.c: Include it.
26245         * lib/unicodeio.c: Likewise.
26246
26247 2002-12-31  Bruno Haible  <bruno@clisp.org>
26248
26249         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
26250         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
26251
26252 2002-12-31  Bruno Haible  <bruno@clisp.org>
26253
26254         * lib/getline.h: Include <stddef.h>, for size_t.
26255
26256         * lib/unicodeio.h: Include <stddef.h>, for size_t.
26257         * lib/unicodeio.c: Don't include <stddef.h>.
26258
26259 2002-12-31  Bruno Haible  <bruno@clisp.org>
26260
26261         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
26262         HAVE_TM_ZONE.
26263
26264 2002-12-24  Karl Berry  <karl@gnu.org>
26265
26266         * config/config.guess: update from prep.
26267
26268 2002-12-24  Bruno Haible  <bruno@clisp.org>
26269
26270         General infrasructure.
26271         * m4/README: Rewritten.
26272         * m4/onceonly.m4: New file.
26273         * m4/onceonly_2_57.m4: New file.
26274
26275         Module atexit.
26276         * m4/atexit.m4: New file.
26277
26278         Module strtod.
26279         * m4/strtod.m4: New file.
26280
26281         Module strtol.
26282         * m4/strtol.m4: New file.
26283
26284         Module strtoul.
26285         * m4/strtoul.m4: New file.
26286
26287         Module memchr.
26288         * m4/memchr.m4: New file.
26289
26290         Module memcmp.
26291         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
26292         (jm_FUNC_MEMCMP): Invoke it.
26293
26294         Module memcpy.
26295         * m4/memcpy.m4: New file.
26296
26297         Module memmove.
26298         * m4/memmove.m4: New file.
26299
26300         Module memset.
26301         * m4/memset.m4: New file.
26302
26303         Module strcspn.
26304         * m4/strcspn.m4: New file.
26305
26306         Module strpbrk.
26307         * m4/strpbrk.m4: New file.
26308
26309         Module strstr.
26310         * m4/strstr.m4: New file.
26311
26312         Module strerror.
26313         * m4/strerror.m4: New file.
26314
26315         Module mktime.
26316         * m4/mktime.m4: Renamed from jm-mktime.m4.
26317         (gl_PREREQ_MKTIME): New macro.
26318         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
26319
26320         Module malloc.
26321         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
26322         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
26323         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
26324
26325         Module realloc.
26326         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
26327         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
26328         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
26329
26330         Module strftime.
26331         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
26332         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
26333         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
26334         gl_TM_GMTOFF.
26335         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
26336
26337         Module xalloc.
26338         * m4/xalloc.m4: New file.
26339
26340         Module alloca.
26341         * m4/alloca.m4: New file.
26342
26343         Module putenv.
26344         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
26345         (jm_FUNC_PUTENV): Invoke it.
26346
26347         Module setenv.
26348         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
26349         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
26350         when invoked twice.
26351         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
26352         gt_FUNC_SETENV.
26353
26354         Module memrchr.
26355         * m4/memrchr.m4: New file.
26356
26357         Module stpcpy.
26358         * m4/stpcpy.m4: New file.
26359
26360         Module strcase.
26361         * m4/strcase.m4: New file.
26362
26363         Module strdup.
26364         * m4/strdup.m4: New file.
26365
26366         Module strnlen.
26367         * m4/strnlen.m4: New file.
26368
26369         Module strndup.
26370         * m4/strndup.m4: New file.
26371
26372         Module xstrtod.
26373         * m4/xstrtod.m4: New file.
26374
26375         Module xstrtol.
26376         * m4/xstrtol.m4: New file.
26377
26378         Module getdate.
26379         * m4/getdate.m4: New file.
26380
26381         Module unlocked-io.
26382         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
26383         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
26384         * m4/jm-glibc-io.m4n: Remove file.
26385
26386         Module long-options.
26387         * m4/long-options.m4: New file.
26388
26389         Module md5.
26390         * m4/md5.m4: New file.
26391
26392         Module sha.
26393         * m4/sha.m4: New file.
26394
26395         Module getstr.
26396         * m4/getstr.m4: New file.
26397
26398         Module getline.
26399         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
26400         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
26401         <sys/types.h>, for size_t. Use the function name gnu_getline, not
26402         simply getline. Infoke gl_PREREQ_GETLINE.
26403
26404         Module obstack.
26405         * m4/obstack.m4: New file.
26406
26407         Module hash.
26408         * m4/hash.m4: New file.
26409
26410         Module readtokens.
26411         * m4/readtokens.m4: New file.
26412
26413         Module strverscmp.
26414         * m4/strverscmp.m4: New file.
26415
26416         Module stdbool.
26417         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
26418         OSF/1.
26419
26420         Module strtoll.
26421         * m4/strtoll.m4: New file.
26422
26423         Module strtoull.
26424         * m4/strtoull.m4: New file.
26425
26426         Module strtoimax.
26427         * m4/strtoimax.m4: New file.
26428
26429         Module strtoumax.
26430         * m4/strtoumax.m4: New file.
26431
26432         Module xstrtoimax.
26433         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
26434         jm_AC_PREREQ_XSTRTOIMAX.
26435         Moved the strtol prerequisites to strtol.m4.
26436         Moved the strtoll prerequisites to strtoll.m4.
26437         Moved the strtoimax prerequisites to strtoimax.m4.
26438
26439         Module xstrtoumax.
26440         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
26441         jm_AC_PREREQ_XSTRTOUMAX.
26442         Moved the strtoul prerequisites to strtoul.m4.
26443         Moved the strtoull prerequisites to strtoull.m4.
26444         Moved the strtoumax prerequisites to strtoumax.m4.
26445
26446         Module chown.
26447         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
26448         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
26449
26450         Module dup2.
26451         * m4/dup2.m4: New file.
26452
26453         Module ftruncate.
26454         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
26455         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
26456
26457         Module getgroups.
26458         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
26459         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
26460
26461         Module gettimeofday.
26462         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
26463         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
26464         gl_PREREQ_GETTIMEOFDAY.
26465
26466         Module mkdir.
26467         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
26468         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
26469
26470         Module mkstemp.
26471         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
26472         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
26473         jm_AC_TYPE_UINTMAX_T.
26474         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
26475
26476         Module stat.
26477         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
26478         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
26479
26480         Module lstat.
26481         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
26482         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
26483
26484         Module timespec.
26485         * m4/timespec.m4 (gl_TIMESPEC): New macro.
26486         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
26487         * m4/st_mtim.m4: Indentation.
26488
26489         Module nanosleep.
26490         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
26491         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
26492         gl_PREREQ_NANOSLEEP.
26493
26494         Module regex.
26495         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
26496         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
26497         (gl_REGEX): New macro.
26498
26499         Module rename.
26500         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
26501         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
26502
26503         Module rmdir.
26504         * m4/rmdir.m4: New file.
26505
26506         Module utime.
26507         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
26508         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
26509         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
26510
26511         Module dirname.
26512         * m4/dirname.m4: New file.
26513
26514         Module getopt.
26515         * m4/getopt.m4: New file.
26516
26517         Module unistd-safer.
26518         * m4/unistd-safer.m4: New file.
26519
26520         Module fnmatch.
26521         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
26522         declaration.
26523         (gl_PREREQ_FNMATCH_EXTRA): New macro.
26524         (gl_FUNC_FNMATCH_POSIX): New macro.
26525         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
26526         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
26527         simply fnmatch.
26528
26529         Module exclude.
26530         * m4/exclude.m4: New file.
26531
26532         Module human.
26533         * m4/human.m4: New file.
26534
26535         Module acl.
26536         * m4/acl.m4: Nop.
26537
26538         Module backupfile.
26539         * m4/backupfile.m4: New file.
26540         * m4/d-ino.m4: Indentation.
26541
26542         Module fsusage.
26543         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
26544         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
26545         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
26546
26547         Module dirfd.
26548         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
26549         requirements.
26550
26551         Module euidaccess.
26552         * m4/euidaccess.m4: New file.
26553
26554         Module file-type.
26555         * m4/file-type.m4: New file.
26556
26557         Module fileblocks.
26558         * m4/fileblocks.m4: New file.
26559
26560         Module filemode.
26561         * m4/filemode.m4: New file.
26562
26563         Module isdir.
26564         * m4/isdir.m4: New file.
26565
26566         Module lchown.
26567         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
26568         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
26569
26570         Module makepath.
26571         * m4/makepath.m4: New file.
26572
26573         Module modechange.
26574         * m4/modechange.m4: New file.
26575
26576         Module mountlist.
26577         * m4/mountlist.m4: New file.
26578         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
26579         Indentation.
26580
26581         Module path-concat.
26582         * m4/path-concat.m4: New file.
26583
26584         Module pathmax.
26585         * m4/pathmax.m4: New file.
26586
26587         Module same.
26588         * m4/same.m4: New file.
26589
26590         Module save-cwd.
26591         * m4/save-cwd.m4: New file.
26592
26593         Module savedir.
26594         * m4/savedir.m4: New file.
26595
26596         Module xgetcwd.
26597         * m4/xgetcwd.m4: New file.
26598         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
26599
26600         Module xreadlink.
26601         * m4/xreadlink.m4: New file.
26602
26603         Module safe-read.
26604         * m4/safe-read.m4: New file.
26605
26606         Module safe-write.
26607         * m4/safe-write.m4: New file.
26608
26609         Module closeout.
26610         * m4/closeout.m4: New file.
26611
26612         Module stdio-safer.
26613         * m4/stdio-safer.m4: New file.
26614
26615         Module getpass.
26616         * m4/getpass.m4: New file.
26617
26618         Module getugroups.
26619         * m4/getugroups.m4: New file.
26620
26621         Module group-member.
26622         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
26623         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
26624
26625         Module idcache.
26626         * m4/idcache.m4: New file.
26627
26628         Module userspec.
26629         * m4/userspec.m4: New file.
26630
26631         Module gettime.
26632         * m4/clock_time.m4: New file.
26633         * m4/gettime.m4: New file.
26634
26635         Module settime.
26636         * m4/settime.m4: New file.
26637
26638         Module posixtm.
26639         * m4/posixtm.m4: New file.
26640
26641         Module gethostname.
26642         * m4/gethostname.m4: New file.
26643
26644         Module canon-host.
26645         * m4/canon-host.m4: New file.
26646
26647         Module gettext.
26648         * m4/codeset.m4: New file, from gettext-0.11.5.
26649         * m4/gettext.m4: New file, from gettext-0.11.5.
26650         * m4/glibc21.m4: New file, from gettext-0.11.5.
26651         * m4/iconv.m4: New file, from gettext-0.11.5.
26652         * m4/intdiv0.m4: New file, from gettext-0.11.5.
26653         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
26654         * m4/inttypes.m4: New file, from gettext-0.11.5.
26655         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
26656         * m4/isc-posix.m4: New file, from gettext-0.11.5.
26657         * m4/lcmessage.m4: New file, from gettext-0.11.5.
26658         * m4/lib-ld.m4: New file, from gettext-0.11.5.
26659         * m4/lib-link.m4: New file, from gettext-0.11.5.
26660         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
26661         * m4/progtest.m4: New file, from gettext-0.11.5.
26662         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
26663         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
26664         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
26665
26666         Module localcharset.
26667         * m4/localcharset.m4: New file.
26668
26669         Module hard-locale.
26670         * m4/hard-locale.m4: New file.
26671
26672         Module mbswidth.
26673         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
26674         onceonly macros.
26675         * m4/mbrtowc.m4: Add comment.
26676
26677         Module memcasecmp.
26678         * m4/memcasecmp.m4: New file.
26679
26680         Module memcoll.
26681         * m4/memcoll.m4: New file.
26682
26683         Module unicodeio.
26684         * m4/unicodeio.m4: New file.
26685
26686         Module rpmatch.
26687         * m4/rpmatch.m4: New file.
26688
26689         Module yesno.
26690         * m4/yesno.m4: New file.
26691
26692         Module exitfail.
26693         * m4/exitfail.m4: New file.
26694
26695         Module c-stack.
26696         * m4/c-stack.m4 (gl_C_STACK): New macro.
26697         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
26698
26699         Module error.
26700         * m4/error.m4 (gl_ERROR): New macro.
26701         (jm_PREREQ_ERROR): Use onceonly macros.
26702
26703         Module fatal.
26704         * m4/fatal.m4: New file.
26705
26706         Module getloadavg.
26707         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
26708         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
26709
26710         Module getpagesize.
26711         * m4/getpagesize.m4: New file.
26712
26713         Module getusershell.
26714         * m4/getusershell.m4: New file.
26715
26716         Module physmem.
26717         * m4/physmem.m4: New file.
26718
26719         Module posixver.
26720         * m4/posixver.m4: New file.
26721
26722         Module quotearg.
26723         * m4/quotearg.m4: New file.
26724
26725         Module quote.
26726         * m4/quote.m4: New file.
26727
26728         Module readutmp.
26729         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
26730
26731         Module sig2str.
26732         * m4/sig2str.m4: New file.
26733
26734         Other.
26735         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
26736         ulonglong.m4.
26737         * m4/intmax_t.m4: New file.
26738         * m4/d-type.m4: Indentation.
26739         * m4/jm-macros.m4: Update.
26740         * m4/prereq.m4 (jm_PREREQ): Update.
26741         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
26742         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
26743         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
26744         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
26745         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
26746         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
26747         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
26748         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
26749         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
26750         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
26751         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
26752         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
26753         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
26754         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
26755         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
26756         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
26757         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
26758         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
26759         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
26760
26761 2002-12-24  Bruno Haible  <bruno@clisp.org>
26762
26763         * MODULES.txt: Update according to m4/ changes.
26764
26765         Module gettext.
26766         * config.rpath: New file, from gettext-0.11.5.
26767
26768         * modules/*: New module descriptions.
26769         * gnulib-tool: New file.
26770         * MODULES.html.sh: New file.
26771
26772 2002-12-21  Karl Berry  <karl@gnu.org>
26773
26774         * doc/fdl.texi: update to version 1.2.
26775
26776 2002-12-19  Karl Berry  <karl@gnu.org>
26777
26778         * config/config.guess: update from prep.
26779
26780 2002-12-18  Bruno Haible  <bruno@clisp.org>
26781
26782         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
26783         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
26784
26785 2002-12-17  Bruno Haible  <bruno@clisp.org>
26786
26787         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
26788         stdlib.h, string.h.
26789
26790 2002-12-17  Bruno Haible  <bruno@clisp.org>
26791
26792         * lib/canon-host.c (strdup): Remove unused declaration.
26793
26794         * lib/fsusage.c: Include full_read.h.
26795         (get_fs_usage): Use full_read instead of safe_read.
26796
26797         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
26798
26799 2002-12-12  Karl Berry  <karl@gnu.org>
26800
26801         * config/config.guess: update from prep.
26802
26803 2002-12-11  Bruno Haible  <bruno@clisp.org>
26804
26805         * m4/setenv.m4: New file, from gettext-0.11.5.
26806
26807 2002-12-11  Bruno Haible  <bruno@clisp.org>
26808
26809         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
26810         not unsetenv().
26811         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
26812         modifications:
26813
26814         2002-12-11  Bruno Haible  <bruno@clisp.org>
26815
26816                 * setenv.c (alloca): Fall back to malloc.
26817                 (freea): New macro.
26818                 (setenv): Use freea() to free memory allocated with alloca().
26819
26820         2002-11-13  Bruno Haible  <bruno@clisp.org>
26821
26822                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
26823                 function declarations.
26824                 * unsetenv.c (unsetenv): Likewise.
26825
26826         2002-03-04  Bruno Haible  <bruno@clisp.org>
26827
26828                 Portability to AIX 4.3.3.
26829                 * unsetenv.c: New file, extracted from setenv.c.
26830                 * setenv.c: Move the unsetenv() function to unsetenv.c.
26831
26832         2001-12-20  Bruno Haible  <bruno@clisp.org>
26833
26834                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
26835                 use malloc instead. For SunOS 4.
26836
26837         2001-12-11  Bruno Haible  <bruno@clisp.org>
26838
26839                 * setenv.c: Declare alloca.
26840                 (compar_fn_t): New typedef.
26841                 (KNOWN_VALUE, STORE_VALUE): Use it.
26842
26843         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
26844         setenv.h.
26845
26846 2002-12-10  Paul Eggert  <eggert@twinsun.com>
26847
26848         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
26849         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
26850         Choose values that are less likely to collide with system fnmatch
26851         options.
26852         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
26853         defined (e.g., a pure POSIX system).
26854         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
26855         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
26856
26857 2002-12-06  Paul Eggert  <eggert@twinsun.com>
26858
26859         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
26860         a pain in practice to deal with generated m4 files.  This change
26861         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
26862
26863         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
26864         and jm-glibc-io.m4, as they are no longer a special case.
26865         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
26866         kludge and the auto-generation stuff.  Check only whether the
26867         functions are declared, not whether they exist, since older hosts
26868         that don't declare the functions can't use the optimization anyway.
26869
26870 2002-12-06  Jim Meyering  <jim@meyering.net>
26871
26872         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
26873
26874         Merge in changes from libc's misc/error.c, in preparation
26875         for the merge of gnulib's changes back into libc.
26876
26877         * lib/error.c (_): Define only if not already defined.
26878         Move definition to follow all #include directives.
26879         Include unlocked-io.h only if !_LIBC.
26880         [_LIBC]: Include <libio/libioP.h>.
26881         [USE_IN_LIBIO]: Include <libio/iolibio.h>
26882         (fflush): Tweak definition to use INTUSE.
26883         (putc): Define.
26884
26885 2002-12-05  Paul Eggert  <eggert@twinsun.com>
26886
26887         * lib/alloca.c [defined emacs]: Include "lisp.h".
26888         (xalloc_die) [defined emacs]: New macro.
26889         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
26890         [! defined emacs]: Include <xalloc.h>.
26891         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
26892         (pointer): Typedef to POINTER_TYPE *.
26893         (malloc): Remove decl; we now always use xmalloc.
26894         (alloca): Use old-style definition, since Emacs needs this.
26895         Check for arithmetic overflow when computing combined size.
26896
26897 2002-12-04  Paul Eggert  <eggert@twinsun.com>
26898
26899         Do not generate unlocked-io.h automatically, since it's easier to
26900         maintain it by hand.
26901
26902         * lib/unlocked-io.h: New file, from GNU diffutils,
26903         but with proper copyright notice and attribution.
26904         * lib/gen-uio: Remove.
26905         * lib/Makefile.am: Add copyright notice.
26906         (libfetish_a_SOURCES): Add unlocked-io.h.
26907         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
26908         (DISTCLEANFILES, io_functions): Remove macros.
26909         (EXTRA_DIST): Remove gen_uio.
26910         (unlocked-io.h): Remove rule.
26911
26912 2002-12-04  Jim Meyering  <jim@meyering.net>
26913
26914         Reflect the fact that stat.c and lstat.c are no longer generated.
26915         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
26916         (DISTCLEANFILES): Likewise.
26917         (EXTRA_DIST): Likewise.
26918         (all_local): Don't depend on stat.c or lstat.c.
26919         (stat.c, lstat.c): Remove rules.
26920         (EXTRA_DIST): Remove xstat.in.
26921
26922         * lib/xstat.in: Remove file.  Contents moved into stat.c.
26923         * lib/stat.c: New file.  Contents mostly from xstat.in.
26924         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
26925         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
26926
26927         * lib/safe-read.c: Rework so that it may serve to define safe_write,
26928         too.
26929         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
26930
26931 2002-12-03  Jim Meyering  <jim@meyering.net>
26932
26933         * lib/safe-read.c, safe-write.c: Change variable names and comments,
26934         but not semantics, to minimize the differences between these two files.
26935         (safe_read): Change comment to mention SAFE_READ_ERROR.
26936
26937         * lib/safe-read.c (IS_EINTR): Define.
26938         (safe_read): Use IS_EINTR in place of in-function cpp directives.
26939
26940 2002-12-02  Jim Meyering  <jim@meyering.net>
26941
26942         * lib/safe-read.c (EINTR): Define.
26943         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
26944         (INT_MAX): Provide fallback.
26945         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
26946
26947         * lib/safe-read.h (SAFE_READ_ERROR): Define.
26948
26949 2002-12-02  Bruno Haible  <bruno@clisp.org>
26950
26951         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
26952         Define, taken from safe-read.c.
26953         (INT_MAX): Provide fallback.
26954         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
26955         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
26956
26957         * lib/safe-read.c (EINTR): Remove definition.
26958         (safe_read): Don't use EINTR if it is absent.
26959
26960 2002-12-01  Jim Meyering  <jim@meyering.net>
26961
26962         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
26963         zero.
26964         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
26965
26966 2002-11-27  Paul Eggert  <eggert@twinsun.com>
26967
26968         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
26969         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
26970         with `if (! (value < limit)) abort ();', for readability.
26971
26972 2002-11-26  Karl Berry  <karl@gnu.org>
26973
26974         * lib/strdup.c: copy from libc again, with jim's ok.
26975         * lib/.cppi-disable: re-add strdup.c
26976
26977 2002-11-25  Karl Berry  <karl@gnu.org>
26978
26979         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
26980         instead of "strtol.c".
26981
26982 2002-11-25  Karl Berry  <karl@gnu.org>
26983
26984         * config/install-sh: update from automake for variable quoting, $0 in
26985         error msgs, etc.
26986
26987         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
26988         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
26989         entry.
26990
26991 2002-11-25  Jim Meyering  <jim@meyering.net>
26992
26993         * lib/mktime.c: Sync from libc, now that it has the latest fix.
26994
26995 2002-11-24  Karl Berry  <karl@gnu.org>
26996
26997         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
26998         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
26999
27000 2002-11-24  Jim Meyering  <jim@meyering.net>
27001
27002         Update from coreutils:
27003
27004         * lib/mktime.c: Merge in changes from libc.
27005
27006         Avoid a link-time failure on some Linux systems.
27007         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
27008         (otherwise).
27009         (__mon_yday): Declare with the STATIC attribute.
27010         (__mktime_internal): Likewise.
27011         Based on a report from Greg Schafer.
27012
27013 2002-11-23  Jim Meyering  <jim@meyering.net>
27014
27015         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
27016         Use `unsigned', not `int', as type of index.
27017
27018         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
27019
27020         * lib/fsusage.c: Remove unneeded parentheses around operands of
27021         `defined'.
27022
27023 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27024
27025         * lib/quotearg.h: Allow multiple inclusion by surrounding with
27026         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
27027         so that we can be included first.
27028         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
27029         * lib/quotearg.c: Include quotearg.h immediately after config.h.
27030         No need to include stddef.h or sys/types.h any more.
27031         Surround local include files with "", not "<>".
27032         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
27033         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
27034         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
27035         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
27036         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
27037         (ISPRINT): Remove; no longer needed now that we assume C89.
27038
27039         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
27040         Preserve errno.
27041
27042         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
27043         quotearg_char): Use SIZE_MAX rather than
27044         (size_t) -1 when we are talking about "infinity".
27045
27046         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
27047
27048 2002-11-22  Paul Eggert  <eggert@twinsun.com>
27049
27050         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
27051         hint that one should use `if (! x) abort ();' rather than `assert
27052         (x);', and anyway it's one less thing to worry about configuring.
27053         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
27054         hash_rehash, hash_insert): Use abort rather than assert.
27055
27056 2002-11-22  Bruno Haible  <bruno@clisp.org>
27057
27058         * lib/safe-read.h: Assume C89. Add comments.
27059         (safe_read): Change return type to size_t.
27060         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
27061         byte counts > SSIZE_MAX correctly.
27062         * lib/safe-write.h: New file.
27063         * lib/safe-write.c: New file.
27064         * lib/full-read.h: New file.
27065         * lib/full-read.c: New file.
27066         * lib/full-write.h: Assume C89. Add comments.
27067         * lib/full-write.c: Include safe-write.h.
27068         (full_write): Rewritten to use safe_write.
27069         Suggested by Jim Meyering and Paul Eggert.
27070
27071 2002-11-21  Jim Meyering  <jim@meyering.net>
27072
27073         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
27074
27075         Merge in changes from the coreutils.
27076
27077         2002-09-25  Paul Eggert  <eggert@twinsun.com>
27078         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
27079         <stdint.h>.
27080         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
27081         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
27082         int.  Work more efficiently if X is the same width as uintmax_t.
27083         Do not compare X to -1, to avoid bogus compiler warning.
27084         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
27085         Don't assume that f_frsize and f_bsize are the same type.
27086
27087         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
27088         warning on FreeBSD.
27089
27090         * lib/makepath.c (make_path): Restore umask *before* creating the final
27091         component.
27092         (make_path): Minor reformatting.
27093
27094         * lib/xmalloc.c: Adjust to work with new autoconf macros,
27095         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
27096         HAVE_MALLOC/HAVE_REALLOC.
27097
27098         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
27099         dummy ones.  At least on GNU/Linux systems, `auto' means something
27100         else.
27101         From Michael Stone.
27102
27103 2002-11-21  Bruno Haible  <bruno@clisp.org>
27104
27105         Remove case insensitive option matching.
27106         * lib/argmatch.h (argcasematch): Remove declaration.
27107         (ARGCASEMATCH): Remove macro.
27108         (__xargmatch_internal): Remove case_sensitive argument.
27109         (XARGMATCH): Update.
27110         (XARGCASEMATCH): Remove macro.
27111         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
27112         case_sensitive argument.
27113         (argcasematch): Remove function.
27114         (__xargmatch_internal): Remove case_sensitive argument.
27115         (main): Use XARGMATCH instead of XARGCASEMATCH.
27116
27117         * lib/xmalloc.c: Change compile-time error message. Add comment about
27118         required autoconf version.
27119
27120 2002-11-20  Paul Eggert  <eggert@twinsun.com>
27121
27122         Merge argmatch cleanups from Bison.  Assume C89.
27123
27124         * lib/argmatch.c: Include config.h here, not in argmatch.h.
27125         Include stdlib.h, for EXIT_FAILURE.
27126         Always include <string.h>, since we assume C89.
27127         (EXIT_FAILURE): Remove pre-C89 bug workaround.
27128         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
27129         Include <stddef.h> instead, since it's all we need for size_t.
27130         (PARAMS): Remove.  All uses removed.
27131         (ARRAY_CARDINALITY): Do not bother to #undef.
27132         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
27133         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27134         Remove unnecessary parentheses.
27135         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
27136         Insert necessary parentheses.
27137         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
27138         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
27139
27140 2002-11-19  Bruno Haible  <bruno@clisp.org>
27141
27142         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
27143         * lib/mbswidth.h: Include <stddef.h>, for size_t.
27144
27145         * lib/mbswidth.h (PARAMS): Remove macro.
27146         (mbswidth, mbsnwidth): Use ANSI C function declarations.
27147         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
27148
27149         * lib/gcd.h (PARAMS): Remove macro.
27150         (gcd): Use ANSI C function declarations.
27151         * lib/gcd.c (gcd): Likewise.
27152
27153 2002-11-15  Bruno Haible  <bruno@clisp.org>
27154
27155         * lib/strcspn.c: Include <stddef.h>.
27156         (strcspn): Use ANSI C function declaration. Change return type to
27157         size_t. Use NULL.
27158         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
27159         (strpbrk): Use NULL.
27160         * lib/strpbrk.h (PARAMS): Remove macro.
27161         (strpbrk): Use ANSI C function declaration.
27162         * lib/strstr.c: Don't include <sys/types.h>.
27163         * lib/strstr.h (PARAMS): Remove macro.
27164         (strstr): Use ANSI C function declarations.
27165
27166 2002-11-14  Karl Berry  <karl@gnu.org>
27167
27168         * config/mkinstalldirs: `do' on separate line, instead of
27169         `for var; do'.
27170
27171 2002-11-06  Bruno Haible  <bruno@clisp.org>
27172
27173         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
27174         * lib/gcd.c (gcd): Likewise.
27175
27176 2002-11-05  Bruno Haible  <bruno@clisp.org>
27177
27178         * lib/gcd.h: New file, from gettext-0.11.5.
27179         * lib/gcd.c: New file, from gettext-0.11.5.
27180
27181 2002-11-05  Bruno Haible  <bruno@clisp.org>
27182
27183         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27184         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27185         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27186         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
27187
27188         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
27189         <libintl.h>.
27190         * lib/makepath.c: Include gettext.h instead of <locale.h> and
27191         <libintl.h>.
27192
27193         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
27194         * lib/human.c: Include gettext.h instead of <libintl.h>.
27195         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
27196         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
27197         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
27198         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
27199         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
27200         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
27201         (textdomain): Remove definition.
27202         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
27203
27204         * lib/long-options.c: Remove include of <libintl.h> and definition of
27205         _.
27206         * lib/same.c: Remove include of <libintl.h> and definition of _.
27207
27208 2002-11-04  Owen Taylor  <otaylor@redhat.com>
27209
27210         * lib/config.charset: A few additions for Solaris.
27211
27212 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27213
27214         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
27215         * lib/localcharset.c (locale_charset): Declare as extern "C".
27216
27217 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
27218
27219         * lib/config.charset: msdos in uk_UA uses CP1125.
27220
27221 2002-11-04  Bruno Haible  <bruno@clisp.org>
27222
27223         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
27224         * lib/strcase.h: New file, from GNU gettext-0.11.5.
27225         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
27226         * lib/strstr.h: New file, from GNU gettext-0.11.5.
27227         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
27228
27229 2002-11-04  Bruno Haible  <bruno@clisp.org>
27230
27231         * lib/localcharset.c (locale_charset): Don't return an empty string.
27232
27233 2002-11-04  Bruno Haible  <bruno@clisp.org>
27234
27235         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
27236         aliases.
27237
27238 2002-11-04  Bruno Haible  <bruno@clisp.org>
27239
27240         * lib/config.charset: Update for newest glibc. Add canonical names
27241         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
27242
27243 2002-11-04  Bruno Haible  <bruno@clisp.org>
27244
27245         * lib/config.charset: Add support for NetBSD.
27246
27247 2002-11-04  Bruno Haible  <bruno@clisp.org>
27248
27249         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
27250
27251 2002-11-01  Bruno Haible  <bruno@clisp.org>
27252
27253         * configure.in: Add AC_CONFIG_AUX_DIR call.
27254         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
27255         test/Makefile.
27256         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
27257
27258 2002-09-28  Karl Berry  <karl@gnu.org>
27259
27260         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
27261         installed automake until the next release, since changes have been
27262         made.
27263
27264 2002-09-25  Karl Berry  <karl@gnu.org>
27265
27266         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
27267         * lib/getopt*: copy from libc/posix.
27268         * lib/gettext.h: copy from gettext.
27269         * lib/.cppi-disable: add strdup.c, gettext.h.
27270
27271 2002-09-25  Karl Berry  <karl@gnu.org>
27272
27273         * config/srclist.txt: enable gettext.h check.
27274         * config/config.{guess,sub}: update from prep.
27275         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
27276                 from automake 1.6.3.
27277         See srclist*.
27278
27279 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
27280
27281         * regex.c (PATFETCH): Remove the translating fetch.
27282         (PATFETCH_RAW): Rename to PATFETCH.
27283         (set_image_of_range): New fun.
27284         (SET_RANGE_TABLE_WORK_AREA): Use it.
27285         (regex_compile): Don't translate the pattern chars so eagerly.
27286         Only do it when inserting an `exactn' bytecode or when handling
27287         a char-range.
27288         (mutually_exclusive_p): Avoid empty statement.
27289
27290 2002-07-06  Jim Meyering  <meyering@lucent.com>
27291
27292         * m4/README: Don't mention Makefile.am.in.
27293         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
27294
27295 2002-07-01  Jim Meyering  <meyering@lucent.com>
27296
27297         * lib/c-stack.c: Include sys/time.h.
27298         From Volker Borchert.
27299
27300 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27301
27302         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
27303
27304 2002-06-26  Paul Eggert  <eggert@twinsun.com>
27305
27306         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
27307         New macro.  Use it uniformly instead of
27308         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
27309         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
27310         reported by Vin Shelton.
27311
27312 2002-06-22  Paul Eggert  <eggert@twinsun.com>
27313
27314         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
27315         Do not assume SA_SIGINFO behavior.
27316         Bug reported by Jim Meyering on NetBSD 1.5.2.
27317
27318 2002-06-22  Jim Meyering  <meyering@lucent.com>
27319
27320         * m4/c-stack.m4: New file, from diffutils-2.8.2.
27321         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
27322
27323         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
27324         now that configure.ac uses AC_GNU_SOURCE.
27325         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
27326         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
27327
27328         Update to latest tools.  Suggestions from Paul Eggert.
27329         * m4/stdbool.m4: New file, from diffutils-2.8.2.
27330         * m4/gnu-source.m4: Update from diffutils-2.8.2.
27331         * m4/fnmatch.m4: Likewise.
27332         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
27333         to AC_HEADER_STDBOOL
27334
27335 2002-06-22  Jim Meyering  <meyering@lucent.com>
27336
27337         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
27338         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
27339
27340 2002-06-22  Jim Meyering  <meyering@lucent.com>
27341
27342         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
27343
27344         * lib/exitfail.c, exitfail.h: Likewise.
27345         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
27346
27347         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
27348         of fnmatch.h.
27349         (EXTRA_DIST): Add fnmatch_loop.c.
27350         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
27351
27352         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
27353         * lib/fnmatch.c: Update from diffutils-2.8.2.
27354         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
27355         * lib/fnmatch.h: Remove file.
27356
27357 2002-06-21  Jim Meyering  <meyering@lucent.com>
27358
27359         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
27360         * m4/mbrtowc.m4: Likewise.
27361
27362         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
27363         * m4/mbswidth.m4: Reflect name change:
27364         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
27365         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
27366
27367         * m4/lib-link.m4: Update from gettext-0.11.2.
27368         * m4/gettext.m4: Likewise.
27369
27370         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
27371         From Alfred M. Szmidt.
27372
27373 2002-06-18  Paul Eggert  <eggert@twinsun.com>
27374
27375         * lib/file-type.h: Report an error if neither S_ISREG nor
27376         S_IFREG is defined, instead of using a test specific to glibc
27377         2.2.  This should be safe, since POSIX requires S_ISREG and
27378         Unix Version 7 had S_IFREG.  We don't need to check for
27379         <sys/types.h> since we don't use any symbols that it defines.
27380
27381 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
27382
27383         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
27384         $@-t, so that each temporary file name is unique and valid in the first
27385         8 characters, for operation under DOS.
27386
27387 2002-06-15  Paul Eggert  <eggert@twinsun.com>
27388
27389         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
27390
27391 2002-06-15  Jim Meyering  <meyering@lucent.com>
27392
27393         Work even with DJGPP 2.03, which lacks support for symlinks.
27394         From Richard Dawe.
27395         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
27396         is defined.
27397         * lib/lchown.c (S_ISLNK): Likewise.
27398
27399 2002-06-15  Jim Meyering  <meyering@lucent.com>
27400
27401         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
27402         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
27403         have been included before this file.
27404
27405 2002-06-14  Jim Meyering  <meyering@lucent.com>
27406
27407         * lib/file-type.h: Use the version from diffutils-2.8.2.
27408         * lib/file-type.c: Likewise.
27409
27410 2002-06-07  Jim Meyering  <meyering@lucent.com>
27411
27412         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
27413         They're needed at least for NetBSD 1.5.2.
27414         ($statxfs_includes): Include those same headers.
27415         ($statxfs_includes): Include sys/vfs.h if available.
27416         ($statxfs_includes): Likewise for sys/statvfs.h.
27417         Check for the following members in both structs statfs and statvfs:
27418         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
27419
27420 2002-06-01  Jim Meyering  <meyering@lucent.com>
27421
27422         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
27423         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
27424
27425 2002-05-28  Jim Meyering  <meyering@lucent.com>
27426
27427         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
27428         Reported by Volker Borchert.
27429
27430 2002-05-27  Jim Meyering  <meyering@lucent.com>
27431
27432         Fix a problem seen only on nonconforming systems whereby ls.c's
27433         use of localtime, and then of gettimeofday would cause trouble:
27434         the localtime call used to initialize rpl_gettimeofday's save
27435         mechanism would clobber ls's current local time information so
27436         that in any long listing the first file would always be listed
27437         with date 1970-01-01.  Analysis by Volker Borchert.
27438
27439         * lib/gettimeofday.c (localtime): Undefine.
27440         (rpl_localtime): New function.
27441
27442 2002-05-27  Jim Meyering  <meyering@lucent.com>
27443
27444         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
27445         localtime.
27446
27447         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
27448         use the replacement function; it wouldn't resolve at link time.
27449         Reported by Volker Borchert.
27450
27451 2002-05-22  Jim Meyering  <meyering@lucent.com>
27452
27453         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
27454         file-type.h.
27455         * lib/file-type.h: New file.
27456         * lib/file-type.c (file_type): New file/function.  Extracted from
27457         diffutils.
27458
27459 2002-04-30  Jim Meyering  <meyering@lucent.com>
27460
27461         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
27462
27463 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27464
27465         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
27466
27467 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27468
27469         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
27470         Do not check for alloca.h (no longer used) or stdbool.h (was never
27471         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
27472
27473 2002-04-29  Paul Eggert  <eggert@twinsun.com>
27474
27475         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
27476
27477 2002-04-29  Jim Meyering  <meyering@lucent.com>
27478
27479         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
27480         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
27481         Use AC_FUNC_STRNLEN here instead.
27482
27483         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
27484         With autoconf-2.53a, it's part of AC_PROG_CC.
27485
27486 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27487
27488         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
27489         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
27490
27491 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27492
27493         * lib/sig2str.h, lib/sig2str.c: New files.
27494         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
27495
27496 2002-04-28  Paul Eggert  <eggert@twinsun.com>
27497
27498         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
27499         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
27500         of 127, since 64 is the largest conceivable number for ancient
27501         nonstandard hosts.
27502         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
27503
27504 2002-04-28  Jim Meyering  <meyering@lucent.com>
27505
27506         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
27507
27508 2002-04-24  Jim Meyering  <meyering@lucent.com>
27509
27510         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
27511         (jm_PREREQ): Use it.
27512
27513         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
27514         mach/mach.h fcntl.h.
27515         Check for this function: setlocale.
27516
27517 2002-04-24  Jim Meyering  <meyering@lucent.com>
27518
27519         * lib/gettext.h: New file, from Gettext.
27520         * lib/Makefile.am (INCLUDES): Remove -I../intl.
27521         (libfetish_a_SOURCES): Add gettext.h.
27522
27523 2002-04-16  Jim Meyering  <meyering@lucent.com>
27524
27525         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
27526         ut_pid, ut_id, ut_exit.
27527
27528 2002-04-16  Jim Meyering  <meyering@lucent.com>
27529
27530         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
27531         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
27532         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
27533
27534 2002-04-12  Jim Meyering  <meyering@lucent.com>
27535
27536         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
27537         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
27538         existence of the getmntinfo function.  Needed for Darwin 5.3.
27539
27540         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
27541         This is necessary at least on Darwin 5.3.
27542
27543         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
27544         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
27545         strnlen.o in the library, and that makes some versions of ranlib
27546         object.
27547
27548 2002-04-12  Jim Meyering  <meyering@lucent.com>
27549
27550         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
27551
27552 2002-04-09  Jim Meyering  <meyering@lucent.com>
27553
27554         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
27555         to be more precise.  Rather than saying we're checking whether the
27556         function `works', say what we're testing.
27557         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
27558         Reported by Bruno Haible.
27559
27560 2002-03-10  Jim Meyering  <meyering@lucent.com>
27561
27562         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
27563         Suggestion from Santiago Vila.
27564
27565 2002-03-08  Jim Meyering  <meyering@lucent.com>
27566
27567         * lib/rename.c: Mention that this wrapper is needed also on
27568         mips-dec-ultrix4.4 systems.
27569
27570 2002-03-02  Jim Meyering  <meyering@lucent.com>
27571
27572         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
27573         not HAVE_CLOCK_SETTIME.
27574
27575 2002-02-27  Paul Eggert  <eggert@twinsun.com>
27576
27577         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
27578         Check for clock_settime.
27579
27580 2002-02-27  Paul Eggert  <eggert@twinsun.com>
27581
27582         * lib/nanosleep.h: Rename to....
27583         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
27584
27585         * lib/gettime.c: New file.
27586         * lib/settime.c: New file.
27587         * lib/stime.c: Remove.
27588
27589         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
27590         timespec.h.  Remove nanosleep.h.
27591
27592 2002-02-25  Paul Eggert  <eggert@twinsun.com>
27593
27594         * m4/acl.m4: New file.
27595         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
27596         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
27597
27598 2002-02-25  Paul Eggert  <eggert@twinsun.com>
27599
27600         * lib/acl.c, lib/acl.h: New files.
27601         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
27602
27603 2002-02-24  Jim Meyering  <meyering@lucent.com>
27604
27605         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
27606         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
27607         cause trouble.  Reported by Nelson Beebe.
27608
27609 2002-02-23  Paul Eggert  <eggert@twinsun.com>
27610
27611         * lib/path-concat.c (xpath_concat): Reorder code to pacify
27612         compilers that don't know that xalloc_die never returns.
27613
27614 2002-02-20  Jim Meyering  <meyering@lucent.com>
27615
27616         * lib/getdate.c: Regenerate using bison-1.33.
27617
27618 2002-02-17  Jim Meyering  <meyering@lucent.com>
27619
27620         * config/config.guess (main): Don't use `head -1'; it's no longer
27621         portable. Use `sed 1q' instead.
27622
27623 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
27624
27625         * m4/codeset.m4: Upgrade to gettext-0.11.
27626         * m4/gettext.m4: Upgrade to gettext-0.11.
27627         * m4/glibc21.m4: Upgrade to gettext-0.11.
27628         * m4/iconv.m4: Upgrade to gettext-0.11.
27629         * m4/isc-posix.m4: Upgrade to gettext-0.11.
27630         * m4/lcmessage.m4: Upgrade to gettext-0.11.
27631         * m4/lib-ld.m4: New file, from gettext-0.11.
27632         * m4/lib-link.m4: New file, from gettext-0.11.
27633         * m4/lib-prefix.m4: New file, from gettext-0.11.
27634         * m4/progtest.m4: Upgrade to gettext-0.11.
27635
27636 2002-02-15  Paul Eggert  <eggert@twinsun.com>
27637
27638         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
27639         (jm_PREREQ): Use it.
27640
27641 2002-02-15  Paul Eggert  <eggert@twinsun.com>
27642
27643         * lib/posixver.c, lib/posixver.h: New files.
27644         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
27645
27646 2002-02-02  Paul Eggert  <eggert@twinsun.com>
27647             Bruno Haible  <bruno@clisp.org>
27648
27649         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
27650         (fwrite_success_callback): New declaration.
27651         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
27652         print_unicode_char. Call failure callback instead of error.
27653         (fwrite_success_callback): New function.
27654         (exit_failure_callback): New function.
27655         (fallback_failure_callback): New function.
27656         (print_unicode_char): Call unicode_to_mb.
27657
27658 2002-01-26  Jim Meyering  <meyering@lucent.com>
27659
27660         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
27661         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
27662
27663 2002-01-26  Jim Meyering  <meyering@lucent.com>
27664
27665         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
27666
27667 2002-01-22  Paul Eggert  <eggert@twinsun.com>
27668
27669         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
27670
27671 2002-01-22  Jim Meyering  <meyering@lucent.com>
27672
27673         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
27674         Otherwise, some versions of automake would omit the rule that makes
27675         Makefile from Makefile.in.
27676
27677 2002-01-21  Paul Eggert  <eggert@twinsun.com>
27678
27679         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
27680         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
27681         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
27682         (memcoll): Set errno to zero if there is no error.
27683
27684         * lib/quotearg.c (quotearg_buffer_restyled):
27685         Fix bug with quoting buffers containing NUL when backslashing escapes.
27686         This bug was exposed by the other changes in this patch.
27687         (quotearg_n_options): New arg ARGSIZE.
27688         All callers changed.
27689         (quoting_options_from_style): New function.
27690         (quotearg_n_style): Use it.
27691         (quotearg_n_style_mem): New function.
27692
27693         * lib/quotearg.h (quotearg_n_style_mem): New function.
27694
27695 2002-01-19  Jim Meyering  <meyering@lucent.com>
27696
27697         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
27698         Remove useless quotes: DF_PROG="df".
27699         * m4/strnlen.m4: New file.
27700
27701 2002-01-16  Paul Eggert  <eggert@twinsun.com>
27702
27703         * lib/backupfile.c (ISDIGIT): Comment fix.
27704         * lib/getdate.y (ISDIGIT): Likewise.
27705         * lib/posixtm.c (ISDIGIT, year): Likewise.
27706         * lib/strverscmp.c (ISDIGIT): Likewise.
27707         * lib/userspec.c (ISDIGIT): Likewise.
27708
27709 2002-01-16  Jim Meyering  <meyering@lucent.com>
27710
27711         * lib/getdate.y: Add three semicolons, each just before a closing
27712         brace. Bison (as of version 1.31) no longer papers over that mistake.
27713
27714 2002-01-05  Jim Meyering  <meyering@lucent.com>
27715
27716         * lib/version-etc.c (version_etc_copyright): Update copyright year.
27717
27718 2001-12-19  Paul Eggert  <eggert@twinsun.com>
27719
27720         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
27721         not silently exit merely because the output buffer happens to
27722         have nothing pending.
27723
27724 2001-12-18  Paul Eggert  <eggert@twinsun.com>
27725
27726         See the big note in ../ChangeLog.
27727         * lib/human.c (suffixes): Prefer K to k for 1024.
27728         (generate_suffix_backwards): New function.
27729         (human_readable_inexact): Use it.
27730         * lib/xstrtol.c (__xstrtol): If there is no number but there
27731         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
27732         Accept 'K' as well as 'k'.
27733
27734 2001-12-15  Jim Meyering  <meyering@lucent.com>
27735
27736         * lib/regex.h (__restrict_arr): Update from libc.
27737
27738         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
27739         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
27740         (STREQ): Define.
27741
27742 2001-12-14  Jim Meyering  <meyering@lucent.com>
27743
27744         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
27745         Suggestion from Bruno Haible.
27746
27747 2001-12-10  Jim Meyering  <meyering@lucent.com>
27748
27749         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
27750         xrealloc, Instead, include "xalloc.h".
27751         (initbuffer): Don't cast xmalloc return value to char*.
27752         (readline): Reword comment.
27753         Don't cast xrealloc return value to char*
27754         Return NULL, not 0.
27755
27756 2001-12-09  Jim Meyering  <meyering@lucent.com>
27757
27758         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
27759         about `signed and unsigned type in conditional expression'.
27760         * lib/posixtm.c (posix_time_parse): Likewise.
27761
27762         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
27763
27764         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
27765         to avoid a pedantic warning.
27766
27767         * lib/getstr.c: Don't include assert.h.
27768         (getstr): Remove warning-evoking assertions.
27769         Return -1 if offset parameter is out of bounds.
27770         Change the type of a local from int to size_t.
27771
27772         * lib/strftime.c (my_strftime_localtime_r): Include this function
27773         definition in the `#if ! HAVE_TM_GMTOFF' block.
27774
27775         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
27776         Include xalloc.h instead.
27777
27778 2001-12-02  Jim Meyering  <meyering@lucent.com>
27779
27780         * lib/tempname.c: Don't declare getenv, thus reverting the change of
27781         2001-11-18.  It's no longer necessary, now that stdlib.h is always
27782         included.
27783
27784         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
27785         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
27786
27787 2001-11-30  Akim Demaille  <akim@epita.fr>
27788
27789         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
27790         before being defined.
27791
27792 2001-11-27  Paul Eggert  <eggert@twinsun.com>
27793
27794         * lib/quotearg.h (quotearg_n, quotearg_n_style):
27795         First arg is int, not unsigned.
27796         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
27797         (SIZE_MAX, UINT_MAX): New macros.
27798         (quotearg_n_options): Abort if N is negative.
27799         Avoid overflow check on hosts where size_t is 64 bits and int
27800         is 32 bits, as overflow is impossible there.
27801         Fix off-by-one typo that caused unnecessary reallocation.
27802
27803 2001-11-27  Jim Meyering  <meyering@lucent.com>
27804
27805         * lib/tempname.c: Merge with version from libc.
27806         * lib/regex.c: Likewise.
27807
27808         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
27809         systems for which STDC_HEADERS is 0, it was not included, resulting in
27810         a warning about an integer-to-pointer conversion problem with getenv.
27811         Reported by Volker Borchert.
27812
27813 2001-11-26  Jim Meyering  <meyering@lucent.com>
27814
27815         * lib/gtod.h: Remove file.
27816         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
27817         * lib/gettimeofday.c: Don't include gtod.h.
27818         (GTOD_init): Remove function.
27819         (rpl_gettimeofday): Do its job here instead, rather than aborting.
27820         Suggestion from Volker Borchert.
27821
27822 2001-11-23  Jim Meyering  <meyering@lucent.com>
27823
27824         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
27825         it.
27826         * lib/hash.c (struct hash_table): Define it here instead.
27827
27828 2001-11-22  Jim Meyering  <meyering@lucent.com>
27829
27830         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
27831
27832 2001-11-20  Jim Meyering  <meyering@lucent.com>
27833
27834         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
27835         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
27836
27837 2001-11-19  Jim Meyering  <meyering@lucent.com>
27838
27839         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
27840         directory.  Use "conftestXXXXXX" as the template.
27841         Suggestion from Paul Eggert.
27842
27843         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
27844         immediately, so the test doesn't mistakenly hit the max-open-files
27845         limit.
27846
27847 2001-11-18  Paul Eggert  <eggert@twinsun.com>
27848
27849         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
27850         (TEMPORARIES): New macro.
27851         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
27852         removes an artificial limitation (e.g. HP-UX 10.20, where
27853         TMP_MAX is 17576).
27854
27855 2001-11-18  Jim Meyering  <meyering@lucent.com>
27856
27857         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
27858
27859 2001-11-18  Jim Meyering  <meyering@lucent.com>
27860
27861         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
27862         on SunOS 4.
27863
27864         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
27865         files will be created before anything else.
27866
27867 2001-11-17  Paul Eggert  <eggert@twinsun.com>
27868
27869         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
27870         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
27871
27872 2001-11-17  Jim Meyering  <meyering@lucent.com>
27873
27874         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
27875         Prompted by a report from Bob Proulx.
27876
27877         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
27878         Instead, require UTILS_FUNC_MKSTEMP.
27879
27880 2001-11-17  Jim Meyering  <meyering@lucent.com>
27881
27882         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
27883         Now, that's done as part of AC_FUNC_STRTOD.
27884
27885 2001-11-17  Jim Meyering  <meyering@lucent.com>
27886
27887         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
27888         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
27889         rather than group writable.  Patch by Juan F. Codagnone.
27890
27891         * lib/readtokens.c: Remove explicit declarations of xmalloc and
27892         xrealloc, Instead, include "xalloc.h".
27893
27894         * lib/mountlist.c: Include unlocked-io.h after all system headers.
27895         Remove explicit declarations of xmalloc, xrealloc,
27896         and xstrdup.  Instead, include "xalloc.h".
27897
27898         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
27899         unlocked-io.h.
27900         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
27901         Likewise.
27902         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
27903
27904         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
27905         Reported by Padraig Brady.
27906
27907         * lib/mkstemp.c: #undef mkstemp.
27908         Include config.h.
27909         (rpl_mkstemp): Rename from mkstemp.
27910         Protoize.
27911
27912 2001-11-16  Jim Meyering  <meyering@lucent.com>
27913
27914         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
27915         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
27916         determine the amount of total physical memory, use pstat_getstatic.
27917         HPUX-11 doesn't define _SC_PHYS_PAGES.
27918         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
27919         If sysconf couldn't be used to determine the amount of available
27920         physical memory, use both pstat_getstatic and pstat_getdynamic.
27921         Based on a patch from Bob Proulx.
27922
27923 2001-11-10  Jim Meyering  <meyering@lucent.com>
27924
27925         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
27926         (jm_PREREQ): Use it.
27927
27928 2001-11-09  Jim Meyering  <meyering@lucent.com>
27929
27930         * m4/jm-macros.m4: Require autoconf-2.52f.
27931         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
27932         Use these AC_-prefixed names, not the AM_-prefixed ones.
27933
27934         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
27935
27936 2001-11-05  Jim Meyering  <meyering@lucent.com>
27937
27938         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
27939
27940 2001-11-04  Jim Meyering  <meyering@lucent.com>
27941
27942         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
27943         $DEFS.
27944
27945 2001-11-03  Jim Meyering  <meyering@lucent.com>
27946
27947         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
27948         of AC_DEFUN.
27949
27950         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
27951         know the name of the variable in the macro definition.
27952
27953 2001-11-03  Jim Meyering  <meyering@lucent.com>
27954
27955         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
27956         in argmatch_to_argument call.
27957
27958         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
27959         argument.
27960
27961         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
27962         e.g., a fault due to an attempt to free a NULL pointer.
27963
27964 2001-11-01  Jim Meyering  <meyering@lucent.com>
27965
27966         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
27967         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
27968
27969 2001-11-01  Jim Meyering  <meyering@lucent.com>
27970
27971         * lib/dirfd.c, lib/dirfd.h: New files.
27972         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
27973
27974         * lib/hash.c (hash_print) [TESTING]: Clean up.
27975
27976 2001-10-22  Paul Eggert  <eggert@twinsun.com>
27977
27978         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
27979         to avoid a warning if -Wall.
27980
27981 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
27982
27983         * README: New file
27984         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
27985         (per RMS's instructions, this is now the canonical source)
27986         * lgpl/, gpl/: New directories.
27987
27988 2001-10-21  Paul Eggert  <eggert@twinsun.com>
27989
27990         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
27991
27992 2001-10-21  Jim Meyering  <meyering@lucent.com>
27993
27994         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
27995         this code would end up calling gettext even in packages built
27996         with --disable-nls.
27997         * lib/getopt.c (_): Likewise.
27998         * lib/regex.c (_): Likewise.
27999
28000 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28001
28002         * m4/error.m4 (jm_PREREQ_ERROR):
28003         Do not invoke AC_CHECK_FUNCS with strerror_r, as
28004         AC_FUNC_STRERROR_R does that.
28005         Check for strerror declaration.
28006
28007         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
28008         are supposed to have them these days.
28009         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
28010         Merge changes from latest Autoconf CVS.
28011         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
28012         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
28013         POSIX decided to standardize on the int flavor of strerror_r.
28014
28015 2001-10-20  Paul Eggert  <eggert@twinsun.com>
28016
28017         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
28018         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
28019         Use strerror_r that is only a macro, even if it is not a function.
28020         (strerror): Check for HAVE_DECL_STRERROR before declaring.
28021         (private_strerror): Use prototypes, not old-style function definition.
28022         (print_errno_message): New function.
28023         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
28024         char*-flavored one.
28025         (error_tail, error, error_at_line): Use it.
28026
28027 2001-10-11  Jim Meyering  <meyering@lucent.com>
28028
28029         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
28030         and quote_n (1, ... to avoid clobbering a buffer.
28031
28032 2001-10-05  Jim Meyering  <meyering@lucent.com>
28033
28034         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
28035         hash-pjw.h.
28036         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
28037         * lib/hash-pjw.h: New file.
28038
28039 2001-09-30  Jim Meyering  <meyering@lucent.com>
28040
28041         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
28042         `struct fsstat' has the `f_fstypename' member.
28043         Use that to define FS_TYPE, which is now used to make
28044         the getfsstat link test tighter.
28045
28046 2001-09-30  Jim Meyering  <meyering@lucent.com>
28047
28048         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
28049         Include <sys/ucred.h>, for Apple Darwin.
28050         Include sys/mount.h and sys/fs_types.h only if available.
28051         (FS_TYPE): Define.
28052         (read_filesystem_list): Use FS_TYPE.
28053
28054 2001-09-29  Paul Eggert  <eggert@twinsun.com>
28055
28056         * lib/exclude.c (excluded_filename): 0 -> false, since it's
28057         a boolean context.
28058
28059 2001-09-29  Jim Meyering  <meyering@lucent.com>
28060
28061         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28062         [one-argument getmntent function]): Include stdio.h before mntent.h.
28063         SunOS 4.1.x needs it for the declaration of `FILE'.
28064         Patch by Volker Borchert.
28065
28066         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
28067         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
28068         sys/fs_types.h, and make the link-test for getfsstat guard #include
28069         directives with appropriate #if HAVE_*_H tests so that we can
28070         detect getfsstat on Apple Darwin1.3.7 systems.
28071         Reported by Nelson Beebe.
28072         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
28073
28074 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28075
28076         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28077         #defines strtoimax.  Also treat the other strto* functions
28078         like strtoimax.
28079
28080         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28081         Check for strtoul and strtoumax,
28082         as those declarations are made even in the signed case.
28083         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
28084         Likewise, for strtol and strtoimax.
28085
28086 2001-09-28  Paul Eggert  <eggert@twinsun.com>
28087
28088         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
28089         #defines strtoimax.  Also treat the other strto* functions
28090         like strtoimax.
28091
28092         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
28093         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
28094         (strtoimax, strtoumax): Do not declare if already defined as a macro.
28095
28096 2001-09-26  Jim Meyering  <meyering@lucent.com>
28097
28098         Most macros in unlocked-io.h had the wrong number of arguments.
28099         * lib/gen-uio: New script.
28100         (USE_UNLOCKED_IO): Define to 1 if not already defined.
28101         * lib/unlocked-io.hin: Remove file.
28102         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
28103         rather than trying to embed it here.
28104         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
28105         Reported by Padraig Brady.
28106
28107 2001-09-25  Volker Borchert  <bt@teknon.de>
28108
28109         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
28110         `result'.
28111
28112 2001-09-24  Jim Meyering  <meyering@lucent.com>
28113
28114         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
28115
28116 2001-09-23  Jim Meyering  <meyering@lucent.com>
28117
28118         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
28119         instead of the mere test for existence of mntent.h.  The latter
28120         would get a false-positive on AIX 3.4 systems.
28121         In the outer getmntent if-block, don't die if neither of the getmntent
28122         tests succeeds.  Instead, just fall through and continue with the
28123         remaining tests.
28124
28125 2001-09-23  Jim Meyering  <meyering@lucent.com>
28126
28127         * lib/mountlist.c: Remove useless parentheses in #if directives.
28128         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
28129         the deprecated MOUNTED symbol is no longer defined in mntent.h.
28130
28131 2001-09-22  Jim Meyering  <meyering@lucent.com>
28132
28133         * m4/gettext.m4: New file.  From gettext.
28134         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
28135         * m4/progtest.m4: Likewise
28136         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
28137         * m4/glibc21.m4: Likewise.
28138
28139         * m4/libintl.m4: Remove.  No longer used.
28140
28141 2001-09-22  Jim Meyering  <meyering@lucent.com>
28142
28143         * lib/localcharset.c: Update from latest gettext.
28144         * lib/config.charset: Likewise.
28145
28146 2001-09-20  Jim Meyering  <meyering@lucent.com>
28147
28148         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
28149         strtoimax.
28150         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
28151         strtoumax.
28152
28153 2001-09-20  Jim Meyering  <meyering@lucent.com>
28154
28155         * lib/xstrtol.c (strtoimax): Guard declaration with
28156         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
28157         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
28158         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
28159         (strtoumax): Likewise, for completeness (it wasn't necessary).
28160
28161 2001-09-17  Paul Eggert  <eggert@twinsun.com>
28162
28163         * lib/strtoimax.c (HAVE_LONG_LONG):
28164         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
28165         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
28166         to work around bug in IBM C compiler.
28167
28168 2001-09-17  Jim Meyering  <meyering@lucent.com>
28169
28170         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
28171         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
28172         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
28173         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
28174         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
28175         whenever the right hand side need not be expanded by the shell.
28176
28177 2001-09-16  Paul Eggert  <eggert@twinsun.com>
28178
28179         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
28180         library.  It's not correct, as some older glibcs are buggy.
28181         fnmatch wasn't fixed until glibc 2.2.
28182
28183         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
28184         special shell magic here.
28185
28186 2001-09-16  Jim Meyering  <meyering@lucent.com>
28187
28188         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
28189         * m4/jm-macros.m4: Require it.
28190
28191 2001-09-16  Jim Meyering  <meyering@lucent.com>
28192
28193         * lib/mkdir.c: New file.
28194
28195 2001-09-15  Jim Meyering  <meyering@lucent.com>
28196
28197         * m4/jm-macros.m4: Check for help2man.
28198
28199 2001-09-11  Jim Meyering  <meyering@lucent.com>
28200
28201         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
28202         The body, by Paul Eggert, was moved here from configure.in.
28203         * m4/jm-macros.m4: Require UTILS_HOST_OS.
28204
28205 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28206
28207         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
28208         (jm_PREREQ): Use it.
28209
28210 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28211
28212         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
28213         Use ssize_t, not int, to store result of readlink.
28214         Check for ssize_t overflow as well as size_t overflow,
28215         as POSIX says the result of readlink is implementation-defined
28216         when ssize_t overflows.
28217         Remove unnecessary cast to char*.
28218         Use free+malloc instead of realloc, as the storage doesn't need
28219         to be preserved and it's clearer and can be more efficient that way.
28220         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
28221         * lib/xreadlink.h (xreadlink): Update prototype.
28222
28223 2001-09-04  Paul Eggert  <eggert@twinsun.com>
28224
28225         * lib/xgetcwd.c: Revert some of the previous change; intead,
28226         fix the HAVE_GETCWD_NULL code to behave more like the
28227         !HAVE_GETCWD_NULL code used to.
28228
28229         Include "xalloc.h".
28230         (xgetcwd): Do not return NULL when memory is exhausted; instead,
28231         invoke xalloc_die.
28232
28233 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28234
28235         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
28236         sys/param.h, as pathmax.h includes them.
28237
28238 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28239
28240         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
28241         (jm_PREREQ_XGETCWD): New macro.
28242
28243         * m4/getcwd.m4: New file.
28244
28245 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28246
28247         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
28248         like the HAVE_GETCWD_NULL code.
28249         Include pathmax.h if not HAVE_GETCWD.
28250         Do not include xalloc.h.
28251         (INITIAL_BUFFER_SIZE): New symbol.
28252         Do not use xmalloc / xrealloc, since the caller is responsible for
28253         handling errors.  Preserve errno around `free' during failure.
28254         Do not overrun buffer when using getwd.
28255
28256 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28257
28258         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
28259         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
28260         getcwd (NULL, 0).
28261
28262 2001-09-03  Paul Eggert  <eggert@twinsun.com>
28263
28264         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
28265         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
28266         spotted by Jim Meyering.
28267
28268 2001-09-03  Jim Meyering  <meyering@lucent.com>
28269
28270         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
28271         failure.
28272
28273 2001-09-02  Jim Meyering  <meyering@lucent.com>
28274
28275         * lib/error.c: Update from GNU libc.
28276
28277 2001-09-01  Jim Meyering  <meyering@lucent.com>
28278
28279         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
28280         Used by df.
28281
28282 2001-09-01  Jim Meyering  <meyering@lucent.com>
28283
28284         * lib/xreadlink.c: New file.
28285         * lib/xreadlink.h: New file.
28286         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
28287         xreadlink.h.
28288
28289         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
28290         doesn't conflict with sparc Solaris 7's definition in
28291         /usr/include/sys/int_types.h.
28292
28293         * lib/exclude.c: Use `""', not `<>' to #include non-system header
28294         files.
28295         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
28296         and strncasecmp as r-values.  Unixware didn't have declarations.
28297
28298 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28299
28300         * lib/xstrtol.h: Add copyright notice.
28301         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
28302         LONGINT_INVALID_SUFFIX_CHAR.
28303
28304 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28305
28306         * lib/xstrtol.c (strtoimax): New decl.
28307
28308 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28309
28310         * lib/xgetcwd.c: Don't include pathmax.h.
28311         Include stdlib.h and unistd.h if available.
28312         Include xalloc.h.
28313         (xmalloc, xstrdup, free): Remove decls.
28314         (xgetcwd): Don't assume sizes fit in unsigned.
28315         Check for overflow when computing sizes.
28316         Simplify reallocation code.
28317
28318 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28319
28320         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
28321         a directory's st_size can have an arbitrary value, so the old
28322         usage could waste an arbitrary amount of memory.  All uses
28323         changed.
28324         * lib/savedir.h: Update prototype.
28325
28326 2001-08-31  Paul Eggert  <eggert@twinsun.com>
28327
28328         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
28329
28330         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
28331         old strtoimax.c.
28332
28333         Also, make the following further changes to make this file's
28334         configuration more similar to that of strtol.c:
28335         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
28336         (strtoumax, uintmax_t, strtoull, strtol): Remove.
28337         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
28338         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
28339         changed to signed values.
28340
28341         And make the following changes as well:
28342         Fix copyright notice, as 1999 was missing.
28343         (verify): New macro.
28344         (strtoimax): Check sizes at compile-time, not run-time.
28345         Prefer strtol to strtoll if both work.
28346         (main): Remove; it was not that useful and was a pain to maintain.
28347
28348         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
28349
28350 2001-08-31  Jim Meyering  <meyering@lucent.com>
28351
28352         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
28353         Use an initial, malloc'd, buffer of length 128 rather than
28354         a statically allocated one of length 1024.
28355
28356 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28357
28358         Simplify code, partly by assuming autoconf 2.52 semantics.
28359
28360         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
28361
28362         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
28363         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
28364         All uses removed.
28365         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
28366         Move AC_REQUIRE to next-to-top level, to avoid confusion.
28367         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
28368         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
28369         jm_AC_HEADER_INTTYPES_H.
28370         * m4/jm-macros.m4 (jm_MACROS): Likewise.
28371
28372         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
28373
28374         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
28375         Quote first arg of AC_DEFUN.
28376         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
28377         since they are needed to parse the include file even if we need
28378         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
28379         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
28380         but with opposite signedness.
28381
28382 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28383
28384         Merge 'exclude' changes from tar 1.13.22.
28385         This fixes one or two unlikely storage allocation overflow bugs,
28386         but doesn't change user-visible behavior otherwise.
28387
28388 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28389
28390         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
28391         (jm_PREREQ_EXCLUDE): New macro.
28392
28393 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28394
28395         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
28396         tm to be declared.
28397
28398 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28399
28400         * lib/hash.c: Remove '2001' from copyright notice.
28401
28402 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28403
28404         * lib/full-write.h: New file.
28405         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
28406         * lib/full-write.c: Correct credits, as cccp.c no longer
28407         exists and anyway it was so heavily changed from the old cccp
28408         code as to be unrecognizable.  Include full-write.h.
28409         (full_write) Return size_t, with short writes meaning failure.
28410         All callers changed.  This fixes a bug with large buffers
28411         on 64-bit hosts.
28412         * lib/utime.c: Include full-write.h.
28413
28414 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28415
28416         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
28417         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
28418         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
28419         Include if available.
28420         (<xalloc.h>): Include
28421         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
28422         (verify): New macro.  Use it to verify that EXCLUDE macros do not
28423         collide with FNM macros.
28424         (struct patopts): New struct.
28425         (struct exclude): Use it, as exclude patterns now come with options.
28426         (new_exclude): Support above changes.
28427         (new_exclude, add_exclude_file):
28428         Initial size must now be a power of two to simplify overflow checking.
28429         (free_exclude, fnmatch_no_wildcards): New function.
28430         (excluded_filename): No longer requires options arg, as the options
28431         are determined by add_exclude.  Now returns bool, not int.
28432         (excluded_filename, add_exclude):
28433         Add support for the fancy new exclusion options.
28434         (add_exclude, add_exclude_file): Now takes int options arg.
28435         Check for arithmetic overflow when computing sizes.
28436         (add_exclude_file): xrealloc might modify errno, so don't
28437         realloc until after errno might be used.
28438
28439         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
28440         New macros.
28441         (free_exclude): New decl.
28442         (add_exclude, add_exclude_file): Now takes int options arg.
28443         (excluded_filename): No longer requires options arg, as the options
28444         are determined by add_exclude.  Now returns bool, not int.
28445
28446 2001-08-30  Paul Eggert  <eggert@twinsun.com>
28447
28448         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
28449
28450 2001-08-27  Jim Meyering  <meyering@lucent.com>
28451
28452         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
28453
28454         * lib/version-etc.c (N_): Remove definition.
28455         Revert most of last change.
28456         Instead, simply don't mark the `Copyright...' string for translation.
28457         Based on advice from Paul Eggert.
28458
28459         * lib/strtoxmax.c: Tweak comment.
28460
28461 2001-08-26  Jim Meyering  <meyering@lucent.com>
28462
28463         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
28464
28465         * m4/xstrtoimax.m4: New file.
28466         * m4/xstrtoumax.m4: Add comments explaining why we
28467         AC_REPLACE_FUNCS(strtol).
28468
28469 2001-08-26  Jim Meyering  <meyering@lucent.com>
28470
28471         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
28472         of copyright with `%s' so translators don't get an untranslated
28473         message in 2002.
28474         (COPYRIGHT_YEAR): Define.
28475         (version_etc): Use fprintf rather than fputs.
28476         Suggestion from Ulrich Drepper.
28477
28478         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
28479
28480         * lib/strtoll.c: New file, from GNU libc.
28481         * lib/xstrtoimax.c: New file.
28482
28483         * lib/xstrtol.h: Add xstrtoimax.
28484         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
28485         * lib/strtoimax.c: New file.  Likewise, but first define
28486         STRTOUXMAX_SIGNED.
28487
28488         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
28489         ...
28490         * lib/strtoxmax.c: ... then renamed to this.
28491
28492 2001-08-18  Paul Eggert  <eggert@twinsun.com>
28493
28494         * m4/inttypes.m4: Add AC_PREREQ(2.13).
28495         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
28496         (jm_AC_TYPE_INTMAX_T): New macro.
28497         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
28498
28499         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
28500
28501         * m4/longlong.m4: Renamed from ulonglong.m4.
28502         * m4/inttypes.m4: Renamed from inttypes_h.m4.
28503         * m4/uintmax_t.m4: Removed.
28504
28505 2001-08-13  Paul Eggert  <eggert@twinsun.com>
28506
28507         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
28508         Port to Solaris 8, where 'sed' requires a space after the 'r'
28509         command, and where sh dislikes "$/".  Clean up the spacing a bit.
28510         Redirect output to $tmp just once.
28511
28512 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
28513
28514         * lib/addext.c (<errno.h>): Include.
28515         (errno): Declare if not defined.
28516         (addext): Work correctly when pathconf returns -1 and leaves
28517         errno alone because there is no limit.  Also, work even if
28518         pathconf returns a value greater than SIZE_MAX.
28519
28520 2001-08-12  Jim Meyering  <meyering@lucent.com>
28521
28522         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
28523         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
28524         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
28525         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
28526         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
28527         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
28528         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
28529         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
28530         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
28531         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
28532         utime.m4, utimes.m4, xstrtoumax.m4:
28533         Quote the first argument in each use of AC_DEFUN.
28534
28535 2001-08-12  Jim Meyering  <meyering@lucent.com>
28536
28537         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
28538         Simply `return getcwd (NULL, 0);'.
28539         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
28540         Use 1300 as initial value for length, not PATH_MAX.
28541
28542         * lib/pathmax.h: Clean up cpp syntax.
28543
28544 2001-08-12  Jim Meyering  <meyering@lucent.com>
28545
28546         * lib/gettimeofday.c: New file.
28547         * lib/gtod.h: New file.
28548         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
28549
28550 2001-08-05  Jim Meyering  <meyering@lucent.com>
28551
28552         * m4/jm-macros.m4: Require autoconf-2.52.
28553
28554 2001-08-04  Jim Meyering  <meyering@lucent.com>
28555
28556         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
28557         stmt, to get in sync with glibc.
28558
28559 2001-08-03  Paul Eggert  <eggert@twinsun.com>
28560
28561         The following changes are from gettext 0.10.39 as maintained by
28562         Bruno Haible.
28563
28564         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
28565         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
28566         with inverted sense.  All uses changed.
28567
28568         * lib/mbswidth.c: Don't include <limits.h>.
28569         Include <stdlib.h> and <string.h> unconditionally.
28570         (iswcntrl, mbsinit, ISCNTRL): New macros.
28571         (mbsnwidth): Use K&R style function declarations.
28572         Don't bother checking for MB_LEN_MAX == 1, since the compiler
28573         can optimize it when MB_CUR_MAX == 1.
28574         The width of control characters is zero, not 1.
28575
28576 2001-08-03  Paul Eggert  <eggert@twinsun.com>
28577
28578         The following changes are from gettext 0.10.39 as maintained by
28579         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
28580
28581         * m4/codeset.m4: Upgrade to serial AM1.
28582         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
28583         all uses changed.  Quote first arg of AC_DEFUN.
28584         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
28585
28586         * m4/iconv.m4: Upgrade to serial AM2.
28587         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
28588         Add --with-libconv-prefix.
28589         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
28590         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
28591         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
28592         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
28593         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
28594
28595         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
28596         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
28597         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
28598         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
28599         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
28600         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
28601         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
28602         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
28603         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
28604
28605         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
28606         string.h any more.
28607
28608         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
28609         not the default value.
28610
28611         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
28612         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
28613         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
28614         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
28615         Also check for iswcntrl, used for wcwidth fallback.
28616         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
28617         to Autoconf 2.13.
28618
28619 2001-08-03  Jim Meyering  <meyering@lucent.com>
28620
28621         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
28622         as it was in the original.  Reported by Paul Eggert.
28623
28624 2001-07-16  Jim Meyering  <meyering@lucent.com>
28625
28626         * m4/gettimeofday.m4: New file.
28627         Prompted by a report from Bernhard Baehr.
28628
28629 2001-07-15  Jim Meyering  <meyering@lucent.com>
28630
28631         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
28632         stuff. Now it's in ../Makefile.cfg.
28633
28634 2001-07-15  Jim Meyering  <meyering@lucent.com>
28635
28636         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
28637         (BUILT_SOURCES): Add unlocked-io.h.
28638         (io_functions): Define.
28639         (unlocked-io.h): New rule.
28640         (DISTCLEANFILES): Add unlocked-io.h.
28641         (all-local): Depend on unlocked-io.h, to ensure it is created.
28642
28643         * lib/unlocked-io.hin: New file
28644
28645         * lib/regex.c: Update from glibc.
28646
28647 2001-07-05  Jim Meyering  <meyering@lucent.com>
28648
28649         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
28650         recommendation.
28651         (libfetish_a_SOURCES): Put all .h files here instead.
28652         Remove a thus-exposed (better checks in automake) duplicate and
28653         two unnecessary .h files.
28654
28655 2001-07-04  Jim Meyering  <meyering@lucent.com>
28656
28657         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
28658         that generates jm-glibc-io.m4 so that it doesn't trigger any make
28659         distcheck failure.
28660
28661 2001-07-02  Jim Meyering  <meyering@lucent.com>
28662
28663         The following changes were prompted by suggestions from Bruno Haible.
28664
28665         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
28666         is now generated.
28667         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
28668         definition of EXTRA_DIST.
28669         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
28670         ensure that the generated file is created/updated whenever the list
28671         of $(unlocked_functions) is changed.
28672         (jm-glibc-io.m4): New rule.
28673         (unlocked-io.h): New rule -- currently unused.
28674
28675 2001-06-24  Jim Meyering  <meyering@lucent.com>
28676
28677         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
28678         unmatched right bracket, rather than kludging it with an extra,
28679         falsely-matching quote in a comment.  Patch by Akim Demaille.
28680
28681 2001-06-11  Jim Meyering  <meyering@lucent.com>
28682
28683         * lib/regex.c: Update from GNU libc.
28684
28685 2001-05-27  Jim Meyering  <meyering@lucent.com>
28686
28687         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
28688         Check for ut_type in struct utmp.
28689
28690 2001-05-27  Jim Meyering  <meyering@lucent.com>
28691
28692         * lib/readutmp.h (UT_TYPE): Define.
28693
28694 2001-05-24  Jim Meyering  <meyering@lucent.com>
28695
28696         * lib/argmatch.c: Include "quote.h".
28697         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
28698         quote function.  Reported by Göran Uddeborg.
28699
28700 2001-05-22  Jim Meyering  <meyering@lucent.com>
28701
28702         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
28703         now that we use the package-supplied version unconditionally.
28704         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
28705
28706 2001-05-21  Jim Meyering  <meyering@lucent.com>
28707
28708         * m4/regex.m4: Change a couple backticks to single quotes to avoid
28709         shell syntax errors.
28710
28711 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
28712
28713         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
28714
28715 2001-05-20  Paul Eggert  <eggert@twinsun.com>
28716
28717         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
28718         Don't bother to check library strftime, since
28719         we'll be using our own my_strftime function anyway.
28720         Define my_strftime instead of strftime.
28721
28722 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
28723
28724         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
28725         which is not yet declared.
28726
28727 2001-05-15  Jim Meyering  <meyering@lucent.com>
28728
28729         * m4/regex.m4: Use proper quoting so brackets appear in the test
28730         program.
28731         Reported by, and with help from, Bruno Haible.
28732
28733 2001-05-13  Jim Meyering  <meyering@lucent.com>
28734
28735         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
28736         undefined.
28737
28738 2001-05-11  Paul Eggert  <eggert@twinsun.com>
28739
28740         dirname code cleanup.  base_name now behaves more compatibly
28741         with POSIX basename when given file names that have trailing
28742         slashes, and similarly for dir_name.  Add new primitives
28743         base_len and dir_len.  Put the directory-name-related decls
28744         into dirname.h.
28745
28746         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
28747         * lib/backupfile.c (base_name): Likewise.
28748         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
28749         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
28750         * lib/makepath.c (strip_trailing_slashes): Likewise.
28751         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
28752         ISSLASH): Likewise.
28753         * lib/rename.c (strip_trailing_slashes): Likewise.
28754         * lib/same.c (base_name): Likewise.
28755         * lib/stripslash.c (ISSLASH): Likewise.
28756
28757         * lib/addext.c: Include <dirname.h> after size_t is defined.
28758         * lib/backupfile.c: Likewise.
28759
28760         * lib/addext.c (addext): Use base_len to trim redundant
28761         trailing slashes instead of doing it ourselves.
28762         But do not trim the last slash if it is not redundant.
28763
28764         * lib/backupfile.c (find_backup_file_name,
28765         max_backup_version): Use base_len instead of rolling it ourselves.
28766         Handle the case of "" and (on DOS) "C:" correctly.
28767
28768         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
28769         needed. Include <string.h>, <dirname.h>.
28770         (base_name): Allow file names ending in slashes, other than names
28771         that are all slashes.  In this case, return the basename followed
28772         by the slashes.  This is more general, and can be used in places
28773         where the original base_name purposely had an assertion failure.
28774         (base_len): New function.
28775
28776         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
28777         Do not include <assert.h>; no longer needed.
28778         Include xalloc.h.
28779         (memrchr): Remove decl.
28780         (dir_name_r): Remove.
28781         (dir_len): Renamed from dirlen.  All callers changed.
28782         Rewrite in terms of base_name, for simplicity and consistency.
28783         (dir_name): Never return NULL.  All callers changed.
28784         Do not include <stdlib.h> in test program; no longer needed.
28785         return 0; is fine for test program.
28786
28787         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
28788         New macros.
28789         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
28790
28791         * lib/path-concat.c (path_concat): Use base_len to compute
28792         base length, not strlen; this means we cannot rely on memcpy
28793         to null-terminate.
28794
28795         * lib/same.c (STREQ): Remove.
28796         (same_name): Handle the case where the basename ends in trailing '/'.
28797
28798         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
28799         a slash was stripped.  Do not strip the last slash after a
28800         file system prefix.
28801
28802 2001-05-11  Paul Eggert  <eggert@twinsun.com>
28803
28804         * lib/Makefile.am (libfetish_a_SOURCES):
28805         Add strftime.c, since we now compile it on all hosts.
28806
28807         * lib/strftime.c (my_strftime):
28808         Define to nstrftime if emacs, but only if my_strftime is not defined.
28809         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
28810         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
28811         Add one more extra argument: a nanoseconds value.
28812         All uses changed.
28813         (ns): New macro.
28814         (my_strftime function): Add %N format.
28815         (emacs_strftimeu): Renamed from emacs_strftime,
28816         with extra ut argument.
28817
28818 2001-05-09  Paul Eggert  <eggert@twinsun.com>
28819
28820         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
28821
28822 2001-04-21  Jim Meyering  <meyering@lucent.com>
28823
28824         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
28825         doesn't interfere.
28826
28827 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
28828
28829         * m4/ftruncate.m4: Check for chsize.
28830         Link with ftruncate.o unconditionally if ftruncate is missing.
28831         This was required when cross-compiling to i586-mingw32msvc.
28832
28833 2001-04-08  Jim Meyering  <meyering@lucent.com>
28834
28835         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
28836         recomputed; that's necessary when the offset spans a DST transition.
28837         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
28838
28839 2001-04-02  Jim Meyering  <meyering@lucent.com>
28840
28841         * lib/regex.h, regex.c: Update from GNU libc.
28842
28843 2001-03-24  Jim Meyering  <meyering@lucent.com>
28844
28845         * m4/jm-macros.m4: Require autoconf-2.49d.
28846
28847 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
28848
28849         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
28850
28851 2001-03-19  Paul Eggert  <eggert@twinsun.com>
28852
28853         * lib/version-etc.c (version_etc_copyright): Update to 2001.
28854
28855 2001-03-17  Jim Meyering  <meyering@lucent.com>
28856
28857         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
28858         now that the version in autoconf is equivalent.
28859         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
28860
28861         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
28862         Suggestion from Akim Demaille.
28863
28864         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
28865         (jm_PREREQ_TEMPNAME): New function.
28866
28867 2001-03-16  Paul Eggert  <eggert@twinsun.com>
28868
28869         * lib/tempname.c (uint64_t): Define to uintmax_t if
28870         not defined, and if UINT64_MAX is not defined.
28871         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
28872         Reported by John David Anglin.
28873
28874 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
28875
28876         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
28877         resolve alias if codeset is empty.
28878         * lib/config.charset (BeOS): Use wildcard syntax.
28879
28880 2001-03-13  Jim Meyering  <meyering@lucent.com>
28881
28882         * lib/path-concat.c (path_concat)
28883         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
28884         concatenating e.g., `C:' and `foo'.
28885         From Bruno Haible.
28886
28887 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
28888
28889         * lib/localcharset.c (locale_charset): Don't use
28890         setlocale(LC_CTYPE,NULL). Don't return NULL.
28891         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
28892
28893 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
28894
28895         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
28896         support for DOS/DJGPP.
28897
28898 2001-03-01  Paul Eggert  <eggert@twinsun.com>
28899
28900         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
28901         lacks mkstemp.  Compile our own tempname.c if we compile our own
28902         mkstemp.c, as mkstemp relies on tempname.
28903
28904 2001-03-01  Jim Meyering  <meyering@lucent.com>
28905
28906         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
28907         AH_VERBATIM really does output its argument verbatim.
28908
28909 2001-02-28  Paul Eggert  <eggert@twinsun.com>
28910
28911         * lib/Makefile.am (libfetish_a_SOURCES):
28912         Add dup-safer.c, fopen-safer.c.
28913         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
28914
28915         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
28916         * lib/unistd-safer.h: New files.
28917
28918 2001-02-25  Paul Eggert  <eggert@twinsun.com>
28919
28920         The mkstemp replacement is taken from glibc 2.2.2, with some
28921         portability fixes for use outside glibc, as follows:
28922
28923         * lib/tempname.c (struct_stat64): New macro.
28924         (direxists, __gen_tempname): Use it.
28925         This avoids a portability problem with Solaris 8.
28926
28927         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
28928         (<stddef.h>, <stdint.h>, <string.h>):
28929         Include only if STDC_HEADERS || _LIBC.
28930         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
28931         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
28932         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
28933         (__set_errno): Define this macro if <errno.h> doesn't.
28934         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
28935         Define these macros if <stdio.h> doesn't.
28936         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
28937         Define these macros if <sys/stat.h>
28938         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
28939         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
28940         __xstat64): Define if not _LIBC.
28941         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
28942         (__gen_tempname): Invoke gettimeofday only if
28943         HAVE_GETTIMEOFDAY || _LIBC;
28944         otherwise, fall back on plain "time".
28945         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
28946
28947         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
28948
28949         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
28950
28951 2001-02-18  Paul Eggert  <eggert@twinsun.com>
28952
28953         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
28954
28955 2001-02-17  Paul Eggert  <eggert@twinsun.com>
28956
28957         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
28958         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
28959         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
28960         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28961
28962 2001-02-17  Paul Eggert  <eggert@twinsun.com>
28963
28964         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
28965         Remove workaround macros for hosts that have mbrtowc but not
28966         mbstate_t, as we now insist on proper declarations for both
28967         before using mbrtowc.
28968
28969 2001-02-17  Jim Meyering  <meyering@lucent.com>
28970
28971         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
28972         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
28973         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
28974         UnixWare 7.1.1.
28975
28976         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
28977         rather than AC_CACHE_VAL.
28978
28979 2001-02-17  Jim Meyering  <meyering@lucent.com>
28980
28981         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
28982         around included file name.
28983
28984         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
28985
28986         * lib/strftime.c: Update from GNU libc (the only changes were to
28987         comments).
28988
28989 2001-02-17  Jim Meyering  <meyering@lucent.com>
28990
28991         * lib/regex.c: Update from libc.
28992
28993 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
28994
28995         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
28996         clash.
28997
28998 2001-02-16  Paul Eggert  <eggert@twinsun.com>
28999
29000         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
29001         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
29002         Reported by Mark Hounschell via Paul Eggert.
29003
29004 2001-02-07  Jim Meyering  <meyering@lucent.com>
29005
29006         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
29007
29008 2001-02-05  Jim Meyering  <meyering@lucent.com>
29009
29010         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
29011         it includes the patch required for `large file' support with at least
29012         HP-UX's 10.20 /bin/cc.
29013
29014 2001-02-03  Jim Meyering  <meyering@lucent.com>
29015
29016         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
29017         AS_IF, now that it works once again (mysteriously).
29018         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29019
29020 2001-01-30  Jim Meyering  <meyering@lucent.com>
29021
29022         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
29023         * m4/chown.m4: Rename conftestchown to conftest.chown.
29024         * m4/rename.m4: s/conftestdir/conftest.d1/ and
29025         s/conftestdir2/conftest.d2/.
29026         * m4/utimes.m4: s/conftestdata/conftest.data/
29027         Inspired by Pavel Roskin's change in autoconf.
29028
29029 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
29030
29031         * lib/config.charset: Update for FreeBSD 4.2.
29032
29033 2001-01-27  Jim Meyering  <meyering@lucent.com>
29034
29035         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
29036         a use of AS_IF.
29037         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
29038
29039 2001-01-26  Jim Meyering  <meyering@lucent.com>
29040
29041         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
29042         quotearg.c includes it.
29043
29044 2001-01-26  Jim Meyering  <meyering@lucent.com>
29045
29046         * lib/quotearg.c: Include stddef.h.
29047         * lib/quote.c: Include stddef.h.
29048         Reported by Axel Kittenberger.
29049
29050         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
29051         line in double quotes so that it evokes a better diagnostic.
29052         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
29053         Reported by Axel Kittenberger.
29054
29055 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
29056
29057         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
29058         as if it was a `charset'.
29059
29060 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29061
29062         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
29063         has const.
29064
29065 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
29066
29067         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
29068         to avoid a warning.  Add back 'const' to inptr.
29069
29070 2001-01-20  Jim Meyering  <meyering@lucent.com>
29071
29072         Be sure that headers are checked before used in code compiled
29073         for the type checks.
29074         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
29075         In place of that, invoke jm_CHECK_ALL_TYPES.
29076         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
29077         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
29078         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
29079         The check for ssize_t was mistakenly run before the test for unistd.h.
29080
29081         The configure-time check for stdbool.h was missing.
29082         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
29083         (jm_PREREQ_HASH): New function.
29084
29085 2001-01-17  Jim Meyering  <meyering@lucent.com>
29086
29087         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
29088         for autoconf-2.49c.
29089         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
29090
29091 2001-01-16  Jim Meyering  <meyering@lucent.com>
29092
29093         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
29094         From Bruno Haible.
29095
29096 2001-01-14  Jim Meyering  <meyering@lucent.com>
29097
29098         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
29099         foo and bar.  Create conftestdir/ in the script, not in the C code.
29100         Remove directories in the script, not in the C code.
29101         Remove conftestdir{,2} before trying to create the directory.
29102         Make the entire configure script fail if the mkdir fails.
29103
29104 2001-01-14  Jim Meyering  <meyering@lucent.com>
29105
29106         * lib/rename.c: New file.  From Volker Borchert.
29107         Include stdlib.h, string.h or strings.h, and xalloc.h.
29108         Use strip_trailing_slashes rather than open-coding it.
29109
29110 2001-01-03  Paul Eggert  <eggert@twinsun.com>
29111
29112         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
29113
29114 2001-01-03  Jim Meyering  <meyering@lucent.com>
29115
29116         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
29117         of local `inptr' to avoid warning with some system declarations of
29118         iconv.
29119
29120 2001-01-02  Volker Borchert  <bt@teknon.de>
29121
29122         * m4/rename.m4: New file.
29123         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
29124
29125 2001-01-01  Jim Meyering  <meyering@lucent.com>
29126
29127         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
29128         even on systems with utmpx.h.  It's necessary for the declaration of
29129         utmp's ut_user member.  Reported by Andreas Jaeger.
29130
29131         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
29132         available. They are required for the declarations of getgrgid and
29133         getpwuid resp.
29134         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
29135         Reported by Andreas Jaeger.
29136
29137 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
29138
29139         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
29140         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
29141         so `make install' also works in VPATH builds.
29142
29143 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
29144
29145         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
29146         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
29147         can be used in subdirectories.
29148
29149 2000-12-29  Paul Eggert  <eggert@twinsun.com>
29150
29151         * lib/modechange.c: Do not assume that mode_t uses the
29152         traditional octal encoding.  E.g. "chmod 1 FOO" should set
29153         the other-execute bit of FOO even if S_IXOTH != 1.
29154
29155         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
29156         WOTH, XOTH, ALLM): New macros.
29157         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
29158          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
29159         Use them.
29160         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
29161         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
29162         (mode_compile):
29163         No need to use uintmax_t; unsigned long is long enough.
29164         Don't bother to get suffix since we don't use it.
29165
29166 2000-12-26  Jim Meyering  <meyering@lucent.com>
29167
29168         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
29169         better with autoheader.
29170
29171 2000-12-24  Jim Meyering  <meyering@lucent.com>
29172
29173         * lib/hash.c (is_prime): Return explicit boolean values.
29174         (hash_get_first): Return NULL to appease Irix5.6's 89.
29175         Reported by Nelson Beebe.
29176
29177 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
29178
29179         * lib/localcharset.c (locale_charset): Add support for Win32.
29180
29181 2000-12-18  Paul Eggert  <eggert@twinsun.com>
29182
29183         * lib/physmem.h, lib/physmem.c: New files.
29184
29185         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
29186         (noinst_HEADERS): Add physmem.h.
29187
29188         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
29189         't' for compatibility with Solaris 8 sort.
29190
29191 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
29192
29193         * lib/config.charset: Add support for BeOS.
29194
29195 2000-12-17  Jim Meyering  <meyering@lucent.com>
29196
29197         * m4/dos.m4 (jm_AC_DOS): New file and macro.
29198         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
29199
29200 2000-12-16  Jim Meyering  <meyering@lucent.com>
29201
29202         This bug had a serious impact on chown: `chown N:M FILE' (for integer
29203         N and M) would have treated it like `chown N:N FILE'.
29204
29205         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
29206
29207 2000-12-16  Jim Meyering  <meyering@lucent.com>
29208
29209         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
29210         SHELLS_FILE to a file name that's useful on djgpp systems.
29211         Include stdlib.h.
29212         (ADDITIONAL_DEFAULT_SHELLS): Define.
29213         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
29214         Based mostly on a patch from Prashant TR.
29215
29216 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
29217
29218         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
29219         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
29220         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
29221
29222 2000-12-08  Andreas Schwab  <schwab@suse.de>
29223
29224         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
29225         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
29226
29227 2000-12-07  Jim Meyering  <meyering@lucent.com>
29228
29229         * lib/stripslash.c (ISSLASH): Define.
29230         (strip_trailing_slashes): Use ISSLASH rather than comparing against
29231         `/'.
29232         From Prashant TR.
29233
29234         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
29235         (dir_name_r): Declare this function as static.
29236         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
29237         manifest itself on a name containing a mix of slashes and
29238         backslashes.
29239         Make this function work with names starting with a DOS-style
29240         drive letter and colon prefix.
29241         (dir_name): Append `.' if necessary.
29242         Based mostly on patches from Prashant TR and Eli Zaretskii.
29243
29244         * lib/dirname.h (dir_name_r): Remove prototype.
29245
29246 2000-12-06  Paul Eggert  <eggert@twinsun.com>
29247
29248         * m4/off_t-format.m4: Remove this file.
29249         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
29250
29251 2000-12-06  Jim Meyering  <meyering@lucent.com>
29252
29253         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
29254         replacement strtoull, we may well need the replacement strtoul, too.
29255         Check for declarations of strtoul and strtoull.
29256         Check for strtol.  Mainly as a cue to cause automake to include
29257         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
29258         Check for limits.h -- strtol.c needs it.
29259
29260 2000-12-05  Jim Meyering  <meyering@lucent.com>
29261
29262         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
29263
29264 2000-12-04  Jim Meyering  <meyering@lucent.com>
29265
29266         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
29267         Also include memory.h, stdlib.h, unistd.h if appropriate.
29268         Reported by Andreas Jaeger (conflicting declaration of malloc).
29269
29270 2000-12-02  Jim Meyering  <meyering@lucent.com>
29271
29272         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
29273         * m4/jm-macros.m4 (jm_MACROS): require it.
29274
29275 2000-12-02  Jim Meyering  <meyering@lucent.com>
29276
29277         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
29278
29279 2000-12-01  Paul Eggert  <eggert@twinsun.com>
29280
29281         * lib/memrchr.c: Include <config.h> before any system include file.
29282
29283 2000-11-30  Jim Meyering  <meyering@lucent.com>
29284
29285         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
29286
29287 2000-11-30  Jim Meyering  <meyering@lucent.com>
29288
29289         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
29290
29291 2000-11-29  Paul Eggert  <eggert@twinsun.com>
29292
29293         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
29294
29295 2000-11-26  Jim Meyering  <meyering@lucent.com>
29296
29297         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
29298
29299 2000-11-22  Paul Eggert  <eggert@twinsun.com>
29300
29301         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
29302         size of (size_t) -1; it's not portable.
29303
29304 2000-11-17  Jim Meyering  <meyering@lucent.com>
29305
29306         * lib/strstr.c: Update from GNU libc.
29307
29308 2000-11-17  Akim Demaille  <akim@epita.fr>
29309
29310         * lib/obstack.h: Formatting changes.
29311         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
29312         prevent type checking.
29313         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
29314         cast the value to (void *): assigning a `foo *' to a `void *'
29315         variable is valid.
29316         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
29317
29318 2000-11-16  Jim Meyering  <meyering@lucent.com>
29319
29320         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
29321
29322 2000-11-11  Jim Meyering  <meyering@lucent.com>
29323
29324         * lib/error.c: Add a couple #includes, merging from GNU libc version.
29325
29326 2000-11-10  Jim Meyering  <meyering@lucent.com>
29327
29328         * lib/obstack.h: Update from GNU libc.
29329         * lib/obstack.c: Likewise.
29330
29331 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
29332
29333         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
29334
29335 2000-11-06  Paul Eggert  <eggert@twinsun.com>
29336
29337         * lib/getusershell.c (setusershell): Use rewind rather than
29338         fseek/fseeko, to avoid configuration hassles with fseeko.
29339         Don't bother opening SHELLS_FILE if shellstream is NULL;
29340         it's not necessary.
29341
29342 2000-11-05  Jim Meyering  <meyering@lucent.com>
29343
29344         * lib/makepath.h (make_dir): Declare.
29345         * lib/makepath.c (make_dir): Remove `static' attribute.
29346         Tweak a comment.
29347
29348 2000-11-04  Jim Meyering  <meyering@lucent.com>
29349
29350         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
29351
29352 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
29353
29354         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
29355         last one in a bucket, advance to the next bucket.
29356
29357 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
29358
29359         * lib/fnmatch.c: Do not comment out all the code if we are using
29360         the GNU C library, because in some cases we are replacing buggy
29361         code in the GNU C library itself.
29362
29363 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
29364
29365         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
29366         (regex_compile): Catch bogus \(\1\).
29367
29368 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29369
29370         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
29371         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
29372         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
29373
29374 2000-10-30  Paul Eggert  <eggert@twinsun.com>
29375
29376         * lib/error.h, getline.h, modechange.h:
29377         Remove "2000" from Copyright line, as the file hasn't been
29378         changed this year other than in the copyright notice.
29379
29380         * lib/xalloc.h: Add "2000" to Copyright line, as this file
29381         was changed this year.
29382
29383 2000-10-29  Jim Meyering  <meyering@lucent.com>
29384
29385         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
29386         renaming.
29387         * m4/ls-mntd-fs.m4: Likewise
29388
29389 2000-10-29  Jim Meyering  <meyering@lucent.com>
29390
29391         * lib/xstat.in: Fix grammar in comment.
29392
29393 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
29394
29395         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
29396         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
29397         doesn't define __restrict_arr.
29398
29399 2000-10-28  Jim Meyering  <meyering@lucent.com>
29400
29401         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
29402         (jm_PREREQ_MEMCHR): New function.
29403
29404 2000-10-28  Jim Meyering  <meyering@lucent.com>
29405
29406         * lib/memchr.c: Update from libc.
29407         Adjust for portability:
29408         [HAVE_STDLIB_H]: Include stdlib.h.
29409         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
29410         Undef __memchr, too.
29411         [!weak_alias]: Define __memchr to memchr.
29412
29413         * lib/regex.c: Update from libc.
29414         * lib/regex.h: Likewise.
29415         * lib/getopt1.c: Likewise.
29416         * lib/memcmp.c: Likewise.
29417
29418         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
29419         Avoid using fseek, when possible -- it's broken by design.
29420         Patch by Ulrich Drepper.
29421
29422 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
29423
29424         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
29425         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
29426         Giving in to popular pressure to shut up the compiler with casts.
29427
29428 2000-10-26  Jim Meyering  <meyering@lucent.com>
29429
29430         * lib/strftime.c: Update from libc.
29431
29432 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
29433
29434         * regex.c: More `unsigned char' -> `re_char' changes.
29435         Also change several `int' into `re_wchar_t'.
29436         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
29437         (PUSH_FAILURE_POINTER): Don't cast any more.
29438         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
29439         We want GCC to complain, since this piece of code makes
29440         re_match non-reentrant, which *should* be fixed.
29441         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
29442         (EXTEND_BUFFER): Use RETALLOC.
29443         (SET_LIST_BIT): Don't cast.
29444         (re_wchar_t): New type.
29445         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
29446         that those two functions will always properly return.
29447         (IMMEDIATE_QUIT_CHECK): Cast to void.
29448         (analyse_first): Use recursion rather than an explicit stack.
29449         (re_compile_fastmap): Can't fail anymore.
29450         (re_search_2): Don't check re_compile_fastmap for failure.
29451         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
29452         Now also sets the new value (passed in a new argument).
29453         (re_match_2_internal): Use it.
29454         Also, use a new var `reg' of type size_t when looping through regs
29455         rather than reuse the inappropriate `mcnt'.
29456
29457 2000-10-25  Jim Meyering  <meyering@lucent.com>
29458
29459         * lib/obstack.c: Update from libc.
29460
29461 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
29462
29463         * regex.c (regex_compile): Change the way of handling a range from
29464         a char less than 256 to a char not less than 256.
29465
29466 2000-10-24  Andrew Innes  <andrewi@gnu.org>
29467
29468         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
29469         NT-Emacs only.
29470         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
29471         so that re_search functions only quit when callers expect them to.
29472
29473 2000-10-23  Jim Meyering  <meyering@lucent.com>
29474
29475         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
29476         wrong.  That set_locale call must not have any side effects.
29477         From Paul Eggert.
29478
29479 2000-10-22  Jim Meyering  <meyering@lucent.com>
29480
29481         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
29482         [CYCLIC]: Remove now-unused definition.
29483
29484         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
29485         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
29486         Suggestion from Ulrich Drepper.
29487
29488 2000-10-21  Jim Meyering  <meyering@lucent.com>
29489
29490         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
29491         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
29492         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
29493
29494 2000-10-21  Jim Meyering  <meyering@lucent.com>
29495
29496         * lib/dirname.c (memrchr): Declare if necessary.
29497         (dir_name): Remove the restriction that there be no
29498         trailing slashes.  Now, this code skips past them, effectively
29499         ignoring them.
29500         [TEST_DIRNAME] (main): New unit tests.
29501
29502         * lib/memrchr.c: New file from GNU libc.
29503         Undef __memrchr, too.
29504         [!weak_alias]: Define __memrchr to memrchr.
29505         Guard weak_alias use with `#ifdef weak_alias'.
29506
29507 2000-10-21  Jim Meyering  <meyering@lucent.com>
29508
29509         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
29510         (dir_name): Use dir_name_r.
29511         * lib/dirname.h (dir_name_r): Declare it.
29512
29513 2000-10-17  Jim Meyering  <meyering@lucent.com>
29514
29515         * lib/quote.h (PARAMS): Define and use.
29516         Reported by Akim Demaille.
29517
29518         * lib/getopt.c: Update from libc.
29519
29520 2000-10-16  Jim Meyering  <meyering@lucent.com>
29521
29522         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
29523         setlocale.
29524         From Jan Fedak.
29525
29526 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
29527
29528         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
29529
29530 2000-09-25  Jim Meyering  <meyering@lucent.com>
29531
29532         * lib/md5.h (rol): Define (from GnuPG).
29533
29534         * lib/sha.c: Give credit (GnuPG) where due.
29535         (M): Use rol rather than open-coding it.
29536         Add a FIXME comment.
29537
29538 2000-09-21  Jim Meyering  <meyering@lucent.com>
29539
29540         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
29541         Reported by Michael Stone.
29542
29543 2000-09-20  Jim Meyering  <meyering@lucent.com>
29544
29545         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
29546         (noinst_HEADERS): Add sha.h.
29547         Based on code from Scott G. Miller and from GnuPG.
29548
29549 2000-09-18  Jim Meyering  <meyering@lucent.com>
29550
29551         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
29552         LIBS. Otherwise, everyone ends up linking with -lelf for some
29553         configurations.
29554         Reported by Mike Stone.
29555
29556 2000-09-15  Jim Meyering  <meyering@lucent.com>
29557
29558         * lib/regex.c: Update from libc.
29559
29560 2000-09-10  Jim Meyering  <meyering@lucent.com>
29561
29562         * lib/getopt.c (_getopt_internal): Update from glibc.
29563
29564 2000-09-09  Jim Meyering  <meyering@lucent.com>
29565
29566         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
29567         think it should be used as a general replacement for isascii.
29568         * lib/fnmatch.c: Likewise.
29569         * lib/mbswidth.c: Likewise
29570         * lib/regex.c: Likewise.
29571
29572         Don't use atoi.
29573         * lib/userspec.c: Include sys/param.h and limits.h.
29574         Include xstrtol.h.
29575         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
29576         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
29577         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
29578         UID, GID.  Check range.
29579
29580 2000-09-06  Jim Meyering  <meyering@lucent.com>
29581
29582         * lib/getopt.c (_getopt_internal): Update from glibc.
29583
29584 2000-08-30  Jim Meyering  <meyering@lucent.com>
29585
29586         * lib/strftime.c: Merge in changes from GNU libc.
29587
29588 2000-08-26  Jim Meyering  <meyering@lucent.com>
29589
29590         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
29591         * m4/fpending.m4: New file.
29592
29593 2000-08-26  Jim Meyering  <meyering@lucent.com>
29594
29595         * lib/closeout.c: Include "__fpending.h".
29596         (close_stdout_status): Return right away if there's nothing to flush.
29597
29598         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
29599         * lib/__fpending.c: New file.
29600         * lib/__fpending.h: New file.
29601
29602 2000-08-20  Jim Meyering  <meyering@lucent.com>
29603
29604         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
29605         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
29606         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
29607
29608 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
29609
29610         Improve fileutils installation on systems where running
29611         programs (like install) can't be unlinked.
29612         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
29613         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
29614
29615 2000-08-07  Paul Eggert  <eggert@twinsun.com>
29616
29617         Standardize on "memory exhausted" instead of "Memory exhausted"
29618         or "virtual memory exhausted".
29619         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
29620         "virtual memory exhausted".
29621         * lib/same.c (same_name): Invoke xalloc_die instead of printing
29622         our own message.
29623         * lib/userspec.c (parse_user_spec): Likewise.
29624         * lib/bumpalloc.h: comment fix
29625         * lib/same.c, userspec.c: Include xalloc.h.
29626
29627         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
29628         not char *const and pointing to a constant array.
29629         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
29630         (xrealloc): Comment fix.
29631
29632         * lib/userspec.c (parse_user_spec):
29633         Don't translate a message until just before returning,
29634         to avoid unnecessary translation.
29635
29636 2000-08-07  Jim Meyering  <meyering@lucent.com>
29637
29638         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
29639         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
29640         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
29641         getgroups.c, gethostname.c, getopt.h, group-member.c,
29642         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
29643         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
29644         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
29645         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
29646         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
29647         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
29648         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
29649         yesno.c: Back out Copyright date changes for each file with no change
29650         this year.  This eases coordination with other programs using the same
29651         source code modules.  From Paul Eggert.
29652
29653 2000-08-06  Paul Eggert  <eggert@twinsun.com>
29654
29655         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
29656         not char, for compatibility with glibc 2.1.3 strftime.c.
29657
29658 2000-08-03  Greg McGary  <greg@mcgary.org>
29659
29660         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
29661         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
29662         (EXTEND_BUFFER): Use them.
29663
29664 2000-08-01  Jim Meyering  <meyering@lucent.com>
29665
29666         * lib/dirname.c (ISSLASH): Define.
29667         (BACKSLASH_IS_PATH_SEPARATOR): Define.
29668         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
29669         both `\' and `/' may be use as path separators.
29670         Based on a patch from Prashant TR.
29671
29672 2000-07-31  Paul Eggert  <eggert@twinsun.com>
29673
29674         * lib/quotearg.c (quotearg_n_options): Don't make the initial
29675         slot vector a constant, since it might get modified.
29676
29677 2000-07-31  Jim Meyering  <meyering@lucent.com>
29678
29679         * lib/xmalloc.c: Use `virtual memory exhausted', not
29680         `Memory exhausted'.
29681         * lib/obstack.c (print_and_abort): Likewise.
29682
29683 2000-07-30  Paul Eggert  <eggert@twinsun.com>
29684
29685         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
29686         buffer, so that the caller can always quote one small
29687         component of a "memory exhausted" message in slot 0.
29688         From a suggestion by Jim Meyering.
29689
29690 2000-07-30  Jim Meyering  <meyering@lucent.com>
29691
29692         * lib/makepath.c (make_path): Quote the other instance, too.
29693
29694         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
29695         (STATIC_BUF_SIZE): Define.
29696         (quotearg_n_options): Use only statically allocated storage when
29697         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
29698         than STATIC_BUF_SIZE.
29699
29700 2000-07-29  Jim Meyering  <meyering@lucent.com>
29701
29702         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
29703         * lib/dirname.c (dir_name): Likewise.
29704
29705         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
29706         `/'.
29707
29708         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
29709         (dir_name): Assert that there are no trailing slashes.
29710
29711 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
29712
29713         * lib/mbswidth.h (mbswidth): Add a flags argument.
29714         (mbswidth): New declaration.
29715         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
29716         * lib/mbswidth.c (mbswidth): Add a flags argument.
29717         (mbsnwidth): New function.
29718
29719 2000-07-24  Jim Meyering  <meyering@lucent.com>
29720
29721         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
29722
29723 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29724
29725         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
29726
29727 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29728
29729         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
29730         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
29731         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
29732         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
29733         invoke multibyte primitives.
29734
29735 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29736
29737         * lib/quotearg.c:
29738         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
29739         so that mbstate_t is always defined.
29740
29741         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
29742         be 1 in at least one GCC installation, and this configuration
29743         error is likely to be common.  Ignoring MB_LEN_MAX hurts
29744         performance on hosts that have mbrtowc but have only unibyte
29745         locales, but I assume these hosts are rare.
29746
29747 2000-07-23  Paul Eggert  <eggert@twinsun.com>
29748
29749         * lib/mbswidth.c (_XOPEN_SOURCE):
29750         Don't define; this causes problems on Solaris 7.
29751         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
29752
29753 2000-07-23  Jim Meyering  <meyering@lucent.com>
29754
29755         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
29756         too: getgrgid, getpwuid, getuid.
29757
29758 2000-07-23  Jim Meyering  <meyering@lucent.com>
29759
29760         * lib/basename.c (base_name): Add an assertion.
29761
29762 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
29763
29764         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
29765         shadow its mbsinit function.
29766
29767 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
29768
29769         * lib/mbswidth.h: New file.
29770         * lib/mbswidth.c: New file.
29771         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
29772         (noinst_HEADERS): Add mbswidth.h.
29773
29774 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
29775
29776         * lib/config.charset: Add support for FreeBSD. Improve support for
29777         HP-UX and IRIX 6.
29778
29779 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
29780
29781         * m4/mbswidth.m4: New file.
29782         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
29783
29784 2000-07-15  Jim Meyering  <meyering@lucent.com>
29785
29786         * lib/makepath.c: Include quote.h.
29787         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
29788         corresponding argument in a `quote (...)' call.
29789         Give better diagnostics.
29790
29791         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
29792         (noinst_HEADERS): Add quote.h.
29793
29794         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
29795         from tar's src/misc.c.
29796         * lib/quote.h: New file.  Prototypes for same.
29797
29798 2000-07-14  Paul Eggert  <eggert@twinsun.com>
29799
29800         From a suggestion by Bruno Haible.
29801         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
29802         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
29803         to decide whether to define the BeOS workaround macro;
29804         this adjusts to the change to AC_MBSTATE_T.
29805
29806 2000-07-14  Jim Meyering  <meyering@lucent.com>
29807
29808         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
29809         jm_AC_TYPE_UINTMAX_T.
29810
29811 2000-07-13  Paul Eggert  <eggert@twinsun.com>
29812
29813         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
29814
29815         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
29816         quotearg_buffer_restyled): Add support for
29817         clocale_quoting_style.  Undo previous change to
29818         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
29819         and "{RIGHT QUOTATION MARK}" msgids.
29820
29821 2000-07-10  Paul Eggert  <eggert@twinsun.com>
29822
29823         From a suggestion by Bruno Haible.
29824         * m4/mbstate_t.m4 (AC_MBSTATE_T):
29825         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
29826         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
29827         and mbstate_t, to a single-part test that simply defines mbstate_t.
29828         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
29829         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
29830
29831 2000-07-10  Jim Meyering  <meyering@lucent.com>
29832
29833         * m4/strerror_r.m4: Mirror the correction made in autoconf.
29834
29835         * m4/gnu-source.m4: Output to confdefs.h directly.
29836         Suggestion from Akim Demaille.
29837
29838 2000-07-09  Paul Eggert  <eggert@twinsun.com>
29839
29840         The old behavior of quoting `like this' doesn't look good with
29841         newer, ISO-style fonts.  See:
29842         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
29843
29844         Instead, quote "like this" by default.  Let the translator
29845         tailor the locale-specific quoting behavior by providing
29846         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
29847
29848         * lib/quotearg.c (N_): New macro.
29849         (gettext_default): New function.
29850         (quotearg_buffer_restyled): Use
29851         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
29852         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
29853
29854 2000-07-09  Jim Meyering  <meyering@lucent.com>
29855
29856         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
29857         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
29858
29859         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
29860         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
29861
29862 2000-07-09  Jim Meyering  <meyering@lucent.com>
29863
29864         * lib/Most files: Update copyright dates to include 2000.
29865
29866 2000-07-08  Jim Meyering  <meyering@lucent.com>
29867
29868         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
29869         if not defined.
29870         (xgethostname): Remove now-unnecessary #ifdef.
29871         Move declaration of `err' into loop where it's used.
29872
29873 2000-07-05  Paul Eggert  <eggert@twinsun.com>
29874         and Bruno Haible  <haible@clisp.cons.org>
29875
29876         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
29877         only if the test for an object-type mbstate_t fails.  This
29878         prevents us from mistakenly reporting that mbstate_t is a
29879         system object type after we "#define mbstate_t int" to work
29880         around its lack.
29881
29882 2000-07-05  Paul Eggert  <eggert@twinsun.com>
29883         and Bruno Haible  <haible@clisp.cons.org>
29884
29885         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
29886
29887 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
29888
29889         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
29890         to strerror_r.
29891         Include <ctype.h> for use of isalpha.
29892
29893 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
29894
29895         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
29896         by allocating a larger buffer. Test the gethostname return value for
29897         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
29898         returns an error and ENAMETOOLONG isn't defined.
29899
29900 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
29901
29902         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
29903         dimension.
29904
29905 2000-07-04  Jim Meyering  <meyering@lucent.com>
29906
29907         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
29908         of the deprecated AC_CHECKING.
29909
29910 2000-07-04  Jim Meyering  <meyering@lucent.com>
29911
29912         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
29913         Reported by Bruno Haible.
29914
29915 2000-07-04  Jim Meyering  <meyering@lucent.com>
29916
29917         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
29918         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
29919         lacks mbrtowc.
29920
29921 2000-07-03  Paul Eggert  <eggert@twinsun.com>
29922
29923         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
29924         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
29925
29926 2000-07-03  Paul Eggert  <eggert@twinsun.com>
29927         and Bruno Haible  <haible@clisp.cons.org>
29928
29929         * lib/quotearg.c (mbrtowc):
29930         Assign to *pwc, and return 1 only if result is nonzero.
29931         (iswprint): Use ISPRINT when substituting our own mbrtowc.
29932
29933 2000-07-03  Jim Meyering  <meyering@lucent.com>
29934
29935         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
29936
29937 2000-07-03  Jim Meyering  <meyering@lucent.com>
29938
29939         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
29940         This is necessary to get a definition of e.g., UTMP_FILE on
29941         HP-UX 10.20.
29942         From Bob Proulx.
29943
29944 2000-07-02  Jim Meyering  <meyering@lucent.com>
29945
29946         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
29947
29948         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
29949         AC_LIBOBJ(function_name).
29950         * m4/chown.m4: Likewise.
29951         * m4/fnmatch.m4: Likewise.
29952         * m4/ftruncate.m4: Likewise.
29953         * m4/getgroups.m4: Likewise.
29954         * m4/getline.m4: Likewise.
29955         * m4/group-member.m4: Likewise.
29956         * m4/jm-macros.m4: Likewise.
29957         * m4/lstat.m4: Likewise.
29958         * m4/malloc.m4: Likewise.
29959         * m4/memcmp.m4: Likewise.
29960         * m4/nanosleep.m4: Likewise.
29961         * m4/putenv.m4: Likewise.
29962         * m4/realloc.m4: Likewise.
29963         * m4/regex.m4: Likewise.
29964         * m4/stat.m4: Likewise.
29965         * m4/strftime.m4: Likewise.
29966
29967 2000-07-02  Jim Meyering  <meyering@lucent.com>
29968
29969         * lib/quotearg.c (mbstate_t): Don't define here.
29970
29971 2000-07-02  Jim Meyering  <meyering@lucent.com>
29972
29973         * lib/nanosleep.c (SIGCONT): Define if not already defined.
29974
29975 2000-07-01  Jim Meyering  <meyering@lucent.com>
29976
29977         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
29978
29979 2000-07-01  Jim Meyering  <meyering@lucent.com>
29980
29981         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
29982         problem.
29983
29984 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
29985
29986         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
29987         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
29988
29989 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
29990
29991         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
29992         per change in ../m4/ls-mntd-fs.m4.
29993         (read_filesystem_list): Ignore symbolic links.
29994
29995 2000-06-29  Jim Meyering  <meyering@lucent.com>
29996
29997         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
29998         for declaration of strcmp.
29999
30000         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
30001
30002         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
30003         Avoid warning by casting result to `char *' to remove `const'.
30004
30005 2000-06-28  Jim Meyering  <meyering@lucent.com>
30006
30007         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
30008         included by quotearg.c, for which we perform this test.  From
30009         Bruno Haible.
30010
30011 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30012
30013         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
30014         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
30015         <utmpx.h> exists, put readutmp.o into LIBOBJS.
30016
30017 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
30018
30019         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
30020
30021 2000-06-26  Paul Eggert  <eggert@twinsun.com>
30022
30023         savedir now sets errno on failure and invokes xmalloc to get memory.
30024         Fix a couple of other minor bugs while we're at it.
30025
30026         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
30027         (NAMLEN): Remove macro.
30028         (malloc, realloc): Remove decls.
30029         (stpcpy): Likewise.
30030         ("xalloc.h"): Include.
30031         (NAME_SIZE_DEFAULT): New macro.
30032         (savedir): Use xmalloc / xrealloc to allocate memory.
30033         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
30034         Skip "" directory entries.
30035         Use strlen to calculate directory entry length, since the old method
30036         is rarely used these days and isn't worth supporting.
30037         Don't use a pointer after freeing it.
30038         Check for integer overflow when calculating allocation size.
30039         Use memcpy to copy entries, instead of stpcpy.
30040         Set errno properly when returning NULL.
30041         Check for readdir error.
30042
30043 2000-06-26  Jim Meyering  <meyering@lucent.com>
30044
30045         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
30046
30047 2000-06-25  Jim Meyering  <meyering@lucent.com>
30048
30049         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
30050         Linux header bug when _XOPEN_SOURCE is defined to 500.
30051
30052 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30053
30054         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
30055         deficiency.
30056
30057 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
30058
30059         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
30060         Include xalloc.h.
30061         Don't include <stdlib.h>.  Don't declare malloc, realloc.
30062
30063 2000-06-24  Jim Meyering  <meyering@lucent.com>
30064
30065         * m4/strerror_r.m4: Revive this file -- to try out an experimental
30066         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
30067         for which strerror does return char*, but which lacks a conveniently
30068         accessible declaration of the function.  If the compile-test says
30069         strerror_r doesn't work, then resort to a `run'-test that works on
30070         BeOS and segfaults on DEC Unix.
30071
30072 2000-06-24  Jim Meyering  <meyering@lucent.com>
30073
30074         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
30075
30076 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30077
30078         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
30079         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
30080
30081 2000-06-23  Paul Eggert  <eggert@twinsun.com>
30082
30083         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
30084         (mbrtowc, mbstate_t): Define substitutes if
30085         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
30086         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
30087         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
30088
30089 2000-06-23  Jim Meyering  <meyering@lucent.com>
30090
30091         * m4/afs.m4: Add missing AC_MSG_RESULT.
30092         Reported by Bruno Haible.
30093
30094         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
30095         Suggestion from Bruno Haible.
30096
30097 2000-06-23  Jim Meyering  <meyering@lucent.com>
30098
30099         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
30100
30101 2000-06-21  Jim Meyering  <meyering@lucent.com>
30102
30103         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
30104
30105 2000-06-21  Jim Meyering  <meyering@lucent.com>
30106
30107         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
30108         (noinst_HEADERS): Add getstr.h.
30109
30110         * lib/getline.c (getstr): Move into a separate file.
30111         * lib/getstr.c (getstr): New file, extracted from getline.c, with
30112         the following changes: new parameter, delim2; both delim[12]
30113         parameters have type `int', not `char'.  The latter would lose
30114         with 8-bit delimiters.
30115         * lib/getstr.h: New file.
30116
30117 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30118
30119         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
30120         than 1024, return a memory chunk of least possible size, instead
30121         of size PATH_MAX + 2. In the loop, increment the size proportionally.
30122         Use free/xmalloc instead of xrealloc to avoid copying for very long
30123         paths.
30124
30125 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30126
30127         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
30128         the empty string.
30129
30130 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
30131
30132         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
30133         address, not strdup.  Include <stdlib.h> and don't declare free().
30134
30135 2000-06-19  Jim Meyering  <meyering@lucent.com>
30136
30137         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
30138
30139 2000-06-18  Jim Meyering  <meyering@lucent.com>
30140
30141         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
30142
30143         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
30144         `checking whether...' message to be consistent with that of the
30145         lstat test.
30146
30147 2000-06-18  Jim Meyering  <meyering@lucent.com>
30148
30149         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
30150         Besides, these days every porting target provides a mkdir function.
30151
30152         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
30153         needed. (this snippet comes from src/system.h).
30154
30155 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
30156
30157         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
30158
30159 2000-06-15  Paul Eggert  <eggert@twinsun.com>
30160
30161         * lib/human.c (adjust_value): New function.
30162         (human_readable_inexact): Apply rounding style even when
30163         printing approximate values.
30164
30165 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30166
30167         * lib/human.c (human_readable_inexact): Allow an input block
30168         size that is not a multiple of the output block size, and vice versa.
30169         Reported by Piergiorgio Sartor.
30170
30171 2000-06-14  Paul Eggert  <eggert@twinsun.com>
30172
30173         * lib/getdate.y (get_date): Apply relative times after time
30174         zone indicator, not before.  Reported by Todd A. Jacobs.
30175
30176 2000-06-13  Jim Meyering  <meyering@lucent.com>
30177
30178         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
30179
30180         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
30181
30182 2000-06-12  Paul Eggert  <eggert@twinsun.com>
30183
30184         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
30185
30186 2000-06-12  Jim Meyering  <meyering@lucent.com>
30187
30188         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
30189         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
30190         optional argument.
30191         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
30192         the optional argument, `lib'.
30193
30194 2000-06-08  Jim Meyering  <meyering@lucent.com>
30195
30196         * m4/largefile.m4: Remove file (now that it's part of autoconf).
30197
30198 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30199
30200         Rewrite largefile configuration so that we don't need to run
30201         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
30202         AC_CANONICAL_HOST in configure.in -- jmm]
30203
30204         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
30205         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
30206         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
30207         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
30208         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
30209         All uses changed.
30210         Instead of inspecting the output of getconf, try to compile the
30211         test program without and with the macro definition.
30212         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
30213         for getconf.  Instead, check for the needed flags by compiling
30214         test programs.
30215
30216 2000-06-04  Paul Eggert  <eggert@twinsun.com>
30217
30218         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
30219
30220 2000-06-04  Jim Meyering  <meyering@lucent.com>
30221
30222         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
30223         SunOS 4.1.4 for which gid_t is an unsigned type.
30224
30225 2000-06-03  Jim Meyering  <meyering@lucent.com>
30226
30227         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
30228         now that autoconf requires that.
30229
30230         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
30231         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
30232         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
30233
30234 2000-06-03  Jim Meyering  <meyering@lucent.com>
30235
30236         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
30237
30238 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30239
30240         * m4/glibc21.m4: New file.
30241         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
30242
30243 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
30244
30245         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
30246         newer, don't install charset.alias.
30247         * lib/config.charset: Change the Linux/glibc rules so they become empty
30248         on glibc-2.1 or newer.
30249
30250 2000-06-02  Jim Meyering  <meyering@lucent.com>
30251
30252         * lib/mountlist.c: Back out last change.  Instead, do this...
30253         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
30254         me_dummy member using the same `ignore'-testing code.
30255         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
30256         fs_type strings.
30257         From Mark D. Roth.
30258
30259 2000-05-29  Jim Meyering  <meyering@lucent.com>
30260
30261         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
30262         mounts with the `ignore' attribute.  Based on a patch from
30263         Mark D. Roth.
30264
30265 2000-05-28  Jim Meyering  <meyering@lucent.com>
30266
30267         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
30268         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30269         * m4/stat.m4: Likewise.
30270         * m4/lstat.m4: Likewise.
30271         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
30272
30273         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
30274         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
30275
30276 2000-05-26  Jim Meyering  <meyering@lucent.com>
30277
30278         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
30279
30280 2000-05-24  Jim Meyering  <meyering@lucent.com>
30281
30282         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
30283         autoconf requires that.
30284         * m4/lib-check.m4: Likewise.
30285         * m4/jm-macros.m4: Likewise.
30286         * m4/strftime.m4: Likewise.
30287
30288         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
30289         AC_CHECK_DECLS, now that autoconf requires that.
30290
30291 2000-05-22  Jim Meyering  <meyering@lucent.com>
30292
30293         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
30294         * m4/lstat.m4: Likewise.
30295
30296 2000-05-22  Jim Meyering  <meyering@lucent.com>
30297
30298         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
30299
30300 2000-05-20  Jim Meyering  <meyering@lucent.com>
30301
30302         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
30303         (jm_PREREQ): Use it.
30304
30305 2000-05-18  Jim Meyering  <meyering@lucent.com>
30306
30307         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
30308         back, too, since it may have been modified by allocate_entry.
30309         (hash_delete): Rewrite to use neither the assignment operator
30310         nor the comma operator in an if-expression.
30311
30312 2000-05-15  Paul Eggert  <eggert@twinsun.com>
30313
30314         * lib/closeout.c:
30315         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
30316         Remove; no longer needed.
30317         "quotearg.h": Add include.
30318         (file_name): Do not bother to explicitly initialize to NULL; it's less
30319         efficient on some hosts.
30320         (close_stdout_status): Remove test as to whether stdout was already
30321         closed; it breaks for the case "echo x | sort >&-".
30322         Quote file name colons.
30323         Do not assume that _("write error") lacks format strings.
30324
30325 2000-05-15  Jim Meyering  <meyering@lucent.com>
30326
30327         * lib/version-etc.c (version_etc_copyright): Update the copyright
30328         string used in all --version output.
30329
30330 2000-05-14  Jim Meyering  <meyering@lucent.com>
30331
30332         * lib/closeout.c (close_stdout_set_file_name): New function.
30333         (close_stdout_status): Use new file-scoped global.
30334         Return right away if fstat says the stdout file descriptor is invalid.
30335         * lib/closeout.h (close_stdout_set_file_name): Declare.
30336
30337 2000-05-10  Jim Meyering  <meyering@lucent.com>
30338
30339         * lib/closeout.c [default_exit_status]: New file-scoped variable.
30340         (close_stdout_set_status): New function.
30341         * lib/closeout.h (close_stdout_set_status): Declare.
30342
30343 2000-05-09  Jim Meyering  <meyering@lucent.com>
30344
30345         * m4/gettext.m4: Rename this...
30346         * m4/libintl.m4: ...to this.
30347
30348 2000-05-08  Jim Meyering  <meyering@lucent.com>
30349
30350         * lib/long-options.c: Don't include closeout.h.
30351         (parse_long_options): Don't call close_stdout for --version.
30352
30353 2000-05-06  Paul Eggert  <eggert@twinsun.com>
30354
30355         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
30356         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
30357         2.1.3 bug.  This avoids a clash when files like regex.c define
30358         _GNU_SOURCE.
30359
30360 2000-05-06  Jim Meyering  <meyering@lucent.com>
30361
30362         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
30363         (AC_REPLACE_FUNCS): Add strnlen.
30364
30365         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
30366         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
30367
30368         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
30369         AC_SEARCH_LIBS call for nanosleep.
30370         (LIB_NANOSLEEP): Set and AC_SUBST.
30371
30372 2000-05-06  Jim Meyering  <meyering@lucent.com>
30373
30374         * lib/strnlen.c: Undefine __strnlen and strnlen.
30375         [!weak_alias]: Define __strnlen to strnlen.
30376
30377         * lib/atexit.c: New file, from libiberty.
30378
30379 2000-05-06  Jim Meyering  <meyering@lucent.com>
30380
30381         * lib/closeout.c (close_stdout_status): Also check for errors on the
30382         stderr stream.
30383
30384 2000-05-05  Jim Meyering  <meyering@lucent.com>
30385
30386         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
30387         AC_SEARCH_LIBS call for clock_gettime.
30388         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
30389
30390         * m4/search-libs.m4: Update from autoconf.
30391
30392         su doesn't work on Solaris 2.6.
30393         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
30394         <shadow.h>.  Reported by Dragos Harabor.
30395
30396 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
30397
30398         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
30399         memcpy instead of xmalloc, xrealloc, path_concat.
30400         (locale_charset): Treat empty environment variables as absent.
30401         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
30402
30403 2000-05-04  Jim Meyering  <meyering@lucent.com>
30404
30405         * lib/getopt.c: Update from glibc.
30406         * lib/obstack.c: Likewise.
30407         * lib/obstack.h: Likewise.
30408         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
30409         file
30410
30411         * lib/regex.h: Likewise.
30412         * lib/strndup.c: Likewise.
30413         * lib/strnlen.c: New file, from glibc.
30414
30415 2000-05-03  Jim Meyering  <meyering@lucent.com>
30416
30417         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
30418
30419 2000-05-02  Paul Eggert  <eggert@twinsun.com>
30420
30421         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
30422         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
30423         compile-time test, rather than inspecting host and OS, to
30424         decide whether to define _LARGEFILE_SOURCE.
30425
30426 2000-05-01  Jim Meyering  <meyering@lucent.com>
30427
30428         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
30429
30430         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
30431         Based on a patch from Bruno Haible.
30432
30433 2000-05-01  Jim Meyering  <meyering@lucent.com>
30434
30435         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
30436
30437 2000-04-29  Jim Meyering  <meyering@lucent.com>
30438
30439         * lib/path-concat.c: Declare strdup only if it's not defined.
30440         * lib/canon-host.c: Likewise.
30441
30442 2000-04-28  Jim Meyering  <meyering@lucent.com>
30443
30444         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
30445         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
30446         is included first, then limits.h is included by locale.h by libintl.h.
30447         From John David Anglin.
30448
30449 2000-04-25  Jim Meyering  <meyering@lucent.com>
30450
30451         * lib/makepath.c (S_IRWXUGO): Define.
30452         (make_path): Always perform explicit chmod if MODE specifies any
30453         of the `special' permission bits.  Prompted by a bug report against
30454         install from Mate Wierdl and Joost van Baal.
30455
30456 2000-04-18  Jim Meyering  <meyering@lucent.com>
30457
30458         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
30459         (jm_PREREQ): Use it.
30460
30461 2000-04-18  Jim Meyering  <meyering@lucent.com>
30462
30463         * lib/README: New file.
30464
30465         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
30466         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
30467
30468 2000-04-17  Jim Meyering  <meyering@lucent.com>
30469
30470         Get it right :-)
30471         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
30472         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
30473         Suggestion from Akim Demaille.
30474
30475 2000-04-17  Jim Meyering  <meyering@lucent.com>
30476
30477         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
30478         the definition of it to rpl_strftime also defined-away the system's
30479         declaration.
30480
30481 2000-04-15  Jim Meyering  <meyering@lucent.com>
30482
30483         Use `C' to denote so-called `contiguous' files, the same way
30484         that tar does.
30485         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
30486         (ftypelet): Use S_ISCTG.
30487         From Michael Deutschmann.
30488
30489 2000-04-14  Jim Meyering  <meyering@lucent.com>
30490
30491         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
30492         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
30493         clobbered.
30494
30495 2000-04-14  Jim Meyering  <meyering@lucent.com>
30496
30497         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
30498
30499 2000-04-13  Jim Meyering  <meyering@lucent.com>
30500
30501         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
30502         AH_VERBATIM to insert required #ifndef into config.h.in.
30503         Suggestion from Akim Demaille.
30504
30505 2000-04-12  Jim Meyering  <meyering@lucent.com>
30506
30507         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
30508         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
30509         Christian Krackowizer.
30510
30511         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
30512         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
30513         (AC_SYS_LARGEFILE): Require.
30514         (AM_C_PROTOTYPES): Require.
30515
30516 2000-04-08  Jim Meyering  <meyering@lucent.com>
30517
30518         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
30519         names don't conflict.  Reported by Eli Zaretskii.
30520
30521 2000-04-07  Jim Meyering  <meyering@lucent.com>
30522
30523         * lib/putenv.c: Move inclusion of errno.h so it follows that of
30524         sys/types.h, to work around system header problems on AIX 3.2.5.
30525         From Bruno Haible.
30526
30527 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
30528
30529         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
30530         bug.  Deal with the different error behavior of Irix iconv.
30531
30532 2000-04-05  Paul Eggert  <eggert@twinsun.com>
30533
30534         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
30535         IRIX if the installer said otherwise.
30536
30537 2000-04-05  Jim Meyering  <meyering@lucent.com>
30538
30539         Portability tweaks required for ultrix4.3.
30540         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
30541         (jm_CHECK_DECLS): Add getutent to the list of functions.
30542         (_jm_DECL_HEADERS): Add utmpx.h.
30543         From John David Anglin.
30544
30545         * m4/strftime.m4: Back out the 2000-04-02 change.
30546         Instead of that change, simply undefine putenv in the test program.
30547
30548 2000-04-05  Jim Meyering  <meyering@lucent.com>
30549
30550         Portability tweaks required for ultrix4.3.
30551         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
30552         getutent.
30553         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
30554         * lib/canon-host.c: Declare strdup.
30555         * lib/path-concat.c: Likewise.
30556         From John David Anglin.
30557
30558 2000-04-04  Jim Meyering  <meyering@lucent.com>
30559
30560         Be more DOS 8.3-friendly.
30561         * lib/ref-add.sin: Renamed from ref-add.sed.in.
30562         * lib/ref-del.sin: Renamed from ref-del.sed.in.
30563         * lib/Makefile.am: Reflect renaming.
30564         Reported by Eli Zaretskii.
30565
30566         Use a temporary file name that won't clash with `charset.alias'
30567         in the DOS 8.3 name space.
30568         * lib/Makefile.am (charset_tmp): Define.
30569         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
30570         (uninstall-local): Likewise.
30571         Reported by Eli Zaretskii.
30572
30573 2000-04-03  Jim Meyering  <meyering@lucent.com>
30574
30575         * m4/gettext.m4: Fix typo in comment.
30576
30577         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
30578         textutils/configure.in).  Suggestion from Paul Eggert.
30579         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
30580
30581 2000-04-02  Paul Eggert  <eggert@twinsun.com>
30582
30583         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
30584         variable in the shell rather than using putenv, which isn't
30585         portable.  This avoids the configure-time inter-test dependency
30586         on the potentially-renamed putenv function.
30587
30588 2000-03-30  Paul Eggert  <eggert@twinsun.com>
30589
30590         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
30591         before checking struct stat.st_blksize, so that
30592         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
30593
30594 2000-03-29  Paul Eggert  <eggert@twinsun.com>
30595
30596         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
30597         since strftime.c uses HAVE_STRFTIME to decide whether to use
30598         the underlying strftime.
30599
30600 2000-03-29  Paul Eggert  <eggert@twinsun.com>
30601
30602         * lib/time/strftime.c (my_strftime): Make sure we call the system
30603         strftime, not ourselves, when invoking the underlying strftime.
30604
30605 2000-03-24  Jim Meyering  <meyering@lucent.com>
30606
30607         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
30608         (charset_alias): Define.
30609         (install-exec-local): Factor out common code.
30610         (uninstall-local): Split lines longer than 80.
30611         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
30612         (SUFFIXES): Define.
30613         (.sed.in.sed): New rule.  Don't redirect directly to $@.
30614         (CLEANFILES): Add ref-add.sed and ref-del.sed.
30615
30616 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
30617
30618         * lib/config.charset: Output a line containing "Packages using this
30619         file".
30620         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
30621         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
30622         ref-del.sed): New rules.
30623
30624 2000-03-17  Jim Meyering  <meyering@lucent.com>
30625
30626         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
30627         Otherwise, include <strings.h>
30628
30629 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
30630
30631         * lib/unicodeio.c (utf8_wctomb): New function.
30632         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
30633         format instead of in UCS-4 with platform dependent endianness.
30634
30635 2000-03-10  Jim Meyering  <meyering@lucent.com>
30636
30637         * m4/lib-check.m4: Look for getspnam in -lgen, too.
30638         From Marco Franzen.
30639
30640 2000-03-07  Paul Eggert  <eggert@twinsun.com>
30641
30642         * lib/savedir.c (savedir): Work even if directory size is
30643         negative; this can happen with some screwy NFS configurations.
30644
30645 2000-03-06  Jim Meyering  <meyering@lucent.com>
30646
30647         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
30648         if it's NULL (because we ran out of memory).  From Bruno Haible.
30649
30650 2000-03-05  Jim Meyering  <meyering@lucent.com>
30651
30652         * lib/localcharset.c ("path-concat.h"): Include.
30653         (get_charset_aliases): Use path_concat instead of ANSI string
30654         concatenation.
30655
30656         * lib/unicodeio.h (PARAMS): Define.
30657         Use it to guard prototype.
30658
30659 2000-03-04  Jim Meyering  <meyering@lucent.com>
30660
30661         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
30662         for lib/localcharset.c.
30663
30664 2000-03-04  Jim Meyering  <meyering@lucent.com>
30665
30666         * lib/Makefile.am (install-exec-local): Create $(libdir) before
30667         installing into it.
30668         (uninstall-local): Uncomment this rule so `make distcheck' works
30669         once again.
30670
30671         * lib/unicodeio.c (<errno.h>): Include it.
30672         (errno): Declare if not defined.
30673
30674         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
30675
30676         * lib/config.charset: New version, incorporating remarks from a linux
30677         i18n mailing list.  From Bruno Haible.
30678
30679 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
30680
30681         * m4/codeset.m4: New file.
30682         * m4/iconv.m4: New file.
30683         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
30684
30685 2000-03-03  Jim Meyering  <meyering@lucent.com>
30686
30687         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
30688
30689 2000-03-02  Jim Meyering  <meyering@lucent.com>
30690
30691         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
30692         the messages come out on separate lines.
30693
30694         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
30695         rather than jm_CHECK_DECLARATIONS.
30696         * m4/decl.m4: Remove now-unused file.
30697
30698         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
30699         geteuid.
30700
30701 2000-03-02  Jim Meyering  <meyering@lucent.com>
30702
30703         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
30704
30705 2000-03-01  Jim Meyering  <meyering@lucent.com>
30706
30707         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
30708         * lib/unicodeio.c: Likewise.
30709
30710 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
30711
30712         * lib/config.charset: New file.
30713         * lib/localcharset.c: New file.
30714         * lib/unicodeio.h, lib/unicodeio.c: New files.
30715         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
30716         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
30717         (noinst_HEADERS): Add unicodeio.h.
30718         (all-local, install-exec-local, charset.alias): New targets.
30719
30720 2000-02-28  Paul Eggert  <eggert@twinsun.com>
30721
30722         * lib/quotearg.c (ALERT_CHAR): New macro.
30723         (quotearg_buffer_restyled): Use it.
30724
30725 2000-02-27  Jim Meyering  <meyering@lucent.com>
30726
30727         * m4/check-decl.m4: Add getenv to the list.
30728
30729 2000-02-27  Jim Meyering  <meyering@lucent.com>
30730
30731         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
30732         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
30733
30734         * lib/backupfile.c: Guard inclusion of stdlib.h with
30735         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
30736         Declare malloc if needed.
30737
30738         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
30739         `#ifndef HAVE_DECL..'
30740         now that autoconf always defines the HAVE_DECL_ symbols.
30741         * lib/human.c: Likewise.
30742         * lib/same.c: Likewise.
30743         * lib/strtoumax.c: Likewise.
30744
30745         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
30746         declaration check was not run.
30747         * lib/hash.c: Likewise.
30748         * lib/human.c: Likewise.
30749         * lib/same.c: Likewise.
30750         * lib/strtoumax.c: Likewise.
30751
30752         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
30753         `.', then first look up the entire `.'-containing string as a login
30754         name.
30755
30756 2000-02-23  Jim Meyering  <meyering@lucent.com>
30757
30758         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
30759         in place of my hack.
30760
30761 2000-02-18  Paul Eggert  <eggert@twinsun.com>
30762
30763         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
30764         (textint): New typedef.
30765         (parser_control): Member year changed from int to textint.
30766         All uses changed.
30767         (YYSTYPE): Removed; replaced by %union with int and textint members.
30768         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
30769         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
30770         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
30771         (tSNUMBER, tUNUMBER): Now of type <textintval>.
30772         (date, number, to_year): Use width of number in digits, not its value,
30773         to determine whether it's a 2-digit year, or a 2-digit time.
30774         (yylex): Store number of digits of numeric tokens.
30775         Reported by John Kendall.
30776
30777         (parser_control): Changed from struct parser_control to typedef (for
30778         consistency).  All uses changed.
30779
30780         (tID): Removed; not used.
30781         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
30782
30783 2000-02-14  Paul Eggert  <eggert@twinsun.com>
30784
30785         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
30786         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
30787
30788 2000-02-12  Jim Meyering  <meyering@lucent.com>
30789
30790         * lib/userspec.c (ISDIGIT): Define it.
30791         (isdigit): Remove definition.
30792         (is_number): Use ISDIGIT, not isdigit.
30793         <libintl.h>: Include.
30794         (_ and N_): Define.
30795         (parse_user_spec): Mark translatable strings.
30796
30797 2000-02-10  Jim Meyering  <meyering@lucent.com>
30798
30799         With these changes, nanosleep.[ch] are finally enough like the other
30800         lib/* replacement files to compile on a few more losing systems.
30801
30802         * lib/nanosleep.h: Don't include config.h.
30803         Remove prototype from declaration of nanosleep.
30804         (PARAMS): Remove now-unneeded definition.
30805         * lib/nanosleep.c: #undef nanosleep.
30806         (rpl_nanosleep): Rename from nanosleep.
30807
30808 2000-02-10  Jim Meyering  <meyering@lucent.com>
30809
30810         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
30811         gnu_nanosleep to rpl_nanosleep.
30812
30813 2000-02-09  Jim Meyering  <meyering@lucent.com>
30814
30815         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
30816         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
30817
30818 2000-02-08  Akim Demaille  <akim@epita.fr>
30819
30820         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
30821         `[' and `]' and remove uses of `changequote'.
30822         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
30823         (AC_SYS_LARGEFILE): Likewise.
30824         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
30825         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
30826         of changequote.
30827         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
30828         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
30829         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
30830         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
30831
30832 2000-02-05  Jim Meyering  <meyering@lucent.com>
30833
30834         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
30835         Remove explicit use of AC_HEADER_TIME.  It is required by
30836         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
30837         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
30838         in autoconf whereby the expansion of the latter ended up preceding
30839         the expansion of its prerequisite, AC_HEADER_TIME.
30840         Reported by Volker Borchert.
30841
30842 2000-02-03  Jim Meyering  <meyering@lucent.com>
30843
30844         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
30845
30846 2000-02-03  Jim Meyering  <meyering@lucent.com>
30847
30848         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
30849         rather than with `#if HAVE_UTMPNAME'.
30850
30851 2000-02-02  Jim Meyering  <meyering@lucent.com>
30852
30853         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
30854         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
30855         Reported by Eli Zaretskii.
30856
30857 2000-02-01  Jim Meyering  <meyering@lucent.com>
30858
30859         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
30860
30861 2000-01-31  Jim Meyering  <meyering@lucent.com>
30862
30863         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
30864         functions.  Add the time.h and sys/time.h headers along with the
30865         AC_REQUIRE'ment of AC_HEADER_TIME.
30866
30867 2000-01-31  Jim Meyering  <meyering@lucent.com>
30868
30869         * lib/nanosleep.h (nanosleep): Guard declaration with
30870         `#if ! HAVE_DECL_NANOSLEEP'.
30871         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
30872         the declaration in that vendor's sys/timers.h.
30873         Reported by Christian Krackowizer.
30874
30875         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
30876         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
30877         (ISPRINT): Likewise.
30878         Reported by Tom Tromey.
30879
30880 2000-01-30  Jim Meyering  <meyering@lucent.com>
30881
30882         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
30883
30884         * m4/prereq.m4 (utmp_includes): Define.
30885         Check for ut_user and ut_name members in both struct utmpx
30886         and struct utmp.
30887
30888 2000-01-30  Jim Meyering  <meyering@lucent.com>
30889
30890         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
30891         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
30892         header files where only utmpx.ut_user is declared.
30893
30894         * lib/readutmp.h (UT_USER): Define.
30895
30896 2000-01-29  Jim Meyering  <meyering@lucent.com>
30897
30898         * m4/lib-check.m4: New file containing library-related checks from
30899         fileutils and sh-utils (textutils had none).
30900
30901 2000-01-28  Jim Meyering  <meyering@lucent.com>
30902
30903         * m4/perl.m4: Change format of warning message to look more like that
30904         from the missing script.  Suggestion from François Pinard.
30905
30906 2000-01-25  Jim Meyering  <meyering@lucent.com>
30907
30908         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
30909         well as time.h in the compile check.
30910         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
30911         Fix typo in cross-compiling case: s/yes/no/.
30912
30913 2000-01-23  Jim Meyering  <meyering@lucent.com>
30914
30915         * m4/jm-macros.m4: Move df-related tests here from
30916         fileutils/configure.in
30917
30918         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
30919         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
30920
30921         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
30922         s/space/ac_fsusage_space/.
30923         (jm_FILE_SYSTEM_USAGE): Take two parameters.
30924
30925         * m4/ftruncate.m4: New file (derived from part of
30926         fileutils/configure.in).
30927         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
30928         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
30929
30930         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
30931         AC_SUBST these here, rather than just in sh-util/configure.in, so
30932         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
30933         all the same.
30934         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
30935         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
30936         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
30937         (AC_SUBST(POW_LIBM)): Likewise.
30938         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
30939
30940 2000-01-23  Jim Meyering  <meyering@lucent.com>
30941
30942         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
30943         obstack.c.
30944
30945 2000-01-22  Jim Meyering  <meyering@lucent.com>
30946
30947         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
30948
30949         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
30950
30951         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
30952         configure.in
30953         (AC_CHECK_HEADERS): Likewise for sh-utils.
30954         (AC_CHECK_HEADERS): Likewise for textutils.
30955         Merge the three lists of headers.
30956
30957         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
30958         from fileutils' configure.in.
30959
30960         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
30961         code. Moved tests into their own function (_jm_DECL_HEADERS) in
30962         check-decl.m4.
30963
30964         * m4/check-decl.m4: Use #if rather than #ifdef.
30965         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
30966         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
30967         (_jm_DECL_HEADERS): Define new function.
30968         (jm_CHECK_DECLARATIONS): Require it.
30969
30970 2000-01-22  Jim Meyering  <meyering@lucent.com>
30971
30972         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
30973         [! HAVE_DECL_STRTOULL]: Declare strtoull.
30974         Required for some AIX systems.  Reported by Christian Krackowizer.
30975         [TESTING] (main): New function.
30976
30977         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
30978         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
30979         letters.
30980
30981         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
30982         iswprint.
30983
30984         * lib/strverscmp.c (ISDIGIT): Define.
30985         (strverscmp): Use ISDIGIT, not isdigit.
30986
30987 2000-01-19  Jim Meyering  <meyering@lucent.com>
30988
30989         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
30990         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
30991         defines `struct timespec' in <sys/time.h>
30992
30993         * m4/c-bs-a.m4: Remove uses of changequote altogether.
30994         Thanks to Akim for explaining.
30995
30996 2000-01-17  Paul Eggert  <eggert@twinsun.com>
30997
30998         * lib/nanosleep.c (nanosleep):
30999         Don't use SA_INTERRUPT to decide whether to call sigaction, as
31000         POSIX.1 doesn't require SA_INTERRUPT and some systems
31001         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
31002         it's been part of POSIX.1 since day 1 (in 1988).
31003
31004 2000-01-17  Jim Meyering  <meyering@lucent.com>
31005
31006         * lib/interlock: Remove unused file.  Reported by François Pinard.
31007
31008 2000-01-16  Paul Eggert  <eggert@twinsun.com>
31009
31010         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
31011         alert, backslash, formfeed, and vertical tab unnecessarily in
31012         shell quoting style.
31013
31014 2000-01-16  Jim Meyering  <meyering@lucent.com>
31015
31016         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
31017         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
31018         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
31019         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
31020
31021 2000-01-16  Jim Meyering  <meyering@lucent.com>
31022
31023         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
31024         because the latter didn't work.
31025
31026 2000-01-15  Jim Meyering  <meyering@lucent.com>
31027
31028         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
31029         (AC_REPLACE_FUNCS): Add memcpy and memset.
31030         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
31031         Add strpbrk.
31032         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
31033
31034 2000-01-12  Jim Meyering  <meyering@lucent.com>
31035
31036         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
31037         (jm_PREREQ): Use it.
31038         (jm_PREREQ_READUTMP): New macro.
31039         (jm_PREREQ): Use it.
31040
31041 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31042
31043         Quote multibyte characters correctly.
31044         * m4/c-bs-a.m4: New file.
31045         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
31046         (jm_PREREQ): Use it.
31047
31048 2000-01-11  Paul Eggert  <eggert@twinsun.com>
31049
31050         * m4/uintmax_t.m4: Port to autoconf 2.13.
31051
31052 2000-01-08  Jim Meyering  <meyering@ascend.com>
31053
31054         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
31055         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
31056
31057 2000-01-04  Jim Meyering  <meyering@ascend.com>
31058
31059         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
31060         jm_STRUCT_DIRENT_D_TYPE.
31061         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
31062         jm_STRUCT_DIRENT_D_INO.
31063         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
31064         jm_STRUCT_UTIMBUF.
31065         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
31066         renamings.
31067         * m4/utime.m4: Likewise.
31068
31069         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
31070         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
31071
31072 2000-01-03  Paul Eggert  <eggert@twinsun.com>
31073
31074         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
31075         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
31076
31077 2000-01-02  Jim Meyering  <meyering@ascend.com>
31078
31079         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
31080         remember if this is necessary.
31081
31082 1999-12-26  Jim Meyering  <meyering@ascend.com>
31083
31084         * m4/jm-macros.m4: Use it here.
31085         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
31086
31087 1999-12-23  Jim Meyering  <meyering@ascend.com>
31088
31089         * m4/jm-macros.m4: Check for clock_gettime (moved from
31090         fileutils/configure.in)
31091         Check for gettimeofday.
31092
31093 1999-12-20  Jim Meyering  <meyering@ascend.com>
31094
31095         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
31096         autoconf-2.14a-1999-12-20.
31097
31098 1999-12-19  Jim Meyering  <meyering@ascend.com>
31099
31100         * m4/lstat-slash.m4: New file.
31101         * m4/jm-macros.m4: Use the new macro:
31102         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31103
31104 1999-12-07  Jim Meyering  <meyering@ascend.com>
31105
31106         * m4/perl.m4: Require that File::Compare be available, too.
31107         Too many systems seem to lack it.
31108
31109         * m4/strftime.m4: Add checks for most of the cpp macros tested in
31110         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
31111
31112 1999-11-18  Paul Eggert  <eggert@twinsun.com>
31113
31114         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
31115         problem with the QNX 4.25 shell, which doesn't propagate exit
31116         status of failed commands inside shell assignments.
31117
31118 1999-11-17  Jim Meyering  <meyering@ascend.com>
31119
31120         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
31121
31122 1999-11-07  Jim Meyering  <meyering@ascend.com>
31123
31124         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
31125
31126 1999-11-06  Jim Meyering  <meyering@ascend.com>
31127
31128         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
31129         * m4/jm-macros.m4 (jm_MACROS): Use it here.
31130
31131 1999-11-05  Jim Meyering  <meyering@ascend.com>
31132
31133         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
31134         configure.in of textutils, fileutils, and sh-utils into this one
31135         (shared between those packages) file.
31136         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
31137         AC_STRUCT_ST_BLKSIZE.
31138
31139 1999-11-03  Jim Meyering  <meyering@ascend.com>
31140
31141         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
31142         of AC_CHECK_TYPE checks includes unistd.h.
31143         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
31144         Suggestion from Akim Demaille.
31145
31146 1999-10-30  Jim Meyering  <meyering@ascend.com>
31147
31148         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
31149         m4-quoted string.
31150         * m4/ls-mntd-fs.m4: Likewise.
31151         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
31152         * m4/jm-winsz1.m4: Likewise.
31153
31154         * m4/const.m4: Remove file, since the fix made it into the experimental
31155         version of autoconf.
31156         * m4/mktime.m4: Likewise.
31157
31158         * m4/check-type.m4: Remove file, now that the latest version of
31159         AC_CHECK_TYPE takes a third arg to specify additional #includes.
31160
31161         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
31162         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
31163         AC_CHECK_TYPE.
31164
31165 1999-10-04  Jim Meyering  <meyering@ascend.com>
31166
31167         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
31168
31169 1999-09-22  Paul Eggert  <eggert@twinsun.com>
31170
31171         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
31172         2.95.1 bug with HP-UX 10.20.
31173
31174 1999-09-17  Jim Meyering  <meyering@ascend.com>
31175
31176         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
31177         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
31178         due to missing strdup (against sh-utils-2.0).
31179
31180 1999-08-29  Jim Meyering  <meyering@ascend.com>
31181
31182         * m4/jm-macros.m4: Require jm_BISON.
31183         * m4/bison.m4: New file.
31184
31185 1999-08-17  Paul Eggert  <eggert@twinsun.com>
31186
31187         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
31188         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
31189
31190 1999-08-05  Jim Meyering  <meyering@ascend.com>
31191
31192         * m4/getline.m4: Rename test file from conftestdata to conftest.data
31193         to avoid conflicts with `conftest' on 8+3 filesystems.
31194         Suggestion from Eli Zaretskii.
31195
31196 1999-08-04  Jim Meyering  <meyering@ascend.com>
31197
31198         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
31199         fileutils and sh-utils (textutils's getline test was inadequate).
31200         (AM_FUNC_GETLINE): Run this test.
31201         (AC_CHECK_FUNCS): Check for getdelim.
31202         Reported by Bob Proulx.
31203
31204 1999-08-02  Jim Meyering  <meyering@ascend.com>
31205
31206         * m4/jm-macros.m4: Add a comment.
31207
31208 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31209
31210         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
31211         <inttypes.h> defines strtoumax as a macro (and not as a
31212         function).
31213
31214 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31215
31216         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
31217         that we can shift, multiply and divide unsigned long long
31218         values; Ultrix cc can't do it.
31219
31220 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31221
31222         * m4/mktime.m4: New file, which is a preview of what should appear
31223         in the next public autoconf release.
31224
31225 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31226
31227         * m4/lfs.m4: Remove this file.
31228         * m4/largefile.m4: New file.  It contains the old contents of
31229         lfs.m4, except that all names with prefix AC_LFS have been
31230         changed to use the prefix AC_SYS_LARGEFILE instead, to be
31231         compatible with future autoconf versions.  Also, some minor m4
31232         quoting problems have been fixed.
31233
31234 1999-08-01  Paul Eggert  <eggert@twinsun.com>
31235
31236         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
31237         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
31238         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
31239         and simplify the shell code.
31240
31241 1999-08-01  Jim Meyering  <meyering@ascend.com>
31242
31243         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
31244         m4.
31245
31246 1999-07-20  Jim Meyering  <meyering@ascend.com>
31247
31248         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
31249
31250 1999-07-15  Jim Meyering  <meyering@ascend.com>
31251
31252         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
31253
31254 1999-05-22  Jim Meyering  <meyering@ascend.com>
31255
31256         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
31257
31258 1999-05-20  Jim Meyering  <meyering@ascend.com>
31259
31260         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
31261         Add a colon after each `then' in case $4 is empty.
31262
31263 1999-05-16  Jim Meyering  <meyering@ascend.com>
31264
31265         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
31266
31267 1999-05-10  Jim Meyering  <meyering@ascend.com>
31268
31269         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
31270
31271         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
31272         AC_FUNC_MKTIME.
31273
31274 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
31275
31276         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
31277
31278 1999-05-04  Paul Eggert  <eggert@twinsun.com>
31279
31280         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
31281         not CPPFLAGS, so that linking works correctly in IRIX.
31282
31283 1999-04-30  Paul Eggert  <eggert@twinsun.com>
31284
31285         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
31286
31287 1999-04-20  Paul Eggert  <eggert@twinsun.com>
31288
31289         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
31290         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
31291         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
31292         jm_AC_TYPE_UNSIGNED_LONG_LONG.
31293         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
31294
31295         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
31296
31297 1999-04-20  Jim Meyering  <meyering@ascend.com>
31298
31299         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
31300         AC_REPLACE xstroull if necessary.  From Paul Eggert.
31301         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
31302
31303 1999-04-18  Jim Meyering  <meyering@ascend.com>
31304
31305         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
31306         * m4/jm-macros.m4: Use it.
31307
31308 1999-04-06  Jim Meyering  <meyering@ascend.com>
31309
31310         * m4/strftime.m4: Remove test for %f.
31311
31312 1999-03-29  Jim Meyering  <meyering@ascend.com>
31313
31314         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
31315         superset of the AC_TYPE_* checks in the textutils, fileutils,
31316         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
31317         AC_TYPE_PID_T.
31318
31319 1999-03-28  Jim Meyering  <meyering@ascend.com>
31320
31321         * m4/jm-macros.m4: Define GNU_PACKAGE here.
31322         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
31323         replaced e.g., in the *.sh files of the sh-utils.
31324
31325 1999-03-20  Jim Meyering  <meyering@ascend.com>
31326
31327         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
31328         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
31329         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
31330
31331 1999-03-19  Jim Meyering  <meyering@ascend.com>
31332
31333         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
31334
31335 1999-03-12  Jim Meyering  <meyering@ascend.com>
31336
31337         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
31338
31339 1999-03-07  Jim Meyering  <meyering@ascend.com>
31340
31341         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
31342         declared.
31343
31344 1999-02-17  Jim Meyering  <meyering@ascend.com>
31345
31346         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
31347         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
31348
31349 1999-02-07  Jim Meyering  <meyering@ascend.com>
31350
31351         * m4/group-member.m4: New file -- extracted from sh-utils'
31352         configure.in.
31353
31354         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
31355         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
31356
31357 1999-02-06  Jim Meyering  <meyering@ascend.com>
31358
31359         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
31360         * m4/fnmatch.m4: Likewise.
31361         * m4/getgroups.m4: Likewise.
31362         * m4/lstat.m4: Likewise.
31363         * m4/malloc.m4: Likewise.
31364         * m4/putenv.m4: Likewise.
31365         * m4/realloc.m4: Likewise.
31366         * m4/regex.m4: Likewise.
31367         * m4/stat.m4: Likewise.
31368         * m4/strftime.m4: Likewise.
31369         Suggestion from Alain Magloire.
31370
31371         * m4/chown.m4: Use `.$ac_objext', not `.o'.
31372         * m4/fnmatch.m4: Likewise.
31373         * m4/getgroups.m4: Likewise.
31374         * m4/getline.m4: Likewise.
31375         * m4/lstat.m4: Likewise.
31376         * m4/malloc.m4: Likewise.
31377         * m4/memcmp.m4: Likewise.
31378         * m4/putenv.m4: Likewise.
31379         * m4/realloc.m4: Likewise.
31380         * m4/regex.m4: Likewise.
31381         * m4/stat.m4: Likewise.
31382         * m4/strftime.m4: Likewise.
31383         Suggestion from Alain Magloire.
31384
31385         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
31386         an argument.
31387
31388         * m4/regex.m4: Add a run-time Test for proper operation of
31389         re_compile_pattern.
31390
31391 1999-01-31  Jim Meyering  <meyering@ascend.com>
31392
31393         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
31394
31395 1999-01-30  Jim Meyering  <meyering@ascend.com>
31396
31397         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
31398
31399         * m4/jm-mktime.m4: Make this a wrapper around the official
31400         AM_FUNC_MKTIME rather than my private copy, now that the official one
31401         is up to date.
31402         * m4/mktime.m4: Remove file.
31403
31404         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
31405         * m4/uptime.m4: Likewise.
31406         * m4/uintmax_t.m4: Likewise.
31407
31408 1999-01-28  Jim Meyering  <meyering@ascend.com>
31409
31410         * m4/jm-macros.m4: Use jm_AFS.
31411         * m4/afs.m4: New file (from fileutils' configure.in).
31412
31413         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
31414         * m4/chown.m4: Likewise.
31415         * m4/d-ino.m4: Likewise.
31416         * m4/d-type.m4: Likewise.
31417         * m4/fnmatch.m4: Likewise.
31418         * m4/getgroups.m4: Likewise.
31419         * m4/gettext.m4: Likewise.
31420         * m4/jm-mktime.m4: Likewise.
31421         * m4/jm-winsz2.m4: Likewise.
31422         * m4/lcmessage.m4: Likewise.
31423         * m4/ls-mntd-fs.m4: Likewise.
31424         * m4/malloc.m4: Likewise.
31425         * m4/memcmp.m4: Likewise.
31426         * m4/putenv.m4: Likewise.
31427         * m4/realloc.m4: Likewise.
31428         * m4/st_mtim.m4: Likewise.
31429         * m4/strftime.m4: Likewise.
31430
31431 1999-01-16  Jim Meyering  <meyering@ascend.com>
31432
31433         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
31434         (ARGMATCH_DIE_DECL): Define.
31435
31436 1999-01-12  Jim Meyering  <meyering@ascend.com>
31437
31438         * m4/Makefile.am.in: Rewrite to avoid using fmt.
31439         Reported by Lars Hecking.
31440
31441 1999-01-10  Jim Meyering  <meyering@ascend.com>
31442
31443         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
31444         gross kludge.
31445         * m4/inttypes_h.m4: Likewise.
31446         * m4/lstat.m4: Likewise.
31447         * m4/malloc.m4: Likewise.
31448         * m4/readdir.m4: Likewise.
31449         * m4/realloc.m4: Likewise.
31450         * m4/st_dm_mode.m4: Likewise.
31451         * m4/stat.m4: Likewise.
31452         * m4/utimbuf.m4: Likewise.
31453         * m4/utimes.m4: Likewise.
31454
31455         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
31456         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
31457         comments in config.h.in are meaningful.
31458
31459         * m4/jm-macros.m4: Require autoconf-2.13 here.
31460
31461         * m4/regex.m4: By default, don't use the included regex.c on systems
31462         with glibc 2.  Suggestion from Uli Drepper.
31463
31464 1999-01-02  Jim Meyering  <meyering@ascend.com>
31465
31466         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
31467
31468 1998-12-18  Jim Meyering  <meyering@ascend.com>
31469
31470         * m4/Makefile.am.in (Makefile.am): Simplify rule.
31471         Based on a suggestion from Lars Hecking.
31472
31473 1998-11-16  Paul Eggert  <eggert@twinsun.com>
31474
31475         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
31476
31477 1998-11-16  Jim Meyering  <meyering@ascend.com>
31478
31479         * m4/lfs.m4: Double-quote the `uname...` expression.
31480
31481 1998-11-14  Jim Meyering  <meyering@ascend.com>
31482
31483         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
31484         * m4/stat.m4: Likewise.
31485
31486 1998-11-03  Jim Meyering  <meyering@ascend.com>
31487
31488         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
31489         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
31490
31491 1998-10-18  Jim Meyering  <meyering@ascend.com>
31492
31493         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
31494
31495 1998-10-17  Jim Meyering  <meyering@ascend.com>
31496
31497         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
31498         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
31499         calls for those previously hard-coded headers.  Instead, take a new
31500         parameter.
31501         (jm_CHECK_DECLARATIONS): Reflect interface change.
31502         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
31503         (jm_CHECK_DECL_LOCALTIME_R): New macro.
31504
31505         * m4/mktime.m4: Test for spring-forward gap before long-running test.
31506
31507 1998-10-14  Jim Meyering  <meyering@ascend.com>
31508
31509         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
31510         instead of "TZ=America/Vancouver".  From Paul Eggert.
31511
31512 1998-10-11  Jim Meyering  <meyering@ascend.com>
31513
31514         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
31515         This adds a test for a recently added compatibility fix for mktime.c.
31516         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
31517
31518 1998-09-27  Jim Meyering  <meyering@ascend.com>
31519
31520         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
31521
31522         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
31523         ../configure.in, including a change from Gordon Matzigkeit to allow
31524         cross-compiling for the Hurd.
31525
31526         * m4/glibc.m4: New file/macro to test for the GNU C Library
31527         versions 1 and 2.  From Gordon Matzigkeit.
31528         Indent.
31529
31530 1998-09-21  Jim Meyering  <meyering@ascend.com>
31531
31532         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
31533
31534 1998-08-18  Paul Eggert  <eggert@twinsun.com>
31535
31536         Port nanosecond-resolution times to UnixWare 2.1.2 and
31537         pedantic Solaris 2.6.
31538
31539         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
31540         AC_STRUCT_ST_MTIM.
31541         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
31542         Generate name of ns member, instead of just 1 or undef.
31543         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
31544
31545 1998-08-15  Jim Meyering  <meyering@ascend.com>
31546
31547         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
31548         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
31549         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
31550         instead of jm_TYPE_SSIZE_T.
31551
31552 1998-08-12  Jim Meyering  <meyering@ascend.com>
31553
31554         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
31555
31556 1998-08-02  Jim Meyering  <meyering@ascend.com>
31557
31558         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
31559         in acconfig.h manually.
31560
31561 1998-07-31  Paul Eggert  <eggert@twinsun.com>
31562
31563         * m4/st_mtim.m4: New file.
31564
31565 1998-07-28  Jim Meyering  <meyering@ascend.com>
31566
31567         * m4/utimes.m4: Undef stat.
31568
31569 1998-07-25  Jim Meyering  <meyering@ascend.com>
31570
31571         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
31572         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
31573
31574 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
31575
31576         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
31577         uid and gid actually remain unchanged.
31578
31579 1998-07-07  Jim Meyering  <meyering@ascend.com>
31580
31581         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
31582
31583 1998-07-04  Jim Meyering  <meyering@ascend.com>
31584
31585         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
31586         to prove that this macro can be used in packages without regex.c.
31587
31588 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
31589
31590         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
31591         is to be used.
31592
31593 1998-07-03  Jim Meyering  <meyering@ascend.com>
31594
31595         * m4/gettext.m4: Add -lintl if it's found to be necessary.
31596
31597         * m4/gettext.m4: New file -- from gettext-0.10.35.
31598         * m4/lcmessage.m4: Likewise.
31599         * m4/progtest.m4: Likewise.
31600
31601         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
31602         * m4/jm-macros.m4: Require the new macro.
31603
31604 1998-06-29  Jim Meyering  <meyering@ascend.com>
31605
31606         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
31607         for the definition of NGROUPS (used in a system header included
31608         by sys/mount.h).
31609
31610 1998-06-28  Jim Meyering  <meyering@ascend.com>
31611
31612         * m4/ls-mntd-fs.m4: New file.
31613         * m4/fstypename.m4: New file.
31614
31615         * m4/jm-macros.m4: Require the new macro.
31616         * m4/jm-glibc-io.m4: New file.
31617
31618 1998-05-19  Jim Meyering  <meyering@ascend.com>
31619
31620         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
31621         * m4/lchown.m4: New file.
31622
31623         * m4/Makefile.am.in: New file.
31624         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
31625
31626 1998-05-14  Jim Meyering  <meyering@ascend.com>
31627
31628         * m4/Makefile.am (EXTRA_DIST): Add them.
31629         * m4/jm-macros.m4: New file.
31630         * m4/utimbuf.m4: New file.
31631
31632 1998-05-12  Jim Meyering  <meyering@ascend.com>
31633
31634         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
31635
31636 1998-05-11  Jim Meyering  <meyering@ascend.com>
31637
31638         * m4/isc-posix.m4: New file.
31639
31640 1998-05-10  Jim Meyering  <meyering@ascend.com>