fd9f3e845fa90ff2422f69d7b2764091250ab1dc
[gnulib.git] / ChangeLog
1 2007-03-19  Simon Josefsson  <simon@josefsson.org>
2
3         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4         <bruno@clisp.org>.
5
6 2007-03-18  Bruno Haible  <bruno@clisp.org>
7
8         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
9         Suggested by Eric Blake.
10
11 2007-03-18  Ben Pfaff  <blp@gnu.org>
12
13         * doc/relocatable.texi: Recommend using as prefix a directory
14         that does not exist and will never be created.  Based on
15         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
16         and others.
17
18 2007-03-17  Bruno Haible  <bruno@clisp.org>
19
20         * lib/fchownat.c: Include lchown.h.
21
22 2007-03-17  Bruno Haible  <bruno@clisp.org>
23
24         Fix endless loop when the given allocated size was > INT_MAX.
25         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
26         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
27         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
28         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
29         * lib/sprintf.c (sprintf): Likewise.
30
31 2007-03-17  Bruno Haible  <bruno@clisp.org>
32
33         * tests/test-argp-2.sh (func_compare): Output a context diff.
34
35 2007-03-17  Bruno Haible  <bruno@clisp.org>
36
37         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
38         locale's decimal-point character.
39
40 2007-03-17  Bruno Haible  <bruno@clisp.org>
41
42         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
43         before comparing it. Needed because on some platforms (e.g. x86) a
44         'long double' occupies less bytes than sizeof (long double).
45
46 2007-03-17  Bruno Haible  <bruno@clisp.org>
47
48         * tests/test-crc.c (main): Make printf statements 64-bit clean.
49         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
50         * tests/test-getaddrinfo.c (simple): Likewise.
51         * tests/test-read-file.c (main): Likewise.
52
53 2007-03-17  Bruno Haible  <bruno@clisp.org>
54
55         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
56
57 2007-03-17  Bruno Haible  <bruno@clisp.org>
58
59         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
60         unused variable.
61
62 2007-03-17  Bruno Haible  <bruno@clisp.org>
63
64         * tests/test-c-strcasecmp.c: Include c-strcase.h.
65         * tests/test-c-strncasecmp.c: Likewise.
66
67 2007-03-17  Bruno Haible  <bruno@clisp.org>
68
69         * modules/stdlib (Depends-on): Add unistd.
70         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
71         Needed for MacOS X 10.3.
72
73 2007-03-17  Bruno Haible  <bruno@clisp.org>
74
75         * lib/unistr/u-strdup.h: Include <stdlib.h>.
76
77 2007-03-17  Bruno Haible  <bruno@clisp.org>
78
79         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
80
81 2007-03-17  Bruno Haible  <bruno@clisp.org>
82
83         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
84         to reflect files copied from gnulib (with or without modifications).
85         Suggested by Jim Meyering.
86
87 2007-03-17  Eric Blake  <ebb9@byu.net>
88
89         * NEWS: Document stdlib change from 2007-02-18.
90
91 2007-03-17  Jim Meyering  <jim@meyering.net>
92
93         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
94         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
95         someone uses a name containing shell meta-characters.
96         Reported by Alfred M. Szmidt.
97
98         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
99
100 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
101
102         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
103         and copy gettext configuration files only if configure.ac contains
104         a use of AM_GNU_GETTEXT_VERSION.
105
106 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
107
108         * build-aux/bootstrap (gnulib_name): New variable.
109         (gnulib_tool_options): Use it.
110
111 2007-03-13  Simon Josefsson  <simon@josefsson.org>
112
113         * tests/test-des.c: Use new namespace.
114
115 2007-03-15  Bruno Haible  <bruno@clisp.org>
116
117         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
118         Reported by James Youngman <jay@gnu.org>.
119
120 2007-03-15  Bruno Haible  <bruno@clisp.org>
121
122         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
123         declared prototype. Needed with cc on OSF/1 5.1.
124
125 2007-03-15  Bruno Haible  <bruno@clisp.org>
126
127         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
128         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
129         (struct gl_list_implementation): Add dispose_fn argument to the
130         'create_empty', 'create' methods.
131         (struct gl_list_impl_base): Add field 'dispose_fn'.
132         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
133         argument.
134         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
135         dispose_fn argument.
136         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
137         dispose_fn on the dropped values.
138         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
139         dispose_fn argument.
140         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
141         dropped values.
142         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
143         (gl_tree_remove_node): Call dispose_fn on the dropped value.
144         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
145         (gl_tree_remove_node): Call dispose_fn on the dropped value.
146         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
147         argument.
148         (gl_tree_list_free): Call dispose_fn on the dropped values.
149         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
150         the dropped values.
151         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
152         Add dispose_fn argument.
153         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
154         Call dispose_fn on the dropped values.
155         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
156         Add dispose_fn argument.
157         (gl_sublist_create): Initialize the 'dispose_fn' field.
158         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
159         * tests/test-array_list.c (main): Update.
160         * tests/test-carray_list.c (main): Update.
161         * tests/test-avltree_list.c (main): Update.
162         * tests/test-rbtree_list.c (main): Update.
163         * tests/test-avltreehash_list.c (main): Update.
164         * tests/test-rbtreehash_list.c (main): Update.
165         * tests/test-linked_list.c (main): Update.
166         * tests/test-linkedhash_list.c (main): Update.
167         * tests/test-array_oset.c (main): Update.
168
169 2007-03-15  Bruno Haible  <bruno@clisp.org>
170
171         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
172         (gl_oset_create_empty): Add dispose_fn argument.
173         (struct gl_oset_implementation): Add dispose_fn argument to
174         'create_empty' method.
175         (struct gl_oset_impl_base): Add dispose_fn field.
176         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
177         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
178         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
179         values.
180         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
181         (gl_tree_oset_free): Call dispose_fn on the dropped values.
182         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
183         dropped value.
184         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
185         dropped value.
186         * tests/test-array_oset.c (main): Update.
187         * tests/test-avltree_oset.c (main): Update.
188         * tests/test-rbtree_oset.c (main): Update.
189         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
190
191 2007-03-13  Bruno Haible  <bruno@clisp.org>
192
193         * tests/test-stdbool.c (i): Update after last patch.
194
195 2007-03-12  Bruno Haible  <bruno@clisp.org>
196
197         * lib/quotearg.c: Include <wctype.h> early, before the definition of
198         the iswprint macro. Needed on Solaris 2.5.1.
199
200 2007-03-12  Bruno Haible  <bruno@clisp.org>
201
202         * tests/test-printf-frexp.c (main): Declare x as volatile.
203
204 2007-03-12  Simon Josefsson  <simon@josefsson.org>
205
206         * doc/gnulib.texi (Build robot for gnulib): New section.
207
208 2007-03-12  Jim Meyering  <jim@meyering.net>
209
210         * build-aux/bootstrap: New file.
211         * build-aux/bootstrap.conf: New file, from coreutils.
212
213 2007-03-11  Bruno Haible  <bruno@clisp.org>
214
215         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
216
217 2007-03-12  Simon Josefsson  <simon@josefsson.org>
218
219         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
220         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
221         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
222
223 2007-03-11  Bruno Haible  <bruno@clisp.org>
224
225         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
226         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
227
228 2007-03-11  Bruno Haible  <bruno@clisp.org>
229
230         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
231         formula. Needed for SunPRO C 5.0.
232
233 2007-03-11  Bruno Haible  <bruno@clisp.org>
234
235         * modules/long-options (Depends-on): Add getopt.
236
237 2007-03-11  Bruno Haible  <bruno@clisp.org>
238
239         * modules/modechange (Depends-on): Add stdbool.
240
241 2007-03-11  Bruno Haible  <bruno@clisp.org>
242
243         * modules/i-ring (Depends-on): Add stdbool.
244
245 2007-03-11  Bruno Haible  <bruno@clisp.org>
246
247         * modules/gc-des (Depends-on): Add stdbool.
248
249 2007-03-11  Bruno Haible  <bruno@clisp.org>
250
251         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
252
253 2007-03-11  Bruno Haible  <bruno@clisp.org>
254
255         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
256
257 2007-03-11  Bruno Haible  <bruno@clisp.org>
258
259         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
260
261 2007-03-11  Bruno Haible  <bruno@clisp.org>
262
263         * lib/vasnprintf.c (sprintf): Undefine.
264
265 2007-03-11  Bruno Haible  <bruno@clisp.org>
266
267         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
268         initializers in SunPRO C and Compaq C compilers.
269
270 2007-03-11  Bruno Haible  <bruno@clisp.org>
271
272         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
273         decrementing code ANSI C compliant.
274
275 2007-03-11  Bruno Haible  <bruno@clisp.org>
276
277         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
278         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
279
280 2007-03-11  Bruno Haible  <bruno@clisp.org>
281
282         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
283         <stdbool.h> substitute doesn't pass.
284
285 2007-03-11  Bruno Haible  <bruno@clisp.org>
286
287         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
288
289 2007-03-11  Bruno Haible  <bruno@clisp.org>
290
291         * gnulib-tool (func_create_megatestdir): Create also an autobuild
292         script, for submission to autobuild.josefsson.org.
293
294 2007-03-10  Bruno Haible  <bruno@clisp.org>
295
296         * modules/canonicalize-lgpl-tests: New file.
297         * tests/test-canonicalize-lgpl.sh: New file.
298         * tests/test-canonicalize-lgpl.c: New file.
299
300         * modules/c-strcase-tests: New file.
301         * tests/test-c-strcase.sh: New file.
302         * tests/test-c-strcasecmp.c: New file.
303         * tests/test-c-strncasecmp.c: New file.
304
305         * modules/atexit-tests: New file.
306         * tests/test-atexit.sh: New file.
307         * tests/test-atexit.c: New file.
308
309 2007-03-10  Bruno Haible  <bruno@clisp.org>
310
311         * tests/test-binary-io.sh: Use temporary filenames that are not so
312         likely to clash with those of other tests (in a parallel make).
313         * tests/test-binary-io.c: Likewise.
314
315 2007-03-10  Bruno Haible  <bruno@clisp.org>
316
317         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
318         fallback; use #error instead.
319         Suggested by Simon Josefsson.
320
321 2007-03-10  Bruno Haible  <bruno@clisp.org>
322
323         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
324         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
325         first and the last.
326
327 2007-03-10  Bruno Haible  <bruno@clisp.org>
328
329         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
330
331 2007-03-10  Bruno Haible  <bruno@clisp.org>
332
333         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
334         "make distcheck".
335         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
336         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
337         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
338
339 2007-03-10  Bruno Haible  <bruno@clisp.org>
340
341         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
342         variable.
343         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
344         variable.
345
346 2007-03-09  Eric Blake  <ebb9@byu.net>
347         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
348
349         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
350         types are not being provided by gnulib.
351         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
352         types are supported.
353
354 2007-03-10  Bruno Haible  <bruno@clisp.org>
355
356         * lib/stdio_.h (__attribute__): New macro.
357         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
358         vsprintf): Specify __attribute__ __format__ for GCC.
359         Suggested by Eric Blake.
360
361 2007-03-09  Bruno Haible  <bruno@clisp.org>
362
363         * modules/printf-posix-tests: New file.
364         * tests/test-printf-posix.sh: New file.
365         * tests/test-printf-posix.c: New file.
366
367         * modules/printf-posix: New file.
368         * lib/printf.c: New file.
369         * m4/printf-posix-rpl.m4: New file.
370         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
371         REPLACE_PRINTF.
372         * lib/stdio_.h (printf): New declaration.
373         (format, __format__, ____printf____, ____scanf____, ____strftime____,
374         ____strfmon____): New macros.
375         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
376         REPLACE_PRINTF.
377
378 2007-03-09  Bruno Haible  <bruno@clisp.org>
379
380         * tests/test-vasnprintf-posix2.sh: New file.
381         * tests/test-vasnprintf-posix2.c: New file.
382         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
383         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
384         (Makefile.am): Activate test-vasnprintf-posix2.sh.
385
386         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
387         a locale dependent decimal point, rather than always '.'.
388
389 2007-03-09  Eric Blake  <ebb9@byu.net>
390
391         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
392         spite of platforms like Tandem/NSK that define it to -1.
393
394 2007-03-08  Bruno Haible  <bruno@clisp.org>
395
396         * modules/vprintf-posix-tests: New file.
397         * tests/test-vprintf-posix.sh: New file.
398         * tests/test-vprintf-posix.c: New file.
399         * tests/test-printf-posix.h: New file.
400
401         * modules/vprintf-posix: New file.
402         * lib/vprintf.c: New file.
403         * m4/vprintf-posix.m4: New file.
404         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
405         REPLACE_VPRINTF.
406         * lib/stdio_.h (vprintf): New declaration.
407         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
408         REPLACE_VPRINTF.
409
410 2007-03-08  Bruno Haible  <bruno@clisp.org>
411
412         * modules/fprintf-posix-tests: New file.
413         * tests/test-fprintf-posix.sh: New file.
414         * tests/test-fprintf-posix.c: New file.
415
416         * modules/fprintf-posix: New file.
417         * lib/fprintf.c: New file.
418         * m4/fprintf-posix.m4: New file.
419         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
420         REPLACE_FPRINTF.
421         * lib/stdio_.h (fprintf): New declaration.
422         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
423         REPLACE_FPRINTF.
424
425 2007-03-08  Bruno Haible  <bruno@clisp.org>
426
427         * modules/vfprintf-posix-tests: New file.
428         * tests/test-vfprintf-posix.sh: New file.
429         * tests/test-vfprintf-posix.c: New file.
430         * tests/test-fprintf-posix.h: New file.
431         * tests/test-fprintf-posix.out: New file.
432
433         * modules/vfprintf-posix: New file.
434         * lib/vfprintf.c: New file.
435         * m4/vfprintf-posix.m4: New file.
436         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
437         REPLACE_VFPRINTF.
438         * lib/stdio_.h (vfprintf): New declaration.
439         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
440         REPLACE_VFPRINTF.
441
442 2007-03-08  Bruno Haible  <bruno@clisp.org>
443
444         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
445
446 2007-03-08  Bruno Haible  <bruno@clisp.org>
447
448         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
449         instead of 'expr' invocations.
450         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
451         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
452         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
453         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
454         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
455         Suggested by Paul Eggert.
456
457 2007-03-08  Bruno Haible  <bruno@clisp.org>
458
459         * modules/fseterr-tests: New file.
460         * tests/test-fseterr.c: New file.
461
462         * modules/fseterr: New file.
463         * lib/fseterr.h: New file.
464         * lib/fseterr.c: New file.
465
466 2007-03-08  Bruno Haible  <bruno@clisp.org>
467
468         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
469         * lib/getopt_.h: Likewise.
470         * lib/mbswidth.h: Likewise.
471         * lib/setenv.h: Likewise.
472         * lib/vasnprintf.h: Likewise.
473         * lib/vasprintf.h: Likewise.
474         * lib/verror.h: Likewise.
475         * lib/xsetenv.h: Likewise.
476         * lib/xvasprintf.h: Likewise.
477
478 2007-03-08  Jim Meyering  <jim@meyering.net>
479
480         * users.txt: Add parted.
481
482         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
483
484 2007-03-07  Bruno Haible  <bruno@clisp.org>
485
486         * m4/printf.m4: Make the shell script snippets copy&pastable.
487
488 2007-03-02  Bruno Haible  <bruno@clisp.org>
489
490         * lib/netinet_in_.h: New file.
491         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
492         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
493         * modules/netinet_in (Files): Add lib/netinet_in_.h.
494         (Depends-on): Add absolute-header.
495         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
496         into netinet/in.h.
497
498 2007-03-03  Bruno Haible  <bruno@clisp.org>
499
500         * lib/sys_select_.h: New file.
501         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
502         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
503         * modules/sys_select (Files): Add lib/sys_select_.h.
504         (Depends-on): Add absolute-header.
505         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
506         into sys/select.h.
507
508 2007-03-02  Bruno Haible  <bruno@clisp.org>
509
510         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
511         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
512         values.
513         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
514         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
515         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
516         * modules/sys_socket (Depends-on): Add absolute-header.
517         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
518         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
519         (Include): Remove requirement of inclusion of <sys/types.h>.
520
521 2007-03-02  Bruno Haible  <bruno@clisp.org>
522
523         * lib/byteswap_.h (bswap_32): Fix formula.
524
525 2007-03-06  Bruno Haible  <bruno@clisp.org>
526
527         * modules/sprintf-posix-tests: New file.
528         * tests/test-sprintf-posix.c: New file.
529
530         * modules/sprintf-posix: New file.
531         * lib/sprintf.c: New file.
532         * m4/sprintf-posix.m4: New file.
533         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
534         REPLACE_SPRINTF.
535         * lib/stdio_.h (sprintf): New declaration.
536         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
537         REPLACE_SPRINTF.
538
539 2007-03-06  Bruno Haible  <bruno@clisp.org>
540
541         * modules/vsprintf-posix-tests: New file.
542         * tests/test-vsprintf-posix.c: New file.
543         * tests/test-sprintf-posix.h: New file.
544
545         * modules/vsprintf-posix: New file.
546         * lib/vsprintf.c: New file.
547         * m4/vsprintf-posix.m4: New file.
548         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
549         REPLACE_VSPRINTF.
550         * lib/stdio_.h (vsprintf): New declaration.
551         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
552         REPLACE_VSPRINTF.
553
554 2007-03-06  Bruno Haible  <bruno@clisp.org>
555
556         * modules/vsnprintf (Depend-on): Remove minmax.
557
558 2007-03-06  Bruno Haible  <bruno@clisp.org>
559
560         * modules/snprintf-posix-tests: New file.
561         * tests/test-snprintf-posix.c: New file.
562
563         * modules/snprintf-posix: New file.
564         * m4/snprintf-posix.m4: New file.
565         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
566         gl_FUNC_SNPRINTF.
567         (gl_FUNC_SNPRINTF): Invoke it.
568         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
569         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
570         is set.
571         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
572
573 2007-03-06  Bruno Haible  <bruno@clisp.org>
574
575         * modules/vsnprintf-posix-tests: New file.
576         * tests/test-vsnprintf-posix.c: New file.
577         * tests/test-snprintf-posix.h: New file.
578
579         * modules/vsnprintf-posix: New file.
580         * m4/vsnprintf-posix.m4: New file.
581         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
582         gl_FUNC_VSNPRINTF.
583         (gl_FUNC_VSNPRINTF): Invoke it.
584         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
585         * lib/stdio_.h (vsnprintf): Define as a replacement if
586         REPLACE_VSNPRINTF is set.
587         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
588
589 2007-03-06  Bruno Haible  <bruno@clisp.org>
590
591         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
592         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
593
594 2007-03-06  Bruno Haible  <bruno@clisp.org>
595
596         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
597         (asinl): Declare also if HAVE_DECL_ASINL is set.
598         (atanl): Declare also if HAVE_DECL_ATANL is set.
599         (ceill): Declare also if HAVE_DECL_CEILL is set.
600         (cosl): Declare also if HAVE_DECL_COSL is set.
601         (expl): Declare also if HAVE_DECL_EXPL is set.
602         (floorl): Declare also if HAVE_DECL_FLOORL is set.
603         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
604         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
605         (logl): Declare also if HAVE_DECL_LOGL is set.
606         (sinl): Declare also if HAVE_DECL_SINL is set.
607         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
608         (tanl): Declare also if HAVE_DECL_TANL is set.
609         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
610         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
611         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
612         declaration of frexpl, ldexpl.
613         * modules/printf-frexpl (Depends-on): Add math.
614         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
615
616 2007-03-05  Bruno Haible  <bruno@clisp.org>
617
618         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
619         frexpl and ldexpl are declared.
620         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
621
622 2007-03-05  Bruno Haible  <bruno@clisp.org>
623
624         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
625         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
626
627 2007-03-05  Bruno Haible  <bruno@clisp.org>
628
629         * lib/stdio_.h: Include <stddef.h>.
630
631 2007-03-05  Bruno Haible  <bruno@clisp.org>
632
633         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
634
635 2007-03-05  Bruno Haible  <bruno@clisp.org>
636
637         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
638         NetBSD 4, from Ralf Wildenhues.
639
640 2007-03-04  Bruno Haible  <bruno@clisp.org>
641
642         * lib/vasprintf.h: Update #if logic for the case when the functions
643         exist but are overridden.
644
645 2007-03-04  Bruno Haible  <bruno@clisp.org>
646
647         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
648         implementations: glibc-2.4 and MacOS X 10.3.
649         * tests/test-vasnprintf-posix.c (test_function): Test also the case
650         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
651         * tests/test-vasprintf-posix.c (test_function): Likewise.
652
653 2007-03-04  Bruno Haible  <bruno@clisp.org>
654
655         * modules/vasprintf-posix-tests: New file.
656         * tests/test-vasprintf-posix.c: New file.
657
658         * modules/vasprintf-posix: New file.
659         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
660         defined.
661         * m4/vasprintf-posix.m4: New file.
662         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
663         gl_FUNC_VASPRINTF.
664         (gl_FUNC_VASPRINTF): Invoke it.
665         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
666         here.
667         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
668
669 2007-03-04  Bruno Haible  <bruno@clisp.org>
670
671         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
672         REPLACE_GETTIMEOFDAY.
673         * modules/sys_time (Makefile.am): Likewise.
674         * m4/sys_time_h.m4: Likewise.
675         * m4/gettimeofday.m4: Likewise.
676
677 2007-03-04  Bruno Haible  <bruno@clisp.org>
678
679         * modules/vasnprintf-posix-tests: New file.
680         * tests/test-vasnprintf-posix.c: New file.
681
682         * modules/vasnprintf-posix: New file.
683         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
684         printf-frexpl.h.
685         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
686         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
687         REPLACE_VASNPRINTF is defined.
688         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
689         gl_FUNC_VASNPRINTF.
690         (gl_FUNC_VASNPRINTF): Invoke it.
691         * m4/vasnprintf-posix.m4: New file.
692         * m4/printf.m4: New file.
693
694 2007-03-04  Bruno Haible  <bruno@clisp.org>
695
696         Compile progreloc.c only if --enable-relocatable is specified.
697         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
698         if --enable-relocatable was specified.
699         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
700         lib_SOURCES.
701
702 2007-03-04  Jim Meyering  <jim@meyering.net>
703
704         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
705         Use it consistently, rather than enumerating errno constants.
706
707 2007-03-04  Bruno Haible  <bruno@clisp.org>
708
709         * modules/xvasprintf-tests: New file.
710         * tests/test-xvasprintf.c: New file.
711
712         * modules/vasprintf-tests: New file.
713         * tests/test-vasprintf.c: New file.
714
715         * modules/vasnprintf-tests: New file.
716         * tests/test-vasnprintf.c: New file.
717
718         * modules/vsnprintf-tests: New file.
719         * tests/test-vsnprintf.c: New file.
720
721         * modules/snprintf-tests: New file.
722         * tests/test-snprintf.c: New file.
723
724 2007-03-04  Bruno Haible  <bruno@clisp.org>
725
726         Compile relocatable.c only if --enable-relocatable is specified.
727         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
728         gl_RELOCATABLE_LIBRARY.
729         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
730         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
731         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
732         gl_RELOCATABLE_LIBRARY.
733         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
734         (Makefile.am): Remove lib_SOURCES.
735         * modules/relocatable-lib-lgpl (configure.ac): Invoke
736         gl_RELOCATABLE_LIBRARY.
737         (Makefile.am): Remove lib_SOURCES.
738         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
739         always.
740         * modules/relocatable-prog-wrapper (configure.ac): Invoke
741         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
742
743 2007-03-04  Bruno Haible  <bruno@clisp.org>
744
745         * modules/argmatch-tests: New file.
746         * tests/test-argmatch.c: New file.
747
748         * tests/test-allocsa.c (main): Halve the number of loop runs.
749
750         * modules/alloca-opt-tests: New file.
751         * tests/test-alloca-opt.c: New file.
752
753 2007-03-04  Jim Meyering  <jim@meyering.net>
754
755         Work around difference between Linux ACLs and Solaris 10 ZFS.
756         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
757         for EINVAL.
758
759 2007-03-03  Bruno Haible  <bruno@clisp.org>
760
761         * modules/relocatable-prog (Depends-on): Add back progreloc's
762         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
763
764 2007-03-03  Bruno Haible  <bruno@clisp.org>
765
766         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
767         * modules/relocatable-lib: New file.
768
769 2007-03-03  Bruno Haible  <bruno@clisp.org>
770
771         * modules/relocatable-prog: Renamed from modules/relocatable.
772         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
773
774 2007-03-03  Bruno Haible  <bruno@clisp.org>
775
776         * modules/relocatable-script (Files): Add doc/relocatable.texi,
777         m4/relocatable-lib.m4.
778         (Depends-on): Remove 'relocatable'.
779         (configure.ac): Add gl_RELOCATABLE_NOP.
780
781 2007-03-03  Bruno Haible  <bruno@clisp.org>
782
783         * modules/relocatable-prog-wrapper: New file.
784         * modules/relocatable (Depends-on): Add it. Remove all other
785         dependencies except progname.
786         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
787
788         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
789         (gl_FUNC_STRERROR): Nop.
790         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
791
792         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
793         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
794
795         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
796         (gl_FUNC_READLINK): Update.
797
798         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
799
800 2007-03-03  Bruno Haible  <bruno@clisp.org>
801
802         * lib/xreadlink.c: Include <unistd.h> unconditionally.
803         * modules/xreadlink (Depends-on): Add unistd.
804         * modules/xreadlink-with-size (Depends-on): Likewise.
805
806 2007-03-03  Bruno Haible  <bruno@clisp.org>
807
808         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
809         extracted from gt_FUNC_SETENV.
810         (gt_FUNC_SETENV): Remove macro.
811         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
812         remove gt_FUNC_SETENV.
813
814 2007-03-03  Bruno Haible  <bruno@clisp.org>
815
816         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
817         ENABLE_RELOCATABLE here.
818         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
819
820 2007-03-03  Bruno Haible  <bruno@clisp.org>
821
822         * modules/rbtreehash-list-tests (Depends-on): Add progname.
823         * tests/test-rbtreehash_list.c: Include progname.h.
824         (main): Call set_program_name.
825
826         * modules/rbtree-oset-tests (Depends-on): Add progname.
827         * tests/test-rbtree_oset.c: Include progname.h.
828         (main): Call set_program_name.
829
830         * modules/rbtree-list-tests (Depends-on): Add progname.
831         * tests/test-rbtree_list.c: Include progname.h.
832         (main): Call set_program_name.
833
834         * modules/linked-list-tests (Depends-on): Add progname.
835         * tests/test-linked_list.c: Include progname.h.
836         (main): Call set_program_name.
837
838 2007-03-03  Bruno Haible  <bruno@clisp.org>
839
840         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
841         All uses of __restrict changed to _Restrict_.
842         * lib/glob_.h (__restrict): Remove macro.
843
844 2007-03-02  Bruno Haible  <bruno@clisp.org>
845
846         * modules/gettext (configure.ac): Require gettext infrastructure
847         from version 0.16.1.
848
849 2007-03-02  Bruno Haible  <bruno@clisp.org>
850
851         * modules/linkedhash-list-tests (Depends-on): Add progname.
852         * tests/test-linkedhash_list.c: Include progname.h.
853         (main): Call set_program_name.
854
855         * modules/carray-list-tests (Depends-on): Add progname.
856         * tests/test-carray_list.c: Include progname.h.
857         (main): Call set_program_name.
858
859         * modules/avltreehash-list-tests (Depends-on): Add progname.
860         * tests/test-avltreehash_list.c: Include progname.h.
861         (main): Call set_program_name.
862
863         * modules/avltree-oset-tests (Depends-on): Add progname.
864         * tests/test-avltree_oset.c: Include progname.h.
865         (main): Call set_program_name.
866
867         * modules/avltree-list-tests (Depends-on): Add progname.
868         * tests/test-avltree_list.c: Include progname.h.
869         (main): Call set_program_name.
870
871         * modules/array-oset-tests (Depends-on): Add progname.
872         * tests/test-array_oset.c: Include progname.h.
873         (main): Call set_program_name.
874
875         * modules/array-list-tests (Depends-on): Add progname.
876         * tests/test-array_list.c: Include progname.h.
877         (main): Call set_program_name.
878
879         * modules/argp-tests (Depends-on): Add progname.
880         * tests/test-argp.c: Include argp.h first. Include progname.h.
881         (main): Call set_program_name.
882
883 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
884
885         * doc/gnulib-tool.texi (Initial import): Reword description of
886         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
887         limited effect even if defined after the first system include.
888
889 2007-03-01  Bruno Haible  <bruno@clisp.org>
890
891         * build-aux/config.libpath: Update to libtool-1.5.22.
892         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
893
894 2007-03-01  Bruno Haible  <bruno@clisp.org>
895
896         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
897         foo_CFLAGS.
898         Reported by Ralf Wildenhues.
899
900 2007-03-01  Bruno Haible  <bruno@clisp.org>
901
902         * build-aux/install-reloc: Remove object files left over by some
903         compilers.
904         Reported by Ralf Wildenhues.
905
906 2007-03-01  Bruno Haible  <bruno@clisp.org>
907
908         * build-aux/install-reloc: Break long lines.
909
910 2007-03-01  Bruno Haible  <bruno@clisp.org>
911
912         * doc/relocatable.texi: Document that it may not work on OpenBSD.
913         Reported by Ralf Wildenhues.
914
915 2007-03-01  Bruno Haible  <bruno@clisp.org>
916
917         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
918         include ordering constraints.
919
920 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
921
922         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
923         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
924         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
925         as another example.
926         * lib/time_.h: Fix misspelling.
927         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
928         Require gl_HEADER_TIME_H_DEFAULTS.
929         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
930         * m4/time_r.m4 (gl_TIME_R): Likewise.
931         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
932
933 2007-03-01  Bruno Haible  <bruno@clisp.org>
934
935         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
936         * m4/utimens.m4 (gl_UTIMENS): Likewise.
937
938 2007-03-01  Jim Meyering  <jim@meyering.net>
939
940         * modules/xreadlink (Maintainer): Add my name.
941         * modules/xreadlink-with-size (Depends-on): Alphabetize.
942
943 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
944             Bruno Haible  <bruno@clisp.org>
945
946         * build-aux/install-reloc: Compile also c-ctype.c.
947         * build-aux/relocatable.sh.in: New file.
948         * doc/relocatable.texi: New file.
949         * doc/relocatable-maint.texi: New file.
950         * doc/gnulib.texi: Include relocatable-maint.texi.
951         * lib/progreloc.c: Include unistd.h unconditionally.
952         * lib/relocwrapper.c: Include unistd.h unconditionally.
953         Include c-ctype.h.
954         (add_dotbin): Use c_tolower.
955         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
956         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
957         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
958         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
959         to m4/relocatable-lib.m4.
960         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
961         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
962         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
963         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
964         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
965         * modules/relocatable: New file.
966         * modules/relocatable-lib: New file.
967         * modules/relocatable-script: New file.
968
969 2007-02-28  Bruno Haible  <bruno@clisp.org>
970
971         Import --enable-relocatable infrastructure.
972         * build-aux/config.libpath: New file, from GNU gettext.
973         * build-aux/install-reloc: New file, from GNU gettext.
974         * build-aux/reloc-ldflags: New file, from GNU gettext.
975         * lib/relocatable.h: New file, from GNU gettext.
976         * lib/relocatable.c: New file, from GNU gettext.
977         * lib/relocwrapper.c: New file, from GNU gettext.
978         * m4/relocatable.m4: New file, from GNU gettext.
979
980 2007-02-28  Bruno Haible  <bruno@clisp.org>
981
982         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
983
984         * modules/xreadlink: New file, from GNU gettext with modifications.
985         * lib/xreadlink.c: New file, from GNU gettext.
986         * lib/xreadlink.h: Add comments.
987         (xreadlink): New declaration.
988
989         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
990         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
991         lib/xreadlink-with-size.c.
992         (configure.ac): Remove gl_XREADLINK invocation.
993         (Makefile.am): Augment lib_SOURCES.
994         * m4/xreadlink.m4: Remove file.
995         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
996         (xreadlink_with_size): Renamed from xreadink.
997         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
998         * modules/canonicalize (Depends-on): Replace xreadlink with
999         xreadlink-with-size.
1000         * lib/canonicalize.c (canonicalize_filename_mode): Update.
1001
1002 2007-02-25  Jim Meyering  <jim@meyering.net>
1003
1004         * build-aux/announce-gen: When complaining about excess arguments,
1005         list them.
1006
1007 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
1008
1009         * README: Document signed integer overflow situation more
1010         accurately.
1011
1012 2007-02-25  Bruno Haible  <bruno@clisp.org>
1013
1014         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
1015         'a' or 'A' conversion.
1016
1017 2007-02-25  Bruno Haible  <bruno@clisp.org>
1018
1019         * modules/filename: Renamed from modules/pathname.
1020         (Files): Replace lib/pathname.h with lib/filename.h. Replace
1021         lib/concatpath.c with lib/concat-filename.c.
1022         (Makefile.am): Update.
1023         (Include): Replace pathname.h with filename.h.
1024         * lib/filename.h: Renamed from lib/pathname.h.
1025         (concatenated_filename): Renamed from concatenated_pathname.
1026         * lib/concat-filename.c: Renamed from lib/concatpath.c.
1027         (concatenated_filename): Renamed from concatenated_pathname.
1028         * lib/findprog.c: Include filename.h instead of pathname.h.
1029         (find_in_path): Update.
1030         * lib/javacomp.c: Include filename.h instead of pathname.h.
1031         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
1032         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
1033         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
1034         is_oldgcj_14_13_usable, is_javac_usable): Update.
1035         * lib/javaexec.c: Include filename.h instead of pathname.h.
1036         (execute_java_class): Update.
1037         * modules/findprog: Update.
1038         * modules/javacomp: Update.
1039         * modules/javaexec: Update.
1040         * MODULES.html.sh (File system functions): Add 'filename', remove
1041         'pathname'.
1042
1043 2007-02-25  Bruno Haible  <bruno@clisp.org>
1044
1045         * modules/printf-frexpl-tests: New file.
1046         * tests/test-printf-frexpl.c: New file.
1047
1048         * modules/printf-frexpl: New file.
1049         * lib/printf-frexpl.h: New file.
1050         * lib/printf-frexpl.c: New file.
1051         * m4/printf-frexpl.m4: New file.
1052
1053 2007-02-25  Bruno Haible  <bruno@clisp.org>
1054
1055         * modules/printf-frexp-tests: New file.
1056         * tests/test-printf-frexp.c: New file.
1057
1058         * modules/printf-frexp: New file.
1059         * lib/printf-frexp.h: New file.
1060         * lib/printf-frexp.c: New file.
1061         * m4/printf-frexp.m4: New file.
1062
1063 2007-02-25  Bruno Haible  <bruno@clisp.org>
1064
1065         Assume automake >= 1.10 for the tests.
1066         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
1067         * modules/arctwo-tests: Likewise.
1068         * modules/argp-tests: Likewise.
1069         * modules/avltree-list-tests: Likewise.
1070         * modules/avltree-oset-tests: Likewise.
1071         * modules/avltreehash-list-tests: Likewise.
1072         * modules/carray-list-tests: Likewise.
1073         * modules/crc-tests: Likewise.
1074         * modules/des-tests: Likewise.
1075         * modules/gc-arcfour-tests: Likewise.
1076         * modules/gc-arctwo-tests: Likewise.
1077         * modules/gc-des-tests: Likewise.
1078         * modules/gc-hmac-md5-tests: Likewise.
1079         * modules/gc-hmac-sha1-tests: Likewise.
1080         * modules/gc-md2-tests: Likewise.
1081         * modules/gc-md4-tests: Likewise.
1082         * modules/gc-md5-tests: Likewise.
1083         * modules/gc-pbkdf2-sha1-tests: Likewise.
1084         * modules/gc-rijndael-tests: Likewise.
1085         * modules/gc-sha1-tests: Likewise.
1086         * modules/gc-tests: Likewise.
1087         * modules/getaddrinfo-tests: Likewise.
1088         * modules/hmac-md5-tests: Likewise.
1089         * modules/hmac-sha1-tests: Likewise.
1090         * modules/linked-list-tests: Likewise.
1091         * modules/linkedhash-list-tests: Likewise.
1092         * modules/lock-tests: Likewise.
1093         * modules/md2-tests: Likewise.
1094         * modules/md4-tests: Likewise.
1095         * modules/md5-tests: Likewise.
1096         * modules/rbtree-list-tests: Likewise.
1097         * modules/rbtree-oset-tests: Likewise.
1098         * modules/rbtreehash-list-tests: Likewise.
1099         * modules/read-file-tests: Likewise.
1100         * modules/rijndael-tests: Likewise.
1101         * modules/stdint-tests: Likewise.
1102         * modules/tls-tests: Likewise.
1103
1104 2007-02-24  Bruno Haible  <bruno@clisp.org>
1105
1106         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
1107         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
1108         function; instead check whether isnan with a double argument links.
1109         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
1110         function; instead check whether isnan with a 'long double' argument
1111         links.
1112         Reported by Eric Blake <ebb9@byu.net>.
1113
1114 2007-02-24  Bruno Haible  <bruno@clisp.org>
1115
1116         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
1117         defined.
1118         * lib/isnanl.c: Remove all code. Just include isnan.c.
1119         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
1120
1121 2007-02-25  Jim Meyering  <jim@meyering.net>
1122
1123         Avoid conflicting types for 'unsetenv' on FreeBSD.
1124         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
1125         conflicting with FreeBSD's (5.0 and 6.1) function declaration
1126         in stdlib.h.
1127
1128 2007-02-24  Bruno Haible  <bruno@clisp.org>
1129
1130         * modules/isnanl-nolibm-tests: New file.
1131         * tests/test-isnanl.c: New file.
1132
1133         * modules/isnanl-nolibm: New file.
1134         * lib/isnanl.h: New file.
1135         * lib/isnanl.c: New file.
1136         * m4/isnanl.m4: New file.
1137
1138 2007-02-24  Bruno Haible  <bruno@clisp.org>
1139
1140         * modules/isnan-nolibm-tests: New file.
1141         * tests/test-isnan.c: New file.
1142
1143         * modules/isnan-nolibm: New file.
1144         * lib/isnan.h: New file.
1145         * lib/isnan.c: New file.
1146         * m4/isnan.m4: New file.
1147
1148 2007-02-24  Bruno Haible  <bruno@clisp.org>
1149
1150         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
1151         assume that an exponent fits in 20 bits.
1152
1153 2007-02-24  Jim Meyering  <jim@meyering.net>
1154
1155         * m4/regex.m4: Update the description of the configure-time option,
1156         --without-included-regex, to state accurately what the defaults are,
1157         and perhaps to give people an idea why using this option is risky.
1158
1159 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
1160
1161         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
1162         loops on small arguments.  This attempts to avoid the problem
1163         Bruno Haible reported for AIX 4.3.2 in
1164         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
1165
1166 2007-02-23  Bruno Haible  <bruno@clisp.org>
1167
1168         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
1169         Needed for help2man.
1170
1171 2007-02-23  Karl Berry  <karl@gnu.org>
1172
1173         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
1174         exists, foo.h should be cvs-ignored, not committed.
1175
1176 2007-02-23  Eric Blake  <ebb9@byu.net>
1177
1178         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
1179         * lib/stat-time.h (includes): Likewise.
1180         * lib/utimecmp.c (includes): Likewise.
1181         * lib/utimens.h (includes): Likewise.
1182         * lib/getdate.y (includes): Also include "timespec.h" for use
1183         internal to the module.
1184         * modules/utimens (Depends-on): Revert yesterday's patch.
1185         * modules/nanosleep (Depends-on): Add missing dependency.
1186
1187 2007-02-22  Bruno Haible  <bruno@clisp.org>
1188
1189         * lib/glob.c: Don't include getlogin_r.h.
1190
1191 2007-02-22  Jim Meyering  <jim@meyering.net>
1192
1193         * modules/utimens (Depends-on): Add timespec, required for
1194         utimens.h's inclusion of timespec.h.
1195
1196 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
1197
1198         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
1199         long unreadable paths in GNU/Linux.  Problem reported by Andreas
1200         Schwab in
1201         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
1202         I'll try to think of a better way to fix the Solaris problem.
1203
1204         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
1205         like glibc; on Solaris 10, it fails with errno == EINVAL.
1206         POSIX says the behavior is unspecified if the first argument is NULL,
1207         so play it safe and never pass NULL to the system getcwd.
1208
1209 2007-02-21  Jim Meyering  <jim@meyering.net>
1210
1211         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
1212         of gettimeofday.  It would conflict with the one now always
1213         provided via sys_time_.h.  Reported by Matthew Woehlke, as
1214         an IRIX 6.5 build failure.
1215
1216 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
1217
1218         Minor fixups to port to Solaris 10 with Sun C 5.8.
1219         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
1220         * modules/getcwd (Depends-on): Add dirfd.
1221         * lib/putenv.c (putenv): #undef it.
1222         (rpl_putenv): New decl.
1223         (malloc, free): Include <stdlib.h> rather than prototyping separately.
1224
1225 2007-02-20  Bruno Haible  <bruno@clisp.org>
1226
1227         * modules/stdio-tests: New file.
1228         * tests/test-stdio.c: New file.
1229
1230         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
1231         (Depends-on): Add stdio.
1232         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1233         (Include): Use <stdio.h> instead of vsnprintf.h.
1234         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1235         HAVE_DECL_VSNPRINTF.
1236         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
1237
1238         * modules/snprintf (Files): Remove lib/snprintf.h.
1239         (Depends-on): Add stdio.
1240         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1241         (Include): Use <stdio.h> instead of snprintf.h.
1242         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1243         HAVE_DECL_SNPRINTF.
1244         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
1245         * lib/getaddrinfo.c: Likewise.
1246
1247         * modules/stdio: New file.
1248         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
1249         * lib/snprintf.h: Remove file.
1250         * lib/vsnprintf.h: Remove file.
1251         * lib/.cppi-disable: Remove snprintf.h.
1252         * m4/stdio_h.m4: New file.
1253         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
1254
1255 2007-02-20  Jim Meyering  <jim@meyering.net>
1256
1257         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
1258         used by e.g., mingw.  From Bruno Haible.
1259
1260 2007-02-19  Bruno Haible  <bruno@clisp.org>
1261
1262         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
1263         warnings.
1264         Reported by Ben Pfaff <blp@cs.stanford.edu>.
1265
1266 2007-02-19  Bruno Haible  <bruno@clisp.org>
1267
1268         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
1269         from mingw users.
1270
1271 2007-02-19  Bruno Haible  <bruno@clisp.org>
1272
1273         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
1274         warnings.
1275         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
1276
1277 2007-02-19  Jim Meyering  <jim@meyering.net>
1278
1279         Don't use FD after a successful "fdopendir (fd)".
1280         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
1281         Reset it by calling dirfd on the just-obtained DIR*.
1282
1283         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
1284         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
1285
1286 2007-02-18  Bruno Haible  <bruno@clisp.org>
1287
1288         * lib/readlink.c: Include <unistd.h>.
1289         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
1290         HAVE_READLINK.
1291         * modules/readlink (Depends-on): Add unistd.
1292         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1293         (Include): Add <unistd.h>.
1294
1295         * lib/getlogin_r.h: Remove file.
1296         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
1297         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
1298         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
1299         HAVE_DECL_GETLOGIN_R.
1300         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
1301         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1302         (Include): Use <unistd.h> instead of getlogin_r.h.
1303
1304         * lib/getcwd.h: Remove file.
1305         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
1306         * lib/xgetcwd.c: Likewise.
1307         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
1308         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
1309         * modules/getcwd (Files): Remove lib/getcwd.h.
1310         (Depends-on): Add unistd.
1311         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1312         (Include): Use <unistd.h> instad of getcwd.h.
1313
1314         * lib/ftruncate.c: Include <unistd.h> first.
1315         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
1316         Set HAVE_FTRUNCATE.
1317         * modules/ftruncate (Depends-on): Add unistd.
1318         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1319
1320         * lib/fchdir.c: Include <unistd.h> first.
1321         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
1322         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
1323         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
1324         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1325         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
1326
1327         * lib/dup2.c: Include <unistd.h> first.
1328         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
1329         HAVE_DUP2.
1330         * modules/dup2 (Depends-on): Add unistd.
1331         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1332
1333         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
1334         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
1335         REPLACE_CHOWN. Don't define chown as a macro here.
1336         * modules/chown (Depends-on): Add unistd.
1337         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1338
1339         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
1340         Add definition for GL_LINK_WARNING.
1341         (chown, dup2): New declarations.
1342         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
1343         link warning.
1344         (ftruncate): New declaration.
1345         (getcwd): New declaration, taken from old getcwd.h.
1346         (getlogin_r): New declaration, taken from old getlogin_r.h.
1347         (readlink): New declaration.
1348         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
1349         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
1350         (gl_PREREQ_UNISTD): Remove macro.
1351         (gl_UNISTD_MODULE_INDICATOR): New macro.
1352         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
1353         many new variables. Don't set UNISTD_H.
1354         * modules/unistd (Description): Change.
1355         (Depends-on): Add link-warning.
1356         (configure.ac): Update.
1357         (Makefile.am): Create unistd.h always. Substitute many new variables
1358         into it.
1359
1360 2007-02-18  Bruno Haible  <bruno@clisp.org>
1361
1362         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
1363         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
1364         HAVE_GETSUBOPT.
1365         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
1366         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
1367         * lib/getsubopt.h: Remove file.
1368         * modules/getsubopt (Files): Remove lib/getsubopt.h.
1369         (Depends-on): Add stdlib.
1370         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1371         (Includes): Use <stdlib.h> instead of getsubopt.h.
1372         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
1373         Set HAVE_GETSUBOPT.
1374         * lib/getsubopt.c: Don't include getsubopt.h.
1375
1376 2007-02-18  Bruno Haible  <bruno@clisp.org>
1377
1378         * modules/fchdir (Depends-on): Add dup2.
1379
1380 2007-02-18  Bruno Haible  <bruno@clisp.org>
1381
1382         * lib/stdlib_.h: Handle glibc's special invocation convention
1383         specially.
1384
1385 2007-02-18  Bruno Haible  <bruno@clisp.org>
1386
1387         * modules/stdlib-tests: New file.
1388         * tests/test-stdlib.c: New file.
1389
1390         * modules/mkstemp (Files): Remove lib/mkstemp.h.
1391         (Depends-on): Add stdlib.
1392         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1393         (Includes): Use <stdlib.h> instead of mkstemp.h.
1394         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1395         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
1396         * lib/mkstemp.c: Don't include mkstemp.h.
1397         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
1398         * lib/stdlib--.h: Don't include mkstemp.h.
1399
1400         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
1401         (Depends-on): Add stdlib.
1402         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1403         (Includes): Use <stdlib.h> instead of mkdtemp.h.
1404         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1405         HAVE_MKDTEMP.
1406         * lib/mkdtemp.c: Don't include mkdtemp.h.
1407         * lib/clean-temp.c: Don't include mkdtemp.h.
1408
1409         * modules/exit (Files): Remove lib/exit.h.
1410         (Depends-on): Add stdlib.
1411         (Makefile.am): Remove lib_SOURCES.
1412         (Include): Use <stdlib.h> instead of exit.h.
1413         * lib/argmatch.c: Don't include exit.h.
1414         * lib/execute.c: Likewise.
1415         * lib/pagealign_alloc.c: Likewise.
1416         * lib/pipe.c: Likewise.
1417         * lib/wait-process.c: Likewise.
1418         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
1419         * lib/exitfail.c: Likewise.
1420         * lib/savewd.c: Likewise.
1421         * lib/xsetenv.c: Likewise.
1422
1423         * modules/stdlib: New file.
1424         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
1425         and extra comments about mkstemp().
1426         * lib/exit.h: Remove file.
1427         * lib/mkdtemp.h: Remove file.
1428         * lib/mkstemp.h: Remove file.
1429         * m4/stdlib_h.m4: New file.
1430         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
1431
1432 2007-02-18  Bruno Haible  <bruno@clisp.org>
1433
1434         * modules/math-tests: New file.
1435         * tests/test-math.c: New file.
1436
1437         * modules/math: New file.
1438         * modules/mathl (Files): Remove lib/mathl.h.
1439         (Depends-on): Add math.
1440         (Makefile.am): Don't mention mathl.h.
1441         (Include): Use <math.h> instead of mathl.h.
1442         * lib/math_.h: New file.
1443         * lib/mathl.h: Remove file.
1444         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
1445         mathl.h.
1446         * lib/asinl.c: Likewise.
1447         * lib/atanl.c: Likewise.
1448         * lib/ceill.c: Likewise.
1449         * lib/cosl.c: Likewise.
1450         * lib/expl.c: Likewise.
1451         * lib/floorl.c: Likewise.
1452         * lib/frexpl.c: Likewise.
1453         * lib/ldexpl.c: Likewise.
1454         * lib/logl.c: Likewise.
1455         * lib/sincosl.c: Likewise.
1456         * lib/sinl.c: Likewise.
1457         * lib/sqrtl.c: Likewise.
1458         * lib/tanl.c: Likewise.
1459         * lib/trigl.c: Likewise.
1460         * m4/math_h.m4: New file.
1461         * MODULES.html.sh (Mathematics): Add math.
1462
1463 2007-02-17  Bruno Haible  <bruno@clisp.org>
1464
1465         * modules/wctype-tests: New file.
1466         * tests/test-wctype.c: New file.
1467
1468         * modules/wchar-tests: New file.
1469         * tests/test-wchar.c: New file.
1470
1471         * modules/unistd-tests: New file.
1472         * tests/test-unistd.c: New file.
1473
1474         * modules/time-tests: New file.
1475         * tests/test-time.c: New file.
1476
1477         * modules/sysexits-tests: New file.
1478         * tests/test-sysexits.c: New file.
1479
1480         * modules/sys_time-tests: New file.
1481         * tests/test-sys_time.c: New file.
1482
1483         * modules/sys_stat-tests: New file.
1484         * tests/test-sys_stat.c: New file.
1485
1486         * modules/sys_socket-tests: New file.
1487         * tests/test-sys_socket.c: New file.
1488
1489         * modules/sys_select-tests: New file.
1490         * tests/test-sys_select.c: New file.
1491
1492         * modules/string-tests: New file.
1493         * tests/test-string.c: New file.
1494
1495         * modules/stdbool-tests: New file.
1496         * tests/test-stdbool.c: New file.
1497
1498         * modules/netinet_in-tests: New file.
1499         * tests/test-netinet_in.c: New file.
1500
1501         * modules/inttypes-tests: New file.
1502         * tests/test-inttypes.c: New file.
1503
1504         * modules/fcntl-tests: New file.
1505         * tests/test-fcntl.c: New file.
1506
1507         * modules/byteswap-tests: New file.
1508         * tests/test-byteswap.c: New file.
1509
1510         * modules/arpa_inet-tests: New file.
1511         * tests/test-arpa_inet.c: New file.
1512
1513 2007-02-17  Bruno Haible  <bruno@clisp.org>
1514
1515         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
1516         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
1517         if the corresponding module is not enabled. Emit link warnings if
1518         the function is used nevertheless.
1519         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
1520         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
1521         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
1522         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
1523         * modules/inttypes (Depends-on): Add link-warning.
1524         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1525         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
1526         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
1527         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
1528         * modules/imaxdiv (configure.ac): Likewise.
1529         * modules/strtoimax (configure.ac): Likewise.
1530         * modules/strtoumax (configure.ac): Likewise.
1531
1532 2007-02-17  Bruno Haible  <bruno@clisp.org>
1533
1534         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
1535         gl_STRING_MODULE_INDICATOR_DEFAULTS.
1536         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
1537         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
1538
1539 2007-02-17  Bruno Haible  <bruno@clisp.org>
1540
1541         * modules/link-warning: New file.
1542         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
1543         * lib/string_.h (GL_LINK_WARNING): Remove definition.
1544         * modules/string (Depends-on): Add link-warning.
1545         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1546         string.h.
1547         * MODULES.html.sh (Support for building libraries and executables): Add
1548         link-warning.
1549
1550 2007-02-17  Bruno Haible  <bruno@clisp.org>
1551
1552         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
1553         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
1554         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
1555         long lines.
1556
1557 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
1558             Bruno Haible  <bruno@clisp.org>
1559
1560         * modules/tmpfile: New file.
1561         * lib/tmpfile.c: New file.
1562         * m4/tmpfile.m4: New file.
1563         * MODULES.html.sh (func_all_modules): New section "Input/output".
1564
1565 2007-02-15  Bruno Haible  <bruno@clisp.org>
1566
1567         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
1568         (supports_delete_on_close): New function.
1569         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
1570
1571 2007-02-14  Bruno Haible  <bruno@clisp.org>
1572
1573         * modules/mbspcasecmp-tests: New file.
1574         * tests/test-mbspcasecmp.sh: New file.
1575         * tests/test-mbspcasecmp.c: New file.
1576
1577         New module mbspcasecmp.
1578         * modules/mbspcasecmp: New file.
1579         * lib/mbspcasecmp.c: New file.
1580         * lib/string_.h (strncasecmp): Change warning message.
1581         (mbspcasecmp): New declaration.
1582         * m4/mbspcasecmp.m4: New file.
1583         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1584         GNULIB_MBSPCASECMP.
1585         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
1586         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
1587
1588 2007-02-14  Bruno Haible  <bruno@clisp.org>
1589
1590         * modules/mbsncasecmp-tests: New file.
1591         * tests/test-mbsncasecmp.sh: New file.
1592         * tests/test-mbsncasecmp.c: New file.
1593
1594         New module mbsncasecmp.
1595         * modules/mbsncasecmp: New file.
1596         * lib/mbsncasecmp.c: New file.
1597         * lib/string_.h (mbsncasecmp): New declaration.
1598         * m4/mbsncasecmp.m4: New file.
1599         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1600         GNULIB_MBSNCASECMP.
1601         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
1602         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
1603
1604 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
1605
1606         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
1607         Verify that it doesn't overlap with our flags.
1608         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
1609         do not have the desired effect in multibyte locales; instead, use
1610         mbscasecmp.
1611         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
1612         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
1613         we don't require GNU fnmatch ourselves (if our users require it, they
1614         should do so explicitly).
1615
1616         Fix regex code so it doesn't rely on strcasecmp.
1617         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
1618         Otherwise, include gnulib's langinfo.h.
1619         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
1620         undesirable behavior in non-C locales.  Instead, rely on localecharset.
1621         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
1622         * modules/regex (FILES): Remove m4/codeset.m4.
1623         (Depends-on): Add localcharset.  Remove strcase.
1624
1625 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1626
1627         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
1628         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
1629
1630 2007-02-13  Bruno Haible  <bruno@clisp.org>
1631
1632         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
1633         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1634
1635 2007-02-12  Bruno Haible  <bruno@clisp.org>
1636
1637         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1638         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
1639         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
1640         time warning rather than a link error.
1641
1642 2007-02-12  Bruno Haible  <bruno@clisp.org>
1643
1644         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
1645         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
1646         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1647
1648 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1649
1650         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
1651         args, not 2.
1652
1653 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1654
1655         New module 'time', so that apps can include <time.h> as per
1656         POSIX and GNU instead of separate include files like time_r.h
1657         and timegm.h.  This implementation tries out a simpler approach
1658         for replacing decls in standard include files (as compared to
1659         the string module), somewhat as an experiment.
1660
1661         * config/srclist.txt: Comment out mktime.c for now.
1662         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
1663         since it doesn't apply any more.  Use generic wording instead.
1664         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
1665         'time'.
1666         * lib/time_.h, m4/time_h.m4, modules/time: New files.
1667         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
1668         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
1669         Don't include <sys/types.h>; no longer needed since we assume C89.
1670         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
1671         * lib/strftime.c: Likewise.
1672         * lib/time_r.c: Likewise.
1673         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
1674         * lib/nanosleep.c: Include <time.h> first, to check interface.
1675         * lib/strptime.c: Likewise.
1676         * lib/time_r.c: Likewise.
1677         * lib/timegm.c: Likewise.
1678         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
1679         needed.
1680         * lib/timegm.c: Don't include timegm.h; no longer needed.
1681         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
1682         time.h now handles any problems in that area.
1683         (struct timespec, nanosleep): Remove; time.h now arranges for these.
1684         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
1685         that time.h defines struct timespec.
1686         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
1687         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
1688         handles that.
1689         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
1690         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
1691         needed.  Set REPLACE_LOCALTIME.
1692         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
1693         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
1694         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
1695         nanosleep; time_h.m4 now does that.  Don't require
1696         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
1697         module handles this now.
1698         * modules/getdate (Depends-on): Remove timespec.  Add time.
1699         * modules/nanosleep (Depends-on): Likewise.
1700         * modules/stat-time (Depends-on): Likewise.
1701         * modules/nanosleep (Include): Include time.h, not timespec.h.
1702         * modules/strptime (Files): Remove lib/strptime.h.
1703         (Depends-on): Add extensions, time.
1704         (Include): Include time.h, not strptime.h.
1705         * modules/time_r (Files): Remove lib/time_r.h.
1706         (Depends-on): Add time.
1707         (Include): Include time.h, not time_r.h.
1708         * modules/timegm: Likewise.
1709         * modules/timespec (Description): Now does timespec-related decls
1710         of our own, instead of struct timespec itself.
1711         (Depends-on): Add time; remove extensions.
1712         (Maintainer): Add self.
1713         * modules/utimecmp (Depends-on): Add time; remove timespec.
1714         * modules/utimens (Depends-on): Likewise.
1715         * modules/xnanosleep (Depends-on): Likewise.
1716
1717 2007-02-11  Bruno Haible  <bruno@clisp.org>
1718
1719         * lib/c-strstr.c: Include allocsa.h.
1720         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1721         * lib/c-strcasestr.c: Include allocsa.h.
1722         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1723         * lib/strcasestr.c: Include allocsa.h.
1724         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1725         * lib/mbsstr.c: Include allocsa.h.
1726         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1727         allocsa/freesa instead of malloc/free.
1728         * lib/mbscasestr.c: Include allocsa.h.
1729         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1730         allocsa/freesa instead of malloc/free.
1731         * modules/c-strstr (Depends-on): Add allocsa.
1732         * modules/c-strcasestr (Depends-on): Likewise.
1733         * modules/strcasestr (Depends-on): Likewise.
1734         * modules/mbsstr (Depends-on): Likewise.
1735         * modules/mbscasestr (Depends-on): Likewise.
1736
1737 2007-02-11  Bruno Haible  <bruno@clisp.org>
1738
1739         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
1740
1741         * modules/mbsspn-tests: New file.
1742         * tests/test-mbsspn.sh: New file.
1743         * tests/test-mbsspn.c: New file.
1744
1745 2007-02-11  Bruno Haible  <bruno@clisp.org>
1746
1747         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
1748
1749         * modules/mbspbrk-tests: New file.
1750         * tests/test-mbspbrk.sh: New file.
1751         * tests/test-mbspbrk.c: New file.
1752
1753 2007-02-11  Bruno Haible  <bruno@clisp.org>
1754
1755         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
1756         unneeded cast.
1757
1758         * modules/mbscspn-tests: New file.
1759         * tests/test-mbscspn.sh: New file.
1760         * tests/test-mbscspn.c: New file.
1761
1762 2007-02-11  Bruno Haible  <bruno@clisp.org>
1763
1764         * modules/mbscasecmp-tests: New file.
1765         * tests/test-mbscasecmp.sh: New file.
1766         * tests/test-mbscasecmp.c: New file.
1767
1768 2007-02-11  Bruno Haible  <bruno@clisp.org>
1769
1770         Ensure O(n) worst-case complexity of mbscasestr.
1771         * lib/mbscasestr.c: Include stdbool.h.
1772         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1773         functions.
1774         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
1775         the bookkeeping indicates that it's worth it.
1776         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
1777
1778         * modules/mbscasestr-tests: New file.
1779         * tests/test-mbscasestr1.c: New file.
1780         * tests/test-mbscasestr2.sh: New file.
1781         * tests/test-mbscasestr2.c: New file.
1782         * tests/test-mbscasestr3.sh: New file.
1783         * tests/test-mbscasestr3.c: New file.
1784         * tests/test-mbscasestr4.sh: New file.
1785         * tests/test-mbscasestr4.c: New file.
1786         * m4/locale-tr.m4: New file.
1787
1788 2007-02-11  Bruno Haible  <bruno@clisp.org>
1789
1790         Ensure O(n) worst-case complexity of mbsstr.
1791         * lib/mbsstr.c: Include stdbool.h.
1792         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1793         functions.
1794         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
1795         bookkeeping indicates that it's worth it.
1796         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
1797
1798         * modules/mbsstr-tests: New file.
1799         * tests/test-mbsstr1.c: New file.
1800         * tests/test-mbsstr2.sh: New file.
1801         * tests/test-mbsstr2.c: New file.
1802         * tests/test-mbsstr3.sh: New file.
1803         * tests/test-mbsstr3.c: New file.
1804         * m4/locale-fr.m4: New file.
1805
1806 2007-02-11  Bruno Haible  <bruno@clisp.org>
1807
1808         * lib/mbsrchr.c (mbsrchr): Fix bug.
1809
1810         * modules/mbsrchr-tests: New file.
1811         * tests/test-mbsrchr.sh: New file.
1812         * tests/test-mbsrchr.c: New file.
1813
1814 2007-02-11  Bruno Haible  <bruno@clisp.org>
1815
1816         * lib/mbschr.c (mbschr): Fix bug.
1817
1818         * modules/mbschr-tests: New file.
1819         * tests/test-mbschr.sh: New file.
1820         * tests/test-mbschr.c: New file.
1821         * m4/locale-zh.m4: New file.
1822
1823 2007-02-11  Bruno Haible  <bruno@clisp.org>
1824
1825         Support for copying multibyte string iterators.
1826         * lib/mbiter.h: Include <string.h>.
1827         (mbiter_multi_copy): New function.
1828         (mbi_copy): New macro.
1829         * lib/mbuiter.h: Include <string.h>.
1830         (mbuiter_multi_copy): New function.
1831         (mbui_copy): New macro.
1832
1833 2007-02-11  Bruno Haible  <bruno@clisp.org>
1834
1835         New module mbslen.
1836         * modules/mbslen: New file.
1837         * lib/mbslen.c: New file.
1838         * lib/string_.h (mbslen): New declaration.
1839         * m4/mbslen.m4: New file.
1840         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1841         GNULIB_MBSLEN.
1842         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
1843         * MODULES.html.sh (Internationalization functions): Add mbslen.
1844
1845 2007-02-11  Bruno Haible  <bruno@clisp.org>
1846
1847         Ensure O(n) worst-case complexity of strcasestr substitute.
1848         * lib/strcasestr.c: Include stdbool.h.
1849         (knuth_morris_pratt): New function.
1850         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1851         bookkeeping indicates that it's worth it.
1852         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
1853
1854         * modules/strcasestr-tests: New file.
1855         * tests/test-strcasestr.c: New file.
1856
1857 2007-02-11  Bruno Haible  <bruno@clisp.org>
1858
1859         Ensure O(n) worst-case complexity of c_strcasestr.
1860         * lib/c-strcasestr.c: Include stdbool.h, string.h.
1861         (knuth_morris_pratt): New function.
1862         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
1863         the bookkeeping indicates that it's worth it.
1864         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
1865
1866         * modules/c-strcasestr-tests: New file.
1867         * tests/test-c-strcasestr.c: New file.
1868
1869 2007-02-11  Bruno Haible  <bruno@clisp.org>
1870
1871         Ensure O(n) worst-case complexity of c_strstr.
1872         * lib/c-strstr.c: Include stdbool.h, string.h.
1873         (knuth_morris_pratt): New function.
1874         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
1875         bookkeeping indicates that it's worth it.
1876         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
1877
1878         * lib/c-strstr.c: Complete rewrite for maintainability.
1879
1880         * modules/c-strstr-tests: New file.
1881         * tests/test-c-strstr.c: New file.
1882
1883 2007-02-11  Bruno Haible  <bruno@clisp.org>
1884
1885         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
1886         5.2.1 and earlier, whereby \055 was treated just like the range
1887         delimiter '-'.
1888         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1889
1890 2007-02-08  Bruno Haible  <bruno@clisp.org>
1891
1892         * modules/regex (Depends-on): Add stdbool.
1893         Reported by Dalibor Topic <robilad@kaffe.org>.
1894
1895 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
1896
1897         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
1898         Prefer returning from main to exiting from it.
1899         Remove unnecessary parens after sizeof.
1900
1901 2007-02-05  Bruno Haible  <bruno@clisp.org>
1902
1903         New module mbssep.
1904         * modules/mbssep: New file.
1905         * lib/mbssep.c: New file.
1906         * lib/string_.h (strsep): Add a conditional link warning.
1907         (mbssep): New declaration.
1908         * m4/mbssep.m4: New file.
1909         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1910         GNULIB_MBSSEP.
1911         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
1912         * MODULES.html.sh (Internationalization functions): Add mbssep.
1913
1914 2007-02-05  Bruno Haible  <bruno@clisp.org>
1915
1916         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
1917         Optimize search in case of 1 delimiter.
1918
1919 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1920
1921         * lib/acl.h: Include sys/types.h before sys/acl.h.
1922
1923 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
1924
1925         Merge upstream fix for glibc bugzilla #3957:
1926
1927         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
1928
1929         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
1930         bit for RE_HAT_LISTS_NOT_NEWLINE.
1931         (build_charclass_op): Remove bogus comment.
1932
1933 2007-02-05  Simon Josefsson  <simon@josefsson.org>
1934
1935         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
1936
1937 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
1938
1939         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
1940         * lib/memmem.c [!defined _LIBC]: Include config.h.
1941
1942 2007-02-04  Bruno Haible  <bruno@clisp.org>
1943
1944         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
1945         warning message.
1946
1947 2007-02-04  Bruno Haible  <bruno@clisp.org>
1948
1949         New module mbstok_r.
1950         * modules/mbstok_r: New file.
1951         * lib/mbstok_r.c: New file.
1952         * lib/string_.h (strtok_r): Change argument names to match the
1953         comments. Add a conditional link warning.
1954         (mbstok_r): New declaration.
1955         * m4/mbstok_r.m4: New file.
1956         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1957         GNULIB_MBSTOK_R.
1958         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
1959         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
1960
1961 2007-02-04  Bruno Haible  <bruno@clisp.org>
1962
1963         New module mbsspn.
1964         * modules/mbsspn: New file.
1965         * lib/mbsspn.c: New file.
1966         * lib/string_.h (strspn): Add a conditional link warning.
1967         (mbsspn): New declaration.
1968         * m4/mbsspn.m4: New file.
1969         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1970         GNULIB_MBSSPN.
1971         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
1972         * MODULES.html.sh (Internationalization functions): Add mbsspn.
1973
1974 2007-02-04  Bruno Haible  <bruno@clisp.org>
1975
1976         New module mbspbrk.
1977         * modules/mbspbrk: New file.
1978         * lib/mbspbrk.c: New file.
1979         * lib/string_.h (strpbrk): Add a conditional link warning.
1980         (mbspbrk): New declaration.
1981         * m4/mbspbrk.m4: New file.
1982         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1983         GNULIB_MBSPBRK.
1984         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
1985         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
1986
1987 2007-02-04  Bruno Haible  <bruno@clisp.org>
1988
1989         New module mbscspn.
1990         * modules/mbscspn: New file.
1991         * lib/mbscspn.c: New file.
1992         * lib/string_.h (strcspn): Add a conditional link warning.
1993         (mbscspn): New declaration.
1994         * m4/mbscspn.m4: New file.
1995         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1996         GNULIB_MBSCSPN.
1997         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
1998         * MODULES.html.sh (Internationalization functions): Add mbscspn.
1999
2000 2007-02-04  Bruno Haible  <bruno@clisp.org>
2001
2002         New module mbscasestr, reduced goal of strcasestr.
2003         * modules/mbscasestr: New file.
2004         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
2005         (mbscasestr): Renamed from strcasestr.
2006         * lib/strcasestr.c: Don't include mbuiter.h.
2007         (strcasestr): Remove support for multibyte locales.
2008         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
2009         Change the conditional link warning.
2010         (mbscasestr): New declaration.
2011         * m4/mbscasestr.m4: New file.
2012         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
2013         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
2014         REPLACE_STRCASESTR.
2015         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
2016         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2017         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2018         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
2019         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
2020         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2021         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
2022         (Depends-on): Remove mbuiter.
2023         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
2024
2025 2007-02-04  Bruno Haible  <bruno@clisp.org>
2026
2027         Simplify handling of strncasecmp.
2028         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
2029         the conditional link warning.
2030         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2031         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
2032         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
2033         * modules/strcase (configure.ac): Don't invoke
2034         gl_STRING_MODULE_INDICATOR.
2035         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
2036
2037 2007-02-04  Bruno Haible  <bruno@clisp.org>
2038
2039         New module mbscasecmp, reduced goal of strcasecmp.
2040         * modules/mbscasecmp: New file.
2041         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
2042         (mbscasecmp): Renamed from strcasecmp.
2043         * lib/strcasecmp.c: Don't include mbuiter.h.
2044         (strcasecmp): Remove support for multibyte locales.
2045         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
2046         Change the conditional link warning.
2047         (mbscasecmp): New declaration.
2048         * m4/mbscasecmp.m4: New file.
2049         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
2050         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
2051         REPLACE_STRCASECMP.
2052         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
2053         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2054         GNULIB_MBSCASECMP.
2055         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
2056         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
2057         * modules/strcase (Files): Remove m4/mbrtowc.m4.
2058         (Depends-on): Remove mbuiter.
2059         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
2060
2061 2007-02-04  Bruno Haible  <bruno@clisp.org>
2062
2063         New module mbsstr. Remove module strstr.
2064         * modules/mbsstr: New file.
2065         * modules/strstr: Remove file.
2066         * lib/mbsstr.c: Renamed from lib/strstr.c.
2067         (mbsstr): Renamed from strstr.
2068         * lib/string_.h (strstr): Remove declaration. Change the conditional
2069         link warning.
2070         (mbsstr): New declaration.
2071         * m4/mbsstr.m4: New file.
2072         * m4/strstr.m4: Remove file.
2073         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
2074         REPLACE_STRSTR.
2075         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
2076         Don't initialize GNULIB_STRSTR.
2077         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
2078         substitute GNULIB_STRSTR and REPLACE_STRSTR.
2079         * MODULES.html.sh (Internationalization functions): Add mbsstr.
2080         (Support for systems lacking ANSI C 89): Remove strstr.
2081
2082 2007-02-04  Bruno Haible  <bruno@clisp.org>
2083
2084         New module mbsrchr.
2085         * modules/mbsrchr: New file.
2086         * lib/mbsrchr.c: New file.
2087         * lib/string_.h (strrchr): Add a conditional link warning.
2088         (mbsrchr): New declaration.
2089         * m4/mbsrchr.m4: New file.
2090         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2091         GNULIB_MBSRCHR.
2092         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
2093         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
2094
2095 2007-02-04  Bruno Haible  <bruno@clisp.org>
2096
2097         New module mbschr.
2098         * modules/mbschr: New file.
2099         * lib/mbschr.c: New file.
2100         * lib/string_.h (strchr): Add a conditional link warning.
2101         (mbschr): New declaration.
2102         * m4/mbschr.m4: New file.
2103         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2104         GNULIB_MBSCHR.
2105         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
2106         * MODULES.html.sh (Internationalization functions): Add mbschr.
2107
2108 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2109
2110         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
2111
2112         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
2113
2114 2007-02-04  Bruno Haible  <bruno@clisp.org>
2115
2116         New module description section 'configure.ac-early'.
2117         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
2118         (func_get_autoconf_early_snippet): New function.
2119         (func_import, func_create_testdir): Use it. Remove special cases for
2120         modules 'extensions' and 'lock'.
2121         * modules/extensions (configure.ac-early): Require
2122         gl_USE_SYSTEM_EXTENSIONS.
2123         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
2124
2125 2007-02-04  Bruno Haible  <bruno@clisp.org>
2126
2127         Make use of gcj-4.3's -fsource and -ftarget option.
2128         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
2129         and if so try the options -fsource and -ftarget.
2130         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
2131         source_version, ftarget_option, target_version arguments.
2132         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
2133         (is_envjavac_oldgcj_14_14_usable): Renamed from
2134         is_envjavac_gcj_14_14_usable.
2135         (is_envjavac_oldgcj_14_13_usable): Renamed from
2136         is_envjavac_gcj_14_13_usable.
2137         (is_gcj_present): Update.
2138         (is_gcj_43, is_gcj43_usable): New functions.
2139         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
2140         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
2141         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
2142         try the options -fsource and -ftarget.
2143
2144 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
2145
2146         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
2147         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
2148         larger value.
2149
2150 2007-02-03  Jim Meyering  <jim@meyering.net>
2151
2152         Give tools a better chance to allocate space for very large buffers.
2153         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
2154
2155         Make pwd and readlink work also when run with an unreadable parent dir
2156         on systems with openat support.
2157         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
2158         provided getcwd function, even when we have openat support.
2159         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
2160
2161 2007-02-02  Bruno Haible  <bruno@clisp.org>
2162
2163         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2164         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
2165         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
2166         portability problems if one of these functions is only used on specific
2167         platforms.
2168         Reported by Paul Eggert.
2169
2170 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
2171
2172         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
2173         is causing more trouble than it's curing.
2174         * lib/regex_internal.h (__mempcpy): Remove.
2175         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
2176         (and make the code a tad smaller to boot).
2177         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
2178
2179 2007-02-02  Jim Meyering  <jim@meyering.net>
2180
2181         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
2182         section, not in the Makefile.am: one.
2183
2184 2007-02-02  Eric Blake  <ebb9@byu.net>
2185
2186         * lib/strchrnul.c: Always include config.h first.
2187
2188         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
2189         gnulib strstr is not necessary here.
2190
2191 2007-02-02  Simon Josefsson  <simon@josefsson.org>
2192
2193         * m4/socklen.m4: Fix typo.
2194
2195 2007-02-02  Eric Blake  <ebb9@byu.net>
2196
2197         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
2198         * modules/netinet_in (Makefile.am): Likewise.
2199
2200 2007-02-01  Bruno Haible  <bruno@clisp.org>
2201
2202         * lib/string_.h (GL_LINK_WARNING): New macro.
2203         (strcasecmp, strstr, strcasestr): If provided by the system,
2204         conditionally define as a macro that leads to a warning instead of to
2205         an error.
2206         (strncasecmp): Conditionally define as a macro that leads to a warning.
2207
2208 2007-02-01  Karl Berry  <karl@gnu.org>
2209
2210         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
2211
2212 2007-02-01  Bruno Haible  <bruno@clisp.org>
2213
2214         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
2215         renamings.
2216
2217 2007-02-01  Eric Blake  <ebb9@byu.net>
2218
2219         * modules/regex (Depends-on): Revert dependence on mempcpy.
2220         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
2221         module's definition of mempcpy.
2222         Reported by Paul Eggert.
2223
2224 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2225
2226         * lib/string_.h: If the gnulib module XYZ is not present, undefine
2227         the symbol XYZ before redefining it.  This fixes a problem with
2228         programs that don't use XYZ, when compiled on systems that define
2229         XYZ to something else.
2230
2231 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
2232
2233         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
2234         occurs when "mkdir -m foo" creates a setgid directory that is (1)
2235         writeable to group or other and (2) is intended to have a special
2236         mode bit that is set or cleared.  In such a case, the directory
2237         should be neither group- nor other-writeable until the special
2238         mode bits are right.
2239
2240 2007-01-31  Eric Blake  <ebb9@byu.net>
2241
2242         * modules/mountlist (Depends-on): Add strstr.
2243
2244         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
2245         bug.
2246         * modules/string (Makefile.am): Remove redundant replacement.
2247         * modules/regex (Depends-on): Add mempcpy.
2248
2249 2007-01-31  Bruno Haible  <bruno@clisp.org>
2250
2251         New module description field 'Link'.
2252         * gnulib-tool (func_usage): Document --extract-link-directive.
2253         (sed_extract_prog): Recognize 'Link' directive.
2254         (func_get_link_directive): New function.
2255         (func_import): Show summary of link directives.
2256         Handle --extract-link-directive option.
2257         * modules/acl (Link): New section.
2258         * modules/clock-time (Link): New section.
2259         * modules/euidaccess (Link): New section.
2260         * modules/gettext (Link): New section.
2261         * modules/iconv (Link): New section.
2262         * modules/lock (Link): New section.
2263         * modules/nanosleep (Link): New section.
2264         * modules/readline (Link): New section.
2265
2266 2007-01-27  Bruno Haible  <bruno@clisp.org>
2267
2268         Enforce the use of gnulib modules for unportable <string.h> functions.
2269         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
2270         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
2271         (gl_HEADER_STRING_H_BODY): Require it.
2272         * lib/string_.h: If the gnulib module XYZ is not present, redefine
2273         the symbol XYZ to one that gives a link error.
2274         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
2275         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
2276         * modules/mempcpy (configure.ac): Likewise.
2277         * modules/memrchr (configure.ac): Likewise.
2278         * modules/stpcpy (configure.ac): Likewise.
2279         * modules/stpncpy (configure.ac): Likewise.
2280         * modules/strcase (configure.ac): Likewise.
2281         * modules/strcasestr (configure.ac): Likewise.
2282         * modules/strchrnul (configure.ac): Likewise.
2283         * modules/strdup (configure.ac): Likewise.
2284         * modules/strndup (configure.ac): Likewise.
2285         * modules/strnlen (configure.ac): Likewise.
2286         * modules/strpbrk (configure.ac): Likewise.
2287         * modules/strsep (configure.ac): Likewise.
2288         * modules/strstr (configure.ac): Likewise.
2289         * modules/strtok_r (configure.ac): Likewise.
2290
2291 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
2292
2293         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
2294
2295 2007-01-30  Jim Meyering  <jim@meyering.net>
2296
2297         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
2298
2299 2007-01-29  Bruno Haible  <bruno@clisp.org>
2300
2301         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
2302         * lib/execute.c: Likewise.
2303         * lib/pipe.c: Likewise.
2304         * lib/printf-args.h: Likewise.
2305         * lib/printf-args.c: Likewise.
2306         * lib/printf-parse.c: Likewise.
2307         * lib/vasnprintf.c: Likewise.
2308
2309 2007-01-29  Eric Blake  <ebb9@byu.net>
2310
2311         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
2312         declaration.
2313
2314 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
2315
2316         * lib/strptime.h (strptime): Use 'restrict' for args where
2317         POSIX requires this.
2318         * lib/strptime.c (strptime): Likewise.
2319         Change license notice from LGPL to GPL, since gnulib-tool will
2320         change this as needed.
2321         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
2322         defined.
2323         Include "strptime.h" first, to check interface.
2324         Do not #undef _LIBC and _NL_CURRENT.
2325         Do not include <stdlib.h>; no longer needed.
2326         Include "time_r.h" and declare ptime_locale_status
2327         only if _LIBC is not defined.
2328         (__P): Remove unused macro.
2329         (match_string): Bring back glibc version, but use it only if _LIBC
2330         is defined.
2331         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
2332         Remove unnecessary assertion and abort() call.
2333         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
2334         * m4/strptime.m4: Fix serial number comment.
2335         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
2336         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
2337         (Depends-on): Add time_r.
2338
2339 2007-01-29  Bruno Haible  <bruno@clisp.org>
2340
2341         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2342         strptime.
2343         * modules/strptime (Depends-on): Add stdbool.
2344         * lib/strptime.h: Include <time.h> always. Add comments.
2345
2346 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
2347
2348         * modules/strptime: New file.
2349         * lib/strptime.h: New file.
2350         * lib/strptime.c: New file.
2351         * m4/strptime.m4: New file.
2352
2353 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
2354
2355         * MODULES.html.sh: New module mpsort.
2356         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
2357
2358         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
2359         a circularity problem with HP-UX ia64 reported by Bob Proulx in
2360         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
2361         All uses changed.
2362         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
2363         All uses changed.
2364         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
2365         to _Restrict_.
2366         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
2367         the parameter matches the prototype.
2368
2369 2007-01-28  Jim Meyering  <jim@meyering.net>
2370
2371         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
2372         sys/time.h here, reverting that part of the previous patch:
2373         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
2374
2375 2007-01-28  Bruno Haible  <bruno@clisp.org>
2376
2377         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
2378         value of $(SYS_TIME_H).
2379         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
2380         remove it conditionally, too. [added by Jim Meyering]
2381         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
2382         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2383         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
2384         GETTIMEOFDAY_REPLACEMENT to 1.
2385
2386 2007-01-28  Bruno Haible  <bruno@clisp.org>
2387
2388         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
2389         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
2390         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
2391         Set UNISTD_H instead of UNISTD_H2.
2392         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
2393
2394 2007-01-28  Bruno Haible  <bruno@clisp.org>
2395
2396         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
2397         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
2398
2399 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2400
2401         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
2402         (func_create_testdir): Ensure C locale for `grep' and `tr'
2403         character ranges.
2404         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
2405         ACLOCAL_AMFLAGS parsing state machine.
2406
2407 2007-01-27  Bruno Haible  <bruno@clisp.org>
2408
2409         * modules/unistr/base: Update.
2410
2411 2007-01-27  Bruno Haible  <bruno@clisp.org>
2412
2413         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
2414         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
2415         * modules/unistr/u32-mbtouc-unsafe: Renamed from
2416         modules/unistr/u32-mbtouc.
2417         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
2418         * lib/unistr.h: Update.
2419         * lib/linebreak.c: Update.
2420         * modules/unistr/u32-mbtouc: Renamed from
2421         modules/unistr/u32-mbtouc-safe.
2422         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
2423         * lib/unistr.h: Update.
2424         * lib/unistr/u32-to-u8.c: Update.
2425         * lib/unistr/u32-to-u16.c: Update.
2426
2427 2007-01-27  Bruno Haible  <bruno@clisp.org>
2428
2429         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
2430         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
2431         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
2432         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
2433         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
2434         * modules/unistr/u16-mbtouc-unsafe: Renamed from
2435         modules/unistr/u16-mbtouc.
2436         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
2437         * lib/unistr.h: Update.
2438         * lib/linebreak.c: Update.
2439         * modules/linebreak: Update.
2440         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
2441         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
2442         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
2443         * modules/unistr/u16-mbtouc: Renamed from
2444         modules/unistr/u16-mbtouc-safe.
2445         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
2446         * lib/unistr.h: Update.
2447         * lib/unistr/u16-to-u8.c: Update.
2448         * modules/unistr/u16-to-u8: Update.
2449         * lib/unistr/u16-to-u32.c: Update.
2450         * modules/unistr/u16-to-u32: Update.
2451
2452 2007-01-27  Bruno Haible  <bruno@clisp.org>
2453
2454         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
2455         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
2456         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
2457         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
2458         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
2459         * modules/unistr/u8-mbtouc-unsafe: Renamed from
2460         modules/unistr/u8-mbtouc.
2461         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
2462         * lib/unistr.h: Update.
2463         * lib/striconveh.c: Update.
2464         * modules/striconveh: Update.
2465         * lib/linebreak.c: Update.
2466         * modules/linebreak: Update.
2467         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
2468         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
2469         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
2470         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
2471         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
2472         * lib/unistr.h: Update.
2473         * lib/striconveh.c: Update.
2474         * modules/striconveh: Update.
2475         * lib/unistr/u8-to-u16.c: Update.
2476         * modules/unistr/u8-to-u16: Update.
2477         * lib/unistr/u8-to-u32.c: Update.
2478         * modules/unistr/u8-to-u32: Update.
2479
2480 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2481
2482         Sync from Libtool.
2483         * lib/argz.c: Do not include strings.h nor memory.h, include
2484         string.h unconditionally.  Patch by Simon Josefsson.
2485
2486 2007-01-27  Bruno Haible  <bruno@clisp.org>
2487
2488         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
2489         from gl_HEADER_STRING_H_BODY.
2490         (gl_HEADER_STRING_H_BODY): Require it.
2491         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
2492         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
2493         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
2494         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
2495         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2496         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
2497         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
2498         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
2499         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
2500         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
2501         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
2502         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
2503         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
2504         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
2505         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2506
2507 2007-01-27  Bruno Haible  <bruno@clisp.org>
2508
2509         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
2510         check_PROGRAMS into noinst_PROGRAMS.
2511         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
2512         check_PROGRAMS in this case.
2513         (func_import): Set for_test to false.
2514         (func_create_testdir): Set for_test to true.
2515
2516 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2517             Bruno Haible  <bruno@clisp.org>
2518
2519         * modules/strcasestr (Files): Remove lib/strcasestr.h.
2520         (Depends-on): Add string.
2521         (Includes): Use <string.h> instead of strcasestr.h.
2522         * modules/string (Makefile.am): Also substitute the value of
2523         REPLACE_STRCASESTR.
2524         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
2525         assume strcasestr is declared in <string.h> not <strings.h>. Also
2526         set REPLACE_STRCASESTR.
2527         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
2528         REPLACE_STRCASESTR.
2529         * lib/strcasestr.h: Remove file.
2530         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
2531         * lib/string_.h (strcasestr): New declaration.
2532
2533 2007-01-27  Bruno Haible  <bruno@clisp.org>
2534
2535         * lib/string_.h: Use 'extern'.
2536
2537 2007-01-27  Jim Meyering  <jim@meyering.net>
2538
2539         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
2540         of set-but-not-used local, "q".
2541
2542         * lib/mempcpy.c: Include <config.h> before <string.h>.
2543         This fixes a compilation error on HP-UX, due to the system's
2544         "restrict"-using mempcpy prototype.
2545
2546 2007-01-26  Bruno Haible  <bruno@clisp.org>
2547
2548         Small optimization.
2549         * lib/javacomp.c: Include c-strstr.h.
2550          (is_envjavac_gcj): Use c_strstr instead of strstr.
2551         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
2552
2553 2007-01-26  Bruno Haible  <bruno@clisp.org>
2554
2555         * MODULES.html.sh (Unicode string functions): Add the new modules.
2556
2557         * modules/uniconv/u32-strconv-to-locale: New file.
2558         * lib/uniconv/u32-strconv-to-locale.c: New file.
2559
2560         * modules/uniconv/u16-strconv-to-locale: New file.
2561         * lib/uniconv/u16-strconv-to-locale.c: New file.
2562
2563         * modules/uniconv/u8-strconv-to-locale: New file.
2564         * lib/uniconv/u8-strconv-to-locale.c: New file.
2565
2566         * modules/uniconv/u32-strconv-from-locale: New file.
2567         * lib/uniconv/u32-strconv-from-locale.c: New file.
2568
2569         * modules/uniconv/u16-strconv-from-locale: New file.
2570         * lib/uniconv/u16-strconv-from-locale.c: New file.
2571
2572         * modules/uniconv/u8-strconv-from-locale: New file.
2573         * lib/uniconv/u8-strconv-from-locale.c: New file.
2574
2575         * modules/uniconv/u32-strconv-to-enc: New file.
2576         * lib/uniconv/u32-strconv-to-enc.c: New file.
2577         * modules/uniconv/u32-strconv-to-enc-tests: New file.
2578         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
2579
2580         * modules/uniconv/u16-strconv-to-enc: New file.
2581         * lib/uniconv/u16-strconv-to-enc.c: New file.
2582         * lib/uniconv/u-strconv-to-enc.h: New file.
2583         * modules/uniconv/u16-strconv-to-enc-tests: New file.
2584         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
2585
2586         * modules/uniconv/u8-strconv-to-enc: New file.
2587         * lib/uniconv/u8-strconv-to-enc.c: New file.
2588         * modules/uniconv/u8-strconv-to-enc-tests: New file.
2589         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
2590
2591         * modules/uniconv/u32-strconv-from-enc: New file.
2592         * lib/uniconv/u32-strconv-from-enc.c: New file.
2593         * modules/uniconv/u32-strconv-from-enc-tests: New file.
2594         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
2595
2596         * modules/uniconv/u16-strconv-from-enc: New file.
2597         * lib/uniconv/u16-strconv-from-enc.c: New file.
2598         * modules/uniconv/u16-strconv-from-enc-tests: New file.
2599         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
2600
2601         * modules/uniconv/u8-strconv-from-enc: New file.
2602         * lib/uniconv/u8-strconv-from-enc.c: New file.
2603         * lib/uniconv/u-strconv-from-enc.h: New file.
2604         * modules/uniconv/u8-strconv-from-enc-tests: New file.
2605         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
2606
2607         * modules/uniconv/u32-conv-from-enc: New file.
2608         * lib/uniconv/u32-conv-from-enc.c: New file.
2609         * modules/uniconv/u32-conv-from-enc-tests: New file.
2610         * tests/uniconv/test-u32-conv-from-enc.c: New file.
2611
2612         * modules/uniconv/u16-conv-from-enc: New file.
2613         * lib/uniconv/u16-conv-from-enc.c: New file.
2614         * lib/uniconv/u-conv-from-enc.h: New file.
2615         * modules/uniconv/u16-conv-from-enc-tests: New file.
2616         * tests/uniconv/test-u16-conv-from-enc.c: New file.
2617
2618         * modules/uniconv/u8-conv-from-enc: New file.
2619         * lib/uniconv/u8-conv-from-enc.c: New file.
2620         * modules/uniconv/u8-conv-from-enc-tests: New file.
2621         * tests/uniconv/test-u8-conv-from-enc.c: New file.
2622
2623         * modules/uniconv/base: New file.
2624         * lib/uniconv.h: New file.
2625
2626 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
2627
2628         * doc/gnulib-tool.texi (Initial import): Update to match current
2629         behavior with strdup module.
2630         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
2631         * lib/memmem.h: Remove; all uses removed.  This is now done
2632         by <string.h>.
2633         * lib/mempcpy.h: Likewise.
2634         * lib/memrchr.h: Likewise.
2635         * lib/stpcpy.h: Likewise.
2636         * lib/stpncpy.h: Likewise.
2637         * lib/strcase.h: Likewise.
2638         * lib/strchrnul.h: Likewise.
2639         * lib/strdup.h: Likewise.
2640         * lib/strndup.h: Likewise.
2641         * lib/strnlen.h: Likewise.
2642         * lib/strpbrk.h: Likewise.
2643         * lib/strsep.h: Likewise.
2644         * lib/strstr.h: Likewise.
2645         * lib/strtok_r.h: Likewise.
2646         * lib/string_.h: New file.
2647         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
2648         Rely on <string.h> instead.
2649         * lib/canon-host.c: Likewise.
2650         * lib/chdir-long.c: Likewise.
2651         * lib/concatpath.c: Likewise.
2652         * lib/exclude.c: Likewise.
2653         * lib/fchdir.c: Likewise.
2654         * lib/getaddrinfo.c: Likewise.
2655         * lib/getcwd.c: Likewise.
2656         * lib/getsubopt.c: Likewise.
2657         * lib/glob.c: Likewise.
2658         * lib/hard-locale.c: Likewise.
2659         * lib/iconvme.c: Likewise.
2660         * lib/javacomp.c: Likewise.
2661         * lib/mempcpy.c: Likewise.
2662         * lib/memrchr.c: Likewise.
2663         * lib/regex_internal.h: Likewise.
2664         * lib/stpncpy.c: Likewise.
2665         * lib/strcasecmp.c: Likewise.
2666         * lib/strchrnul.c: Likewise.
2667         * lib/strdup.c: Likewise.
2668         * lib/striconv.c: Likewise.
2669         * lib/striconveh.c: Likewise.
2670         * lib/striconveha.c: Likewise.
2671         * lib/strncasecmp.c: Likewise.
2672         * lib/strndup.c: Likewise.
2673         * lib/strnlen.c: Likewise.
2674         * lib/strsep.c: Likewise.
2675         * lib/strstr.c: Likewise.
2676         * lib/strtok_r.c: Likewise.
2677         * lib/userspec.c: Likewise.
2678         * lib/w32spawn.h: Likewise.
2679         * lib/xstrndup.c: Likewise.
2680         * lib/mountlist.c (strstr): Remove decl.
2681         * m4/string_h.m4: New file.
2682         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
2683         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
2684         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
2685         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
2686         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
2687         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
2688         Set REPLACE_STRCASECMP if necessary.
2689         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
2690         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
2691         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
2692         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
2693         HAVE_DECL_STRDUP if necessary.
2694         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
2695         since gl_FUNC_STRNDUP does that now.
2696         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
2697         Check for decl here...
2698         (gl_PREREQ_STRNLEN): ... not here.
2699         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
2700         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
2701         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
2702         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
2703         necessary.
2704         * modules/string: New file.
2705         * modules/memmem (Files): Remove special-purpose include file.
2706         (Depends-on): Add string.
2707         (Include): Include <string.h>, not the removed file.
2708         * modules/mempcpy: Likewise.
2709         * modules/memrchr: Likewise.
2710         * modules/stpcpy: Likewise.
2711         * modules/stpncpy: Likewise.
2712         * modules/strcase: Likewise.
2713         * modules/strchrnul: Likewise.
2714         * modules/strdup: Likewise.
2715         * modules/strndup: Likewise.
2716         * modules/strnlen: Likewise.
2717         * modules/strpbrk: Likewise.
2718         * modules/strsep: Likewise.
2719         * modules/strstr: Likewise.
2720         * modules/strtok_r: Likewise.
2721         * tests/test-dirname.c: Don't include "strdup.h", since
2722         <string.h> now suffices.
2723         * tests/test-memmem.c: Don't include "memmem.h", since
2724         <string.h> now suffices.
2725
2726 2007-01-25  Bruno Haible  <bruno@clisp.org>
2727
2728         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
2729         *resultp is 0.
2730
2731         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
2732         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
2733         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
2734         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
2735
2736         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
2737         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
2738         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
2739         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
2740         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
2741         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
2742
2743 2007-01-24  Bruno Haible  <bruno@clisp.org>
2744
2745         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
2746         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
2747         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
2748         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
2749         gl_FUNC_FTS_CORE.
2750         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
2751         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
2752         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2753         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
2754         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
2755         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
2756         gl_FUNC_FCHOWNAT.
2757         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
2758         gl_FUNC_STRFTIME.
2759         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
2760         Reported by Ralf Wildenhues.
2761
2762 2007-01-24  Bruno Haible  <bruno@clisp.org>
2763
2764         Drop AC_REQUIRE calls that are redundant with the module dependencies.
2765         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
2766         gl_GETADDRINFO.
2767         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
2768         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
2769         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
2770
2771 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2772
2773         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
2774         Don't use 'exit'; just return from 'main'.
2775         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
2776
2777         * lib/fnmatch_.h: Readjust white space and comments to match
2778         glibc, to avoid spurious diffs.
2779
2780 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2781
2782         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
2783         2004-12-01 change by Jakub Jelinek, since this code won't compile
2784         if !LIBC.  Problem reported by Bob Proulx.
2785
2786 2007-01-23  Bruno Haible  <bruno@clisp.org>
2787
2788         * lib/striconveh.c: Include c-strcaseeq.h.
2789         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
2790         * modules/striconveh (Depends-on): Add c-strcaseeq.
2791
2792 2007-01-23  Bruno Haible  <bruno@clisp.org>
2793
2794         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
2795
2796         * modules/c-strcaseeq: New file.
2797         * lib/c-strcaseeq.h: New file.
2798
2799         * modules/streq: New file.
2800         * lib/streq.h: New file.
2801
2802 2007-01-23  Bruno Haible  <bruno@clisp.org>
2803
2804         * modules/striconveha-tests: New file.
2805         * tests/test-striconveha.c: New file.
2806
2807         * lib/striconveha.h: Include <stdbool.h>.
2808         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
2809         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
2810         (mem_iconveha_notranslit): Renamed from mem_iconveha.
2811         (mem_iconveha): New function.
2812         (str_iconveha_notranslit): Renamed from str_iconveha.
2813         (str_iconveha): New function.
2814         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
2815         c-strcase.
2816
2817 2007-01-23  Bruno Haible  <bruno@clisp.org>
2818
2819         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
2820         encodings without forgiving before trying any encoding with handler.
2821         (str_iconveha): Try all encodings without forgiving before trying any
2822         encoding with handler.
2823
2824 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2825
2826         Import the following changes from libc.
2827
2828         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
2829
2830         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
2831
2832         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2833
2834         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
2835         normal_bracket label.
2836
2837         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
2838
2839         [BZ #361]
2840         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
2841         to normal_bracket after fetching the next character.
2842
2843 2007-01-22  Bruno Haible  <bruno@clisp.org>
2844
2845         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
2846         argument.
2847         * lib/striconveh.c (iconv_carefully_1): New function.
2848         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
2849         argument.
2850         (str_cd_iconveh): Update.
2851         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
2852         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
2853         * tests/test-striconveh.c (MAGIC): New macro.
2854         (new_offsets): New function.
2855         (main): Test call with and without offsets.
2856
2857 2007-01-22  Bruno Haible  <bruno@clisp.org>
2858
2859         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
2860         * modules/sys_select (Makefile.am): Likewise.
2861         * modules/sys_socket (Makefile.am): Likewise.
2862         * modules/sys_time (Makefile.am): Likewise.
2863
2864 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
2865
2866         * modules/gettimeofday (License): Change from GPL to LGPL, since
2867         gettimeofday is a library function.
2868
2869 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2870
2871         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
2872
2873 2007-01-21  Bruno Haible  <bruno@clisp.org>
2874
2875         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
2876
2877 2007-01-21  Bruno Haible  <bruno@clisp.org>
2878
2879         * modules/striconveha: New file.
2880         * lib/striconveha.h: New file.
2881         * lib/striconveha.c: New file.
2882         * MODULES.html.sh (Internationalization functions): Add striconveha.
2883         * lib/striconv.c (str_iconv): Optimize the case of an empty input
2884         string.
2885         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
2886
2887 2007-01-21  Bruno Haible  <bruno@clisp.org>
2888
2889         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
2890         * lib/striconveh.c (str_iconveh): Likewise.
2891
2892 2007-01-21  Bruno Haible  <bruno@clisp.org>
2893
2894         * lib/striconveh.h (mem_iconveh): New declaration.
2895         * lib/striconveh.c (mem_iconveh): New function.
2896         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
2897
2898 2007-01-21  Bruno Haible  <bruno@clisp.org>
2899
2900         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
2901
2902         * lib/striconveh.h (mem_cd_iconveh): Change specification.
2903         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
2904         original result buffer.
2905         (str_cd_iconveh): Update.
2906         * tests/test-striconveh.c (main): Update.
2907
2908         * lib/striconv.h (mem_cd_iconv): Change specification.
2909         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
2910         result buffer.
2911         (str_cd_iconv): Update.
2912         * tests/test-striconv.c (main): Update.
2913
2914 2007-01-21  Bruno Haible  <bruno@clisp.org>
2915
2916         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
2917
2918 2007-01-20  Jim Meyering  <jim@meyering.net>
2919
2920         * lib/userspec.c (parse_with_separator): If a user or group string
2921         starts with "+", skip the corresponding name-to-ID look-up, since
2922         such a look-up must fail: user and group names may not include "+".
2923
2924 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
2925
2926         * lib/poll.c: Include sys/time.h and time.h unconditionally,
2927         since we now assume the sys_time module.
2928         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
2929         check for sys/time.h; no longer needed.
2930         * modules/poll (Depends-on): Depend on sys_time.
2931
2932 2007-01-18  Bruno Haible  <bruno@clisp.org>
2933
2934         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
2935         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
2936
2937         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
2938         gettimeofday.
2939
2940         * tests/test-gettimeofday.c: Include <time.h>.
2941         (dummy): Remove variable.
2942
2943         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
2944         gl_HEADER_SYS_TIME_H.
2945         (gl_HEADER_SYS_TIME_H): New macro.
2946
2947         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
2948         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2949         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
2950         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
2951         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2952         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
2953         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
2954         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2955         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
2956         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
2957         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
2958
2959         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
2960         last change; it caused a compilation error when cross-compiling to
2961         Cygwin.
2962
2963 2007-01-18  Jim Meyering  <jim@meyering.net>
2964
2965         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
2966         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
2967         than the race-prone "test -d sys || mkdir sys".
2968         (configure.ac): Use AC_PROG_MKDIR_P.
2969         * modules/sys_select: Likewise.
2970         * modules/sys_socket: Likewise.
2971         * modules/sys_time: Likewise.
2972
2973 2007-01-18  Eric Blake  <ebb9@byu.net>
2974
2975         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
2976         replace gettimeofday.
2977         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
2978         name, to avoid infinite recursion.
2979
2980 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
2981
2982         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
2983         module sys_time.
2984         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
2985         assume timespec.h defines struct timeval.
2986         * lib/settime.c: Likewise.
2987         * lib/utimens.c: Likewise.
2988         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
2989         since we now assume the gettimeofday module.
2990         * lib/tempname.c (__gen_tempname): Likewise.
2991         * lib/gettimeofday.h: Remove.
2992         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
2993         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
2994         Include <time.h>, for 'time()'.
2995         (localtime_buffer_addr): Also use this workaround if
2996         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
2997         to simplify the uses.  All uses changed.
2998         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
2999         that #undef is inside {}, and 'const' follows type name consistently.
3000         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
3001         (gettimeofday): Do not use the maximum possible value for
3002         tv->tv_usec, since that might break usages other than ls.c.
3003         Instead, we'll leave ls.c alone.  This undoes today's patch
3004         by Bruno.  Add a compile-time warning for 1s-clock resolution;
3005         we've never observed the problem but might as well keep the
3006         canary.
3007         * lib/nanosleep.c: Include timespec.h first, for interface check.
3008         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
3009         now assume the sys_time module.
3010         * lib/tempname.c: Likewise.
3011         * lib/timespec.h: Likewise.
3012         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
3013         needed.
3014         * lib/strftime.c: Likewise.
3015         * lib/timespec.h: Likewise.
3016         * lib/posixtm.c: Include posixtm.h first, for interface check.
3017         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
3018         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
3019         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
3020         * lib/sys_time_.h: New file.
3021         * lib/timespec.h (struct timespec): Use long int, not long.
3022         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3023         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
3024         Remove obsolescent call to AC_HEADER_TIME.
3025         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
3026         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
3027         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3028         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
3029         Likewise.
3030         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
3031         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
3032         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
3033         into the sys_time module.  Check for gettimeofday just once.
3034         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
3035         for gettimeofday signature to just check the signature.  Merely
3036         compile it, since linking doesn't test signature.  Improve test for
3037         whether gettimeofday.o is actually needed.
3038         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
3039         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
3040         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
3041         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3042         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
3043         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
3044         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
3045         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
3046         than worrying about sys/time.h.
3047         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3048         Don't bother worrying about TIME_WITH_SYS_TIME.
3049         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
3050         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
3051         * m4/sys_time_h.m4: New file.
3052         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
3053         Don't include sys/time.h.  Return from main rather than exiting.
3054         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
3055         all uses changed.
3056         * modules/gethrxtime (Depends-on): Add sys_time.
3057         * modules/gettime (Depends-on): Likewise.
3058         * modules/gettimeofday (Depends-on): Likewise.
3059         * modules/nanosleep (Depends-on): Likewise.
3060         * modules/settime (Depends-on): Likewise.
3061         * modules/tempname (Depends-on): Likewise.
3062         * modules/utimens (Depends-on): Likewise.
3063         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
3064         (Include:) Change back to <sys/time.h>.
3065         (Maintainer:) Add self.
3066         * modules/sys_time: New file.
3067         * modules/tempname (Depends-on): Add gettimeofday.
3068         * tests/test-gettimeofday.c: Include <sys/time.h>
3069         rather than gettimeofday.h.
3070
3071 2007-01-17  Bruno Haible  <bruno@clisp.org>
3072
3073         * gnulib-tool (func_get_license): Revert last patch. Instead, let
3074         the license default to GPL.
3075         (func_create_testdir): Don't complain if a module is LGPL and its
3076         tests module depends on GPLed modules.
3077
3078 2007-01-17  Bruno Haible  <bruno@clisp.org>
3079
3080         * lib/gettimeofday.c (gettimeofday): Add code for the case
3081         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
3082         maximum possible value for tv->tv_usec, rather than the minimum one.
3083
3084 2005-10-08  Martin Lambers  <marlam@marlam.de>
3085 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3086 2007-01-16  Bruno Haible  <bruno@clisp.org>
3087
3088         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
3089         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
3090         gl_FUNC_GETTIMEOFDAY.
3091         (Include): Add gettimeofday.h.
3092         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
3093         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
3094         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
3095         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
3096         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
3097         * lib/gettimeofday.h: New file.
3098         * lib/gettimeofday.c: Include <sys/timeb.h>.
3099         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
3100         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3101         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
3102         fall back on time().
3103
3104         * tests/test-gettimeofday.c: New file.
3105         * modules/gettimeofday-tests: New file.
3106
3107 2007-01-16  Eric Blake  <ebb9@byu.net>
3108
3109         * modules/fnmatch (Depends-on): Depend on wchar.
3110         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
3111         * m4/fnmatch.m4: Likewise.
3112         * modules/mbchar (Makefile.am): Assume <wchar.h>.
3113         * m4/mbchar.m4: Likewise.
3114         * modules/mbswidth (Depends-on): Depend on wchar.
3115         * lib/mbswidth.c: Assume <wchar.h>.
3116         * m4/mbswidth.m4: Likewise.
3117         * modules/quotearg (Depends-on): Depend on wchar.
3118         * lib/quotearg.c: Assume <wchar.h>.
3119         * m4/quotearg.m4: Likewise.
3120         * modules/regex (Depends-on): Depend on wchar.
3121         * lib/regex_internal.h: Assume <wchar.h>.
3122         * m4/regex.m4: Likewise.
3123         * modules/stdint (Depends-on): Depend on wchar.
3124         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
3125         * m4/stdint.m4: Likewise.
3126         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
3127         * modules/strftime (Depends-on): Depend on wchar.
3128         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
3129         * modules/strtol (Depends-on): Depend on wchar.
3130         * lib/strtol.c: Assume <wchar.h>.
3131         * modules/wcwidth (Depends-on): Depend on wchar.
3132         * lib/wcwidth.h: Assume <wchar.h>.
3133         * m4/wcwidth.m4: Likewise.
3134
3135 2007-01-16  Bruno Haible  <bruno@clisp.org>
3136
3137         * modules/csharpexec-script: New, created from...
3138         * modules/csharpexec: ... this.
3139
3140 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
3141
3142         * modules/javaexec-script: New, created from...
3143         * modules/javaexec: ... this.
3144
3145 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3146
3147         * modules/poll (Dependencies): Add sys_select.
3148
3149 2007-01-15  Jim Meyering  <jim@meyering.net>
3150
3151         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
3152         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
3153         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
3154         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
3155
3156 2007-01-15  Bruno Haible  <bruno@clisp.org>
3157
3158         * modules/striconveh: New file.
3159         * lib/striconveh.h: New file.
3160         * lib/striconveh.c: New file.
3161         * MODULES.html.sh (Internationalization functions): Add striconveh.
3162
3163         * modules/striconveh-tests: New file.
3164         * tests/test-striconveh.c: New file.
3165
3166 2007-01-15  Bruno Haible  <bruno@clisp.org>
3167
3168         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
3169         not from GNU libiconv or GNU libc.
3170
3171 2007-01-15  Bruno Haible  <bruno@clisp.org>
3172
3173         * doc/gnulib-intro.texi (Copyright): Explain the different license
3174         terms for module descriptions, autoconf macros, tests, documentation.
3175
3176 2007-01-14  Bruno Haible  <bruno@clisp.org>
3177
3178         * modules/striconv-tests: New file.
3179         * tests/test-striconv.c: New file.
3180
3181 2007-01-14  Bruno Haible  <bruno@clisp.org>
3182
3183         * modules/iconv-tests: New file.
3184         * tests/test-iconv.c: New file.
3185
3186 2007-01-14  Bruno Haible  <bruno@clisp.org>
3187
3188         * gnulib-tool (func_get_license): For test modules, use the license of
3189         the main module.
3190
3191 2007-01-14  Bruno Haible  <bruno@clisp.org>
3192
3193         * modules/iconv (Include): Clarify that <iconv.h> can only be included
3194         if iconv is found to exist.
3195
3196 2007-01-14  Bruno Haible  <bruno@clisp.org>
3197
3198         * modules/c-ctype-tests: New file.
3199         * tests/test-c-ctype.c: New file.
3200
3201 2007-01-14  Bruno Haible  <bruno@clisp.org>
3202
3203         * modules/binary-io-tests: New file.
3204         * tests/test-binary-io.sh: New file.
3205         * tests/test-binary-io.c: New file.
3206
3207 2007-01-14  Bruno Haible  <bruno@clisp.org>
3208
3209         * modules/array-oset-tests: New file.
3210         * tests/test-array_oset.c: New file.
3211
3212 2007-01-14  Bruno Haible  <bruno@clisp.org>
3213
3214         * modules/array-list-tests: New file.
3215         * tests/test-array_list.c: New file.
3216
3217 2007-01-14  Bruno Haible  <bruno@clisp.org>
3218
3219         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
3220         and make.
3221         Reported by Simon Josefsson in
3222         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
3223
3224 2007-01-14  Bruno Haible  <bruno@clisp.org>
3225
3226         * modules/allocsa-tests: New file.
3227         * tests/test-allocsa.c: New file.
3228
3229 2007-01-14  Bruno Haible  <bruno@clisp.org>
3230
3231         * modules/fchdir (Depends-on): Add absolute-header.
3232         * modules/unistd (Depends-on): Likewise.
3233
3234 2006-12-30  Bruno Haible  <bruno@clisp.org>
3235
3236         * modules/fchdir: New file.
3237         * modules/unistd (Files): Add lib/unistd_.h.
3238         (Makefile.am): Generate unistd.h from unistd_.h.
3239         * lib/fchdir.c: New file.
3240         * lib/dirent_.h: New file.
3241         * lib/unistd_.h: New file.
3242         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
3243         * m4/fchdir.m4: New file.
3244         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
3245         (gl_HEADER_UNISTD): Invoke it.
3246         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
3247         function.
3248         * lib/backupfile.c (opendir, closedir): Undefine.
3249         * lib/chown.c (open, close): Undefine.
3250         * lib/clean-temp.c (open, close): Undefine.
3251         * lib/copy-file.c (open, close): Undefine.
3252         * lib/execute.c (open, close): Undefine.
3253         * lib/fsusage.c (open, close): Undefine.
3254         * lib/gc-gnulib.c (open, close): Undefine.
3255         * lib/getcwd.c (opendir, closedir): Undefine.
3256         * lib/glob.c (opendir, closedir): Undefine.
3257         * lib/javacomp.c (open, close): Undefine.
3258         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
3259         * lib/openat-proc.c (open, close): Undefine.
3260         * lib/pagealign_alloc.c (open, close): Undefine.
3261         * lib/pipe.c (open, close): Undefine.
3262         * lib/progreloc.c (open, close): Undefine.
3263         * lib/savedir.c (opendir, closedir): Undefine.
3264         * lib/utime.c (open, close): Undefine.
3265         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
3266
3267 2007-01-10  Bruno Haible  <bruno@clisp.org>
3268
3269         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
3270
3271 2007-01-12  Eric Blake  <ebb9@byu.net>
3272
3273         Provide a robust <wchar.h>.  Further simplifications are now
3274         possible in other modules, but not included here.
3275         * modules/wchar: New module.
3276         * m4/wchar.m4: New file.
3277         * lib/wchar_.h: Likewise.
3278         * modules/mbchar (Depends-on): Depend on wchar, as the first use
3279         of the new module.
3280         * MODULES.html.sh (Extended multibyte and wide character utilities):
3281         New section.
3282
3283 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
3284
3285         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
3286         to a reasonable default for memory allocation.
3287         (xreadlink): Don't allocate a huge buffer, to work around a buggy
3288         file system that reports garbage st_size values for symlinks.
3289         Problem reported by Liyang Hu.
3290
3291 2007-01-11  Simon Josefsson  <simon@josefsson.org>
3292
3293         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
3294         Emacs .#* auto-save files).
3295
3296 2007-01-11  Bruno Haible  <bruno@clisp.org>
3297
3298         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
3299         directory.
3300
3301 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
3302
3303         Use @...@ consistently in lib/wctype_.h.
3304         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
3305         on it being set to 1 or 0.
3306         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
3307         go back to AC_SUBSTing it.
3308         * modules/wctype (Makefile.am): Undo previous change.
3309
3310 2007-01-10  Eric Blake  <ebb9@byu.net>
3311
3312         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
3313         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
3314         * modules/wctype (Makefile.am): Likewise.
3315         Reported by Chris McGuire.
3316
3317 2007-01-10  Jim Meyering  <jim@meyering.net>
3318
3319         fts.c: a small readability/maintainability improvement
3320         * lib/fts.c (fts_read): Make this code slightly more readable and
3321         maintainable by hoisting the "sp->fts_cur = p" assignments to
3322         immediately follow the statements that set P.  Derived from
3323         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
3324
3325 2007-01-10  Eric Blake  <ebb9@byu.net>
3326
3327         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
3328         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
3329         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3330         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
3331         Reported by Chris McGuire.
3332
3333 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3334
3335         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
3336         in sed script.
3337
3338 2007-01-09  Bruno Haible  <bruno@clisp.org>
3339
3340         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
3341         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
3342         variables.
3343         (func_module): Use them.
3344
3345 2007-01-09  Bruno Haible  <bruno@clisp.org>
3346
3347         * modules/unistr/base: New file.
3348         * lib/unistr.h: New file.
3349
3350         * modules/unistr/u8-to-u16: New file.
3351         * lib/unistr/u8-to-u16.c: New file.
3352
3353         * modules/unistr/u8-to-u32: New file.
3354         * lib/unistr/u8-to-u32.c: New file.
3355
3356         * modules/unistr/u16-to-u8: New file.
3357         * lib/unistr/u16-to-u8.c: New file.
3358
3359         * modules/unistr/u16-to-u32: New file.
3360         * lib/unistr/u16-to-u32.c: New file.
3361
3362         * modules/unistr/u32-to-u8: New file.
3363         * lib/unistr/u32-to-u8.c: New file.
3364
3365         * modules/unistr/u32-to-u16: New file.
3366         * lib/unistr/u32-to-u16.c: New file.
3367
3368         * modules/unistr/u8-check: New file.
3369         * modules/unistr/u16-check: New file.
3370         * modules/unistr/u32-check: New file.
3371         * lib/unistr/u8-check.c: New file.
3372         * lib/unistr/u16-check.c: New file.
3373         * lib/unistr/u32-check.c: New file.
3374
3375         * modules/unistr/u8-chr: New file.
3376         * modules/unistr/u16-chr: New file.
3377         * modules/unistr/u32-chr: New file.
3378         * lib/unistr/u8-chr.c: New file.
3379         * lib/unistr/u16-chr.c: New file.
3380         * lib/unistr/u32-chr.c: New file.
3381
3382         * modules/unistr/u8-cmp: New file.
3383         * modules/unistr/u16-cmp: New file.
3384         * modules/unistr/u32-cmp: New file.
3385         * lib/unistr/u8-cmp.c: New file.
3386         * lib/unistr/u16-cmp.c: New file.
3387         * lib/unistr/u32-cmp.c: New file.
3388
3389         * modules/unistr/u8-cpy: New file.
3390         * modules/unistr/u16-cpy: New file.
3391         * modules/unistr/u32-cpy: New file.
3392         * lib/unistr/u8-cpy.c: New file.
3393         * lib/unistr/u16-cpy.c: New file.
3394         * lib/unistr/u32-cpy.c: New file.
3395         * lib/unistr/u-cpy.h: New file.
3396
3397         * modules/unistr/u8-cpy-alloc: New file.
3398         * modules/unistr/u16-cpy-alloc: New file.
3399         * modules/unistr/u32-cpy-alloc: New file.
3400         * lib/unistr/u8-cpy-alloc.c: New file.
3401         * lib/unistr/u16-cpy-alloc.c: New file.
3402         * lib/unistr/u32-cpy-alloc.c: New file.
3403         * lib/unistr/u-cpy-alloc.h: New file.
3404
3405         * modules/unistr/u8-endswith: New file.
3406         * modules/unistr/u16-endswith: New file.
3407         * modules/unistr/u32-endswith: New file.
3408         * lib/unistr/u8-endswith.c: New file.
3409         * lib/unistr/u16-endswith.c: New file.
3410         * lib/unistr/u32-endswith.c: New file.
3411         * lib/unistr/u-endswith.h: New file.
3412
3413         * modules/unistr/u8-mblen: New file.
3414         * modules/unistr/u16-mblen: New file.
3415         * modules/unistr/u32-mblen: New file.
3416         * lib/unistr/u8-mblen.c: New file.
3417         * lib/unistr/u16-mblen.c: New file.
3418         * lib/unistr/u32-mblen.c: New file.
3419
3420         * modules/unistr/u8-mbtouc: New file.
3421         * modules/unistr/u16-mbtouc: New file.
3422         * modules/unistr/u32-mbtouc: New file.
3423         * lib/unistr/u8-mbtouc.c: New file.
3424         * lib/unistr/u16-mbtouc.c: New file.
3425         * lib/unistr/u32-mbtouc.c: New file.
3426
3427         * modules/unistr/u8-mbtouc-safe: New file.
3428         * modules/unistr/u16-mbtouc-safe: New file.
3429         * modules/unistr/u32-mbtouc-safe: New file.
3430         * lib/unistr/u8-mbtouc-safe.c: New file.
3431         * lib/unistr/u16-mbtouc-safe.c: New file.
3432         * lib/unistr/u32-mbtouc-safe.c: New file.
3433
3434         * modules/unistr/u8-move: New file.
3435         * modules/unistr/u16-move: New file.
3436         * modules/unistr/u32-move: New file.
3437         * lib/unistr/u8-move.c: New file.
3438         * lib/unistr/u16-move.c: New file.
3439         * lib/unistr/u32-move.c: New file.
3440         * lib/unistr/u-move.h: New file.
3441
3442         * modules/unistr/u8-next: New file.
3443         * modules/unistr/u16-next: New file.
3444         * modules/unistr/u32-next: New file.
3445         * lib/unistr/u8-next.c: New file.
3446         * lib/unistr/u16-next.c: New file.
3447         * lib/unistr/u32-next.c: New file.
3448
3449         * modules/unistr/u8-prev: New file.
3450         * modules/unistr/u16-prev: New file.
3451         * modules/unistr/u32-prev: New file.
3452         * lib/unistr/u8-prev.c: New file.
3453         * lib/unistr/u16-prev.c: New file.
3454         * lib/unistr/u32-prev.c: New file.
3455
3456         * modules/unistr/u8-set: New file.
3457         * modules/unistr/u16-set: New file.
3458         * modules/unistr/u32-set: New file.
3459         * lib/unistr/u8-set.c: New file.
3460         * lib/unistr/u16-set.c: New file.
3461         * lib/unistr/u32-set.c: New file.
3462         * lib/unistr/u-set.h: New file.
3463
3464         * modules/unistr/u8-startswith: New file.
3465         * modules/unistr/u16-startswith: New file.
3466         * modules/unistr/u32-startswith: New file.
3467         * lib/unistr/u8-startswith.c: New file.
3468         * lib/unistr/u16-startswith.c: New file.
3469         * lib/unistr/u32-startswith.c: New file.
3470         * lib/unistr/u-startswith.h: New file.
3471
3472         * modules/unistr/u8-stpcpy: New file.
3473         * modules/unistr/u16-stpcpy: New file.
3474         * modules/unistr/u32-stpcpy: New file.
3475         * lib/unistr/u8-stpcpy.c: New file.
3476         * lib/unistr/u16-stpcpy.c: New file.
3477         * lib/unistr/u32-stpcpy.c: New file.
3478         * lib/unistr/u-stpcpy.h: New file.
3479
3480         * modules/unistr/u8-stpncpy: New file.
3481         * modules/unistr/u16-stpncpy: New file.
3482         * modules/unistr/u32-stpncpy: New file.
3483         * lib/unistr/u8-stpncpy.c: New file.
3484         * lib/unistr/u16-stpncpy.c: New file.
3485         * lib/unistr/u32-stpncpy.c: New file.
3486         * lib/unistr/u-stpncpy.h: New file.
3487
3488         * modules/unistr/u8-strcat: New file.
3489         * modules/unistr/u16-strcat: New file.
3490         * modules/unistr/u32-strcat: New file.
3491         * lib/unistr/u8-strcat.c: New file.
3492         * lib/unistr/u16-strcat.c: New file.
3493         * lib/unistr/u32-strcat.c: New file.
3494         * lib/unistr/u-strcat.h: New file.
3495
3496         * modules/unistr/u8-strchr: New file.
3497         * modules/unistr/u16-strchr: New file.
3498         * modules/unistr/u32-strchr: New file.
3499         * lib/unistr/u8-strchr.c: New file.
3500         * lib/unistr/u16-strchr.c: New file.
3501         * lib/unistr/u32-strchr.c: New file.
3502
3503         * modules/unistr/u8-strcmp: New file.
3504         * modules/unistr/u16-strcmp: New file.
3505         * modules/unistr/u32-strcmp: New file.
3506         * lib/unistr/u8-strcmp.c: New file.
3507         * lib/unistr/u16-strcmp.c: New file.
3508         * lib/unistr/u32-strcmp.c: New file.
3509
3510         * modules/unistr/u8-strcpy: New file.
3511         * modules/unistr/u16-strcpy: New file.
3512         * modules/unistr/u32-strcpy: New file.
3513         * lib/unistr/u8-strcpy.c: New file.
3514         * lib/unistr/u16-strcpy.c: New file.
3515         * lib/unistr/u32-strcpy.c: New file.
3516         * lib/unistr/u-strcpy.h: New file.
3517
3518         * modules/unistr/u8-strcspn: New file.
3519         * modules/unistr/u16-strcspn: New file.
3520         * modules/unistr/u32-strcspn: New file.
3521         * lib/unistr/u8-strcspn.c: New file.
3522         * lib/unistr/u16-strcspn.c: New file.
3523         * lib/unistr/u32-strcspn.c: New file.
3524         * lib/unistr/u-strcspn.h: New file.
3525
3526         * modules/unistr/u8-strdup: New file.
3527         * modules/unistr/u16-strdup: New file.
3528         * modules/unistr/u32-strdup: New file.
3529         * lib/unistr/u8-strdup.c: New file.
3530         * lib/unistr/u16-strdup.c: New file.
3531         * lib/unistr/u32-strdup.c: New file.
3532         * lib/unistr/u-strdup.h: New file.
3533
3534         * modules/unistr/u8-strlen: New file.
3535         * modules/unistr/u16-strlen: New file.
3536         * modules/unistr/u32-strlen: New file.
3537         * lib/unistr/u8-strlen.c: New file.
3538         * lib/unistr/u16-strlen.c: New file.
3539         * lib/unistr/u32-strlen.c: New file.
3540         * lib/unistr/u-strlen.h: New file.
3541
3542         * modules/unistr/u8-strmblen: New file.
3543         * modules/unistr/u16-strmblen: New file.
3544         * modules/unistr/u32-strmblen: New file.
3545         * lib/unistr/u8-strmblen.c: New file.
3546         * lib/unistr/u16-strmblen.c: New file.
3547         * lib/unistr/u32-strmblen.c: New file.
3548
3549         * modules/unistr/u8-strmbtouc: New file.
3550         * modules/unistr/u16-strmbtouc: New file.
3551         * modules/unistr/u32-strmbtouc: New file.
3552         * lib/unistr/u8-strmbtouc.c: New file.
3553         * lib/unistr/u16-strmbtouc.c: New file.
3554         * lib/unistr/u32-strmbtouc.c: New file.
3555
3556         * modules/unistr/u8-strncat: New file.
3557         * modules/unistr/u16-strncat: New file.
3558         * modules/unistr/u32-strncat: New file.
3559         * lib/unistr/u8-strncat.c: New file.
3560         * lib/unistr/u16-strncat.c: New file.
3561         * lib/unistr/u32-strncat.c: New file.
3562         * lib/unistr/u-strncat.h: New file.
3563
3564         * modules/unistr/u8-strncmp: New file.
3565         * modules/unistr/u16-strncmp: New file.
3566         * modules/unistr/u32-strncmp: New file.
3567         * lib/unistr/u8-strncmp.c: New file.
3568         * lib/unistr/u16-strncmp.c: New file.
3569         * lib/unistr/u32-strncmp.c: New file.
3570
3571         * modules/unistr/u8-strncpy: New file.
3572         * modules/unistr/u16-strncpy: New file.
3573         * modules/unistr/u32-strncpy: New file.
3574         * lib/unistr/u8-strncpy.c: New file.
3575         * lib/unistr/u16-strncpy.c: New file.
3576         * lib/unistr/u32-strncpy.c: New file.
3577         * lib/unistr/u-strncpy.h: New file.
3578
3579         * modules/unistr/u8-strnlen: New file.
3580         * modules/unistr/u16-strnlen: New file.
3581         * modules/unistr/u32-strnlen: New file.
3582         * lib/unistr/u8-strnlen.c: New file.
3583         * lib/unistr/u16-strnlen.c: New file.
3584         * lib/unistr/u32-strnlen.c: New file.
3585         * lib/unistr/u-strnlen.h: New file.
3586
3587         * modules/unistr/u8-strpbrk: New file.
3588         * modules/unistr/u16-strpbrk: New file.
3589         * modules/unistr/u32-strpbrk: New file.
3590         * lib/unistr/u8-strpbrk.c: New file.
3591         * lib/unistr/u16-strpbrk.c: New file.
3592         * lib/unistr/u32-strpbrk.c: New file.
3593         * lib/unistr/u-strpbrk.h: New file.
3594
3595         * modules/unistr/u8-strrchr: New file.
3596         * modules/unistr/u16-strrchr: New file.
3597         * modules/unistr/u32-strrchr: New file.
3598         * lib/unistr/u8-strrchr.c: New file.
3599         * lib/unistr/u16-strrchr.c: New file.
3600         * lib/unistr/u32-strrchr.c: New file.
3601
3602         * modules/unistr/u8-strspn: New file.
3603         * modules/unistr/u16-strspn: New file.
3604         * modules/unistr/u32-strspn: New file.
3605         * lib/unistr/u8-strspn.c: New file.
3606         * lib/unistr/u16-strspn.c: New file.
3607         * lib/unistr/u32-strspn.c: New file.
3608         * lib/unistr/u-strspn.h: New file.
3609
3610         * modules/unistr/u8-strstr: New file.
3611         * modules/unistr/u16-strstr: New file.
3612         * modules/unistr/u32-strstr: New file.
3613         * lib/unistr/u8-strstr.c: New file.
3614         * lib/unistr/u16-strstr.c: New file.
3615         * lib/unistr/u32-strstr.c: New file.
3616         * lib/unistr/u-strstr.h: New file.
3617
3618         * modules/unistr/u8-strtok: New file.
3619         * modules/unistr/u16-strtok: New file.
3620         * modules/unistr/u32-strtok: New file.
3621         * lib/unistr/u8-strtok.c: New file.
3622         * lib/unistr/u16-strtok.c: New file.
3623         * lib/unistr/u32-strtok.c: New file.
3624         * lib/unistr/u-strtok.h: New file.
3625
3626         * modules/unistr/u8-uctomb: New file.
3627         * modules/unistr/u16-uctomb: New file.
3628         * modules/unistr/u32-uctomb: New file.
3629         * lib/unistr/u8-uctomb.c: New file.
3630         * lib/unistr/u16-uctomb.c: New file.
3631         * lib/unistr/u32-uctomb.c: New file.
3632
3633         * MODULES.html.sh (Unicode string functions): Add the new modules.
3634
3635 2007-01-08  Bruno Haible  <bruno@clisp.org>
3636
3637         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
3638         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
3639         subdirectories.
3640
3641 2007-01-08  Karl Berry  <karl@gnu.org>
3642
3643         * doc/error.texi: mention that main() fns must set program_name
3644         when progname is used.
3645
3646 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
3647
3648         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
3649         WCTYPE_H is empty, for the benefit of builds from non-distclean
3650         directories.  Problem reported by Eric Blake in
3651         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
3652
3653 2007-01-08  Bruno Haible  <bruno@clisp.org>
3654
3655         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
3656         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
3657         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
3658         PROVIDE_CANONICALIZE_FILENAME_MODE.
3659         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
3660
3661 2007-01-08  Bruno Haible  <bruno@clisp.org>
3662
3663         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
3664         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
3665         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
3666         * lib/fts.c: Likewise.
3667         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
3668
3669 2006-12-25  Bruno Haible  <bruno@clisp.org>
3670
3671         * modules/utf8-ucs4-safe: New file.
3672         * lib/utf8-ucs4-safe.h: New file.
3673         * lib/unistr/utf8-ucs4-safe.c: New file.
3674
3675         * modules/utf16-ucs4-safe: New file.
3676         * lib/utf16-ucs4-safe.h: New file.
3677         * lib/unistr/utf16-ucs4-safe.c: New file.
3678
3679         * MODULES.html.sh (Unicode string functions): Add the new modules.
3680
3681 2007-01-08  Bruno Haible  <bruno@clisp.org>
3682
3683         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
3684         (Depends-on): Add unitypes.
3685         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3686         (u8_mbtouc_aux): Move out to separate file.
3687         (u8_mbtouc): Use ucs4_t, uint8_t types.
3688         * lib/unistr/utf8-ucs4.c: New file.
3689
3690         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
3691         (Depends-on): Add unitypes.
3692         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3693         (u16_mbtouc_aux): Move out to separate file.
3694         (u16_mbtouc): Use ucs4_t, uint16_t types.
3695         * lib/unistr/utf16-ucs4.c: New file.
3696
3697         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
3698         (Depends-on): Add unitypes.
3699         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
3700         (u8_uctomb_aux): Move out to separate file.
3701         (u8_uctomb): Use ucs4_t, uint8_t types.
3702         * lib/unistr/ucs4-utf8.c: New file.
3703
3704         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
3705         (Depends-on): Add unitypes.
3706         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
3707         (u16_uctomb_aux): Move out to separate file.
3708         (u16_uctomb): Use ucs4_t, uint16_t types.
3709         * lib/unistr/ucs4-utf16.c: New file.
3710
3711 2006-12-25  Bruno Haible  <bruno@clisp.org>
3712
3713         * modules/unitypes: New file.
3714         * lib/unitypes.h: New file.
3715         * MODULES.html.sh (func_all_modules): New section "Unicode string
3716         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
3717         this section. Add unitypes.
3718
3719 2007-01-08  Bruno Haible  <bruno@clisp.org>
3720
3721         Avoid variable names that conflict with those from libtool.
3722         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
3723         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
3724         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
3725         library_names_spec to acl_library_names_spec, hardcode_* to
3726         acl_hardcode_*.
3727         Reported by Ralf Wildenhues.
3728
3729 2007-01-08  Bruno Haible  <bruno@clisp.org>
3730
3731         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
3732         definition.
3733         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
3734         definition.
3735         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
3736         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
3737         definition.
3738         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
3739         definition.
3740         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
3741         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
3742         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
3743         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
3744         definition.
3745         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
3746         definition.
3747         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
3748         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
3749         GC_USE_<algorithm>.
3750         * lib/gc-libgcrypt.c: Likewise.
3751         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
3752         * modules/gc-arctwo (configure.ac): Likewise.
3753         * modules/gc-des (configure.ac): Likewise.
3754         * modules/gc-hmac-md5 (configure.ac): Likewise.
3755         * modules/gc-hmac-sha1 (configure.ac): Likewise.
3756         * modules/gc-md2 (configure.ac): Likewise.
3757         * modules/gc-md4 (configure.ac): Likewise.
3758         * modules/gc-md5 (configure.ac): Likewise.
3759         * modules/gc-random (configure.ac): Likewise.
3760         * modules/gc-rijndael (configure.ac): Likewise.
3761         * modules/gc-sha1 (configure.ac): Likewise.
3762
3763 2007-01-08  Bruno Haible  <bruno@clisp.org>
3764
3765         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
3766         macro definition.
3767         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
3768         definition.
3769         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
3770         definition.
3771         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
3772         * modules/fcntl-safer (configure.ac): Likewise.
3773         * modules/fopen-safer (configure.ac): Likewise.
3774         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
3775         GNULIB_FWRITEERROR macro definition.
3776
3777 2007-01-08  Bruno Haible  <bruno@clisp.org>
3778
3779         * m4/gnulib-common.m4: New file.
3780         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
3781         (func_get_filelist): Add m4/gnulib-common.m4.
3782
3783 2007-01-08  Bruno Haible  <bruno@clisp.org>
3784
3785         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
3786         command.
3787
3788 2007-01-08  Jim Meyering  <jim@meyering.net>
3789
3790         Use a more robust test for a "can't happen" condition.
3791         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
3792         narrowed the st_size value.  Presuming the "can't happen" condition
3793         is true, that narrowing could conceivably convert an invalid st_size
3794         value into a valid one.  Instead, use a change based on Matthew
3795         Woehlke's original patch.
3796
3797         Slight readability improvement: use an assert-like macro
3798         in place of literal "abort ()" uses.
3799         * lib/fts.c (fts_assert): Define.
3800         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
3801         Use this macro instead of a bare 'abort'.
3802
3803 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
3804
3805         Don't worry about using IRIX 5.3's wctype.h broken definitions;
3806         simply work around them.
3807         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
3808         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
3809         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
3810         declaring.
3811         Don't bother to define as macros, since the standard doesn't require it.
3812         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
3813         longer worry about IRIX 5.3.
3814         (HAVE_WCTYPE_CTMP_BUG): Remove.
3815
3816 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
3817
3818         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
3819         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
3820         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
3821         Problems reported by Georg Schwarz for IRIX 5.3.
3822
3823         * gnulib-tool (autoconf_minversion): Take the maximum version number
3824         found, not the minimum.  Problem reported by James Youngman.
3825
3826 2007-01-03  Karl Berry  <karl@gnu.org>
3827
3828         * doc/error.texi: new file, explaining interaction with progname.
3829         * doc/gnulib.texi: include it.  Update copyright.
3830
3831 2007-01-03  Simon Josefsson  <simon@josefsson.org>
3832
3833         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
3834         AC_CANONICAL_HOST, to improve autobuild outputs.
3835
3836 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
3837             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3838
3839         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
3840         sockets, server sockets, and other file descriptors.  Count errors
3841         to compute the return value.  Reorder the code a bit to be easier
3842         to follow.  Don't set event bits that were not requested (except
3843         POLLERR and POLLHUP).
3844
3845 2007-01-01  Bruno Haible  <bruno@clisp.org>
3846
3847         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
3848
3849 2007-01-03  Jim Meyering  <jim@meyering.net>
3850
3851         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
3852
3853 2007-01-02  Bruno Haible  <bruno@clisp.org>
3854
3855         * modules/settime (Include): Require timespec.h.
3856         * modules/nanosleep (Include): Likewise.
3857
3858 2007-01-01  Bruno Haible  <bruno@clisp.org>
3859
3860         * gnulib-tool (func_emit_copyright_notice): Bump year.
3861         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
3862
3863 2007-01-01  Bruno Haible  <bruno@clisp.org>
3864
3865         Improve support for OpenBSD.
3866         * build-aux/config.rpath (libname_spec): Export.
3867         (library_names_spec): New variable. Export.
3868         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
3869         library_names_spec from the config.rpath output. Locate shared library
3870         through the name pattern in library_names_spec.
3871
3872 2007-01-01  Eric Blake  <ebb9@byu.net>
3873
3874         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
3875
3876 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
3877
3878         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
3879         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
3880         assume the C locale, and avoid an "eval" that could cause trouble.
3881         Problem with SORT reported by Bob Proulx.
3882
3883         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
3884         Define.  Trivial patch from Henning Nielsen Lund, originally
3885         sent to bug-grep@gnu.org today.
3886
3887 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
3888
3889         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
3890         struct stat.  Problem reported by Henning Nielsen Lund.
3891         * lib/acl.c: Include acl.h first, to check interface.  Don't
3892         bother to include sys/types.h and sys/stat.h again.
3893
3894 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
3895
3896         Import the following change from libc; problem reported by
3897         Sven Verdoolaege.
3898
3899         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
3900
3901         [BZ #1373]
3902         * lib/argp.h: Remove __NTH for __argp_usage inline function.
3903
3904 2006-12-28  Jim Meyering  <jim@meyering.net>
3905
3906         * build-aux/announce-gen: Do not assume that the package
3907         builds any of tar.gz, tar.bz2, and .xdelta files.
3908         Suggestion from Simon Josefsson.
3909
3910 2006-12-28  Simon Josefsson  <simon@josefsson.org>
3911
3912         * modules/announce-gen: New file.
3913
3914 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
3915
3916         * lib/mbchar.h: Just include <wctype.h>; the wctype module
3917         handles its gotchas now.
3918         * lib/mbswidth.c: Likewise.
3919         * lib/wcwidth.h: Likewise.
3920         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
3921         and iswcntrl; the wctype module does this stuff now.
3922         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
3923         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3924         * modules/mbchar (Depends-on): Add wctype.
3925         * modules/mbswidth (Depends-on): Likewise.
3926         * modules/wcwidth (Depends-on): Likewise.
3927
3928 2006-12-27  Eric Blake  <ebb9@byu.net>
3929
3930         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
3931         module uses more than what <wctype.h> is required to provide.
3932
3933 2006-12-26  Eric Blake  <ebb9@byu.net>
3934
3935         * gnulib-tool (sed_extract_prog): Avoid space-tab.
3936
3937 2006-12-26  Eric Blake  <ebb9@byu.net>
3938
3939         * modules/absolute-header: New module.
3940         * modules/fcntl (Depends-on): Depend on it.
3941         * modules/inttypes (Depends-on): Likewise.
3942         * modules/stdint (Depends-on): Likewise.
3943         * modules/sys_stat (Depends-on): Likewise.
3944         * modules/wctype (Depends-on): Likewise.
3945         * MODULES.html.sh (Support for building libraries and
3946         executables): Document it.
3947
3948 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
3949
3950         * gnulib-tool (SED): Remove, undoing previous change.
3951         The problem was that it broke coreutils on Solaris, because
3952         "sed --posix" leaked into a makefile.
3953         (sed): New alias, if 'alias' and GNU sed.
3954
3955 2006-12-24  Jim Meyering  <jim@meyering.net>
3956
3957         Work around an fchownat bug in glibc-2.4:
3958         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
3959         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
3960         in spite of the -P option.
3961         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
3962         New macros.
3963         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
3964         * modules/openat (Files): Add lib/fchownat.c.
3965         * lib/openat.c (fchownat): Don't define here.  Move to...
3966         * lib/fchownat.c: ...this new file.
3967
3968 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
3969
3970         Fix bug reported by Bruno Haible in
3971         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
3972         where quotearg.c didn't compile on Mac OS X 10.2 because it
3973         lacks <wchar.h> and wint_t.
3974         * lib/wctype_.h (__wctype_wint_t): New type.
3975         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
3976         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
3977         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
3978         Arg is now of type __wctype_wint_t, not wint_t.
3979         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
3980         substitute HAVE_WINT_T.
3981         * modules/wctype (Files): Add m4/wint_t.m4.
3982         (wctype.h): Substitute HAVE_WINT_T.
3983
3984 2006-12-23  Bruno Haible  <bruno@clisp.org>
3985
3986         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
3987
3988 2006-12-23  Bruno Haible  <bruno@clisp.org>
3989
3990         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
3991         S_ISLNK.
3992         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
3993         mingw.
3994
3995 2006-12-22  Bruno Haible  <bruno@clisp.org>
3996
3997         * lib/copy-file.c: Include acl.h.
3998         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
3999         Close the file descriptors only after being done with copy_acl.
4000         * modules/copy-file (Depends-on): Add acl.
4001
4002 2006-12-22  Bruno Haible  <bruno@clisp.org>
4003
4004         * gnulib-tool (SED): New variable.
4005         Use $SED instead of sed everywhere.
4006
4007 2006-12-22  Bruno Haible  <bruno@clisp.org>
4008
4009         * modules/no-c++: New file.
4010         * m4/no-c++.m4: New file.
4011         * MODULES.html.sh (Support for building libraries and executables):
4012         Add no-c++.
4013
4014 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
4015
4016         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4017         Include <limits.h>, and use its INT_MAX to rewrite the
4018         j loop so that it does not overflow 'int'.  Problem reported by
4019         Ralf Wildenhues in
4020         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
4021         Play it safe by shifting left by 1 rather than multiplying by 2,
4022         as GCC is less likely to optimize this away when the value
4023         is signed (when it assumes overflow leads to undefined behavior).
4024         Also, don't assume time_t uses two's complement.
4025
4026 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
4027
4028         * MODULES.html.sh: New module wctype.
4029         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
4030         * lib/fnmatch.c: Don't bother to include <wchar.h> before
4031         <wctype.h>, since the new wctype module should fix this.
4032         * lib/quotearg.c: Include <wctype.h> unconditionally, since
4033         the wctype module should arrange for it.
4034         * lib/regex_internal.h: Likewise.
4035         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
4036         since the wctype module should handle this now.
4037         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
4038         * modules/fnmatch (Depends-on): Add wctype.
4039         * modules/quotearg (Depends-on): Likewise.
4040         * modules/regex (Depends-on): Likewise.
4041
4042 2006-12-19  Bruno Haible  <bruno@clisp.org>
4043
4044         * lib/strdup.h [C++]: Wrap definitions in extern "C".
4045         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
4046
4047 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4048
4049         * modules/savewd (Depends-on): Fix dependency on fcntl.
4050
4051 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4052
4053         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
4054         conforms to C99, rather than relying on the user's environment
4055         setting of STDINT_H.
4056
4057 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4058         and Eric Blake  <ebb9@byu.net>
4059
4060         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
4061         This is more consistent with the other defines here.
4062         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
4063         Port to z/OS.  Problem reported by Paul Gilmartin.
4064         Change local vars to use gl_ prefix rather than ac_.
4065         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
4066         with other defines.
4067         * modules/double-slash-root: New module.
4068         * modules/dirname (Files): Remove m4/double-slash-root.m4.
4069         (Depends-on): Add double-slash-root.
4070         * MODULES.html.sh (File system functions): Mention new module.
4071
4072 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
4073
4074         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
4075         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
4076         This is for the benefit of gzip, which doesn't do i18n.
4077
4078 2006-12-12  Jim Meyering  <jim@meyering.net>
4079
4080         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
4081         Reported by Andreas Schwab <schwab@suse.de>.
4082
4083 2006-12-12  Bruno Haible  <bruno@clisp.org>
4084
4085         Merge these changes.
4086         2006-09-05  Bruno Haible  <bruno@clisp.org>
4087         * lib/iconvme.c (iconv_string): No need to save and restore errno when
4088         iconv_alloc succeeded.
4089         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
4090         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
4091         test for " && dest " at the end - dest is always != NULL there. Call
4092         iconv with 4xNULL arguments initially, to reset the state. Call iconv
4093         with 2xNULL arguments, also to flush the state storage. Handle the
4094         IRIX iconv behaviour. Realloc the final result, to throw away unused
4095         memory.
4096
4097 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
4098
4099         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
4100         and fchmodat unconditionally, since glibc 2.4 has them.
4101         Problem reported by Arkadiusz Miskiewicz.
4102
4103 2006-12-10  Bruno Haible  <bruno@clisp.org>
4104
4105         * gnulib-tool (func_import): Show the include files only for those
4106         modules that are copied and specified.
4107         Reported by Karl Berry.
4108
4109 2006-12-08  Jim Meyering  <jim@meyering.net>
4110
4111         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
4112         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
4113
4114         * build-aux/announce-gen: Add two new options, both optional:
4115         --bootstrap-tools=TOOL_LIST
4116               a comma-separated list of tools, e.g.,
4117               autoconf,automake,bison,gnulib
4118         --gnulib-snapshot-date=DATE
4119               if gnulib is in the bootstrap tool list,
4120               then report this as the snapshot date.
4121               If not specified, use the current date/time.
4122               If you specify a date here, be sure it's UTC.
4123
4124 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4125
4126         * tests/test-argp-2.sh: Fix test to match actual output.
4127         (func_compare): Fix sed script to be portable.
4128
4129 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
4130
4131         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
4132         workaround for this case.  It is not autoconfigured now; offhand
4133         it's hard to see how to autoconfigure it.
4134
4135 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
4136
4137         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
4138         a directory that is about to be chowned.  Such a directory's
4139         initial file permissions should permit the owner only and this
4140         should not be changed until after the chown, since the group and
4141         other bits would be incorrect if they granted permission before
4142         the chown.
4143
4144         Fix porting problem for iswctype reported by Georg Schwarz in:
4145         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
4146         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
4147         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
4148         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
4149         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
4150
4151 2006-12-03  Jim Meyering  <jim@meyering.net>
4152
4153         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
4154         p->fts_statp may not yet be defined.
4155         (fts_read): Instead, set it in the caller, once p->fts_statp is
4156         sure to be defined, and corresponds to a top-level directory.
4157         This bug made du -x fail.  Here's the coreutils test case:
4158         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
4159         Reported by Mike Frysinger.
4160
4161 2006-12-01  Jim Meyering  <jim@meyering.net>
4162
4163         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
4164         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
4165         Reported by Simon Josefsson.
4166
4167 2006-11-30  Jim Meyering  <jim@meyering.net>
4168
4169         * m4/warning.m4: Use the all-permissive copyright notice
4170         recommended by RMS (rather than LGPL).
4171         * m4/vararrays.m4: Likewise.
4172         * m4/flexmember.m4: Likewise.
4173
4174 2006-11-29  Bruno Haible  <bruno@clisp.org>
4175
4176         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4177         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
4178         using +=.
4179         Reported by Simon Josefsson <simon@josefsson.org>.
4180
4181 2006-11-28  James Youngman <jay@gnu.org>
4182
4183         * README: Advise users that they might find the bug-gnulib@gnu.org
4184         and autotools-announce@gnu.org mailing lists useful.
4185
4186 2006-11-28  Bruno Haible  <bruno@clisp.org>
4187
4188         * m4/ptrdiff_max.m4: Remove file.
4189
4190 2006-11-21  Bruno Haible  <bruno@clisp.org>
4191
4192         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
4193         _AC_COMPUTE_INT.
4194         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4195         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
4196         _AC_COMPUTE_INT.
4197         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4198         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
4199         _AC_COMPUTE_INT.
4200         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4201
4202 2006-11-28  Jim Meyering  <jim@meyering.net>
4203
4204         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
4205         warning from "gcc -Wshadow" about shadowing the builtin.
4206
4207 2006-11-27  Bruno Haible  <bruno@clisp.org>
4208
4209         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
4210         _AC_COMPUTE_INT.
4211         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4212
4213 2006-11-27  Bruno Haible  <bruno@clisp.org>
4214             Paul Eggert  <eggert@cs.ucla.edu>
4215
4216         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
4217
4218 2006-11-26  Bruno Haible  <bruno@clisp.org>
4219
4220         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4221         noinst_LTLIBRARIES.
4222
4223 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
4224             Bruno Haible  <bruno@clisp.org>
4225
4226         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
4227         if compiling with "gcc -ansi".
4228
4229 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
4230
4231         Fix some incompatibilities with gcc -ansi -pedantic.
4232         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
4233         if compiling pedantically with GCC, unless it's C99 or later.
4234         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
4235         it mishandles gcc -ansi -pedantic as well.
4236         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
4237         if gcc -pedantic.
4238         * lib/regexec.c (check_node_accept_bytes): Don't use auto
4239         initializers for struct if -pedantic, unless it's C99 or later.
4240
4241 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
4242
4243         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
4244         Don't close an fd more than once. Identical atimes indicate
4245         success, not failure.
4246
4247 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
4248
4249         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
4250
4251 2006-11-23  Jim Meyering  <jim@meyering.net>
4252
4253         * build-aux/announce-gen: New file.  From coreutils.
4254
4255 2006-11-22  Jim Meyering  <jim@meyering.net>
4256
4257         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
4258         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
4259         (fts_read): Use a temporary to narrow the overused st_size member
4260         before using it in a switch statement.  Reported by Matthew Woehlke.
4261
4262         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
4263         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
4264
4265 2006-11-20  Bruno Haible  <bruno@clisp.org>
4266
4267         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
4268         changequote instead of pairs of brackets.
4269         Reported by Andreas Schwab <schwab@suse.de>.
4270
4271 2006-11-21  Jim Meyering  <jim@meyering.net>
4272
4273         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
4274         so as to remain compatible with older compilers.
4275         Patch from Michael Deutschmann.
4276
4277 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4278
4279         * MODULES.html.sh (File system functions): Add openat.
4280
4281         * lib/openat.h (rpl_fstatat): New macro, if
4282         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
4283         (fstatat): Define to rpl_fstatat under the same conditions,
4284         unless COMPILING_FSTATAT.
4285         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
4286         seems to have the bug.
4287         * lib/fstatat.c: New file.
4288         * modules/openat (Files): Add it.
4289
4290 2006-11-20  Bruno Haible  <bruno@clisp.org>
4291
4292         * Makefile: New file.
4293
4294 2006-11-20  Jim Meyering  <jim@meyering.net>
4295
4296         The beginnings of syntax-related checks for gnulib.
4297         * lib/Makefile: New file.
4298         * lib/t-idcache: New script.  Ensure that the two halves of
4299         idcache.c stay in sync.
4300
4301         * lib/idcache.c: Adjust comments in user- and group- portions to
4302         be more accurate, and to be consistent with one another.
4303
4304 2006-11-20  Jim Meyering  <jim@meyering.net>
4305
4306         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
4307         continue using the flexible array member (thus, this module performs
4308         half as many malloc calls), with the addition that...
4309         (getgroup, getuser): Consistently record a non-match via an empty
4310         "name" string, and map an empty string match to a NULL return value.
4311         * modules/idcache (Depends-on): Re-add flexmember.
4312
4313         * lib/idcache.c (getuser): Remove all uses of the register keyword.
4314         (getuidbyname, getgroup, getgidbyname): Likewise.
4315
4316         Use cleaner syntax: NULL rather than 0.
4317         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
4318
4319 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4320
4321         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
4322         It mishandled the case where the group was missing.
4323         Problem reported by Greg Schafer.
4324         * modules/idcache: Likewise.
4325
4326 2006-11-18  Jim Meyering  <jim@meyering.net>
4327
4328         * check-module (%exempt_header): Add exception for some
4329         conditionally-included headers.
4330
4331         * modules/i-ring (Depends-on): Add verify.
4332         (License): Change to LGPL.
4333
4334 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
4335
4336         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
4337         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
4338         and inttostr.h.  Use snprintf rather than uinttostr, so that
4339         LGPLed code doesn't depend on GPLed.
4340
4341 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
4342
4343         * modules/inline (License): Change from GPL to LGPL.
4344
4345 2006-11-17  Jim Meyering  <jim@meyering.net>
4346
4347         * modules/d-type (License): Switch to LGPL.
4348
4349 2006-11-15  Bruno Haible  <bruno@clisp.org>
4350
4351         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
4352
4353 2006-11-15  Eric Blake  <ebb9@byu.net>
4354
4355         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
4356         the module dependency.
4357
4358 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4359             Bruno Haible  <bruno@clisp.org>
4360
4361         * gnulib-tool (func_create_testdir): Add license consistency check.
4362
4363 2006-11-15  Eric Blake  <ebb9@byu.net>
4364
4365         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
4366         random "(cached)" in configure output.
4367
4368 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4369
4370         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
4371         test for conforming inttypes.h is both announced and cached.
4372
4373         * MODULES.html.sh (seen_modules, seen_files): New variables.
4374         (func_module): Rewrite to use a few less gnulib-tool and sed
4375         invocations.  Avoid a couple of quadratic algorithms for ...
4376         (missed_modules, missed_files): ... these, with ...
4377         (func_append, func_tmpdir): ... these new functions, from
4378         gnulib-tool.  Analogously, install traps for cleanup.
4379
4380         * tests/test-gc.c (main): Remove unused variables.
4381         * tests/test-read-file.c: Include stdlib.h, for 'free'.
4382
4383 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
4384
4385         * modules/inttostr (License): Change to LGPL.
4386
4387 2006-11-14  Eric Blake  <ebb9@byu.net>
4388
4389         * modules/tempname (License): Change to LGPL.
4390
4391 2006-11-14  Eric Blake  <ebb9@byu.net>
4392
4393         * doc/functions.texi (Function Portability): *printf functions on
4394         Cygwin now understand all POSIX size specifiers.
4395
4396 2006-11-14  Bruno Haible  <bruno@clisp.org>
4397
4398         * modules/c-ctype (License): Change to LGPL.
4399
4400 2006-11-12  Bruno Haible  <bruno@clisp.org>
4401
4402         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
4403         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
4404         for GNOME libraries, for which the include files are installed in
4405         subdirectories of $prefix/include.
4406
4407 2006-11-12  Bruno Haible  <bruno@clisp.org>
4408
4409         * m4/lib-link.m4: Require at least autoconf-2.54.
4410         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
4411         name to underscores for the --with option.
4412
4413 2006-11-13  Bruno Haible  <bruno@clisp.org>
4414
4415         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
4416         the tests directory.
4417         Reported by Ralf Wildenhues.
4418
4419 2006-11-13  Bruno Haible  <bruno@clisp.org>
4420
4421         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
4422         (func_emit_initmacro_end): Undo the override here.
4423         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
4424         Works around the famous automake error in coreutils.
4425
4426 2006-11-13  Eric Blake  <ebb9@byu.net>
4427
4428         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
4429         element, not its node.
4430
4431 2006-11-12  Bruno Haible  <bruno@clisp.org>
4432
4433         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
4434         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
4435
4436 2006-11-12  Bruno Haible  <bruno@clisp.org>
4437
4438         * gnulib-tool: New option --local-symlink.
4439         (func_usage): Document it.
4440         (lsymbolic): New variable.
4441         (func_import, func_create_testdir): If --symlink was not specified,
4442         test whether --local-symlink was specified and the file comes from
4443         the local_gnulib_dir.
4444
4445 2006-11-12  Bruno Haible  <bruno@clisp.org>
4446
4447         * gnulib-tool (func_ln): New function.
4448         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
4449
4450 2006-11-12  Bruno Haible  <bruno@clisp.org>
4451
4452         Finish support for source files in subdirectories.
4453         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
4454         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
4455         AUTOMAKE_OPTIONS.
4456         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
4457
4458 2006-11-12  Bruno Haible  <bruno@clisp.org>
4459
4460         * gnulib-tool (func_get_automake_snippet): Synthesize also an
4461         EXTRA_lib_SOURCES augmentation.
4462         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
4463
4464 2006-11-12  Jim Meyering  <jim@meyering.net>
4465
4466         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
4467         file descriptors.  This also averts a failure on systems with
4468         native openat support when a traversed directory lacks "x" access.
4469         * lib/fts_.h: Include "i-ring.h"
4470         (struct FTS) [fts_fd_ring]: New member.
4471         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
4472         (FCHDIR): Add parentheses.
4473         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
4474         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
4475         When descending, rather than simply closing the previous
4476         fts_cwd_fd value, push that file descriptor onto the ring.
4477         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
4478         (fts_open): Initialize the new fd_ring member.
4479         (fts_close): Clear the ring.
4480         (fts_safe_changedir): When possible, use our new fd_ring to skip
4481         the diropen and fstat and dev/ino comparison that would normally
4482         accompany a virtual `chdir ("..")'.
4483
4484         * modules/fts (Depends-on): Add i-ring.
4485         * modules/i-ring: New module.
4486         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
4487         * m4/i-ring.m4: New file.
4488
4489 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4490
4491         * gnulib-tool (func_create_testdir): Fix replacement of
4492         `build-aux' in configure.ac.  Run autotools in gltests
4493         subdirectory.
4494         (func_create_testdir, func_create_megatestdir, test): There is
4495         no need for '--force' in most autotool invocations in a new
4496         tree.  Actually fail the whole test if any of the tools, or the
4497         configure or make stages fail.
4498
4499         Sync from Automake.
4500         * build-aux/gnupload: Revert last change.  Add pointer to upload
4501         instructions of the GNU Maintenance Instructions.
4502         Suggestion by Karl Berry.
4503
4504 2006-11-10  Jim Meyering  <jim@meyering.net>
4505
4506         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
4507
4508 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4509
4510         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
4511         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
4512         (bind_textdomain_codeset) [! ENABLE_NLS]:
4513         Evaluate all the arguments.  That way, callers get compatible behavior
4514         if the arguments have side effects.  Also, it avoids some GCC
4515         diagnostics in some cases; Joel E. Denny reported problems when Bison
4516         was configured with --enable-gcc-warnigs.
4517
4518 2006-11-10  Jim Meyering  <jim@meyering.net>
4519
4520         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
4521         relevant options in CFLAGS (like -O, -fno-inline) are taken into
4522         account.
4523
4524 2006-11-10  Jim Meyering  <jim@meyering.net>
4525
4526         * modules/inline: New file/module.
4527         * modules/xalloc (Files): Remove m4/inline.m4.
4528         (Depends-on): Add inline, instead.
4529         * modules/oset: Likewise.
4530         * modules/list: Likewise.
4531
4532 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4533
4534         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
4535         Problem reported by Matthew Woehlke.
4536
4537 2006-11-09  Bruno Haible  <bruno@clisp.org>
4538
4539         * lib/tempname.c (gen_tempname): Remove variant that invokes
4540         __gen_tempname.
4541         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
4542         __gen_tempname.
4543
4544 2006-11-08  Bruno Haible  <bruno@clisp.org>
4545
4546         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
4547         to 'yes' instead of 'cross-compiling'.
4548
4549 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
4550
4551         * lib/quotearg.h (quotearg_free): New decl.
4552         * lib/quotearg.c (quotearg_free): New function.
4553         (slot0, nslots, slotvec0, slotvec):
4554         Now file-scope so that quotearg_free can get at them.
4555
4556 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4557
4558         Sync from Automake.
4559         * build-aux/gnupload: Add missing 'gnu' to example URL.
4560         Report by Karl Berry.
4561
4562 2006-11-08  Bruno Haible  <bruno@clisp.org>
4563
4564         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
4565         Suggested by Paul Eggert.
4566
4567 2006-11-08  Jim Meyering  <jim@meyering.net>
4568
4569         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
4570         It's already included if !_LIBC.
4571         (fts_safe_changedir): Add a comment.
4572
4573 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4574
4575         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
4576         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
4577         Matthew Woehlke.
4578
4579         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
4580         definitions up, to avoid colliding with change below.
4581         (static_inline) [HAVE_INLINE]: New macro.
4582         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
4583         Provide extern decls when !HAVE_INLINE.  Do not define unless
4584         static_inline is defined, either by us or by xmalloc.c.  Use
4585         static_inline rather than static inline.
4586         (XCALLOC): Optimize sizeof(T) = 1 case.
4587         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
4588
4589 2006-11-07  Bruno Haible  <bruno@clisp.org>
4590
4591         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
4592         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
4593         AC_C_INLINE.
4594         * modules/xalloc (Files): Add m4/inline.m4.
4595
4596 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4597
4598         * README: Fix typo.
4599         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
4600         (Miscellanous Notes): ...from this.
4601
4602 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4603
4604         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
4605         Mention that offsetof should be used instead of sizeof.
4606         From Bruno Haible.
4607
4608 2006-11-07  Bruno Haible  <bruno@clisp.org>
4609
4610         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
4611
4612 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4613
4614         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4615         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
4616         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4617         (gl_tree_add_before, gl_tree_add_after):
4618         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
4619         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
4620         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4621         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
4622         (gl_linked_add_after, gl_linked_add_at): Likewise.
4623         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
4624         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4625         (gl_tree_add_before, gl_tree_add_after): Likewise.
4626         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
4627         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
4628         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
4629
4630 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4631
4632         * lib/gl_oset.h: Use C comment style, not C++ comment style.
4633
4634 2006-11-06  Bruno Haible  <bruno@clisp.org>
4635
4636         * m4/inline.m4: New file.
4637         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
4638         * modules/list (Files): Add m4/inline.m4.
4639         * modules/oset (Files): Likewise.
4640
4641 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4642
4643         * lib/idcache.c: Include <stddef.h>, for offsetof.
4644         (struct userid.name): Change from char * to a flexible array member.
4645         All uses changed.
4646         * modules/idcache (Depends-on): Add flexmember.
4647
4648         * MODULES.html.sh (Core language properties): New module flexmember.
4649         * modules/flexmember, m4/flexmember.m4: New files.
4650
4651         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
4652         inline functions that are identical with the old xnmalloc_inline,
4653         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
4654         that we can avoid some unnecessary integer multiplications and
4655         divisions in the common case where the element size is known at
4656         compile time.
4657         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
4658         needed.
4659         (xnboundedmalloc): Remove.
4660         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
4661         arguments, for consistency with rest of this header.
4662         (xcharalloc): Rewrite using XNMALLOC.
4663         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
4664         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
4665         versions have been moved to lib/xalloc.h and renamed to be the
4666         non-*_inline versions.
4667         (xmalloc, xrealloc): Implement without reference to the xnmalloc
4668         and xnrealloc functions, since those functions are now inline and
4669         now call us.
4670         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
4671         renaming described above.
4672         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
4673         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
4674         captures the dependency in AC_C_INLINE.
4675
4676         New module canonicalize-lgpl, proposed by Charles Wilson in
4677         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
4678         with a few small changes afterwards.
4679         * MODULES.html.sh (File system functions): New module
4680         canonicalize-lgpl.
4681         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
4682         and canonicalize_file_name.
4683         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
4684         * modules/canonicalize-lgpl: New files.
4685
4686 2006-11-05  Bruno Haible  <bruno@clisp.org>
4687
4688         * gnulib-tool (func_import, func_create_testdir): Create directories
4689         also for files in subdirectories of lib/.
4690
4691 2006-11-05  Bruno Haible  <bruno@clisp.org>
4692
4693         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
4694         ANSI C compliant.
4695
4696 2006-11-03  Bruno Haible  <bruno@clisp.org>
4697
4698         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4699         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
4700         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
4701         (xnboundedmalloc): New inline function.
4702         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
4703         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
4704         xmalloc.
4705         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
4706         xmalloc.
4707         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
4708         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
4709         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
4710         xmalloc.
4711         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4712         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
4713         xmalloc.
4714         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
4715         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4716         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
4717         xmalloc.
4718         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4719         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
4720         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4721         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
4722         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
4723         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
4724         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
4725
4726 2006-11-03  Bruno Haible  <bruno@clisp.org>
4727
4728         * lib/c-ctype.h [C++]: Define functions without name mangling.
4729         * lib/fwriteerror.h [C++]: Likewise.
4730         * lib/gcd.h [C++]: Likewise.
4731         * lib/linebreak.h [C++]: Likewise.
4732
4733 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
4734
4735         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
4736         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
4737         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
4738         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4739         Check for functions and headers just once.
4740         Check for declaration of canonicalize_file_name.
4741         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
4742
4743 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4744
4745         * gnulib-tool (func_import): Fix typo in actioncmd.
4746
4747 2006-11-02  Bruno Haible  <bruno@clisp.org>
4748
4749         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
4750         newline sequence in the Makefile.am snippet as a space, like "make"
4751         does.
4752         Reported by Roger Persson <perrog@gmail.com>.
4753
4754 2006-11-01  Bruno Haible  <bruno@clisp.org>
4755
4756         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
4757         already declared in <string.h>.
4758         * lib/strcase.h (strncasecmp): Don't declare it if yes.
4759
4760 2006-11-01  Bruno Haible  <bruno@clisp.org>
4761
4762         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
4763         * lib/strcase.h: Include <string.h>.
4764         (strcasecmp): Define to rpl_strcasecmp here.
4765
4766 2006-11-01  Bruno Haible  <bruno@clisp.org>
4767
4768         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
4769
4770 2006-11-01  Eric Blake  <ebb9@byu.net>
4771
4772         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
4773
4774         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
4775
4776 2006-10-29  Bruno Haible  <bruno@clisp.org>
4777
4778         Make it compile in C++ mode.
4779         * lib/full-write.c (full_rw): Add a cast.
4780
4781 2006-11-01  Bruno Haible  <bruno@clisp.org>
4782
4783         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
4784         be POSIX compliant.
4785         Reported by Roger Persson <perrog@gmail.com>.
4786
4787 2006-11-01  Eric Blake  <ebb9@byu.net>
4788
4789         * lib/getopt_.h: Fix comments.
4790
4791 2006-10-31  Eric Blake  <ebb9@byu.net>
4792
4793         * modules/tmpdir (Depends-on): Add sys_stat.
4794         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
4795         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
4796         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
4797         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
4798         tempname.
4799
4800 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
4801
4802         Avoid some C++ diagnostics reported by Bruno Haible.
4803         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
4804         xmalloc.
4805         (quotearg_alloc): Use xcharalloc rather than xmalloc.
4806         (struct slotvec): Move to top level.
4807         (quotearg_n_options): Rewrite to avoid xmalloc.
4808         * lib/xalloc.h (xcharalloc): New function.
4809         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
4810         [defined __cplusplus]: Add function template that provides result
4811         type propagation.  This part of the change is from Bruno Haible.
4812
4813 2006-10-29  Bruno Haible  <bruno@clisp.org>
4814
4815         Make it compile in C++ mode.
4816         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
4817         * lib/strnlen1.c (strnlen1): Cast memchr result.
4818         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
4819         * lib/clean-temp.c (string_equals, string_hash): Add casts.
4820         (create_temp_dir): Rename local variable 'template'.
4821         (compile_csharp_using_sscli): Add cast.
4822         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
4823         * lib/findprog.c (find_in_path): Likewise.
4824         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
4825         * lib/wait-process.c (register_slave_subprocess): Likewise.
4826
4827 2006-10-22  Bruno Haible  <bruno@clisp.org>
4828
4829         * modules/tsearch: New file.
4830         * lib/tsearch.h: New file.
4831         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
4832         * m4/tsearch.m4: New file.
4833         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
4834
4835 2006-10-29  Eric Blake  <ebb9@byu.net>
4836
4837         * lib/arcfour.c: Assume config.h.
4838         * lib/arctwo.c: Likewise.
4839         * lib/base64.c: Likewise.
4840         * lib/check-version.c: Likewise.
4841         * lib/crc.c: Likewise.
4842         * lib/des.c: Likewise.
4843         * lib/gc-gnulib.c: Likewise.
4844         * lib/gc-libgcrypt.c: Likewise.
4845         * lib/gc-pbkdf2-sha1.c: Likewise.
4846         * lib/getaddrinfo.c: Likewise.
4847         * lib/getdelim.c: Likewise.
4848         * lib/getline.c: Likewise.
4849         * lib/hmac-md5.c: Likewise.
4850         * lib/hmac-sha1.c: Likewise.
4851         * lib/iconvme.c: Likewise.
4852         * lib/md2.c: Likewise.
4853         * lib/md4.c: Likewise.
4854         * lib/memxor.c: Likewise.
4855         * lib/read-file.c: Likewise.
4856         * lib/readline.c: Likewise.
4857         * lib/rijndael-alg-fst.c: Likewise.
4858         * lib/rijndael-api-fst.c: Likewise.
4859         * lib/xgetdomainname.c: Likewise.
4860
4861 2006-10-28  Eric Blake  <ebb9@byu.net>
4862
4863         * lib/xstrndup.c: Assume config.h.
4864
4865 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
4866
4867         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
4868         stat-macros.h is now for our own macros, whereas stat_h is for
4869         macros in the <sys/stat.h> name space.
4870         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
4871         (STAT_MACROS_H): Remove.
4872         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
4873         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
4874         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
4875         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
4876         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
4877         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
4878         Move these macros to ...
4879         * lib/stat_.h: here.  Don't include stat-macros.h.
4880         * lib/canonicalize.c: Don't include stat-macros.h.
4881         * lib/chown.c: Likewise.
4882         * lib/euidaccess.c: Likewise.
4883         * lib/file-type.c: Likewise.
4884         * lib/filemode.c: Likewise.
4885         * lib/glob.c: Likewise.
4886         * lib/isapipe.c: Likewise.
4887         * lib/lchown.c: Likewise.
4888         * lib/lstat.c: Likewise.
4889         * lib/mkdir-p.c: Likewise.
4890         * lib/rmdir.c: Likewise.
4891         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
4892         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
4893         unless mkdir isn't declared, to speed up 'configure'.
4894         Always create sys/stat.h, since it's unlikely any real sys/stat.h
4895         would define all the S_* symbols.
4896         * modules/canonicalize (Depends-on):
4897         Depend on sys_stat, not stat-macros.
4898         * modules/chown: Likewise.
4899         * modules/euidaccess: Likewise.
4900         * modules/filemode: Likewise.
4901         * modules/file-type: Likewise.
4902         * modules/glob: Likewise.
4903         * modules/isapipe: Likewise.
4904         * modules/lchown: Likewise.
4905         * modules/lstat: Likewise.
4906         * modules/mkancesdirs: Likewise.
4907         * modules/rmdir: Likewise.
4908         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
4909         * modules/modechange: Likewise.
4910         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
4911         (configure.ac): Remove gl_STAT_MACROS.
4912         * modules/sys_stat (Depends-on): Remove stat-macros.
4913
4914 2006-10-27  Bruno Haible  <bruno@clisp.org>
4915
4916         * m4/signed.m4: Remove file.
4917         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
4918         invocation.
4919         * modules/vasnprintf (Files): Remove m4/signed.m4.
4920
4921 2006-10-27  Bruno Haible  <bruno@clisp.org>
4922
4923         Update to GNU gettext 0.16.
4924         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
4925         m4/inttypes-h.m4, m4/signed.m4.
4926         * m4/gettext.m4: Update to GNU gettext 0.16.
4927         * m4/intl.m4: New file, from GNU gettext.
4928         * m4/intldir.m4: New file, from GNU gettext.
4929         * config/srclist.txt: Update
4930
4931 2006-10-27  Eric Blake  <ebb9@byu.net>
4932
4933         * MODULES.html.sh: Document tempname.
4934         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
4935         dependencies.
4936         (Files): Move lib/tempname.c...
4937         * modules/tempname: ...to this new module.
4938         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
4939         (gl_PREREQ_TEMPNAME): Move...
4940         * m4/tempname.m4: ...to this new file.
4941         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
4942         * modules/sys_stat (Depends-on): Add stat-macros.
4943         * lib/stat_.h (includes): Pick up stat macros.
4944         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
4945         if stat macros are broken.
4946         * lib/tempname.c (includes): No need to include "stat-macros.h".
4947         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
4948         (direxists, __path_search) [!_LIBC]: Don't compile these in
4949         gnulib; the tmpdir module covers that.
4950         * lib/tempname.h: New file.
4951
4952 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
4953
4954         * COPYING: Explain how gnulib-tool converts licence headers.
4955         Almost all wording by Eric Blake.
4956
4957 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
4958
4959         * lib/mbchar.h (is_basic_table): Make read-only.
4960         * lib/mbchar.c (is_basic_table): Likewise.
4961         Reported by John Darrington.
4962
4963 2006-10-25  Bruno Haible  <bruno@clisp.org>
4964
4965         * lib/progname.h (set_program_name): Undefine before defining.
4966
4967 2006-10-25  Bruno Haible  <bruno@clisp.org>
4968
4969         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
4970         false for non-gcc C++ compilers.
4971         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
4972
4973 2006-10-24  Bruno Haible  <bruno@clisp.org>
4974
4975         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
4976         iconv implementations like Irix iconv.
4977
4978 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4979
4980         * modules/vararrays: New file.
4981         * m4/vararrays.m4: New file, taken from diffutils.
4982         * MODULES.html.sh: New module vararrays.
4983
4984 2006-10-24  Karl Berry  <karl@gnu.org>
4985
4986         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
4987         Don't call GNU Unix.
4988
4989 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4990
4991         * users.txt: Add Libtool.
4992
4993         Sync from Libtool:
4994
4995         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
4996
4997         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
4998         to gnulib's policy of including config.h unconditionally.
4999
5000 2006-10-24  Bruno Haible  <bruno@clisp.org>
5001
5002         * modules/wcwidth (Files): Add m4/wint_t.m4.
5003         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
5004         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
5005
5006 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5007
5008         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
5009         to pacify GCC with some -W flags enabled.  Problem reported by
5010         Bruno Haible.
5011
5012 2006-10-24  Jim Meyering  <jim@meyering.net>
5013
5014         * MODULES.html.sh: Remove uinttostr.  It's not a module.
5015         Reported by Karl Berry.
5016
5017 2006-10-23  Bruno Haible  <bruno@clisp.org>
5018
5019         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
5020
5021 2006-10-24  Bruno Haible  <bruno@clisp.org>
5022
5023         * lib/gl_list.h: Use C comment style, not C++ comment style.
5024
5025 2006-10-23  Eric Blake  <ebb9@byu.net>
5026
5027         * lib/getaddrinfo.c (includes): Add missing include.
5028
5029 2006-10-23  Bruno Haible  <bruno@clisp.org>
5030             Paul Eggert  <eggert@cs.ucla.edu>
5031
5032         Ability to rename obstack_free.
5033         * lib/obstack.h (__obstack_free): New macro. Declare instead of
5034         obstack_free.
5035         (obstack_free): Invoke the __obstack_free macro.
5036         * lib/obstack.c (obstack_free): Use __obstack_free macro.
5037
5038 2006-10-23  Bruno Haible  <bruno@clisp.org>
5039             Paul Eggert  <eggert@cs.ucla.edu>
5040
5041         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
5042         __argc, __argv from the declaration. (They are defined as macros on
5043         mingw.)
5044
5045 2006-10-22  Bruno Haible  <bruno@clisp.org>
5046
5047         * doc/gnulib-intro.texi: New file.
5048         * doc/gnulib.texi: Include it.
5049
5050 2006-10-21  Bruno Haible  <bruno@clisp.org>
5051
5052         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
5053         "Introduction", "Miscellanous Notes", "Particular Modules".
5054
5055 2006-10-21  Bruno Haible  <bruno@clisp.org>
5056
5057         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5058         Change mostlyclean-local rule to avoid sh syntax error from bash
5059         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
5060
5061 2006-10-23  Jim Meyering  <jim@meyering.net>
5062
5063         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
5064         in place of snprintf.
5065
5066         * modules/inttostr (Files): Add lib/uinttostr.c.
5067         * lib/uinttostr.c (inttostr): New file/function.
5068         * lib/inttostr.h (uinttostr): Declare.
5069         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
5070         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
5071         Add uinttostr.
5072         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
5073
5074 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5075
5076         * lib/canonicalize.c (ELOOP): Define if not already defined.
5077         Problem reported by Bruno Haible in
5078         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
5079
5080 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5081
5082         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
5083         Problem reported by Perry Smith and Ville Laurikari.
5084
5085         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
5086         uses.
5087
5088 2006-10-19  Bruno Haible  <bruno@clisp.org>
5089
5090         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
5091         for mingw.
5092
5093 2006-10-19  Bruno Haible  <bruno@clisp.org>
5094
5095         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
5096         Needed for mingw.
5097
5098 2006-10-19  Bruno Haible  <bruno@clisp.org>
5099
5100         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
5101
5102 2006-10-19  Bruno Haible  <bruno@clisp.org>
5103
5104         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
5105         it.
5106
5107 2006-10-19  Bruno Haible  <bruno@clisp.org>
5108
5109         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
5110         invocation.
5111
5112 2006-10-19  Bruno Haible  <bruno@clisp.org>
5113
5114         * gnulib-tool (func_create_testdir): Don't include ftruncate and
5115         mountlist by default.
5116
5117 2006-10-16  Bruno Haible  <bruno@clisp.org>
5118
5119         * lib/c-strstr.c: Include c-strstr.h.
5120
5121 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5122
5123         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
5124         in a slash.
5125
5126 2006-10-18  Bruno Haible  <bruno@clisp.org>
5127
5128         * lib/lock.h [C++]: Wrap definitions in extern "C".
5129
5130 2006-10-18  Bruno Haible  <bruno@clisp.org>
5131
5132         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
5133         gl_LIBOBJS list.
5134
5135 2006-10-18  Bruno Haible  <bruno@clisp.org>
5136
5137         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
5138
5139 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
5140
5141         * lib/xstrtol.h: Include gettext.h.
5142         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
5143         Problem reported by Eric Blake.
5144         * modules/xstrtol (Depends-on): Add gettext-h.
5145
5146 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
5147
5148         * lib/strftime.c (advance): New macro.
5149         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
5150         incomplete type, so you can't add 0 to it.  Problem and patch
5151         reported by Eelco Dolstra for dietlibc.
5152
5153 2006-10-18  Jim Meyering  <jim@meyering.net>
5154
5155         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
5156         type for a local, and rename it: s/up/user_proc/.
5157
5158 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5159
5160         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
5161         READ_UTMP_USER_PROCESS.
5162         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
5163
5164 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
5165
5166         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
5167         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
5168
5169 2006-10-17  Eric Blake  <ebb9@byu.net>
5170
5171         * lib/sigprocmask.c (sigprocmask): Fix typo.
5172
5173         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
5174
5175         * modules/clean-temp (Makefile.am): Don't add to make output...
5176         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
5177         config.h.
5178
5179 2006-10-17  Bruno Haible  <bruno@clisp.org>
5180
5181         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
5182         differently if DEFAULT_TEXT_DOMAIN is set.
5183
5184 2006-10-16  Bruno Haible  <bruno@clisp.org>
5185
5186         * lib/clean-temp.c: Include fwriteerror.h.
5187
5188 2006-10-16  Bruno Haible  <bruno@clisp.org>
5189
5190         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
5191
5192 2006-10-16  Bruno Haible  <bruno@clisp.org>
5193
5194         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
5195         * lib/sigprocmask.h: Include <sys/types.h>.
5196         (sigset_t): Use the system's definition if present.
5197
5198 2006-10-17  Eric Blake  <ebb9@byu.net>
5199
5200         * lib/xvasprintf.c (includes): Assume config.h.
5201         * lib/xasprintf.c (includes): Likewise.
5202
5203 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
5204
5205         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
5206         at least as wide as intmax_t.
5207
5208 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
5209
5210         (Imported from Automake.)
5211         * build-aux/gnupload: Update to version 1.1 of directive file.
5212
5213 2006-10-16  Eric Blake  <ebb9@byu.net>
5214
5215         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
5216         match Automake 1.10a.
5217
5218 2006-10-14  Bruno Haible  <bruno@clisp.org>
5219
5220         * modules/sigprocmask: New file.
5221         * lib/sigprocmask.h: New file.
5222         * lib/sigprocmask.c: New file.
5223         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
5224         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
5225         request sigprocmask.o.
5226         (gl_PREREQ_SIGPROCMASK): New macro.
5227         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
5228         (Depends-on): Add sigprocmask.
5229         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
5230         gt_SIGNALBLOCKING. Test for 'raise' only once.
5231         * lib/fatal-signal.c: Include sigprocmask.h.
5232         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
5233         unblock_fatal_signals): Define always.
5234         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5235         sigprocmask.
5236
5237 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
5238
5239         Sync from Automake.
5240         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
5241         which incorrectly sets the mode of an existing destination
5242         directory.  In some cases the unpatched install-sh could do the
5243         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
5244         system.  We hope this is rare in practice, but it's clearly worth
5245         fixing.  Problem reported by Alex Unleashed in
5246         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
5247         Also, don't bother to check for -m bugs unless we're using -m;
5248         suggested by Stepan Kasal.
5249
5250 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5251
5252         Sync from Automake.
5253         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
5254         `-c' flag, so they appear at the same position as in %FASTDEP%
5255         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
5256         which ignores unknown options only after the first non-option.
5257         Bug report against M4 by Nelson H. F. Beebe.
5258
5259 2006-10-13  Jim Meyering  <jim@meyering.net>
5260
5261         Fix a bug in yesterday's change.
5262         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
5263         p->fts_statp->st_dev would be used uninitialized.
5264         Ensures that we always call fts_stat on the very first entry.
5265         Miklos Szeredi reported that find -xdev stopped working.
5266
5267 2006-10-12  Bruno Haible  <bruno@clisp.org>
5268
5269         * gnulib-tool (func_get_automake_snippet): Append an automatically
5270         computed EXTRA_DIST augmentation.
5271         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
5272         * modules/alloca-opt (Makefile.am): Likewise.
5273         * modules/allocsa (Makefile.am): Likewise.
5274         * modules/arcfour (Makefile.am): Likewise.
5275         * modules/arctwo (Makefile.am): Likewise.
5276         * modules/argmatch (Makefile.am): Likewise.
5277         * modules/argz (Makefile.am): Likewise.
5278         * modules/atexit (Makefile.am): Likewise.
5279         * modules/backupfile (Makefile.am): Likewise.
5280         * modules/byteswap (Makefile.am): Likewise.
5281         * modules/c-strtod (Makefile.am): Likewise.
5282         * modules/c-strtold (Makefile.am): Likewise.
5283         * modules/calloc (Makefile.am): Likewise.
5284         * modules/canon-host (Makefile.am): Likewise.
5285         * modules/canonicalize (Makefile.am): Likewise.
5286         * modules/chdir-long (Makefile.am): Likewise.
5287         * modules/chdir-safer (Makefile.am): Likewise.
5288         * modules/check-version (Makefile.am): Likewise.
5289         * modules/chown (Makefile.am): Likewise.
5290         * modules/cloexec (Makefile.am): Likewise.
5291         * modules/close-stream (Makefile.am): Likewise.
5292         * modules/closeout (Makefile.am): Likewise.
5293         * modules/crc (Makefile.am): Likewise.
5294         * modules/csharpexec (Makefile.am): Likewise.
5295         * modules/cycle-check (Makefile.am): Likewise.
5296         * modules/des (Makefile.am): Likewise.
5297         * modules/dev-ino (Makefile.am): Likewise.
5298         * modules/dirfd (Makefile.am): Likewise.
5299         * modules/dirname (Makefile.am): Likewise.
5300         * modules/dup2 (Makefile.am): Likewise.
5301         * modules/eealloc (Makefile.am): Likewise.
5302         * modules/error (Makefile.am): Likewise.
5303         * modules/euidaccess (Makefile.am): Likewise.
5304         * modules/exclude (Makefile.am): Likewise.
5305         * modules/exitfail (Makefile.am): Likewise.
5306         * modules/fcntl-safer (Makefile.am): Likewise.
5307         * modules/fcntl (Makefile.am): Likewise.
5308         * modules/file-type (Makefile.am): Likewise.
5309         * modules/fileblocks (Makefile.am): Likewise.
5310         * modules/filemode (Makefile.am): Likewise.
5311         * modules/filenamecat (Makefile.am): Likewise.
5312         * modules/fnmatch (Makefile.am): Likewise.
5313         * modules/fopen-safer (Makefile.am): Likewise.
5314         * modules/fpending (Makefile.am): Likewise.
5315         * modules/fprintftime (Makefile.am): Likewise.
5316         * modules/free (Makefile.am): Likewise.
5317         * modules/fsusage (Makefile.am): Likewise.
5318         * modules/ftruncate (Makefile.am): Likewise.
5319         * modules/fts (Makefile.am): Likewise.
5320         * modules/gc-arcfour (Makefile.am): Likewise.
5321         * modules/gc-des (Makefile.am): Likewise.
5322         * modules/gc-hmac-md5 (Makefile.am): Likewise.
5323         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
5324         * modules/gc-md4 (Makefile.am): Likewise.
5325         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5326         * modules/gc-sha1 (Makefile.am): Likewise.
5327         * modules/gc (Makefile.am): Likewise.
5328         * modules/getaddrinfo (Makefile.am): Likewise.
5329         * modules/getcwd (Makefile.am): Likewise.
5330         * modules/getdelim (Makefile.am): Likewise.
5331         * modules/getdomainname (Makefile.am): Likewise.
5332         * modules/getgroups (Makefile.am): Likewise.
5333         * modules/gethostname (Makefile.am): Likewise.
5334         * modules/gethrxtime (Makefile.am): Likewise.
5335         * modules/getline (Makefile.am): Likewise.
5336         * modules/getloadavg (Makefile.am): Likewise.
5337         * modules/getlogin_r (Makefile.am): Likewise.
5338         * modules/getndelim2 (Makefile.am): Likewise.
5339         * modules/getopt (Makefile.am): Likewise.
5340         * modules/getpagesize (Makefile.am): Likewise.
5341         * modules/getpass-gnu (Makefile.am): Likewise.
5342         * modules/getpass (Makefile.am): Likewise.
5343         * modules/getsubopt (Makefile.am): Likewise.
5344         * modules/gettime (Makefile.am): Likewise.
5345         * modules/gettimeofday (Makefile.am): Likewise.
5346         * modules/getugroups (Makefile.am): Likewise.
5347         * modules/getusershell (Makefile.am): Likewise.
5348         * modules/glob (Makefile.am): Likewise.
5349         * modules/group-member (Makefile.am): Likewise.
5350         * modules/hard-locale (Makefile.am): Likewise.
5351         * modules/hash (Makefile.am): Likewise.
5352         * modules/hmac-md5 (Makefile.am): Likewise.
5353         * modules/hmac-sha1 (Makefile.am): Likewise.
5354         * modules/human (Makefile.am): Likewise.
5355         * modules/idcache (Makefile.am): Likewise.
5356         * modules/imaxabs (Makefile.am): Likewise.
5357         * modules/imaxdiv (Makefile.am): Likewise.
5358         * modules/inet_ntop (Makefile.am): Likewise.
5359         * modules/inet_pton (Makefile.am): Likewise.
5360         * modules/intprops (Makefile.am): Likewise.
5361         * modules/inttostr (Makefile.am): Likewise.
5362         * modules/inttypes (Makefile.am): Likewise.
5363         * modules/isapipe (Makefile.am): Likewise.
5364         * modules/javaversion (Makefile.am): Likewise.
5365         * modules/lchmod (Makefile.am): Likewise.
5366         * modules/lchown (Makefile.am): Likewise.
5367         * modules/localcharset (Makefile.am): Likewise.
5368         * modules/long-options (Makefile.am): Likewise.
5369         * modules/lstat (Makefile.am): Likewise.
5370         * modules/malloc (Makefile.am): Likewise.
5371         * modules/mathl (Makefile.am): Likewise.
5372         * modules/mbchar (Makefile.am): Likewise.
5373         * modules/md2 (Makefile.am): Likewise.
5374         * modules/md4 (Makefile.am): Likewise.
5375         * modules/md5 (Makefile.am): Likewise.
5376         * modules/memcasecmp (Makefile.am): Likewise.
5377         * modules/memchr (Makefile.am): Likewise.
5378         * modules/memcmp (Makefile.am): Likewise.
5379         * modules/memcoll (Makefile.am): Likewise.
5380         * modules/memcpy (Makefile.am): Likewise.
5381         * modules/memmem (Makefile.am): Likewise.
5382         * modules/memmove (Makefile.am): Likewise.
5383         * modules/mempcpy (Makefile.am): Likewise.
5384         * modules/memrchr (Makefile.am): Likewise.
5385         * modules/memset (Makefile.am): Likewise.
5386         * modules/memxor (Makefile.am): Likewise.
5387         * modules/mkancesdirs (Makefile.am): Likewise.
5388         * modules/mkdir-p (Makefile.am): Likewise.
5389         * modules/mkdir (Makefile.am): Likewise.
5390         * modules/mkdtemp (Makefile.am): Likewise.
5391         * modules/mkstemp (Makefile.am): Likewise.
5392         * modules/mktime (Makefile.am): Likewise.
5393         * modules/modechange (Makefile.am): Likewise.
5394         * modules/mountlist (Makefile.am): Likewise.
5395         * modules/nanosleep (Makefile.am): Likewise.
5396         * modules/obstack (Makefile.am): Likewise.
5397         * modules/openat (Makefile.am): Likewise.
5398         * modules/pagealign_alloc (Makefile.am): Likewise.
5399         * modules/pathmax (Makefile.am): Likewise.
5400         * modules/physmem (Makefile.am): Likewise.
5401         * modules/poll (Makefile.am): Likewise.
5402         * modules/posixtm (Makefile.am): Likewise.
5403         * modules/posixver (Makefile.am): Likewise.
5404         * modules/putenv (Makefile.am): Likewise.
5405         * modules/quote (Makefile.am): Likewise.
5406         * modules/quotearg (Makefile.am): Likewise.
5407         * modules/raise (Makefile.am): Likewise.
5408         * modules/read-file (Makefile.am): Likewise.
5409         * modules/readline (Makefile.am): Likewise.
5410         * modules/readlink (Makefile.am): Likewise.
5411         * modules/readtokens (Makefile.am): Likewise.
5412         * modules/readutmp (Makefile.am): Likewise.
5413         * modules/realloc (Makefile.am): Likewise.
5414         * modules/regex (Makefile.am): Likewise.
5415         * modules/rename-dest-slash (Makefile.am): Likewise.
5416         * modules/rename (Makefile.am): Likewise.
5417         * modules/rijndael (Makefile.am): Likewise.
5418         * modules/rmdir (Makefile.am): Likewise.
5419         * modules/rpmatch (Makefile.am): Likewise.
5420         * modules/safe-read (Makefile.am): Likewise.
5421         * modules/safe-write (Makefile.am): Likewise.
5422         * modules/same-inode (Makefile.am): Likewise.
5423         * modules/same (Makefile.am): Likewise.
5424         * modules/save-cwd (Makefile.am): Likewise.
5425         * modules/savedir (Makefile.am): Likewise.
5426         * modules/setenv (Makefile.am): Likewise.
5427         * modules/settime (Makefile.am): Likewise.
5428         * modules/sha1 (Makefile.am): Likewise.
5429         * modules/sig2str (Makefile.am): Likewise.
5430         * modules/snprintf (Makefile.am): Likewise.
5431         * modules/stat-macros (Makefile.am): Likewise.
5432         * modules/stat-time (Makefile.am): Likewise.
5433         * modules/stdbool (Makefile.am): Likewise.
5434         * modules/stdint (Makefile.am): Likewise.
5435         * modules/stdlib-safer (Makefile.am): Likewise.
5436         * modules/stpcpy (Makefile.am): Likewise.
5437         * modules/stpncpy (Makefile.am): Likewise.
5438         * modules/strcase (Makefile.am): Likewise.
5439         * modules/strcasestr (Makefile.am): Likewise.
5440         * modules/strchrnul (Makefile.am): Likewise.
5441         * modules/strcspn (Makefile.am): Likewise.
5442         * modules/strdup (Makefile.am): Likewise.
5443         * modules/strerror (Makefile.am): Likewise.
5444         * modules/strftime (Makefile.am): Likewise.
5445         * modules/strndup (Makefile.am): Likewise.
5446         * modules/strnlen (Makefile.am): Likewise.
5447         * modules/strpbrk (Makefile.am): Likewise.
5448         * modules/strsep (Makefile.am): Likewise.
5449         * modules/strstr (Makefile.am): Likewise.
5450         * modules/strtod (Makefile.am): Likewise.
5451         * modules/strtoimax (Makefile.am): Likewise.
5452         * modules/strtok_r (Makefile.am): Likewise.
5453         * modules/strtol (Makefile.am): Likewise.
5454         * modules/strtoll (Makefile.am): Likewise.
5455         * modules/strtoul (Makefile.am): Likewise.
5456         * modules/strtoull (Makefile.am): Likewise.
5457         * modules/strtoumax (Makefile.am): Likewise.
5458         * modules/strverscmp (Makefile.am): Likewise.
5459         * modules/sys_socket (Makefile.am): Likewise.
5460         * modules/sys_stat (Makefile.am): Likewise.
5461         * modules/sysexits (Makefile.am): Likewise.
5462         * modules/time_r (Makefile.am): Likewise.
5463         * modules/timegm (Makefile.am): Likewise.
5464         * modules/timespec (Makefile.am): Likewise.
5465         * modules/tmpfile-safer (Makefile.am): Likewise.
5466         * modules/trim (Makefile.am): Likewise.
5467         * modules/unistd-safer (Makefile.am): Likewise.
5468         * modules/unlinkdir (Makefile.am): Likewise.
5469         * modules/unlocked-io (Makefile.am): Likewise.
5470         * modules/userspec (Makefile.am): Likewise.
5471         * modules/utime (Makefile.am): Likewise.
5472         * modules/utimecmp (Makefile.am): Likewise.
5473         * modules/utimens (Makefile.am): Likewise.
5474         * modules/vasnprintf (Makefile.am): Likewise.
5475         * modules/vasprintf (Makefile.am): Likewise.
5476         * modules/vsnprintf (Makefile.am): Likewise.
5477         * modules/xalloc (Makefile.am): Likewise.
5478         * modules/xgetcwd (Makefile.am): Likewise.
5479         * modules/xnanosleep (Makefile.am): Likewise.
5480         * modules/xreadlink (Makefile.am): Likewise.
5481         * modules/xstrtod (Makefile.am): Likewise.
5482         * modules/xstrtol (Makefile.am): Likewise.
5483         * modules/xstrtold (Makefile.am): Likewise.
5484         * modules/yesno (Makefile.am): Likewise.
5485         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
5486
5487 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5488
5489         * modules/error (Makefile.am): Distribute files through
5490         EXTRA_DIST, not lib_SOURCES.
5491
5492 2006-10-12  Eric Blake  <ebb9@byu.net>
5493
5494         * modules/error (Makefile.am): Distribute files in /lib.
5495         * modules/obstack (Makefile.am): Likewise.
5496
5497 2006-10-12  Bruno Haible  <bruno@clisp.org>
5498
5499         * modules/acl (Makefile.am): Distribute all files in lib/ through
5500         EXTRA_DIST.
5501         * modules/arcfour (Makefile.am): Likewise.
5502         * modules/arctwo (Makefile.am): Likewise.
5503         * modules/argmatch (Makefile.am): Likewise.
5504         * modules/argz (Makefile.am): Likewise.
5505         * modules/atexit (Makefile.am): Likewise.
5506         * modules/backupfile (Makefile.am): Likewise.
5507         * modules/c-strtod (Makefile.am): Likewise.
5508         * modules/c-strtold (Makefile.am): Likewise.
5509         * modules/calloc (Makefile.am): Likewise.
5510         * modules/canon-host (Makefile.am): Likewise.
5511         * modules/canonicalize (Makefile.am): Likewise.
5512         * modules/chdir-long (Makefile.am): Likewise.
5513         * modules/chdir-safer (Makefile.am): Likewise.
5514         * modules/check-version (Makefile.am): Likewise.
5515         * modules/chown (Makefile.am): Likewise.
5516         * modules/cloexec (Makefile.am): Likewise.
5517         * modules/close-stream (Makefile.am): Likewise.
5518         * modules/closeout (Makefile.am): Likewise.
5519         * modules/crc (Makefile.am): Likewise.
5520         * modules/cycle-check (Makefile.am): Likewise.
5521         * modules/des (Makefile.am): Likewise.
5522         * modules/dirfd (Makefile.am): Likewise.
5523         * modules/dirname (Makefile.am): Likewise.
5524         * modules/dup2 (Makefile.am): Likewise.
5525         * modules/euidaccess (Makefile.am): Likewise.
5526         * modules/exclude (Makefile.am): Likewise.
5527         * modules/exitfail (Makefile.am): Likewise.
5528         * modules/fcntl-safer (Makefile.am): Likewise.
5529         * modules/file-type (Makefile.am): Likewise.
5530         * modules/fileblocks (Makefile.am): Likewise.
5531         * modules/filemode (Makefile.am): Likewise.
5532         * modules/filenamecat (Makefile.am): Likewise.
5533         * modules/fnmatch (Makefile.am): Likewise.
5534         * modules/fopen-safer (Makefile.am): Likewise.
5535         * modules/fpending (Makefile.am): Likewise.
5536         * modules/fprintftime (Makefile.am): Likewise.
5537         * modules/free (Makefile.am): Likewise.
5538         * modules/fsusage (Makefile.am): Likewise.
5539         * modules/ftruncate (Makefile.am): Likewise.
5540         * modules/fts (Makefile.am): Likewise.
5541         * modules/gc (Makefile.am): Likewise.
5542         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5543         * modules/getaddrinfo (Makefile.am): Likewise.
5544         * modules/getcwd (Makefile.am): Likewise.
5545         * modules/getdelim (Makefile.am): Likewise.
5546         * modules/getdomainname (Makefile.am): Likewise.
5547         * modules/getgroups (Makefile.am): Likewise.
5548         * modules/gethostname (Makefile.am): Likewise.
5549         * modules/gethrxtime (Makefile.am): Likewise.
5550         * modules/getline (Makefile.am): Likewise.
5551         * modules/getloadavg (Makefile.am): Likewise.
5552         * modules/getlogin_r (Makefile.am): Likewise.
5553         * modules/getopt (Makefile.am): Likewise.
5554         * modules/getpass (Makefile.am): Likewise.
5555         * modules/getpass-gnu (Makefile.am): Likewise.
5556         * modules/getsubopt (Makefile.am): Likewise.
5557         * modules/gettime (Makefile.am): Likewise.
5558         * modules/gettimeofday (Makefile.am): Likewise.
5559         * modules/getugroups (Makefile.am): Likewise.
5560         * modules/getusershell (Makefile.am): Likewise.
5561         * modules/glob (Makefile.am): Likewise.
5562         * modules/group-member (Makefile.am): Likewise.
5563         * modules/hard-locale (Makefile.am): Likewise.
5564         * modules/hash (Makefile.am): Likewise.
5565         * modules/hmac-md5 (Makefile.am): Likewise.
5566         * modules/hmac-sha1 (Makefile.am): Likewise.
5567         * modules/human (Makefile.am): Likewise.
5568         * modules/idcache (Makefile.am): Likewise.
5569         * modules/imaxabs (Makefile.am): Likewise.
5570         * modules/imaxdiv (Makefile.am): Likewise.
5571         * modules/inet_ntop (Makefile.am): Likewise.
5572         * modules/inet_pton (Makefile.am): Likewise.
5573         * modules/inttostr (Makefile.am): Likewise.
5574         * modules/isapipe (Makefile.am): Likewise.
5575         * modules/lchown (Makefile.am): Likewise.
5576         * modules/long-options (Makefile.am): Likewise.
5577         * modules/lstat (Makefile.am): Likewise.
5578         * modules/malloc (Makefile.am): Likewise.
5579         * modules/mathl (Makefile.am): Likewise.
5580         * modules/mbchar (Makefile.am): Likewise.
5581         * modules/md2 (Makefile.am): Likewise.
5582         * modules/md4 (Makefile.am): Likewise.
5583         * modules/md5 (Makefile.am): Likewise.
5584         * modules/memcasecmp (Makefile.am): Likewise.
5585         * modules/memchr (Makefile.am): Likewise.
5586         * modules/memcmp (Makefile.am): Likewise.
5587         * modules/memcoll (Makefile.am): Likewise.
5588         * modules/memcpy (Makefile.am): Likewise.
5589         * modules/memmem (Makefile.am): Likewise.
5590         * modules/memmove (Makefile.am): Likewise.
5591         * modules/mempcpy (Makefile.am): Likewise.
5592         * modules/memrchr (Makefile.am): Likewise.
5593         * modules/memset (Makefile.am): Likewise.
5594         * modules/memxor (Makefile.am): Likewise.
5595         * modules/mkancesdirs (Makefile.am): Likewise.
5596         * modules/mkdir (Makefile.am): Likewise.
5597         * modules/mkdir-p (Makefile.am): Likewise.
5598         * modules/mkdtemp (Makefile.am): Likewise.
5599         * modules/mkstemp (Makefile.am): Likewise.
5600         * modules/mktime (Makefile.am): Likewise.
5601         * modules/modechange (Makefile.am): Likewise.
5602         * modules/mountlist (Makefile.am): Likewise.
5603         * modules/nanosleep (Makefile.am): Likewise.
5604         * modules/openat (Makefile.am): Likewise.
5605         * modules/pagealign_alloc (Makefile.am): Likewise.
5606         * modules/physmem (Makefile.am): Likewise.
5607         * modules/poll (Makefile.am): Likewise.
5608         * modules/posixtm (Makefile.am): Likewise.
5609         * modules/posixver (Makefile.am): Likewise.
5610         * modules/putenv (Makefile.am): Likewise.
5611         * modules/quote (Makefile.am): Likewise.
5612         * modules/quotearg (Makefile.am): Likewise.
5613         * modules/raise (Makefile.am): Likewise.
5614         * modules/read-file (Makefile.am): Likewise.
5615         * modules/readline (Makefile.am): Likewise.
5616         * modules/readlink (Makefile.am): Likewise.
5617         * modules/readtokens (Makefile.am): Likewise.
5618         * modules/readutmp (Makefile.am): Likewise.
5619         * modules/realloc (Makefile.am): Likewise.
5620         * modules/regex (Makefile.am): Likewise.
5621         * modules/rename (Makefile.am): Likewise.
5622         * modules/rename-dest-slash (Makefile.am): Likewise.
5623         * modules/rijndael (Makefile.am): Likewise.
5624         * modules/rmdir (Makefile.am): Likewise.
5625         * modules/rpmatch (Makefile.am): Likewise.
5626         * modules/safe-read (Makefile.am): Likewise.
5627         * modules/safe-write (Makefile.am): Likewise.
5628         * modules/same (Makefile.am): Likewise.
5629         * modules/save-cwd (Makefile.am): Likewise.
5630         * modules/savedir (Makefile.am): Likewise.
5631         * modules/setenv (Makefile.am): Likewise.
5632         * modules/settime (Makefile.am): Likewise.
5633         * modules/sha1 (Makefile.am): Likewise.
5634         * modules/sig2str (Makefile.am): Likewise.
5635         * modules/snprintf (Makefile.am): Likewise.
5636         * modules/stdlib-safer (Makefile.am): Likewise.
5637         * modules/stpcpy (Makefile.am): Likewise.
5638         * modules/stpncpy (Makefile.am): Likewise.
5639         * modules/strcase (Makefile.am): Likewise.
5640         * modules/strcasestr (Makefile.am): Likewise.
5641         * modules/strchrnul (Makefile.am): Likewise.
5642         * modules/strcspn (Makefile.am): Likewise.
5643         * modules/strdup (Makefile.am): Likewise.
5644         * modules/strerror (Makefile.am): Likewise.
5645         * modules/strftime (Makefile.am): Likewise.
5646         * modules/strndup (Makefile.am): Likewise.
5647         * modules/strnlen (Makefile.am): Likewise.
5648         * modules/strpbrk (Makefile.am): Likewise.
5649         * modules/strsep (Makefile.am): Likewise.
5650         * modules/strstr (Makefile.am): Likewise.
5651         * modules/strtod (Makefile.am): Likewise.
5652         * modules/strtoimax (Makefile.am): Likewise.
5653         * modules/strtok_r (Makefile.am): Likewise.
5654         * modules/strtol (Makefile.am): Likewise.
5655         * modules/strtoll (Makefile.am): Likewise.
5656         * modules/strtoul (Makefile.am): Likewise.
5657         * modules/strtoull (Makefile.am): Likewise.
5658         * modules/strtoumax (Makefile.am): Likewise.
5659         * modules/strverscmp (Makefile.am): Likewise.
5660         * modules/time_r (Makefile.am): Likewise.
5661         * modules/timegm (Makefile.am): Likewise.
5662         * modules/tmpfile-safer (Makefile.am): Likewise.
5663         * modules/unistd-safer (Makefile.am): Likewise.
5664         * modules/unlinkdir (Makefile.am): Likewise.
5665         * modules/userspec (Makefile.am): Likewise.
5666         * modules/utime (Makefile.am): Likewise.
5667         * modules/utimecmp (Makefile.am): Likewise.
5668         * modules/utimens (Makefile.am): Likewise.
5669         * modules/vasnprintf (Makefile.am): Likewise.
5670         * modules/vasprintf (Makefile.am): Likewise.
5671         * modules/vsnprintf (Makefile.am): Likewise.
5672         * modules/xalloc (Makefile.am): Likewise.
5673         * modules/xgetcwd (Makefile.am): Likewise.
5674         * modules/xnanosleep (Makefile.am): Likewise.
5675         * modules/xreadlink (Makefile.am): Likewise.
5676         * modules/xstrtod (Makefile.am): Likewise.
5677         * modules/xstrtol (Makefile.am): Likewise.
5678         * modules/xstrtold (Makefile.am): Likewise.
5679         * modules/yesno (Makefile.am): Likewise.
5680
5681 2006-10-12  Jim Meyering  <jim@meyering.net>
5682
5683         * m4/getloadavg.m4: Revert the change below.
5684
5685         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
5686         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
5687         fail with a symlink, which is what coreutils' ./bootstrap now
5688         creates by default.
5689
5690 2006-10-12  Bruno Haible  <bruno@clisp.org>
5691
5692         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
5693         mingw.
5694         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
5695         MSVC and mingw explicitly.
5696
5697 2006-10-11  Simon Josefsson  <jas@extundo.com>
5698             Bruno Haible  <bruno@clisp.org>
5699
5700         Add support for multiple gnulib-tool invocations in the scope of a
5701         single configure.ac file.
5702         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
5703         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
5704         with the same contents as the _LIBADD variable.
5705         (func_emit_initmacro_start, func_emit_initmacro_end,
5706         func_emit_initmacro_done): New functions.
5707         (func_import, func_create_testdir): Invoke them. Allow the identifiers
5708         gl_LIBOBJS and gl_LTLIBOBJS.
5709
5710 2006-10-11  Bruno Haible  <bruno@clisp.org>
5711
5712         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
5713         (func_create_testdir): Don't create po/Makefile.am, don't invoke
5714         autoreconf. Instead, invoke autopoint explicitly but move back the
5715         *.m4 files from gnulib.
5716
5717 2006-10-11  Bruno Haible  <bruno@clisp.org>
5718
5719         * gnulib-tool (func_usage): Make module names after --create-testdir
5720         optional.
5721         (func_create_testdir): If no module was specified, use nearly all
5722         modules.
5723
5724 2006-10-12  Jim Meyering  <jim@meyering.net>
5725
5726         Big performance improvement for fts-based tools that use FTS_NOSTAT.
5727         Avoid spurious inode-mismatch problems on non-POSIX file systems.
5728         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
5729         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
5730         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
5731         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
5732         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
5733         (fts_set_stat_required): New function.
5734         (fts_open): Defer the calls to fts_stat, if possible or requested.
5735         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
5736         into fts_stat itself.
5737         (fts_read): Perform any required (deferred) fts_stat call.
5738         (fts_build): Likewise, for the directory we're about to open and read.
5739         In the readdir loop, carefully decide whether each entry will require
5740         an eventual call to fts_stat, using dirent.d_type info if available.
5741         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
5742         a command line argument into this function.  Update all callers.
5743         Map a return value of FTS_DOT to FTS_D for a command line argument.
5744         * modules/fts (Depends-on): Add d-type.  Alphabetize.
5745         Thanks to Miklos Szeredi for his tenacity and for the initial
5746         bug report about "find" failing on a FUSE-based file system.
5747
5748         * lib/fts.c (fts_open): Use consistent indentation.
5749
5750 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5751
5752         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
5753         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
5754         reported by Jim Meyering.  All uses of cache variables renamed
5755         to match Autoconf's.
5756         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
5757         the other one.
5758
5759         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
5760         Fix misspelling in diagnostic.
5761
5762 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5763
5764         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
5765         defined.  Problem reported by Matthew Woehlke.
5766
5767         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
5768         Add support for Tandem NonStop R series.
5769         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
5770         Use new macro.
5771
5772         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
5773         (has_trailing_slash): Omit size arg; all callers changed.
5774         Omit 'inline', since it doesn't help performance and we'd
5775         need to configure it.
5776         Don't count //, ///, etc. as having a trailing slash.
5777         As a side effect, this removes a C99ism reported by Matthew Woehlke.
5778         (rpl_rename_dest_slash): On failure, use rename's errno rather
5779         than (in some cases) an incorrect or junk errno.
5780         Simplify code by removing need to compute length; this does
5781         cause it to make two passes instead of one over the file name,
5782         but it's worth it.
5783
5784         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
5785         change, since Autoconf's version may no longer be appropriate now
5786         that we are using CVS Autoconf's version.  Add support for Tandem.
5787
5788 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5789             Bruno Haible  <bruno@clisp.org>
5790
5791         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
5792         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
5793         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
5794         gl_AC_TYPE_LONG_LONG.
5795
5796         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
5797         instead of HAVE_LONG_LONG.
5798         * lib/printf-args.c (printf_fetchargs): Likewise.
5799         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
5800         * lib/vasnprintf.c (VASNPRINTF): Likewise.
5801         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
5802         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
5803         gl_AC_TYPE_LONG_LONG.
5804
5805 2006-10-11  Bruno Haible  <bruno@clisp.org>
5806
5807         * m4/longlong.m4: Add comments.
5808         * m4/ulonglong.m4: Likewise.
5809
5810 2006-10-10  Bruno Haible  <bruno@clisp.org>
5811
5812         Make it possible to #define stpcpy, strdup to aliases.
5813         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
5814         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
5815
5816 2006-10-10  Bruno Haible  <bruno@clisp.org>
5817
5818         Make it possible to #define gcd to an alias.
5819         * lib/gcd.c: Include config.h.
5820
5821 2006-10-10  Bruno Haible  <bruno@clisp.org>
5822
5823         Make it possible to #define c_isascii to an alias.
5824         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
5825         defined. Undefine the macros before defining them, to avoid gcc
5826         warnings.
5827         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
5828         define NO_C_CTYPE_MACROS early.
5829
5830 2006-10-10  Bruno Haible  <bruno@clisp.org>
5831
5832         Make it possible to #define set_program_name to an alias.
5833         * lib/progname.c: Don't undefine set_program_name; instead, undefine
5834         ENABLE_RELOCATABLE early.
5835
5836 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
5837
5838         Port to Tandem NSK OSS, which has 64-bit signed int but at most
5839         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
5840         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
5841         More generally, don't assume that 64-bit signed int is available
5842         if unsigned int is, and vice versa.
5843         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
5844         unsigned symbols, not on their signed counterparts.
5845         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
5846         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
5847         (UINT64_C, UINTMAX_C):
5848         Likewise.
5849         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
5850         unsigned counterparts.
5851         (Have_long_long, Unsigned): New macros.
5852         (Int): Renamed from INT.
5853         (strtoimax): Use the new macros.
5854         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
5855         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
5856         * modules/inttypes (inttypes.h): Substitute
5857         HAVE_UNSIGNED_LONG_LONG_INT.
5858         * modules/stdint (stdint.h): Likewise.
5859         (Files): Add m4/ulonglong.m4.
5860
5861 2006-10-10  Bruno Haible  <bruno@clisp.org>
5862
5863         Fix a gcc -Wshadow warning.
5864         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
5865         to 'bucket'.
5866         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
5867         gl_linked_indexof_from_to): Likewise.
5868         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
5869         Likewise.
5870         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
5871         Likewise.
5872         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
5873         Reported by Eric Blake.
5874
5875 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
5876
5877         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
5878         for NetBSD.  Problem reported by Bruno Haible.
5879
5880 2006-10-09  Jim Meyering  <jim@meyering.net>
5881
5882         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
5883         Patch from Bruno Haible.
5884
5885 2006-10-09  Jim Meyering  <jim@meyering.net>
5886
5887         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
5888         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
5889         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
5890
5891 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
5892
5893         Don't include <config.h> twice; this doesn't work in some cases,
5894         e.g., when config.h has "#define intmax_t long long int" and
5895         we include <config.h>, <inttypes.h>, <config.h> in that order.
5896         Problem reported by Matthew Woehlke in:
5897         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
5898         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
5899         * lib/fts-cycle.c: Don't include config.h.
5900         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
5901         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
5902         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
5903         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
5904         inttypes.h.
5905         * lib/xstrtoumax.c: Likewise.
5906         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
5907         __strtol and the like, so that this module is more like its siblings.
5908         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
5909         Remove; no longer needed now that we assume gnulib inttypes.h.
5910
5911 2006-10-08  Bruno Haible  <bruno@clisp.org>
5912
5913         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
5914         option.
5915
5916 2006-10-07  Jim Meyering  <jim@meyering.net>
5917
5918         * modules/inttypes (inttypes.h): Revert what seems to have been
5919         an inadvertent part of today's change: use "|", not "/" in the
5920         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
5921
5922 2006-10-07  Bruno Haible  <bruno@clisp.org>
5923
5924         * modules/sublist: New file.
5925
5926 2006-10-07  Bruno Haible  <bruno@clisp.org>
5927
5928         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
5929         * modules/argz (argz.h): Likewise.
5930         * modules/arpa_inet (arpa/inet.h): Likewise.
5931         * modules/byteswap (byteswap.h): Likewise.
5932         * modules/configmake (configmake.h): Likewise.
5933         * modules/fcntl (fcntl.h): Likewise.
5934         * modules/fnmatch (fnmatch.h): Likewise.
5935         * modules/getopt (getopt.h): Likewise.
5936         * modules/glob (glob.h): Likewise.
5937         * modules/inttypes (inttypes.h): Likewise.
5938         * modules/netinet_in (netinet/in.h): Likewise.
5939         * modules/poll (poll.h): Likewise.
5940         * modules/stdbool (stdbool.h): Likewise.
5941         * modules/stdint (stdint.h): Likewise.
5942         * modules/sys_select (sys/select.h): Likewise.
5943         * modules/sys_socket (sys/socket.h): Likewise.
5944         * modules/sys_stat (sys/stat.h): Likewise.
5945         * modules/sysexits (sysexits.h): Likewise.
5946         * modules/unistd (unistd.h): Likewise.
5947         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5948         Add a "DO NOT EDIT" comment to the generated file.
5949         (func_import): Likewise for gnulib-comp.m4.
5950
5951 2006-10-07  Bruno Haible  <bruno@clisp.org>
5952
5953         * lib/gl_sublist.h: New file.
5954         * lib/gl_sublist.c: New file.
5955
5956 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
5957
5958         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
5959         name (relative to the original working directory) and the file
5960         name component (relative to the temporary working directory).  All
5961         callers changed.
5962         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
5963         * lib/mkdir-p.c (make_dir_parents): Likewise.
5964         * lib/mkdir-p.h (make_dir_parents): Likewise.
5965
5966 2006-10-06  Eric Blake  <ebb9@byu.net>
5967
5968         Define several macros for use by the clean-temp module.
5969         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
5970         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
5971         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
5972
5973         * lib/clean-temp.h (close_stream_temp): New declaration.
5974         * lib/clean-temp.c (includes): Pull in headers according to what
5975         other modules are in use.
5976         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
5977
5978 2006-10-06  Bruno Haible  <bruno@clisp.org>
5979
5980         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
5981         instead of fopen, fwriteerror.
5982
5983 2006-10-06  Bruno Haible  <bruno@clisp.org>
5984
5985         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
5986         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
5987         int.
5988         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
5989         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
5990         Return an error indicator.
5991         Suggested by Eric Blake.
5992
5993 2006-10-06  Bruno Haible  <bruno@clisp.org>
5994
5995         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
5996         Reported by Eric Blake.
5997
5998 2006-10-06  Bruno Haible  <bruno@clisp.org>
5999
6000         * modules/closeout (Description): Mention stderr too.
6001
6002 2006-10-06  Bruno Haible  <bruno@clisp.org>
6003         and Paul Eggert  <eggert@cs.ucla.edu>
6004
6005         * lib/closeout.c (close_stdout): Also close stderr.
6006         * lib/closeout.h: Update comment.
6007
6008 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6009
6010         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
6011         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
6012         * lib/dirchownmod.c: Include lchown.h.
6013         * lib/lchown.c: Don't include files that lchown.h now includes.
6014         Don't declare chown, since lchown.h now does that.
6015         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
6016         (lchown): Define to rpl_chown if lchown is declared but
6017         does not exist.  Declare using a prototype if lchown is not
6018         declared.  Add a copyright notice.
6019         * lib/mkstemp.h: Include <unistd.h>.
6020         * lib/openat.c: Include lchown.h.
6021
6022         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
6023         we now test for that separately.
6024         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
6025         rather than O_NOFOLLOW, when testing whether it's possible to
6026         avoid a race condition reliably.
6027         * lib/savewd.c (savewd_chdir): Likewise.
6028
6029         Remove macros that are no longer needed now that stdint.h is
6030         reliable.
6031         * lib/fsusage.c (UINTMAX_MAX): Remove.
6032         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
6033         * lib/utimecmp.c (SIZE_MAX): Remove.
6034
6035         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
6036
6037         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
6038         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
6039         O_NOATIME works.
6040
6041 2006-10-05  Bruno Haible  <bruno@clisp.org>
6042
6043         * lib/gl_list.h (gl_sortedlist_search_from_to,
6044         gl_sortedlist_indexof_from_to): New declarations.
6045         (gl_list_implementation): New fields sortedlist_search_from_to,
6046         sortedlist_indexof_from_to.
6047         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
6048         inline functions.
6049         * lib/gl_list.c (gl_sortedlist_search_from_to,
6050         gl_sortedlist_indexof_from_to): New functions.
6051         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
6052         function.
6053         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
6054         (gl_array_sortedlist_search_from_to): New function.
6055         (gl_array_list_implementation): Update.
6056         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
6057         function.
6058         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
6059         (gl_carray_sortedlist_search_from_to): New function.
6060         (gl_carray_list_implementation): Update.
6061         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
6062         gl_linked_sortedlist_indexof_from_to): New functions.
6063         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6064         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6065         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
6066         gl_tree_sortedlist_indexof_from_to): New functions.
6067         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6068         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6069         Update.
6070         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6071         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
6072         Update.
6073
6074 2006-10-05  Bruno Haible  <bruno@clisp.org>
6075
6076         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
6077         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
6078         (struct gl_list_implementation): Add fields search_from_to,
6079         indexof_from_to. Remove fields search, indexof.
6080         (gl_list_search): Use the search_from_to method.
6081         (gl_list_search_from, gl_list_search_from_to): New functions.
6082         (gl_list_indexof): Use the indexof_from_to method.
6083         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6084         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
6085         (gl_list_search_from, gl_list_search_from_to): New functions.
6086         (gl_list_indexof): Use the indexof_from_to method.
6087         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6088         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
6089         gl_array_indexof. Add start_index, end_index arguments.
6090         (gl_array_search_from_to): Renamed from gl_array_search. Add
6091         start_index, end_index arguments.
6092         (gl_array_remove, gl_array_list_implementation): Update.
6093         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
6094         gl_carray_indexof. Add start_index, end_index arguments.
6095         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
6096         start_index, end_index arguments.
6097         (gl_carray_remove, gl_carray_list_implementation): Update.
6098         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
6099         gl_linked_search. Add start_index, end_index arguments.
6100         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
6101         start_index, end_index arguments.
6102         (gl_linked_remove): Update.
6103         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6104         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6105         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
6106         field to 'size_t'.
6107         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
6108         gl_tree_search. Add start_index, end_index arguments.
6109         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6110         start_index, end_index arguments.
6111         (gl_tree_remove): Update.
6112         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6113         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6114         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
6115         function.
6116         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
6117         gl_tree_search. Add start_index, end_index arguments.
6118         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6119         start_index, end_index arguments.
6120         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6121         Update.
6122         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
6123
6124 2006-10-05  Bruno Haible  <bruno@clisp.org>
6125
6126         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
6127
6128         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
6129         fwriteerror_temp): New declarations.
6130         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
6131         (descriptors): New variable.
6132         (cleanup): First, close the descriptors.
6133         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
6134         fclose_temp, fwriteerror_temp): New functions.
6135
6136 2006-10-04  Jim Meyering  <jim@meyering.net>
6137
6138         * lib/fts.c (fts_open): Tiny comment change.
6139
6140 2006-10-04  Bruno Haible  <bruno@clisp.org>
6141
6142         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
6143         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
6144         gl_LOCK_BODY.
6145         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
6146         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
6147         gl_LOCK_EARLY_BODY.
6148         (gl_LOCK): Require gl_LOCK_BODY.
6149
6150 2006-10-04  Bruno Haible  <bruno@clisp.org>
6151
6152         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
6153         (gl_oset_search_atleast): New declaration.
6154         (struct gl_oset_implementation): Add field 'search_atleast'.
6155         (gl_oset_search_atleast): New inline function.
6156         * lib/gl_oset.c (gl_oset_search_atleast): New function.
6157         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
6158         (gl_array_oset_implementation): Update.
6159         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
6160         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
6161         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
6162
6163 2006-10-04  Bruno Haible  <bruno@clisp.org>
6164
6165         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
6166
6167 2006-10-03  Bruno Haible  <bruno@clisp.org>
6168
6169         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
6170         from gl_avltreehash_list_implementation.
6171
6172 2006-10-03  Bruno Haible  <bruno@clisp.org>
6173
6174         * lib/gl_oset.c (gl_oset_add): Fix return type.
6175
6176 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
6177
6178         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
6179
6180 2006-10-02  Eric Blake  <ebb9@byu.net>
6181
6182         * modules/strnlen (Depends-on): Add extensions.
6183
6184 2006-10-02  Eric Blake  <ebb9@byu.net>
6185
6186         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
6187         definition in 2.60+.
6188
6189 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
6190
6191         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
6192         checks.
6193
6194 2006-10-02  Bruno Haible  <bruno@clisp.org>
6195
6196         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
6197         to the AUTOMAKE_OPTIONS.
6198         Reported by Jim Meyering.
6199
6200 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
6201
6202         Work around bug in Solaris 10 /proc file system:
6203         /proc/self/fd/NNN/.. isn't the parent directory of
6204         the directory whose file descriptor is NNN.  This needs to
6205         be worked around at run time, not compile time, since a
6206         program might be built on Solaris 8, where things work, and
6207         run on Solaris 10.
6208         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
6209         to use the following interface instead:
6210         (OPENAT_BUFFER_SIZE): New macro.
6211         (openat_proc_name): New function.
6212         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
6213         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
6214         Likewise.
6215         * lib/openat-proc.c: New file.
6216         * modules/openat (Files): Add lib/openat-proc.c.
6217         (Depends-on): Add same-inode, stdbool.
6218         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
6219
6220 2006-09-29  Bruno Haible  <bruno@clisp.org>
6221
6222         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
6223         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
6224         argument. Set stdout_closed before testing for ferror, not after.
6225         (fwriteerror, fwriteerror_no_ebadf): New functions.
6226
6227 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6228
6229         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
6230
6231 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
6232
6233         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
6234         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
6235
6236 2006-09-28  Jim Meyering  <jim@meyering.net>
6237
6238         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
6239         Include <unistd.h>.
6240
6241 2006-09-28  Bruno Haible  <bruno@clisp.org>
6242
6243         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
6244         * modules/linkedhash-list (Depends-on): Likewise.
6245         * modules/rbtreehash-list (Depends-on): Likewise.
6246
6247 2006-09-28  Bruno Haible  <bruno@clisp.org>
6248
6249         * lib/strndup.h: Simplify the redefinition of strndup.
6250         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
6251         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
6252
6253 2006-09-28  Bruno Haible  <bruno@clisp.org>
6254
6255         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
6256         * lib/gl_linkedhash_list.c: Likewise.
6257         * lib/gl_rbtreehash_list.c: Likewise.
6258
6259 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
6260
6261         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
6262         getaddrinfo.
6263
6264         * lib/__fpending.h: Don't include <stdio_ext.h> unless
6265         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
6266         it causes <stdio_ext.h> to cause a compile-time error.
6267         Problem reported by Nelson H. F. Beebe.
6268         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
6269         of HAVE_DECL___PENDING.
6270
6271         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
6272         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
6273         declaration.
6274
6275 2006-09-27  Jim Meyering  <jim@meyering.net>
6276
6277         This file could end up with a definition for a function
6278         named __strndup, rather than rpl_strndup on a system with
6279         incomplete weak_alias support.
6280         * lib/strndup.c (strndup): Rename from __strndup.
6281         Remove #defines that used to map __strndup to strndup.
6282         Don't use K&R prototypes.
6283         Remove LIBC-related code, since this file is not sync'd with glibc.
6284         * lib/strndup.h: Revamp, accordingly.
6285         * m4/strndup.m4: Modernize.
6286
6287 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
6288
6289         * modules/savewd (Depends-on): Add 'raise'.
6290         * lib/savewd.c: Include <signal.h>, for 'raise'.
6291
6292 2006-09-26  Jim Meyering  <jim@meyering.net>
6293
6294         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
6295         when we detect Darwin 8.7.0's acl_get_file bug.
6296         Rearrange to perform the new (below) run-test while $LIBS
6297         contains any acl-related library.  Set USE_ACL at the end.
6298         (gl_ACL_GET_FILE): New function.
6299
6300 2006-09-26  Eric Blake  <ebb9@byu.net>
6301
6302         * lib/verror.c: Include <config.h> unconditionally.
6303
6304 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
6305
6306         * modules/clock-time (Maintainer): Add self.
6307         * modules/getlogin_r (Depends-on): Add extensions.
6308
6309 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6310
6311         * modules/clock-time: New module.
6312         * modules/nanosleep (Depends-on): Add clock-time.
6313         * modules/gethrxtime (Depends-on): Likewise.
6314         * modules/gettime (Depends-on): Likewise.
6315         * modules/settime (Depends-on): Likewise.
6316
6317         * modules/fts-lgpl: Depend on openat.
6318         * modules/mkancesdirs: Depend on savewd.
6319         * modules/mkdir-p: Likewise.
6320
6321 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6322
6323         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
6324
6325         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
6326         `gl_have_arbitrary_file_name_length_limit' to
6327         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
6328         actually works between configure runs.
6329
6330 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6331             Bruno Haible  <bruno@clisp.org>
6332
6333         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
6334
6335 2006-09-25  Jim Meyering  <jim@meyering.net>
6336
6337         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
6338         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
6339
6340 2006-09-25  Eric Blake  <ebb9@byu.net>
6341
6342         * gnulib-tool (func_import, func_create_testdir): Fix typos in
6343         exec's in 2006-09-18 patch when shuffling fds.
6344
6345 2006-09-25  Bruno Haible  <bruno@clisp.org>
6346
6347         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
6348         Reported by Jim Meyering.
6349
6350 2006-09-24  Jim Meyering  <jim@meyering.net>
6351
6352         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
6353         compare a pointer against a literal "0".  That caused failures with
6354         at least HP-UX's hpcc.
6355
6356 2006-09-22  Simon Josefsson  <jas@extundo.com>
6357
6358         * modules/gc-sha1:
6359         * modules/gc-md4:
6360         * modules/gc-hmac-sha1:
6361         * modules/gc-hmac-md5:
6362         * modules/gc-des:
6363         * modules/gc-arcfour: Distribute more files.
6364
6365 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6366
6367         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
6368         (gl_linked_iterator_from_to): Initialize struct completely.
6369         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
6370         (gl_tree_iterator_from_to): Likewise
6371         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
6372         * lib/gl_array_list.c [lint] (gl_array_iterator)
6373         (gl_array_iterator_from_to): Likewise.
6374         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
6375         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
6376         (gl_carray_iterator_from_to): Likewise.
6377
6378         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
6379         * lib/md4.c (md4_process_block): Remove unused variable.
6380         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
6381         parentheses for clarity.
6382
6383 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6384
6385         * modules/bison-i18n (Depends-on): Add gettext.
6386
6387 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6388
6389         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
6390         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
6391         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
6392         also add missing comma that caused broken test.
6393         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
6394         stdlib.h, for `abort'.
6395         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
6396         variables.
6397         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
6398         include unistd.h if present, for `rmdir'.
6399         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
6400         variables.
6401         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
6402         in the process include standard headers for prototypes.
6403         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
6404         gets declared on GNU/Linux.
6405         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
6406         unistd.h, for `rmdir'.
6407         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
6408
6409         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
6410         always true.
6411         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
6412
6413         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
6414
6415 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6416
6417         * gnulib-tool (func_version): Create output all at once.  This
6418         may help avoid triggering unnecessary SIGPIPEs, and at any
6419         rate it doesn't hurt.
6420
6421 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6422             Bruno Haible  <bruno@clisp.org>
6423
6424         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
6425         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
6426         * m4/signed.m4 (bh_C_SIGNED): Likewise.
6427
6428         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
6429         (gl_FUNC_VASPRINTF): Invoke it.
6430
6431 2006-09-22  Bruno Haible  <bruno@clisp.org>
6432
6433         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
6434         getloadavg.c as first argument.
6435
6436 2006-09-22  Bruno Haible  <bruno@clisp.org>
6437
6438         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
6439         at the beginning of the gl_INIT macro.
6440         * modules/getloadavg (configure.ac): Pass $gl_source_base to
6441         gl_GETLOADAVG.
6442
6443 2006-09-22  Bruno Haible  <bruno@clisp.org>
6444
6445         * gnulib-tool (func_create_megatestdir): Don't include the config-h
6446         module.
6447         Suggested by Ralf Wildenhues.
6448
6449 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
6450
6451         Import this patch from libc:
6452
6453         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
6454
6455         * lib/regex_internal.c (re_string_reconstruct): Handle
6456         offset < pstr->valid_raw_len && pstr->offsets_needed case.
6457         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
6458         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
6459         re_string_context_at.
6460
6461         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
6462         now requires it.
6463         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
6464         gl_REGEX now does it for us.
6465         (gl_REGEX): Add test taken from
6466         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
6467
6468         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
6469         Check that large offsets work.  Modernize Autoconf usages.
6470         Prefer "yes" to mean a good thing rather than a bad.
6471         Don't put "#define mkstemp" in config.h, as this might interfere
6472         with standard system headers that "#define mkstemp mkstemp64".
6473
6474         * modules/mkstemp (Depends-on): Add extensions, so that
6475         mkstemp is visible on some platforms.
6476         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
6477         (Include): Change to "mkstemp.h" from <stdlib.h>.
6478         (Files): Add mkstemp.h.
6479
6480         * lib/mkstemp.h: New file, since some standard headers
6481         #define mkstemp.
6482         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
6483         Include "mkstemp.h".
6484         Make the _LIBC code resemble glibc original more,
6485         e.g., use K&R style.
6486         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
6487         (mkstemp): Remove, since mkstemp.h does this for us.
6488         * lib/stdlib--.h: Include mkstemp.h.
6489
6490         Import this patch from libc:
6491
6492         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
6493
6494         * lib/tempname.c (__gen_tempname): Change attempts_min
6495         into a macro.  Use preprocessor to decide how to initialize
6496         attempts [Coverity CID 67].
6497
6498 2006-09-20  Bruno Haible  <bruno@clisp.org>
6499
6500         * lib/mkdtemp.c: Import from libc.
6501         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
6502                 * sysdeps/posix/tempname.c (__gen_tempname): Change
6503                 attempts_min into a macro.  Use preprocessor to decide how to
6504                 initialize attempts [Coverity CID 67].
6505         2001-11-27  Paul Eggert  <eggert@twinsun.com>
6506                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
6507                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
6508
6509 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6510
6511         * gnulib-tool (func_exit): New function, to allow to pass the
6512         exit status portably through the trap.  Use everywhere.
6513         (--help, --version): Signal a write error.
6514         (trap): catch SIGPIPE, for write errors.
6515         Exit at the end of the trap, with the correct exit status.
6516
6517 2006-09-19  Karl Berry  <karl@gnu.org>
6518
6519         * doc/gnulib.texi: note about the license texinfo files.
6520
6521 2006-09-19  Eric Blake  <ebb9@byu.net>
6522
6523         * gnulib-tool: Avoid space-tab.
6524
6525 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6526
6527         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
6528         that prevented coreutils 6.1 from building.  Problem reported
6529         by Petter Reinholdtsen.
6530
6531 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6532
6533         * gnulib-tool (avoidlist): Fix typo that broke options like
6534         --avoid=lock that are used by coreutils bootstrap.
6535
6536 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
6537
6538         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
6539         more systematically.
6540
6541 2006-09-18  Jim Meyering  <jim@meyering.net>
6542
6543         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
6544
6545 2006-09-18  Bruno Haible  <bruno@clisp.org>
6546
6547         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
6548
6549 2006-09-18  Bruno Haible  <bruno@clisp.org>
6550
6551         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
6552         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
6553         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
6554         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
6555         * m4/gettext.m4: Require autoconf >= 2.52.
6556         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
6557         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
6558         of gl_cv_header_inttypes_h.
6559
6560 2006-09-18  Bruno Haible  <bruno@clisp.org>
6561
6562         * lib/javaversion.c: Include configmake.h.
6563
6564 2006-09-18  Bruno Haible  <bruno@clisp.org>
6565
6566         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
6567         avoid that the while loops be executed in a subshell.
6568
6569 2006-09-18  Bruno Haible  <bruno@clisp.org>
6570
6571         * MODULES.html.sh (func_module): Break long lines.
6572         Suggested by Bruce Korb <bkorb@gnu.org>.
6573
6574 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6575
6576         Speed up by a factor of 1.12.
6577         * gnulib-tool (nl): New variable.
6578         (func_import): Rewrite include directive extraction to only read each
6579         directive once.
6580
6581 2006-09-17  Bruno Haible  <bruno@clisp.org>
6582
6583         * modules/javaversion (Makefile.am): Remove DEFS setting.
6584         (Depends-on): Add configmake, for PKGDATADIR definition.
6585
6586 2006-09-17  Bruno Haible  <bruno@clisp.org>
6587
6588         * gnulib-tool (func_create_testdir): Rewrite all files at once.
6589
6590 2006-09-17  Bruno Haible  <bruno@clisp.org>
6591
6592         * gnulib-tool (func_append): New function, stolen from libtool.m4.
6593         (func_modules_transitive_closure, func_modules_add_dummy,
6594         func_modules_to_filelist, func_import, func_create_testdir,
6595         func_create_megatestdir, ...): Use it wherever possible.
6596         Suggested by Ralf Wildenhues.
6597
6598 2006-09-16  Karl Berry  <karl@gnu.org>
6599
6600         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
6601         to avoid sectioning errors.
6602         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
6603         [ifinfo]: blank line after @center-ed titles.
6604         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
6605         Spell FSF address consistently with others.
6606         (These changes approved by rms.)
6607
6608 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6609
6610         Speed up by a factor of 1.61.
6611         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
6612         already checked module names again.
6613
6614 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6615
6616         Speed up by a factor of 1.13.
6617         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
6618         for new_files, and the input to func_add_or_update.
6619
6620 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6621
6622         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
6623         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
6624
6625 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6626
6627         * modules/mkancesdirs (Depends-on): Add fcntl.
6628         * modules/savewd: New file.
6629         * MODULES.html.sh (File system functions): Add savewd.
6630
6631         * modules/configmake (Makefile.am): Add support for the
6632         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
6633
6634 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6635
6636         * m4/savewd.m4: New file.
6637
6638 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6639
6640         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
6641         (dirchownmod): New arg FD.  All callers changed.
6642         Use FD rather than opening the directory ourself, as opening is
6643         now the caller's responsibility.
6644         * lib/dirchownmod.h: Likewise.
6645         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
6646         hosts that require <sys/types.h> before <sys/stat.h>.  Include
6647         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
6648         (test_dir): Remove.
6649         (mkancesdirs): Return length of prefix of FILE that has already
6650         been made, or -2 if there is a child doing the work.  Redo
6651         algorithm so that it is O(N) rather than O(N**2).  Optimize away
6652         ".", and treat ".." specially since it might stray back into
6653         already-created areas.  Use a subprocess if necessary.  New arg
6654         WD; all users changed.  MAKE_DIR function should now return 1
6655         if it creates a directory that is not readable.  Return -2 if
6656         a child process is spun off.
6657         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
6658         Adjust signature to match code.
6659         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
6660         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
6661         all users changed.
6662         * lib/savewd.c, lib/savewd.h: New files.
6663
6664 2006-09-15  Jim Meyering  <jim@meyering.net>
6665
6666         * modules/rename-dest-slash: New module.
6667         * MODULES.html.sh (posix_compat): Add it here.
6668
6669         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
6670
6671 2006-09-15  Jim Meyering  <jim@meyering.net>
6672
6673         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
6674         file.
6675
6676         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
6677
6678 2006-09-15  Jim Meyering  <jim@meyering.net>
6679
6680         * lib/rename-dest-slash.c (has_trailing_slash): Use
6681         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
6682         (rpl_rename_dest_slash): Perform the cheaper trailing slash
6683         test before testing whether SRC is a directory.
6684         Suggestions from Bruno Haible.
6685
6686         Avoid a warning about an unused variable.
6687         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
6688         into the #ifdef block where it's used.
6689
6690         * lib/rename-dest-slash.c: New file.
6691
6692 2006-09-14  Bruno Haible  <bruno@clisp.org>
6693
6694         * lib/allocsa.c: Include <config.h> unconditionally.
6695         * lib/asnprintf.c: Likewise.
6696         * lib/asprintf.c: Likewise.
6697         * lib/c-strcasecmp.c: Likewise.
6698         * lib/c-strcasestr.c: Likewise.
6699         * lib/c-strncasecmp.c: Likewise.
6700         * lib/c-strstr.c: Likewise.
6701         * lib/classpath.c: Likewise.
6702         * lib/clean-temp.c: Likewise.
6703         * lib/concatpath.c: Likewise.
6704         * lib/copy-file.c: Likewise.
6705         * lib/csharpcomp.c: Likewise.
6706         * lib/csharpexec.c: Likewise.
6707         * lib/execute.c: Likewise.
6708         * lib/fatal-signal.c: Likewise.
6709         * lib/findprog.c: Likewise.
6710         * lib/fwriteerror.c: Likewise.
6711         * lib/gl_array_list.c: Likewise.
6712         * lib/gl_array_oset.c: Likewise.
6713         * lib/gl_avltree_list.c: Likewise.
6714         * lib/gl_avltree_oset.c: Likewise.
6715         * lib/gl_avltreehash_list.c: Likewise.
6716         * lib/gl_carray_list.c: Likewise.
6717         * lib/gl_linked_list.c: Likewise.
6718         * lib/gl_linkedhash_list.c: Likewise.
6719         * lib/gl_list.c: Likewise.
6720         * lib/gl_oset.c: Likewise.
6721         * lib/gl_rbtree_list.c: Likewise.
6722         * lib/gl_rbtree_oset.c: Likewise.
6723         * lib/gl_rbtreehash_list.c: Likewise.
6724         * lib/imaxabs.c: Likewise.
6725         * lib/imaxdiv.c: Likewise.
6726         * lib/javacomp.c: Likewise.
6727         * lib/javaexec.c: Likewise.
6728         * lib/javaversion.c: Likewise.
6729         * lib/linebreak.c: Likewise.
6730         * lib/localcharset.c: Likewise.
6731         * lib/lock.c: Likewise.
6732         * lib/mbchar.c: Likewise.
6733         * lib/mbswidth.c: Likewise.
6734         * lib/mkdtemp.c: Likewise.
6735         * lib/pipe.c: Likewise.
6736         * lib/printf-args.c: Likewise.
6737         * lib/printf-parse.c: Likewise.
6738         * lib/progname.c: Likewise.
6739         * lib/progreloc.c: Likewise.
6740         * lib/readlink.c: Likewise.
6741         * lib/sh-quote.c: Likewise.
6742         * lib/stpcpy.c: Likewise.
6743         * lib/stpncpy.c: Likewise.
6744         * lib/strcasecmp.c: Likewise.
6745         * lib/strcasestr.c: Likewise.
6746         * lib/strcspn.c: Likewise.
6747         * lib/striconv.c: Likewise.
6748         * lib/strncasecmp.c: Likewise.
6749         * lib/strnlen1.c: Likewise.
6750         * lib/strstr.c: Likewise.
6751         * lib/strtok_r.c: Likewise.
6752         * lib/tls.c: Likewise.
6753         * lib/tmpdir.c: Likewise.
6754         * lib/unicodeio.c: Likewise.
6755         * lib/unsetenv.c: Likewise.
6756         * lib/vasnprintf.c: Likewise.
6757         * lib/vasprintf.c: Likewise.
6758         * lib/wait-process.c: Likewise.
6759         * lib/xallocsa.c: Likewise.
6760         * lib/xsetenv.c: Likewise.
6761         * lib/xstriconv.c: Likewise.
6762
6763 2006-09-13  Simon Josefsson  <jas@extundo.com>
6764
6765         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
6766         that internally, suggested by Ralf Wildenhues
6767         <Ralf.Wildenhues@gmx.de>.
6768
6769 2006-09-13  Simon Josefsson  <jas@extundo.com>
6770
6771         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
6772         @LIBOBJS@.
6773         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6774
6775 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
6776
6777         * lib/_fpending.c: Include <config.h> unconditionally, since we no
6778         longer worry about uses that don't define HAVE_CONFIG_H.
6779         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
6780         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
6781         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
6782         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
6783         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
6784         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
6785         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
6786         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
6787         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
6788         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
6789         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
6790         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
6791         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
6792         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
6793         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
6794         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
6795         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
6796         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
6797         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
6798         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
6799         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
6800         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
6801         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
6802         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
6803         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
6804         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
6805         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
6806         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
6807         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
6808         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
6809         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
6810         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
6811         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
6812         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
6813         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
6814         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
6815         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
6816         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
6817         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
6818         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
6819         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
6820         Likewise.
6821
6822 2006-09-13  Eric Blake  <ebb9@byu.net>
6823
6824         * lib/getopt.c: Fix typo in last commit.
6825
6826 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6827
6828         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
6829         dgettext.
6830
6831 2006-09-12  Jim Meyering  <jim@meyering.net>
6832
6833         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
6834         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
6835         Reported by Nelson H. F. Beebe.
6836
6837 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6838
6839         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
6840         program_invocation_name and program_invocation_short_name are
6841         initialized.
6842         * lib/argp-namefrob.h: Move declarations of program_invocation_name
6843         and program_invocation_short_name to argp.h, so they are visible
6844         to user programs.
6845         * lib/argp.h: Likewise
6846
6847 2006-09-10  Bruno Haible  <bruno@clisp.org>
6848
6849         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
6850         m4/inttypes_h.m4, m4/uintmax_t.m4.
6851
6852 2006-09-10  Bruno Haible  <bruno@clisp.org>
6853
6854         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
6855         gl_AC_TYPE_UINTMAX_T.
6856
6857 2006-09-10  Bruno Haible  <bruno@clisp.org>
6858
6859         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
6860
6861 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6862
6863         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
6864         convention.  Text proposed by Bruno Haible.
6865         (struct argp_option): Document the use of N_() wrappers.
6866
6867         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
6868         '\v', and translate the two parts separately, instead of feeding
6869         the whole string to gettext.  This allows to exclude
6870         '\v' from the strings visible to the translator by writing doc
6871         strings as N_("..") "\v" N_("..").
6872
6873 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
6874
6875         * config/srclist.txt: Undo latest change; the bug was fixed.
6876
6877 2006-09-09  Bruno Haible  <bruno@clisp.org>
6878
6879         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
6880         assignments if building a library without libtool.
6881         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
6882         in func_emit_lib_Makefile_am.
6883         (func_import): When building a static library libfoo.a, arrange to
6884         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
6885         (func_create_testdir): Likewise.
6886         * modules/gc (configure.ac, Makefile.am): If building statically,
6887         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
6888         * modules/iconvme (configure.ac, Makefile.am): Likewise.
6889         * modules/striconv (configure.ac, Makefile.am): Likewise.
6890         Based on a suggestion by Ralf Wildenhues.
6891
6892 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6893
6894         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
6895         Check for unistd.h too, since Autoconf doesn't assume POSIX.
6896         Also:
6897
6898         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6899         Add year_2050_test to catch glibc bug 2821
6900         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6901
6902         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6903         Prefer #ifdef to #if.
6904
6905         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
6906         Return from 'main' instead of calling 'exit'.
6907
6908 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6909
6910         * lib/mktime.c (guess_time_tm): Fix bug where mktime
6911         returned the maximum time_t value rather than (time_t) -1.
6912         Problem originally reported by William Bardwell
6913         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
6914
6915         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6916         Moved to here ...
6917         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
6918         ... from here.
6919
6920 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
6921
6922         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
6923         2821 is fixed.
6924
6925 2006-09-08  Jim Meyering  <jim@meyering.net>
6926
6927         Don't make generated files read-only.  That would bother too many
6928         people.  However, do retain the ability to work when targets are
6929         read-only: remove the destination and temporary files before writing
6930         them (when generated via sed or echo), or by using the -f option for
6931         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
6932         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6933         * modules/byteswap, modules/configmake, modules/fcntl:
6934         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6935         * modules/localcharset, modules/netinet_in, modules/poll:
6936         * modules/stdbool, modules/stdint, modules/sys_select:
6937         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6938
6939 2006-09-08  Jim Meyering  <jim@meyering.net>
6940
6941         Avoid new build failure on FreeBSD 6.0.
6942         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
6943         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
6944         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
6945
6946 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6947
6948         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
6949
6950 2006-09-07  Jim Meyering  <jim@meyering.net>
6951
6952         Fix global typo in last change: use chmod u-w, not chmod u-x.
6953         Spotted by Paul Eggert and Bruce Korb.
6954         * modules/alloca-opt, modules/argz, modules/arpa_inet:
6955         * modules/byteswap, modules/configmake, modules/fcntl:
6956         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
6957         * modules/localcharset, modules/netinet_in, modules/poll:
6958         * modules/stdbool, modules/stdint, modules/sys_select:
6959         * modules/sys_socket, modules/sys_stat, modules/sysexits:
6960
6961 2006-09-06  Jim Meyering  <jim@meyering.net>
6962
6963         Make generated files be read-only.
6964         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
6965         Ensure that each generated file is now read-only.
6966         * modules/argz: Likewise.
6967         * modules/arpa_inet: Likewise.
6968         * modules/byteswap: Likewise.
6969         * modules/configmake: Likewise.
6970         * modules/fcntl: Likewise.
6971         * modules/fnmatch: Likewise.
6972         * modules/getopt: Likewise.
6973         * modules/glob: Likewise.
6974         * modules/inttypes: Likewise.
6975         * modules/netinet_in: Likewise.
6976         * modules/poll: Likewise.
6977         * modules/stdbool: Likewise.
6978         * modules/stdint: Likewise.
6979         * modules/sys_select: Likewise.
6980         * modules/sys_socket: Likewise.
6981         * modules/sys_stat: Likewise.
6982         * modules/sysexits: Likewise.
6983         * modules/localcharset: Same as above, but continue using temporary
6984         file named "t-$@" (why different?) rather than the "$@-t" used
6985         everywhere else.
6986
6987         * modules/sysexits (Makefile.am): Replace literal occurrences
6988         of "sysexit.h" more readable, and more consistent, "$@".
6989
6990 2006-09-06  Bruno Haible  <bruno@clisp.org>
6991
6992         * modules/striconv: New file.
6993         * modules/xstriconv: New file.
6994         * MODULES.html.sh (Internationalization functions): Add striconv,
6995         xstriconv.
6996
6997 2006-09-06  Bruno Haible  <bruno@clisp.org>
6998
6999         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
7000         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
7001         not using libtool correctly.
7002
7003 2006-09-06  Bruno Haible  <bruno@clisp.org>
7004
7005         * lib/striconv.h: New file.
7006         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
7007         iconvstring.c.
7008         * lib/xstriconv.h: New file.
7009         * lib/xstriconv.c: New file.
7010
7011 2006-09-06  Bruno Haible  <bruno@clisp.org>
7012
7013         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7014         lib_..._LDFLAGS.
7015
7016 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7017
7018         * lib/argz_.h: Sync from Libtool.
7019
7020         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
7021                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7022
7023         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
7024
7025 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7026
7027         * modules/trim: New file.
7028
7029 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7030
7031         * lib/trim.h: New file.
7032         * lib/trim.c: New file.
7033
7034 2006-09-05  Bruno Haible  <bruno@clisp.org>
7035
7036         * MODULES.html.sh (String handling): Add trim.
7037
7038 2006-09-04  Karl Berry  <karl@gnu.org>
7039
7040         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
7041         until next release.
7042
7043 2006-09-03  Bruno Haible  <bruno@clisp.org>
7044
7045         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
7046         correctly.
7047
7048 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7049
7050         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
7051         not gl_GETLOADAVG.  Omit unneeded semicolons.
7052         Problems reported by Ralf Wildenhues in
7053         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7054         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
7055         at the end, which is the usual gnulib style.
7056
7057         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
7058         of doing all the work ourselves.
7059         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
7060         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
7061
7062 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7063
7064         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
7065         Problem reported by Ralf Wildenhues in
7066         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7067
7068         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
7069         HAVE_STRUCT_STATFS_F_FSTYPENAME.
7070
7071 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7072
7073         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
7074         yesterday's patch by changing test -n to test -z.
7075
7076 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7077
7078         * modules/getloadavg (Files): Add m4/getloadavg.m4.
7079         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
7080         the former is now obsolescent.
7081
7082         * modules/chdir-long (Depends-on): Add fcntl.
7083
7084 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7085
7086         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
7087         obsolescent, and programs should use gnulib instead.
7088         * m4/getloadavg.m4: New file, with contents taken from Autoconf
7089         but with prefixes changed.
7090
7091 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7092
7093         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
7094         or stdbool.h, because they might not exist while configuring.
7095
7096         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
7097         Don't include unistd.h or limits.h; not needed, since chdir-long.h
7098         does that for us.
7099         (O_DIRECTORY): Remove.
7100
7101 2006-08-31  Eric Blake  <ebb9@byu.net>
7102
7103         * gnulib-tool: Don't let emacs change spaces to TAB.
7104
7105 2006-08-31  Bruno Haible  <bruno@clisp.org>
7106
7107         * gnulib-tool: When calling func_import more than once, do it in a
7108         subshell.
7109         Reported by Eric Blake <ebb9@byu.net>.
7110
7111 2006-08-31  Bruno Haible  <bruno@clisp.org>
7112
7113         * gnulib-tool (nl): Remove variable.
7114         (sed_transform_lib_file): Use more robust test for config-h module.
7115         (func_import): Fix typo in 2006-08-25 patch.
7116
7117 2006-08-31  Bruno Haible  <bruno@clisp.org>
7118
7119         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
7120         specified, augment Makefile.am variables instead of assigning them.
7121
7122 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7123
7124         Work around a bug in both the Linux and SunOS 64-bit kernels:
7125         nanosleep mishandles sleeps for longer than 2**31 seconds.
7126         Problem reported by Frank v Waveren in
7127         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7128         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
7129         Check for nanosleep bug.
7130         (LIB_NANOSLEEP): Append clock_gettime library if needed.
7131
7132 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7133
7134         Work around a bug in both the Linux and SunOS 64-bit kernels:
7135         nanosleep mishandles sleeps for longer than 2**31 seconds.
7136         Problem reported by Frank v Waveren in
7137         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7138         * lib/nanosleep.c (BILLION): New constant.
7139         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
7140         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
7141         implementation.
7142
7143 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7144
7145         * modules/nanosleep (Depends-on): Add gettime.
7146
7147 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7148         and Simon Josefsson  <jas@extundo.com>
7149         and Oskar Liljeblad  <oskar@osk.mine.nu>
7150
7151         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
7152         * gnulib-tool (func_import): New license type 'unmodifiable license
7153         text'.
7154         * modules/fdl: Use it.  Longer description.
7155         * module/gpl, module/lgpl: New files.
7156
7157 2006-08-30  Jim Meyering  <jim@meyering.net>
7158
7159         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
7160         shadowing the parameter.
7161
7162 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7163
7164         Sync from Libtool:
7165
7166         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7167
7168         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
7169         sharing with gnulib.  Report by Eric Blake.
7170
7171 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7172
7173         * modules/isapipe: New file.
7174         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
7175
7176 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7177
7178         * modules/configmake (Makefile.am): Add a comment, and omit
7179         the CONFIGMAKE_ prefix from generated macro names.  Suggested
7180         by Bruno Haible.
7181
7182 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7183
7184         * m4/isapipe.m4: New file.
7185
7186 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7187
7188         * lib/isapipe.c, lib/isapipe.h: New files.
7189
7190 2006-08-29  Jim Meyering  <jim@meyering.net>
7191
7192         * modules/configmake (Makefile.am): Make configmake.h depend on
7193         Makefile.  Otherwise, a stale configmake.h could hang around.
7194
7195 2006-08-29  Eric Blake  <ebb9@byu.net>
7196
7197         * lib/error.c (error_at_line, print_errno_message): Match libc, after
7198         resolution of upstream bug 3044.
7199
7200 2006-08-29  Bruno Haible  <bruno@clisp.org>
7201
7202         * modules/localcharset (Depends-on): Add configmake.
7203         (Makefile.am): Remove setting of LIBDIR through DEFS.
7204
7205 2006-08-29  Bruno Haible  <bruno@clisp.org>
7206
7207         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
7208         defined.
7209
7210 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7211
7212         * modules/fcntl: New file.
7213         * modules/chdir-safer (Depends-on): Add fcntl.
7214         * modules/fts: Likewise.
7215         * modules/mkdir-p: Likewise.
7216
7217         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
7218         This undoes the most recent change, since we're now addressing the
7219         problem in a different way.
7220
7221         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
7222         into output, since the output might be called Makefile.am even
7223         if $makefile_name is something different.
7224         (func_import): Use $makefile_am rather than
7225         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
7226         empty.
7227
7228         * modules/inttypes (Files): Add m4/inttypes-h.m4.
7229
7230 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7231
7232         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
7233         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
7234         recent change to stdint.m4, since we're now addressing the problem in a
7235         different way.
7236
7237 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7238
7239         * m4/fcntl_h.m4: New file.
7240
7241 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7242
7243         * lib/fcntl_.h: New file.
7244         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
7245         the fcntl module.
7246         * lib/dirchownmod.c: Likewise.
7247         * lib/fts.c: Likewise.
7248
7249         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
7250         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
7251         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
7252         just before including <inttypes.h>, to avoid circular inclusion.
7253
7254 2006-08-28  Jim Meyering  <jim@meyering.net>
7255
7256         * doc/visibility.texi: Actually read and correct the grammar of the
7257         sentence affected by yesterday's change.
7258
7259 2006-08-28  Eric Blake  <ebb9@byu.net>
7260
7261         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
7262         needs wrapper.
7263
7264 2006-08-28  Eric Blake  <ebb9@byu.net>
7265
7266         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
7267
7268 2006-08-28  Eric Blake  <ebb9@byu.net>
7269
7270         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
7271
7272 2006-08-28  Bruno Haible  <bruno@clisp.org>
7273
7274         * modules/c-strstr: New file, from GNU gettext.
7275         * MODULES.html.sh (String handling): Add c-strstr.
7276
7277 2006-08-28  Bruno Haible  <bruno@clisp.org>
7278
7279         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
7280         macros.
7281         Reported by Eric Blake.
7282
7283 2006-08-28  Bruno Haible  <bruno@clisp.org>
7284
7285         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
7286         (VASNPRINTF): Return a string of length > INT_MAX without failing.
7287         * lib/vasprintf.c: Include errno.h, limits.h.
7288         (EOVERFLOW): New fallback definition.
7289         (vasprintf): Test here whether the string length is > INT_MAX.
7290         * lib/vsnprintf.c: Include errno.h, limits.h.
7291         (EOVERFLOW): New fallback definition.
7292         (vsnprintf): Fix bug when generated string was too long for the buffer.
7293         Test here whether the string length is > INT_MAX.
7294
7295 2006-08-28  Bruno Haible  <bruno@clisp.org>
7296
7297         * lib/inttypes_.h (SCNX*): Remove definitions.
7298         Reported by Eric Blake.
7299
7300 2006-08-28  Bruno Haible  <bruno@clisp.org>
7301
7302         * lib/c-strstr.h: New file, from GNU gettext.
7303         * lib/c-strstr.c: New file, from GNU gettext.
7304
7305 2006-08-28  Bruno Haible  <bruno@clisp.org>
7306
7307         * gnulib-tool: Reorder some statements.
7308
7309 2006-08-28  Bruno Haible  <bruno@clisp.org>
7310
7311         * gnulib-tool: New option --makefile-name.
7312         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
7313         $makefile_name.
7314         (func_import): Write $makefile_name to the cache file, and read it from
7315         there unless explicitly specified. Use $makefile_name as file name
7316         instead of Makefile.am. Adjust the recommendations accordingly.
7317
7318 2006-08-28  Bruno Haible  <bruno@clisp.org>
7319
7320         * gnulib-tool (func_verify_module): Check against misapplying patch.
7321
7322 2006-08-28  Bruno Haible  <bruno@clisp.org>
7323
7324         * gnulib-tool (func_relativize, func_relconcat): New functions.
7325         Give an error if --local-dir is given with --update.
7326         Remove trailing slashes from $local_gnulib_dir.
7327         (func_import): Store the relativized $local_gnulib_dir in
7328         gnulib-cache.m4, and read it from there if not specified explicitly.
7329
7330 2006-08-28  Bruno Haible  <bruno@clisp.org>
7331
7332         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
7333         is the current directory. Respect also $local_gnulib_dir.
7334
7335 2006-08-28  Bruno Haible  <bruno@clisp.org>
7336             Simon Josefsson  <jas@extundo.com>
7337
7338         BeOS portability.
7339         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
7340
7341 2006-08-27  Jim Meyering  <jim@meyering.net>
7342
7343         * doc/visibility.texi: Remove duplicate word: "pointer".
7344
7345 2006-08-26  Bruno Haible  <bruno@clisp.org>
7346
7347         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
7348         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
7349         (Makefile.am): Create inttypes.h from inttypes_.h.
7350         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
7351
7352         * modules/imaxabs: New file.
7353
7354         * modules/imaxdiv: New file.
7355
7356 2006-08-26  Bruno Haible  <bruno@clisp.org>
7357
7358         * m4/inttypes.m4: New file.
7359         * m4/_inttypes_h.m4: Remove file.
7360         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
7361         PRI_MACROS_BROKEN.
7362         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
7363
7364         * m4/imaxabs.m4: New file.
7365
7366         * m4/imaxdiv.m4: New file.
7367
7368 2006-08-26  Bruno Haible  <bruno@clisp.org>
7369
7370         * lib/inttypes_.h: New file.
7371         * lib/inttypes.h: Remove file.
7372         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
7373
7374         * lib/imaxabs.c: New file.
7375
7376         * lib/imaxdiv.c: New file.
7377
7378 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
7379
7380         New config-h module, so that "make" output needn't be cluttered
7381         by -DHAVE_CONFIG_H.
7382         * MODULES.html.sh (Support for building libraries and executables):
7383         Add config-h.
7384         * modules/config-h: New file.
7385         * gnulib-tool (nl, sed_transform_lib_file): New vars.
7386         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
7387         the config-h module is used.
7388
7389         New configmake module, so that "make" output needn't be cluttered
7390         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
7391         * MODULES.html.sh (Support for building libraries and executables):
7392         Add configmake.
7393         * modules/configmake: New file.
7394
7395 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
7396
7397         * m4/config-h.m4: New file.
7398
7399 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7400
7401         * config/srclist.txt: Add elisp-comp.
7402
7403 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7404
7405         * MODULES.html.sh (Support for building libraries and executables):
7406         Add elisp-comp.
7407         * build-aux/elisp-comp: New file.
7408         * modules/elisp-comp: New file.
7409
7410 2006-08-24  Bruno Haible  <bruno@clisp.org>
7411
7412         * gnulib-tool (func_create_testdir): Use non-default values of
7413         sourcebase and m4base.
7414
7415 2006-08-24  Bruno Haible  <bruno@clisp.org>
7416
7417         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
7418         HTML structure.
7419
7420 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
7421
7422         * modules/openat (Depends-on): Add lchown.
7423
7424 2006-08-23  Bruno Haible  <bruno@clisp.org>
7425
7426         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
7427         of gl_LOCK_EARLY instead of gl_LOCK.
7428
7429 2006-08-23  Bruno Haible  <bruno@clisp.org>
7430
7431         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
7432         on OSF/1 to no.
7433         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
7434
7435 2006-08-23  Bruno Haible  <bruno@clisp.org>
7436
7437         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
7438         as unusable.
7439
7440         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
7441         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
7442         (gl_LOCK): New macro.
7443
7444 2006-08-22  Simon Josefsson  <jas@extundo.com>
7445
7446         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
7447         to md5 module.
7448
7449 2006-08-22  Simon Josefsson  <jas@extundo.com>
7450
7451         * MODULES.html.sh: Add "Support for maintaining and release
7452         projects".
7453
7454         * build-aux/gnupload: New file, from coreutils.
7455
7456 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7457
7458         Avoid the need for AC_LIBSOURCES in m4 macros.
7459         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
7460         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
7461         * modules/check-version (EXTRA_DIST): Add check-version.h.
7462         * modules/crc (EXTRA_DIST): Add crc.h.
7463         * modules/des (EXTRA_DIST): Add des.h.
7464         * modules/gc (EXTRA_DIST): Add gc.h.
7465         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
7466         * modules/getline (EXTRA_DIST): Add getline.h.
7467         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
7468         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
7469         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
7470         * modules/md2 (EXTRA_DIST): Add md2.h.
7471         * modules/md4 (EXTRA_DIST): Add md4.h.
7472         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
7473         * modules/read-file (EXTRA_DIST): Add read-file.h.
7474         * modules/readline (EXTRA_DIST): Add readline.h.
7475         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
7476         rijndael-api-fst.h.
7477
7478 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7479
7480         * m4/rijndael.m4 (gl_ARCFOUR):
7481         * m4/arctwo.m4 (gl_ARCTWO):
7482         * m4/check-version.m4 (gl_CHECK_VERSION):
7483         * m4/crc.m4 (gl_CRC):
7484         * m4/des.m4 (gl_DES):
7485         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
7486         * m4/gc.m4 (gl_GC):
7487         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
7488         * m4/getline.m4 (gl_FUNC_GETLINE):
7489         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
7490         * m4/hmac-md5.m4 (gl_HMAC_MD5):
7491         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
7492         * m4/md2.m4 (gl_MD2):
7493         * m4/md4.m4 (gl_MD4):
7494         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
7495         * m4/read-file.m4 (gl_FUNC_READ_FILE):
7496         * m4/readline.m4 (gl_FUNC_READLINE):
7497         * m4/rijndael.m4 (gl_RIJNDAEL):
7498         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7499         to get the necessary .h files and whatnot.
7500
7501 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7502
7503         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
7504         gnulib rather than the other way around.
7505         * config/srclistvars.sh (COREUTILS): Remove.
7506
7507 2006-08-22  Jim Meyering  <jim@meyering.net>
7508
7509         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
7510
7511         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
7512
7513 2006-08-22  Eric Blake  <ebb9@byu.net>
7514
7515         * modules/regexprops-generic: New file.
7516         * MODULES.html.sh (Support for building documentation): List it.
7517
7518 2006-08-22  Eric Blake  <ebb9@byu.net>
7519
7520         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
7521         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
7522         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
7523         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
7524
7525 2006-08-22  Bruno Haible  <bruno@clisp.org>
7526
7527         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
7528         and lib_LTLIBRARIES like the other lib_* variables.
7529
7530 2006-08-22  Bruno Haible  <bruno@clisp.org>
7531
7532         * build-aux/x-to-1.in: New file, from GNU gettext.
7533
7534 2006-08-22  Bruno Haible  <bruno@clisp.org>
7535
7536         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
7537         <utmpx.h> exists.
7538
7539 2006-08-22  Bruno Haible  <bruno@clisp.org>
7540
7541         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
7542         <utmpx.h> exists.
7543
7544 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7545
7546         BeOS portability.
7547         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
7548         exist.
7549         Problem reported by Bruno Haible.
7550
7551 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7552
7553         Avoid the need for AC_LIBSOURCES in m4 macros.
7554         * modules/acl (EXTRA_DIST): Add acl.h.
7555         * modules/argmatch (Files): Add m4/argmatch.m4.
7556         (configure.ac): Add gl_ARGMATCH.
7557         (EXTRA_DIST): Renamed from lib_SOURCES, for
7558         consistency with the other modules.  Remove argmatch.c.
7559         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
7560         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
7561         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
7562         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
7563         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
7564         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
7565         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
7566         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
7567         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
7568         * modules/closeout (EXTRA_DIST): Add closeout.h.
7569         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
7570         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
7571         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
7572         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
7573         dirname.h; remove basename.c and stripslash.c.
7574         * modules/exclude (EXTRA_DIST): Add exclude.h.
7575         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
7576         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
7577         * modules/file-type (EXTRA_DIST): Add file-type.h.
7578         * modules/filemode (EXTRA_DIST): Add filemode.h.
7579         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
7580         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7581         * modules/fpending (EXTRA_DIST): Add __fpending.h.
7582         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
7583         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
7584         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
7585         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
7586         * modules/getdate (EXTRA_DIST): Add getdate.c.
7587         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
7588         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
7589         * modules/getpass (EXTRA_DIST): Add getpass.h.
7590         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
7591         * modules/group-member (EXTRA_DIST): Add group-member.h.
7592         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
7593         * modules/hash (EXTRA_DIST): Add hash.h.
7594         * modules/human (EXTRA_DIST): Add human.h.
7595         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
7596         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
7597         * modules/lchown (EXTRA_DIST): Add lchown.h.
7598         * modules/long-options (EXTRA_DIST): Add long-options.h.
7599         * modules/lstat (EXTRA_DIST): Add lstat.h.
7600         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
7601         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
7602         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
7603         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
7604         * modules/memxor (EXTRA_DIST): Add memxor.h.
7605         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
7606         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
7607         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
7608         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
7609         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
7610         * modules/physmem (EXTRA_DIST): Add physmem.h.
7611         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
7612         * modules/posixver (EXTRA_DIST): Add posixver.h.
7613         * modules/quote (EXTRA_DIST): Add quote.h.
7614         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
7615         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
7616         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
7617         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
7618         regex_internal.h regexec.c.
7619         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
7620         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
7621         * modules/same (EXTRA_DIST): Add same.h.
7622         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
7623         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
7624         * modules/savedir (EXTRA_DIST): Add savedir.h.
7625         * modules/sha1 (EXTRA_DIST): Add sha1.h.
7626         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
7627         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
7628         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
7629         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
7630         * modules/strdup (EXTRA_DIST): Add strdup.h.
7631         * modules/strftime (EXTRA_DIST): Add strftime.h.
7632         * modules/strndup (EXTRA_DIST): Add strndup.h.
7633         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
7634         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
7635         * modules/time_r (EXTRA_DIST): Add time_r.h.
7636         * modules/timespec (EXTRA_DIST): Add timespec.h.
7637         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7638         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
7639         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
7640         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
7641         * modules/userspec (EXTRA_DIST): Add userspec.h.
7642         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
7643         * modules/utimens (EXTRA_DIST): Add utimens.h.
7644         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
7645         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
7646         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
7647         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
7648         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
7649         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
7650         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
7651         * modules/yesno (EXTRA_DIST): Add yesno.h.
7652
7653 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7654
7655         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
7656
7657         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
7658         * m4/dev-ino.m4, same-inode.m4: Remove.
7659
7660         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
7661         * m4/acl.m4 (AC_FUNC_ACL):
7662         * m4/backupfile.m4 (gl_BACKUPFILE):
7663         * m4/c-strtod.m4 (gl_C99_STRTOLD):
7664         * m4/canon-host.m4 (gl_CANON_HOST):
7665         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
7666         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
7667         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
7668         * m4/cloexec.m4 (gl_CLOEXEC):
7669         * m4/close-stream.m4 (gl_CLOSE_STREAM):
7670         * m4/closeout.m4 (gl_CLOSEOUT):
7671         * m4/dirfd.m4 (gl_FUNC_DIRFD):
7672         * m4/dirname.m4 (gl_DIRNAME):
7673         * m4/exclude.m4 (gl_EXCLUDE):
7674         * m4/exitfail.m4 (gl_EXITFAIL):
7675         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
7676         * m4/file-type.m4 (gl_FILE_TYPE):
7677         * m4/filemode.m4 (gl_FILEMODE):
7678         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
7679         * m4/fpending.m4 (gl_FUNC_FPENDING):
7680         * m4/fprintftime.m4 (gl_FPRINTFTIME):
7681         * m4/fts.m4 (gl_FUNC_FTS):
7682         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
7683         * m4/getdate.m4 (gl_GETDATE):
7684         * m4/gethrxtime.m4 (gl_GETHRXTIME):
7685         * m4/getpagesize.m4 (gl_GETPAGESIZE):
7686         * m4/getpass.m4 (gl_FUNC_GETPASS):
7687         * m4/gettime.m4 (gl_GETTIME):
7688         * m4/getugroups.m4 (gl_GETUGROUPS):
7689         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
7690         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
7691         * m4/hard-locale.m4 (gl_HARD_LOCALE):
7692         * m4/hash.m4 (gl_HASH):
7693         * m4/idcache.m4 (gl_IDCACHE):
7694         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
7695         * m4/lchown.m4 (gl_FUNC_LCHOWN):
7696         * m4/long-options.m4 (gl_LONG_OPTIONS):
7697         * m4/lstat.m4 (gl_FUNC_LSTAT):
7698         * m4/md5.m4 (gl_MD5):
7699         * m4/memcasecmp.m4 (gl_MEMCASECMP):
7700         * m4/memcoll.m4 (gl_MEMCOLL):
7701         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
7702         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
7703         * m4/memxor.m4 (gl_MEMXOR):
7704         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
7705         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
7706         * m4/modechange.m4 (gl_MODECHANGE):
7707         * m4/mountlist.m4 (gl_MOUNTLIST):
7708         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7709         * m4/openat.m4 (gl_FUNC_OPENAT):
7710         * m4/pathmax.m4 (gl_PATHMAX):
7711         * m4/physmem.m4 (gl_PHYSMEM):
7712         * m4/posixtm.m4 (gl_POSIXTM):
7713         * m4/posixver.m4 (gl_POSIXVER):
7714         * m4/quote.m4 (gl_QUOTE):
7715         * m4/quotearg.m4 (gl_QUOTEARG):
7716         * m4/readtokens.m4 (gl_READTOKENS):
7717         * m4/readutmp.m4 (gl_READUTMP):
7718         * m4/regex.m4 (gl_REGEX):
7719         * m4/safe-read.m4 (gl_SAFE_READ):
7720         * m4/safe-write.m4 (gl_SAFE_WRITE):
7721         * m4/same.m4 (gl_SAME):
7722         * m4/save-cwd.m4 (gl_SAVE_CWD):
7723         * m4/savedir.m4 (gl_SAVEDIR):
7724         * m4/settime.m4 (gl_SETTIME):
7725         * m4/sha1.m4 (gl_SHA1):
7726         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
7727         * m4/stat-macros.m4 (gl_STAT_MACROS):
7728         * m4/stat-time.m4 (gl_STAT_TIME):
7729         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
7730         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
7731         * m4/strdup.m4 (gl_FUNC_STRDUP):
7732         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
7733         * m4/strndup.m4 (gl_FUNC_STRNDUP):
7734         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
7735         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
7736         * m4/time_r.m4 (gl_TIME_R):
7737         * m4/timespec.m4 (gl_TIMESPEC):
7738         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
7739         * m4/unlinkdir.m4 (gl_UNLINKDIR):
7740         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
7741         * m4/userspec.m4 (gl_USERSPEC):
7742         * m4/utimecmp.m4 (gl_UTIMECMP):
7743         * m4/utimens.m4 (gl_UTIMENS):
7744         * m4/xalloc.m4 (gl_XALLOC):
7745         * m4/xgetcwd.m4 (gl_XGETCWD):
7746         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
7747         * m4/xreadlink.m4 (gl_XREADLINK):
7748         * m4/xstrtod.m4 (gl_XSTRTOD):
7749         * m4/yesno.m4 (gl_YESNO):
7750         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7751         to get the necessary .h files and whatnot.
7752
7753 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
7754             Bruno Haible  <bruno@clisp.org>
7755
7756         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
7757         /bin/sh understanding of '!' conditional negation.
7758
7759 2006-08-21  Jim Meyering  <jim@meyering.net>
7760
7761         * modules/openat (Depends-on): Really alphabetize.
7762
7763         * modules/acl (Depends-on): Add error and quote.
7764
7765         * check-module (find_included_lib_files): Add at-func.c to the
7766         ok-to-include-more-than-once white list.
7767
7768         * modules/openat (Depends-on): Add lstat.  Alphabetize.
7769
7770 2006-08-21  Bruno Haible  <bruno@clisp.org>
7771
7772         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7773         Emit a pkgdata_DATA variable only if some snippets add contents to it.
7774         Reported by Martin Lambers <marlam@marlam.de>.
7775
7776 2006-08-21  Bruno Haible  <bruno@clisp.org>
7777
7778         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
7779         specify an installation location, don't emit a noinst_LIBRARIES or
7780         noinst_LTLIBRARIES assignment.
7781
7782 2006-08-21  Bruno Haible  <bruno@clisp.org>
7783
7784         BeOS portability.
7785         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
7786         BeOS has mbrtowc() but no <wctype.h>.
7787
7788 2006-08-21  Bruno Haible  <bruno@clisp.org>
7789
7790         BeOS portability.
7791         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
7792         exist.
7793
7794 2006-08-21  Bruno Haible  <bruno@clisp.org>
7795
7796         BeOS portability.
7797         * lib/mbchar.h: Include <wctype.h> only if it exists.
7798
7799 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7800
7801         Remove files that are no longer needed by their respective modules.
7802         * m4/obstack.m4: Remove.
7803         * m4/strerror_r.m4: Remove.
7804         * m4/uint32_t.m4: Remove.
7805         * m4/uintptr_t.m4: Remove.
7806         * m4/ullong_max.m4: Remove.
7807         * m4/xstrtoimax.m4: Remove.
7808         * m4/xstrtoumax.m4: Remove.
7809
7810         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
7811         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
7812         dependencies now capture this.
7813
7814         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
7815         Do not use AC_LIBSOURCES, since gnulib modules now do this.
7816         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
7817         * m4/human.m4 (gl_HUMAN): Likewise.
7818         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
7819         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
7820
7821         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
7822
7823         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
7824         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
7825         stdint.
7826         * m4/human.m4 (gl_HUMAN): Likewise.
7827         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
7828         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
7829         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7830         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7831         * m4/xstrtol (gl_XSTRTOL): Likewise.
7832
7833         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
7834         AC_TYPE_LONG_LONG_INT.
7835         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7836         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
7837         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
7838         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7839
7840         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
7841         on stdbool.
7842
7843         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
7844         (gl_PREREQ_XSTRTOUL): Remove.
7845
7846         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
7847
7848         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
7849         mode.
7850
7851 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7852
7853         Add and change modules to make it easier for coreutils to use
7854         gnulib-tool.
7855         * modules/backupfile (Files): Remove m4/d-ino.m4.
7856         (Depends-on): Add d-ino.
7857         * modules/cycle-check (Depends-on): Add stdint.
7858         (lib_SOURCES): Add cycle-check.h.
7859         * modules/d-ino: New module.
7860         * modules/d-type: New module.
7861         * modules/error (Files): Remove m4/strerror_r.m4.
7862         * modules/filemode (Files): Add m4/st_dm_mode.m4.
7863         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7864         m4/inttypes_h.m4, m4/uintmax_t.m4.
7865         (Depends-on): Add stdint.
7866         (lib_SOURCES): Add fsusage.h.
7867         * modules/getcwd (Files): Remove d-ino.m4.
7868         (Depends-on): Add d-ino.
7869         * modules/getndelim2 (Depends-on): Add stdint.
7870         * modules/glob (Files): Remove m4/d-type.m4.
7871         (Depends-on): Add d-type.
7872         * modules/host-os: New module.
7873         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
7874         m4/inttypes_h.m4, m4/uintmax_t.m4.
7875         * Depends-on: Add stdint.
7876         (lib_SOURCES): Add human.h.
7877         * modules/inttostr (Files): Remove m4/intmax_t.m4,
7878         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
7879         m4/uintmax_t.m4, m4/ulonglong.m4.
7880         (Depends-on): Add stdint.
7881         (EXTRA_DIST): Add inttostr.h.
7882         * modules/lchmod: New module.
7883         * modules/link-follow: New module.
7884         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
7885         (Depends-on): Add lchmod.
7886         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
7887         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
7888         (Depends-on): Add stdint.
7889         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
7890         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7891         (Depends-on): Add stdint.
7892         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
7893         * modules/perl: New module.
7894         * modules/regex (Depends-on): Add stdint.
7895         * modules/rmdir-errno: New module.
7896         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7897         m4/intmax_t.m4.
7898         (Depends-on): Add stdint.
7899         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
7900         m4/uintmax_t.m4.
7901         (Depends-on): Add stdint.
7902         * modules/unlink-busy: New module.
7903         * modules/utimecmp (Depends-on): Add stdint.
7904         * modules/uptime: New module.
7905         * modules/winsz-ioctl: New module.
7906         * modules/winsz-termios: New module.
7907         * modules/xnanosleep (Depends-on): Add nanosleep.
7908         * modules/ullong_max: Remove.
7909         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
7910         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
7911         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
7912         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
7913         (Depends-on): Add inttypes.
7914         (lib_SOURCES): Add xstrtol.h.
7915         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
7916         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
7917         * MODULES.html.sh: Move 'assert' into the assert section.
7918         Move 'dummy' into the linking section.
7919         Remove ullong_max.
7920         Add section for compatibility checks for POSIX:2001 functions,
7921         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
7922         winsz-ioctl, and winsz-termios into it.
7923         Add lchmod.
7924         Add top-level Misc section and put host-os, perl, and uptime
7925         into it.
7926
7927 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7928
7929         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
7930         now assume the stdint module.  Do not include inttypes.h.
7931         * lib/fsusage.h: Likewise.
7932         * lib/getndelim2.c: Likewise.
7933         * lib/human.h: Likewise.
7934         * lib/inttostr.h: Likewise.
7935         * lib/obstack.c: Likewise.
7936         * lib/regex_internal.h: Likewise.
7937         * lib/tempname.c: Likewise.
7938         * lib/utimecmp.c: Likewise.
7939         * lib/xstrtol.h: Likewise.
7940
7941         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
7942
7943         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
7944         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
7945         * lib/xtime.h: Likewise.
7946
7947 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7948
7949         * modules/openat (Files): Add lib/fchmodat.c.
7950         Fixes problem reported by Jay Youngman.
7951
7952 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
7953
7954         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
7955         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
7956
7957 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
7958             Bruno Haible  <bruno@clisp.org>
7959
7960         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
7961         and is a script that invokes bison. Tighten the code. Add comments.
7962
7963 2006-08-18  Jim Meyering  <jim@meyering.net>
7964
7965         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
7966         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
7967         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
7968         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
7969
7970 2006-08-18  Bruno Haible  <bruno@clisp.org>
7971
7972         * modules/bison-i18n: New file.
7973         * MODULES.html.sh (Internationalization functions): Add it.
7974
7975 2006-08-18  Bruno Haible  <bruno@clisp.org>
7976
7977         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
7978         sys/statvfs.h. When getmntinfo was found, check its declaration and
7979         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
7980
7981 2006-08-18  Bruno Haible  <bruno@clisp.org>
7982
7983         * m4/bison-i18n.m4: New file, from bison.
7984
7985 2006-08-18  Bruno Haible  <bruno@clisp.org>
7986
7987         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
7988         (ME_DUMMY): Treat "kernfs" as a dummy.
7989         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
7990
7991 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
7992
7993         Update from coreutils.
7994
7995         2006-08-15  Jim Meyering  <jim@meyering.net>
7996
7997         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
7998
7999         2006-01-17  Jim Meyering  <jim@meyering.net>
8000
8001         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
8002
8003         2006-01-11  Jim Meyering  <jim@meyering.net>
8004
8005         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
8006         Check for the lchmod function.
8007
8008 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8009
8010         Update from coreutils.
8011
8012         * lib/__fpending.h: Add copyright notice.
8013         * lib/fprintftime.h: Likewise.
8014         * lib/savedir.c: Use (C) in copyright notice.
8015         * lib/savedir.h: Likewise.
8016
8017         2006-08-15  Jim Meyering  <jim@meyering.net>
8018
8019         * lib/at-func.c: New file, with the logic of all emulated at-functions.
8020         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
8021         in support of the EXPECTED_ERRNO macro.
8022         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
8023         definitions.  Instead, define the appropriate symbols and include
8024         "at-func.c".
8025         * lib/mkdirat.c (mkdirat): Likewise.
8026         * lib/fchmodat.c (fchmodat): Likewise.
8027         (ENOSYS): Remove definition.
8028         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
8029         it.  Don't include "unistd--.h" -- it wasn't ever used.
8030
8031         2006-01-17  Jim Meyering  <jim@meyering.net>
8032
8033         Rewrite fts.c not to change the current working directory,
8034         by using openat, fstatat, fdopendir, etc..
8035
8036         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
8037         (HAVE_OPENAT_SUPPORT): Define.
8038         [_LIBC] (fchdir): Don't undef or define; no longer used.
8039         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
8040         Now, this `function' always succeeds, and consumes its file descriptor
8041         parameter -- so callers must not close such FDs.  Update callers.
8042         (diropen_fd, opendirat, cwd_advance_fd): New functions.
8043         (diropen): Add parameter, SP.  Adjust all callers.
8044         Implement using diropen_fd, rather than open.
8045         (fts_open): Initialize new member, fts_cwd_fd.
8046         Remove fts_rft-setting code.
8047         (fts_close): Close fts_cwd_fd, if necessary.
8048         (__opendir2): Define in terms of opendir or opendirat,
8049         depending on whether the FST_NOCHDIR flag is set.
8050         (fts_build): Since fts_safe_changedir consumes its FD, and since
8051         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
8052         and close the dup'd file descriptor upon failure.
8053         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
8054         (fts_safe_changedir): Tweak semantics to reflect that this function
8055         now calls cwd_advance_fd and hence consumes its FD argument.
8056         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
8057         [struct FTS] (fts_rft): Remove now-unused member.
8058         [struct FTS] (fts_cycle.state): Improve comment.
8059
8060         * lib/openat.c (openat_needs_fchdir): New function.
8061         * lib/openat.h (openat_needs_fchdir): Declare it.
8062
8063 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
8064
8065         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
8066         Problem and fix reported by Pádraig Brady in
8067         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
8068
8069 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8070
8071         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
8072
8073 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8074
8075         * lib/memcoll.c (memcoll): Optimize for the common case where the
8076         arguments are bytewise equal.
8077
8078 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8079
8080         * doc/regexprops-generic.texi: Add a copyright notice.
8081
8082 2006-08-15  Bruno Haible  <bruno@clisp.org>
8083
8084         * modules/tmpdir (License): Change to LGPL.
8085
8086 2006-08-15  Bruno Haible  <bruno@clisp.org>
8087
8088         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
8089         module.
8090
8091 2006-08-14  Simon Josefsson  <jas@extundo.com>
8092
8093         * config/srclist.txt: Add gnupload.
8094
8095 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8096
8097         Change copyright notice from LGPL 2 to GPL 2, since that's the
8098         standard form used in the gnulib repository.
8099         * tests/test-lock.c: Likewise.
8100         * tests/test-stdint.c: Likewise.
8101         * tests/test-tls.c: Likewise.
8102
8103         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
8104         prelude-manager.  User shorter URLs for GNU projects, without '?'.
8105         Add copyright notice.
8106
8107         * check-module: Add copyright notice.  Output a copyright
8108         notice if "--version" is specified.
8109         * modules/COPYING: New file.
8110         * tests/test-getaddrinfo.c: Add copyright notice.
8111         * tests/test-verify.c: Likewise.
8112
8113 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8114
8115         Change copyright notice from LGPL 2 to GPL 2, since that's the
8116         standard form used in the gnulib repository.
8117         * lib/lock.c: LGPL -> GPL.
8118         * lib/lock.h: Likewise.
8119         * lib/strnlen1.c: Likewise.
8120         * lib/strnlen1.h: Likewise.
8121         * lib/tls.c: Likewise.
8122         * lib/tls.h: Likewise.
8123         * lib/tmpdir.c: Likewise.
8124
8125         * lib/TODO: Remove; this belongs only in coreutils.
8126
8127 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8128
8129         Add copyright notices to long-enough files that lack them, since
8130         otherwise the files aren't clearly free.  Use the same notice that
8131         getdate.texi already uses.
8132         * doc/alloca-opt.texi: Add copyright notice.
8133         * doc/alloca.texi: Likewise.
8134         * doc/ctime.texi: Likewise.
8135         * doc/functions.texi: Likewise.
8136         * doc/gcd.texi: Likewise.
8137         * doc/gnulib-tool.texi: Likewise.
8138         * doc/inet_ntoa.texi: Likewise.
8139         * doc/visibility.texi: Likewise.
8140
8141         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
8142         * doc/quote.texi: Add copyright notice.
8143
8144         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
8145         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
8146         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
8147         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
8148         is now obsolete, and give a pointer to the Sun list.
8149         Add copyright notice.
8150
8151 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8152
8153         * config/srclistvars.sh: Add copyright notice.
8154
8155 2006-08-14  Eric Blake  <ebb9@byu.net>
8156
8157         Import the following change from libc:
8158
8159         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
8160
8161         Upstream bug 2997.
8162         * lib/misc/error.c: Add space between program name and message if file
8163         name is missing.
8164
8165 2006-08-12  Karl Berry  <karl@gnu.org>
8166
8167         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
8168         remove, these originate in gnulib now.
8169
8170 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8171
8172         * doc/Makefile (standards.info standards.html standards.dvi):
8173         Also depend on make-stds.texi.
8174
8175 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
8176
8177         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
8178         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
8179
8180         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
8181         in wchar_t.  Problem reported by Eric Blake.
8182
8183         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
8184         LEN is smaller than SIZE.  Suggested by Bruno Haible.
8185         Also, help the compiler to keep LEN in a register.
8186
8187 2006-08-11  Eric Blake  <ebb9@byu.net>
8188
8189         * users.txt: Sort.  Add tar.
8190
8191 2006-08-11  Bruno Haible  <bruno@clisp.org>
8192
8193         * users.txt: New file.
8194
8195 2006-08-11  Bruno Haible  <bruno@clisp.org>
8196
8197         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
8198         before <wchar.h>. Needed for OSF/1 and BSD/OS.
8199
8200 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8201
8202         * modules/snprintf (Depends-on): Remove minmax.
8203         (Maintainer): Add self and Bruno.
8204
8205 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8206
8207         * lib/.cppi-disable: Add snprintf.h, socket_.h.
8208         * lib/snprintf.c: Include <errno.h> and <limits.h>.
8209         (EOVERFLOW): Define if the system does not.
8210         Do not include "minmax.h"; it wasn't used.
8211         (snprintf): Don't assume size_t promotes to an unsigned type.
8212         Fix bug when generated string was too long for the buffer: the
8213         buffer's contents are supposed to be the initial prefix of the
8214         output.  Don't assume vasnprintf returns EOVERFLOW if the size
8215         exceeds INT_MAX; do the check ourselves.
8216
8217         Import the following changes from libc:
8218
8219         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
8220
8221         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
8222         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
8223         set wc to the byte which couldn't be converted.
8224         (re_string_reconstruct): Don't clear valid_raw_len before calling
8225         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
8226         tip_context using re_string_context_at.
8227
8228         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
8229
8230         * lib/posix/regex.h: g++ still cannot handled [restrict].
8231
8232         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
8233
8234         * lib/posix/regex.h: Remove special handling for VMS.
8235
8236 2006-08-10  Jim Meyering  <jim@meyering.net>
8237
8238         * modules/same-inode: New module.
8239         * modules/dev-ino: New module.
8240         * modules/cycle-check: Depend on these modules, rather than simply
8241         including their .h files.
8242         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
8243         required via m4/cycle-check.m4.
8244         * modules/same: Depend on new same-inode module, rather than
8245         including same-inode.h.
8246         * modules/chdir-safer: New file.
8247
8248         * modules/chown (Depends-on): Add stat-macros.
8249
8250 2006-08-10  Jim Meyering  <jim@meyering.net>
8251
8252         * m4/cycle-check.m4: New file.
8253         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
8254         * m4/dev-ino.m4, m4/same-inode.m4: New files.
8255
8256 2006-08-10  Eric Blake  <ebb9@byu.net>
8257
8258         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
8259         in from original proposal.
8260
8261 2006-08-10  Eric Blake  <ebb9@byu.net>
8262         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8263
8264         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
8265         namespace.
8266
8267 2006-08-10  Bruno Haible  <bruno@clisp.org>
8268
8269         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
8270         as well.
8271
8272 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8273
8274         Sync from coreutils.
8275
8276         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
8277
8278         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
8279         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
8280
8281 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8282
8283         * modules/restrict: Remove; no longer needed now that we assume
8284         Autoconf 2.59 or later.
8285         * MODULES.html.sh: Remove 'restrict'.
8286         * modules/argp (Depends-on): Remove 'restrict'.
8287         * modules/base64 (Depends-on): Likewise.
8288         * modules/gc (Depends-on): Likewise.
8289         * modules/getaddrinfo (Depends-on): Likewise.
8290         * modules/glob (Depends-on): Likewise.
8291         * modules/inet_ntop (Depends-on): Likewise.
8292         * modules/inet_pton (Depends-on): Likewise.
8293         * modules/memxor (Depends-on): Likewise.
8294         * modules/regex (Depends-on): Likewise.
8295         * modules/strtok_r (Depends-on): Likewise.
8296         * modules/time_r (Depends-on): Likewise.
8297
8298 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8299
8300         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
8301         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
8302         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8303         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
8304         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
8305         * m4/memxor.m4 (gl_MEMXOR): Likewise.
8306         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
8307         gl_C_RESTRICT replaced by AC_C_RESTRICT.
8308
8309         Merge from coreutils.
8310         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
8311         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
8312         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
8313         * m4/time_r.m4 (gl_TIME_R): Likewise.
8314
8315 2006-08-09  Karl Berry  <karl@gnu.org>
8316
8317         * config/srclist.txt: no more gettext-tools, per Bruno.
8318
8319 2006-08-08  Eric Blake  <ebb9@byu.net>
8320
8321         * modules/verror: New module.
8322         * MODULES.html.sh: Document it.
8323
8324 2006-08-08  Eric Blake  <ebb9@byu.net>
8325
8326         * lib/verror.h, lib/verror.c: New files.
8327
8328 2006-08-08  Eric Blake  <ebb9@byu.net>
8329
8330         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
8331         verror_at_line output complies with GNU Coding Standards even when
8332         file is NULL.
8333
8334 2006-08-07  Bruno Haible  <bruno@clisp.org>
8335
8336         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
8337         versions of AIX.
8338         Reported by Ralf Wildenhues.
8339
8340 2006-08-07  Bruno Haible  <bruno@clisp.org>
8341
8342         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
8343         in an AC_DEFUN. Needed so that the autoconf snippets can use
8344         AC_REQUIRE.
8345
8346 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8347
8348         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8349         Initialize pkgdata_DATA.
8350         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
8351         overriding it.
8352
8353 2006-08-06  Eric Blake  <ebb9@byu.net>
8354
8355         * lib/error.h: Fold in some upstream changes from glibc.
8356         * lib/error.c: Likewise.
8357
8358 2006-08-04  Bruno Haible  <bruno@clisp.org>
8359
8360         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8361         Make the mostlyclean-local rule depend on mostlyclean-generic.
8362         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
8363
8364 2006-07-31  Bruno Haible  <bruno@clisp.org>
8365
8366         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
8367         <stdlib.h>, <string.h>.
8368
8369 2006-07-30  Bruno Haible  <bruno@clisp.org>
8370
8371         * modules/readlink (License): Change to LGPL.
8372
8373 2006-07-30  Bruno Haible  <bruno@clisp.org>
8374
8375         * modules/javaversion (Makefile.am): Distribute javaversion.java and
8376         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
8377         set PKGDATADIR to point to it.
8378
8379 2006-07-30  Bruno Haible  <bruno@clisp.org>
8380
8381         * modules/csharpexec (configure.ac): Comment out macro invocation.
8382         * modules/javaexec (configure.ac): Likewise.
8383         * modules/javacomp-script (configure.ac): Likewise.
8384
8385         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
8386
8387 2006-07-30  Bruno Haible  <bruno@clisp.org>
8388
8389         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
8390         linked-list.
8391
8392 2006-07-30  Bruno Haible  <bruno@clisp.org>
8393
8394         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
8395
8396 2006-07-30  Bruno Haible  <bruno@clisp.org>
8397
8398         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8399         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
8400         get removed.
8401
8402 2006-07-29  Bruno Haible  <bruno@clisp.org>
8403
8404         Make it possible for gnulib-tool to work with locally modified or
8405         augmented gnulib repositories.
8406         * gnulib-tool (func_usage): Document --local-dir option.
8407         (local_gnulib_dir): New variable.
8408         Handle --local-dir option.
8409         (func_lookup_file): New function.
8410         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
8411         (func_get_description, func_get_filelist, func_get_description,
8412         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
8413         func_get_automake_snippet, func_get_include_directive,
8414         func_get_license, func_get_maintainer): Use func_lookup_file.
8415         (func_import, func_create_testdir): Use func_lookup_file.
8416
8417 2006-07-29  Bruno Haible  <bruno@clisp.org>
8418
8419         * modules/setenv (Depends-on): Add unistd.
8420
8421 2006-07-29  Bruno Haible  <bruno@clisp.org>
8422
8423         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
8424
8425 2006-07-29  Bruno Haible  <bruno@clisp.org>
8426
8427         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
8428
8429 2006-07-29  Bruno Haible  <bruno@clisp.org>
8430
8431         * gnulib-tool (import, update): If there is no Makefile.am, look at
8432         aclocal.m4, instead of bailing out.
8433
8434 2006-07-29  Bruno Haible  <bruno@clisp.org>
8435
8436         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
8437         Categorize the options by when they are useful.
8438
8439 2006-07-29  Bruno Haible  <bruno@clisp.org>
8440
8441         * gnulib-tool (func_usage): Document option --no-libtool.
8442         Handle option --no-libtool.
8443         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
8444         for changed semantics of $libtool variable.
8445         (func_import): Likewise. If libtool is not used, show this through
8446         an option --no-libtool.
8447         (func_create_testdir): Update.
8448
8449 2006-07-29  Bruno Haible  <bruno@clisp.org>
8450
8451         * gnulib-tool (func_import): Extend error message about missing
8452         --doc-base.
8453
8454 2006-07-29  Bruno Haible  <bruno@clisp.org>
8455
8456         * gnulib-tool (func_import): Don't create the $docbase directory if
8457         there is no file to store there.
8458
8459 2006-07-29  Bruno Haible  <bruno@clisp.org>
8460
8461         * gnulib-tool (autoconf_minversion): If a --dir option is given and
8462         relevant, look for configure.ac there, not in the current directory.
8463         Also use a simple search for AC_PREREQ, not "autoconf --trace".
8464
8465 2006-07-29  Bruno Haible  <bruno@clisp.org>
8466
8467         * gnulib-tool (SORT): New variable.
8468         (func_usage): Undocument --assume-autoconf option.
8469         Remove --assume-autoconf option handling.
8470         (autoconf_minversion): Determine from the contents of configure.ac.
8471         (func_import): Remove autoconf_minversion handling.
8472         Suggested by Eric Blake.
8473
8474 2006-07-29  Bruno Haible  <bruno@clisp.org>
8475
8476         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
8477
8478 2006-07-29  Bruno Haible  <bruno@clisp.org>
8479
8480         * config/srclist.txt (*setenv.[ch]): Remove rules.
8481
8482 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8483
8484         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
8485
8486 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8487
8488         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
8489         arpa/inet.h.
8490
8491 2006-07-28  Simon Josefsson  <jas@extundo.com>
8492
8493         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
8494         * modules/inet_pton (Depends-on): Likewise.
8495
8496 2006-07-28  Simon Josefsson  <jas@extundo.com>
8497
8498         * m4/netinet_in_h.m4: New file.
8499
8500 2006-07-28  Simon Josefsson  <jas@extundo.com>
8501
8502         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
8503         #include's.
8504
8505 2006-07-28  Simon Josefsson  <jas@extundo.com>
8506
8507         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
8508         #include's.
8509
8510 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
8511
8512         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
8513         setgid on directories only if they set these bits.
8514         * lib/modechange.h: Remove obsolete comment about masks.
8515
8516 2006-07-28  Eric Blake  <ebb9@byu.net>
8517
8518         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
8519         macro expansion.
8520
8521 2006-07-28  Bruno Haible  <bruno@clisp.org>
8522
8523         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
8524
8525 2006-07-28  Bruno Haible  <bruno@clisp.org>
8526
8527         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
8528
8529 2006-07-28  Bruno Haible  <bruno@clisp.org>
8530
8531         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
8532         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
8533         Define fallbacks.
8534         Avoids link error on FreeBSD 4.x.
8535         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
8536
8537         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
8538         encoding.
8539         * lib/mbswidth.c (iswcntrl): Likewise.
8540
8541 2006-07-27  Bruno Haible  <bruno@clisp.org>
8542
8543         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
8544         test.
8545
8546 2006-07-27  Bruno Haible  <bruno@clisp.org>
8547
8548         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
8549         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
8550         defined.
8551
8552 2006-07-26  Eric Blake  <ebb9@byu.net>
8553
8554         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
8555
8556 2006-07-26  Eric Blake  <ebb9@byu.net>
8557
8558         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
8559         like mingw that lack mkstemp.
8560         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
8561         avoid compilation warning on mingw.
8562
8563 2006-07-26  Bruno Haible  <bruno@clisp.org>
8564
8565         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
8566         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
8567         INT_FAST*_MIN, INTPTR_MIN.
8568
8569 2006-07-25  Bruno Haible  <bruno@clisp.org>
8570
8571         * modules/version-etc (Depends-on): Add stdarg.
8572
8573 2006-07-25  Bruno Haible  <bruno@clisp.org>
8574
8575         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
8576         complex commands.
8577
8578 2006-07-25  Bruno Haible  <bruno@clisp.org>
8579
8580         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
8581         defined in <stdarg.h> or config.h.
8582
8583 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
8586         (gl_STDIO_SAFER): Remove.
8587
8588 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8589
8590         * MODULES.html.sh (File stream based Input/Output):
8591         Add fopen-safer, tmpfile-safer; remove stdio-safer.
8592         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
8593         * modules/fopen-safer, modules/tmpfile-safer: New files.
8594         * modules/stdio-safer: Remove.
8595
8596 2006-07-24  Bruno Haible  <bruno@clisp.org>
8597
8598         * modules/tmpdir: New file.
8599         * MODULES.html.sh (File system functions): Add it.
8600
8601 2006-07-24  Bruno Haible  <bruno@clisp.org>
8602
8603         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
8604         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
8605
8606 2006-07-24  Bruno Haible  <bruno@clisp.org>
8607
8608         * modules/clean-temp: New file.
8609
8610 2006-07-24  Bruno Haible  <bruno@clisp.org>
8611
8612         * m4/tmpdir.m4: New file, from GNU gettext.
8613
8614 2006-07-24  Bruno Haible  <bruno@clisp.org>
8615
8616         * lib/tmpdir.h: New file, from GNU gettext.
8617         * lib/tmpdir.c: New file, from GNU gettext.
8618
8619 2006-07-24  Bruno Haible  <bruno@clisp.org>
8620
8621         * lib/clean-temp.h: New file, from GNU gettext.
8622         * lib/clean-temp.c: New file, from GNU gettext.
8623
8624 2006-07-23  Eric Blake  <ebb9@byu.net>
8625
8626         * modules/stdio-safer (Files): Add tmpfile-safer.c.
8627         (Depends-on): Add binary-io.
8628
8629 2006-07-23  Eric Blake  <ebb9@byu.net>
8630
8631         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
8632
8633 2006-07-23  Eric Blake  <ebb9@byu.net>
8634
8635         * lib/tmpfile-safer.c: New file.
8636         * lib/stdio-safer.h (fopen_safer): Add prototype.
8637         * lib/stdio--.h (tmpfile): Make safer.
8638
8639 2006-07-23  Bruno Haible  <bruno@clisp.org>
8640
8641         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
8642         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
8643         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
8644         gl_linked_remove_at): Use it.
8645
8646 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8647         and Simon Josefsson <jas@extundo.com>
8648
8649         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
8650
8651         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
8652
8653 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8654
8655         * modules/close-stream: New file.
8656         * modules/closeout (Description): Make it clear that it exits
8657         with a diagnostic on error.
8658         (Depends-on): Add close-stream.  Remove fpending, stdbool.
8659         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
8660
8661 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8662
8663         * m4/close-stream.m4: New file.
8664
8665 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8666
8667         * lib/close-stream.c, lib/close-stream.h: New files.
8668
8669 2006-07-22  Bruno Haible  <bruno@clisp.org>
8670
8671         Merge from GNU gettext 0.15.
8672
8673         2006-05-01  Bruno Haible  <bruno@clisp.org>
8674
8675                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
8676
8677         2006-07-22  Bruno Haible  <bruno@clisp.org>
8678
8679                 * modules/javaversion: New file.
8680                 * MODULES.html.sh (Java): Add javaversion.
8681
8682         2006-03-12  Bruno Haible  <bruno@clisp.org>
8683
8684                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
8685
8686         2005-12-04  Bruno Haible  <bruno@clisp.org>
8687
8688                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
8689                 (untested).
8690
8691         2006-06-21  Bruno Haible  <bruno@clisp.org>
8692
8693                 Avoid warnings from recent versions of mcs.
8694                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
8695                 -o, -L, -r any more. Use options documented since mcs-1.0
8696                 instead. Similarly for -g.
8697
8698         2005-12-04  Bruno Haible  <bruno@clisp.org>
8699
8700                 * build-aux/csharpcomp.sh.in: Suffix for resources is
8701                 .resources, not .resource.
8702
8703         2005-07-09  Bruno Haible  <bruno@clisp.org>
8704
8705                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
8706                 add a .dll suffix.
8707                 Reported by Mark Junker <mjscod@gmx.de>.
8708
8709         2006-07-22  Bruno Haible  <bruno@clisp.org>
8710
8711                 * modules/gettext: Upgrade to gettext-0.15.
8712                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
8713                 m4/visibility.m4.
8714                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
8715
8716 2006-07-22  Bruno Haible  <bruno@clisp.org>
8717
8718         Merge from GNU gettext 0.15.
8719
8720         2006-03-25  Bruno Haible  <bruno@clisp.org>
8721
8722                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
8723
8724         2006-07-21  Bruno Haible  <bruno@clisp.org>
8725
8726                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
8727                 "1.1".
8728
8729         2006-05-09  Bruno Haible  <bruno@clisp.org>
8730
8731                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
8732                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
8733                 for the conftestver execution.
8734
8735         2006-05-01  Bruno Haible  <bruno@clisp.org>
8736
8737                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
8738                 optional target-version argument. Verify that the compiler
8739                 groks source of the specified source-version, or add -source
8740                 option as necessary. Verify that the compiler produces
8741                 bytecode in the specified target-version, or add -target and
8742                 -source options as necessary. Make the result of the test
8743                 available as variable CONF_JAVAC. Also log error output in
8744                 config.log.
8745
8746         2006-03-11  Bruno Haible  <bruno@clisp.org>
8747
8748                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
8749
8750         2006-05-09  Bruno Haible  <bruno@clisp.org>
8751
8752                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
8753                 CLASSPATH_SEPARATOR to a semicolon.
8754
8755         2006-03-12  Bruno Haible  <bruno@clisp.org>
8756
8757                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
8758                 available as variable CONF_JAVA, for subsequent autoconf
8759                 tests. Also log error output in config.log.
8760
8761         2006-07-19  Bruno Haible  <bruno@clisp.org>
8762
8763                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
8764                 that getline works on glibc2 systems. Needed to avoid trouble
8765                 in relocatable.c.
8766                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
8767
8768         2005-12-04  Bruno Haible  <bruno@clisp.org>
8769
8770                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
8771                 launcher (untested).
8772
8773         2005-12-04  Bruno Haible  <bruno@clisp.org>
8774
8775                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
8776
8777         2006-07-22  Bruno Haible  <bruno@clisp.org>
8778
8779                 * gettext.m4: Update from GNU gettext-0.15.
8780                 * nls.m4: Likewise.
8781                 * po.m4: Likewise.
8782                 * inttypes-pri.m4: Likewise.
8783                 * inttypes-h.m4: Renamed from inttypes.m4.
8784                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
8785
8786 2006-07-22  Bruno Haible  <bruno@clisp.org>
8787
8788         Merge from GNU gettext 0.15.
8789
8790         2005-07-05  Bruno Haible  <bruno@clisp.org>
8791
8792                 * printf-args.c (printf_fetchargs): Work around broken
8793                 definition of wint_t on mingw.
8794
8795         2005-02-12  Bruno Haible  <bruno@clisp.org>
8796
8797                 * xallocsa.h: Add extern "C" for C++.
8798
8799         2006-05-17  Bruno Haible  <bruno@clisp.org>
8800
8801                 Cygwin portability.
8802                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
8803
8804         2006-04-30  Bruno Haible  <bruno@clisp.org>
8805
8806                 * progreloc.c: Include <mach-o/dyld.h> if available.
8807                 (find_executable): Use _NSGetExecutablePath when possible.
8808
8809         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8810
8811                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
8812                 function.
8813
8814         2005-12-29  Bruno Haible  <bruno@clisp.org>
8815
8816                 * progreloc.c (set_program_name_and_installdir): Fix
8817                 compilation error.
8818
8819         2005-12-04  Bruno Haible  <bruno@clisp.org>
8820
8821                 Cygwin portability.
8822                 * progreloc.c: Include <windows.h> also on Cygwin.
8823                 (find_executable): Add support for Cygwin.
8824                 (set_program_name_and_installdir): Handle also platforms with
8825                 nonempty EXEEXT.
8826
8827         2006-07-11  Bruno Haible  <bruno@clisp.org>
8828
8829                 * javacomp.c: Fix a comment.
8830                 Reported by Jim Meyering.
8831
8832         2006-04-30  Bruno Haible  <bruno@clisp.org>
8833
8834                 * javacomp.h (compile_java_class): Add source_version,
8835                 target_version arguments.
8836                 * javacomp.c: Rewritten to choose only a compiler that
8837                 respects the specified source_version and target_version.
8838
8839         2006-06-27  Bruno Haible  <bruno@clisp.org>
8840
8841                 Assume correct S_ISDIR macro.
8842                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
8843
8844         2006-07-22  Bruno Haible  <bruno@clisp.org>
8845
8846                 * javaversion.h: New file, from GNU gettext.
8847                 * javaversion.c: New file, from GNU gettext.
8848                 * javaversion.java: New file, from GNU gettext.
8849                 * javaversion.class: New file, from GNU gettext.
8850
8851         2006-05-17  Bruno Haible  <bruno@clisp.org>
8852
8853                 Cygwin portability.
8854                 * javaexec.c (execute_java_class): Test for jview program
8855                 also on Cygwin.
8856
8857         2006-04-09  Bruno Haible  <bruno@clisp.org>
8858
8859                 * fatal-signal.c: Don't include string.h.
8860                 (at_fatal_signal): Use a copying loop instead of memcpy.
8861
8862         2005-12-04  Bruno Haible  <bruno@clisp.org>
8863
8864                 * csharpexec.c: Add support for 'clix' launcher (untested).
8865                 (execute_csharp_using_sscli): New function.
8866                 (execute_csharp_program): Call it.
8867
8868         2006-06-21  Bruno Haible  <bruno@clisp.org>
8869
8870                 Avoid warnings from recent versions of mcs.
8871                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
8872                 -o, -L, -r any more. Use options documented since mcs-1.0
8873                 instead. Similarly for -g.
8874
8875         2005-07-09  Bruno Haible  <bruno@clisp.org>
8876
8877                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
8878                 add a .dll suffix.
8879                 Reported by Mark Junker <mjscod@gmx.de>.
8880
8881         2006-06-17  Bruno Haible  <bruno@clisp.org>
8882
8883                 * config.charset: Update for NetBSD 3.0.
8884
8885         2006-05-17  Bruno Haible  <bruno@clisp.org>
8886
8887                 Cygwin portability.
8888                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
8889
8890         2006-05-16  Bruno Haible  <bruno@clisp.org>
8891
8892                 * localcharset.c [CYGWIN]: Include <windows.h>.
8893                 (get_charset_aliases): For Cygwin, return the same CPxxx
8894                 aliases list as under WIN32.
8895                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
8896                 the environment variables. Fall back to GetACP().
8897
8898         2006-04-05  Bruno Haible  <bruno@clisp.org>
8899
8900                 * config.charset: Update Juan Manuel Guerrero's address.
8901
8902         2005-02-12  Bruno Haible  <bruno@clisp.org>
8903
8904                 * allocsa.h: Add extern "C" for C++.
8905
8906         2005-02-10  Bruno Haible  <bruno@clisp.org>
8907
8908                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
8909                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
8910
8911         2006-07-22  Bruno Haible  <bruno@clisp.org>
8912
8913                 * gettext.h: Update to GNU gettext-0.15.
8914
8915 2006-07-22  Bruno Haible  <bruno@clisp.org>
8916
8917         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
8918         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
8919         lib-prefix.m4, longdouble.m4, ssize_t.m4.
8920
8921 2006-07-21  Eric Blake  <ebb9@byu.net>
8922
8923         * modules/stdlib-safer: New file.
8924         * MODULES.html.sh (File stream based Input/Output): Add
8925         stdlib-safer.
8926
8927 2006-07-21  Eric Blake  <ebb9@byu.net>
8928
8929         * lib/stdlib-safer.h: New file from coreutils, required by
8930         stdlib--.h.
8931
8932 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
8933
8934         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
8935
8936 2006-07-20  Bruno Haible  <bruno@clisp.org>
8937
8938         * gnulib-tool: Recognize new option --assume-autoconf.
8939         (autoconf_minversion): New variable.
8940         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
8941
8942 2006-07-20  Bruno Haible  <bruno@clisp.org>
8943
8944         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
8945
8946 2006-07-19  Derek R. Price  <derek@ximbiot.com>
8947
8948         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
8949         Reindent and repaginate.
8950
8951 2006-07-19  Derek Price  <derek@ximbiot.com>
8952
8953         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
8954         Correct grammar.
8955
8956 2006-07-17  Bruno Haible  <bruno@clisp.org>
8957
8958         * modules/list: New file.
8959         * modules/array-list: New file.
8960         * modules/carray-list, modules/carray-list-tests: New files.
8961         * modules/linked-list, modules/linked-list-tests: New files.
8962         * modules/avltree-list, modules/avltree-list-tests: New files.
8963         * modules/rbtree-list, modules/rbtree-list-tests: New files.
8964         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
8965         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
8966         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
8967         * modules/oset: New file.
8968         * modules/array-oset: New file.
8969         * modules/avltree-oset, modules/avltree-oset-tests: New files.
8970         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
8971         * tests/test-carray_list.c: New file.
8972         * tests/test-linked_list.c: New file.
8973         * tests/test-avltree_list.c: New file.
8974         * tests/test-rbtree_list.c: New file.
8975         * tests/test-linkedhash_list.c: New file.
8976         * tests/test-avltreehash_list.c: New file.
8977         * tests/test-rbtreehash_list.c: New file.
8978         * tests/test-avltree_oset.c: New file.
8979         * tests/test-rbtree_oset.c: New file.
8980         * MODULES.html.sh (Container data structures): New section.
8981
8982 2006-07-17  Bruno Haible  <bruno@clisp.org>
8983
8984         * m4/gl_list.m4: New file.
8985
8986 2006-07-17  Bruno Haible  <bruno@clisp.org>
8987
8988         * lib/gl_list.h: New file.
8989         * lib/gl_list.c: New file.
8990         * lib/gl_array_list.h: New file.
8991         * lib/gl_array_list.c: New file.
8992         * lib/gl_carray_list.h: New file.
8993         * lib/gl_carray_list.c: New file.
8994         * lib/gl_linked_list.h: New file.
8995         * lib/gl_linked_list.c: New file.
8996         * lib/gl_anylinked_list1.h: New file.
8997         * lib/gl_anylinked_list2.h: New file.
8998         * lib/gl_avltree_list.h: New file.
8999         * lib/gl_avltree_list.c: New file.
9000         * lib/gl_anyavltree_list1.h: New file.
9001         * lib/gl_anyavltree_list2.h: New file.
9002         * lib/gl_rbtree_list.h: New file.
9003         * lib/gl_rbtree_list.c: New file.
9004         * lib/gl_anyrbtree_list1.h: New file.
9005         * lib/gl_anyrbtree_list2.h: New file.
9006         * lib/gl_anytree_list1.h: New file.
9007         * lib/gl_anytree_list2.h: New file.
9008         * lib/gl_linkedhash_list.h: New file.
9009         * lib/gl_linkedhash_list.c: New file.
9010         * lib/gl_anyhash_list1.h: New file.
9011         * lib/gl_anyhash_list2.h: New file.
9012         * lib/gl_avltreehash_list.h: New file.
9013         * lib/gl_avltreehash_list.c: New file.
9014         * lib/gl_rbtreehash_list.h: New file.
9015         * lib/gl_rbtreehash_list.c: New file.
9016         * lib/gl_anytreehash_list1.h: New file.
9017         * lib/gl_anytreehash_list2.h: New file.
9018
9019         * lib/gl_oset.h: New file.
9020         * lib/gl_oset.c: New file.
9021         * lib/gl_array_oset.h: New file.
9022         * lib/gl_array_oset.c: New file.
9023         * lib/gl_avltree_oset.h: New file.
9024         * lib/gl_avltree_oset.c: New file.
9025         * lib/gl_rbtree_oset.h: New file.
9026         * lib/gl_rbtree_oset.c: New file.
9027         * lib/gl_anytree_oset.h: New file.
9028
9029 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9030
9031         * m4/mkancesdirs.m4: New file.
9032         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
9033         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
9034         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
9035         it.
9036
9037 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9038
9039         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
9040         * lib/mkancesdirs.h: New files.
9041         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
9042         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
9043         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
9044         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
9045         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
9046         callers changed.  Revamp internals significantly, by not
9047         attempting to create directories that are temporarily more
9048         permissive than the final results.  Do not attempt to use
9049         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
9050         This removes some race conditions, fixes some bugs, and simplifies
9051         things.  Use new dirchownmod function to do owner and mode changes.
9052         * lib/mkdir-p.h: Likewise.
9053         * lib/modechange.c (octal_to_mode): New function.
9054         (struct mode_change): New member mentioned.
9055         (make_node_op_equals): New arg mentioned.  All callers changed.
9056         (mode_compile): Keep track of which mode bits the user has explicitly
9057         mentioned.
9058         (mode_adjust): New arg DIR, so that we implement the X op correctly.
9059         New arg PMODE_BITS, to keep track of which mode bits the user
9060         mentioned; it treats S_ISUID and S_ISGID speciall.
9061         All callers changed.
9062         * lib/modechange.h: Likewise.
9063
9064 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9065
9066         * MODULES.html.sh: Add mkancestors.
9067         * modules/mkancesdirs: New module.
9068         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
9069         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
9070         The chdir-safer and afs files are now orphans; I'll remove them
9071         unless someone speaks up.
9072         Add lib/dirchownmod.c, lib/dirchownmod.h.
9073         (Depends-on): Remove alloca, chown, save-cwd, dirname.
9074         Add lchown, mkancesdirs.
9075         (Maintainer): Add self.
9076
9077 2006-07-15  Karl Berry  <karl@gnu.org>
9078
9079         * gnulib-tool: help message wording/arrangement.
9080
9081 2006-07-14  Simon Josefsson  <jas@extundo.com>
9082
9083         * doc/gnulib.texi (Libtool and Windows): New section.
9084
9085 2006-07-12  Simon Josefsson  <jas@extundo.com>
9086
9087         * modules/gendocs (License): Fix license, approved by Karl.
9088
9089 2006-07-12  Eric Blake  <ebb9@byu.net>
9090
9091         * MODULES.html.sh: Add gendocs.
9092
9093 2006-07-11  Eric Blake  <ebb9@byu.net>
9094
9095         * modules/fdl: New module, to install doc/fdl.texi.
9096         * MODULES.html.sh: Add new section for documentation modules.
9097         * gnulib-tool: Avoid space-tab.
9098         (--doc-base): New option, to manage files from doc.
9099
9100 2006-07-11  Eric Blake  <ebb9@byu.net>
9101
9102         * m4/absolute-header.m4: Fix comments to match recent change.
9103
9104 2006-07-11  Eric Blake  <ebb9@byu.net>
9105
9106         * gnulib-tool: List --doc-base before --tests-base.
9107
9108 2006-07-11  Derek R. Price  <derek@ximbiot.com>
9109
9110         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
9111
9112 2006-07-11  Bruno Haible  <bruno@clisp.org>
9113
9114         * README: Mention where to put documentation.
9115
9116 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9117
9118         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
9119
9120 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9121
9122         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
9123         to stdint.m4.
9124
9125 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9126
9127         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
9128         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
9129         "no/such/file/stdint.h" when there is no such file, so that
9130         the resulting C code can be parsed by dodgy compilers.
9131         Problems reported by Bob Proulx.
9132
9133 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9134
9135         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
9136         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9137         macros into the GNU _D_EXACT_NAMLEN.
9138         * lib/savedir.c:  Likewise.
9139         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
9140
9141 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9142         and Paul Eggert  <eggert@cs.ucla.edu>
9143
9144         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
9145         * m4/savedir.m4:
9146         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9147         macros into the GNU _D_EXACT_NAMLEN.
9148
9149 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9150
9151         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
9152         around the absolute name, to work around a problem with the HP-UX
9153         11.23 native C compiler, reported by Bob Proulx.
9154
9155 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9156
9157         * doc/maintain.texi, make-stds.texi: Sync from
9158         <http://savannah.gnu.org/projects/gnustandards>.
9159
9160 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9161
9162         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
9163
9164 2006-07-09  Jim Meyering  <jim@meyering.net>
9165
9166         * m4/glob.m4: Remove a doubled word in a comment.
9167
9168 2006-07-09  Jim Meyering  <jim@meyering.net>
9169
9170         * lib/argp-pv.c: Remove a doubled word in a comment.
9171         * lib/check-version.c (check_version): Likewise.
9172         * lib/javacomp.c (compile_java_class): Likewise.
9173
9174 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
9175
9176         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
9177         for the benefit of people using Autoconf 2.60.  If you want to
9178         support older Autoconf versions you can copy m4/onceonly_2_57.m4
9179         (or m4/onceonly.m4, if pre-2.57) manually.
9180
9181 2006-07-08  Jim Meyering  <jim@meyering.net>
9182
9183         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
9184         comment.
9185         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
9186         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
9187         comment.
9188
9189 2006-07-08  Jim Meyering  <jim@meyering.net>
9190
9191         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
9192
9193 2006-07-07  Simon Josefsson  <jas@extundo.com>
9194
9195         * tests/test-crc.c: Change expected crc value, the test vector
9196         were probably computed using the old broken crc.c?
9197
9198 2006-07-06  Simon Josefsson  <jas@extundo.com>
9199
9200         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
9201         now the canonical place for the M4 file).
9202
9203         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
9204         from the sys_socket dependency now.
9205
9206         * modules/inet_pton (Files): Ditto.
9207
9208         * modules/inet_ntop (Files): Ditto.
9209
9210 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9211
9212         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
9213         not gl_PREREQ_GETUSERSHELL.
9214
9215 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9216
9217         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
9218         with only one argument, for Autoconf 2.60.
9219         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
9220         expand to nothing, so add a shell command to avoid syntax error.
9221         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9222
9223 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9224
9225         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
9226
9227 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9228
9229         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
9230         no longer needed.  Check for isblank decl.
9231         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
9232         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
9233         of existence.
9234
9235 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9236
9237         * lib/getloadavg.c: Use __VMS, not VMS.
9238         * lib/getopt.c: Likewise.
9239         * lib/getpagesize.h: Likewise.
9240         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
9241         and probably does not work.
9242
9243 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9244
9245         * lib/.cppi-disable: Add wcwidth.
9246         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
9247         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
9248         (ISGRAPH): Remove.  All uses changed to isgraph.
9249         (FOLD) [!defined _LIBC]: Remove special case.
9250         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
9251         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
9252         HAVE_ISBLANK.
9253         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
9254         case.
9255
9256 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9257
9258         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
9259         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
9260         brackets.  Other minor changes to suppress some compiler
9261         warnings.
9262
9263 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9264         and Paul Eggert  <eggert@cs.ucla.edu>
9265
9266         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
9267         of invoking obsolescent AC_HEADER_DIRENT macro.
9268         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
9269         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
9270         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
9271         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
9272         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
9273         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9274         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
9275         * m4/readdir.m4: Remove; no longer needed.
9276
9277 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9278         and Paul Eggert  <eggert@cs.ucla.edu>
9279
9280         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
9281         Don't worry about this obsolete case any more.
9282         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
9283         directories.
9284         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
9285         worry about this obsolete case any more.
9286         * lib/fts.c: Likewise.
9287         * lib/getcwd.c: Likewise.
9288         * lib/glob.h: Likewise.
9289         * lib/savedir.c: Likewise.
9290
9291 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9292
9293         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
9294         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
9295         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
9296         needed.
9297         All uses removed.
9298         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9299         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9300         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
9301         needed.
9302         * m4/getdate.m4 (gl_GETDATE): Likewise.
9303         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9304         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9305         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9306         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9307         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9308         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9309         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
9310         needed.
9311
9312 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9313
9314         * lib/memcasecmp.c: Include <limits.h>.
9315         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
9316         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
9317         Don't assume isdigit succeeds only on '0' through '9'.
9318
9319 2006-07-05  Eric Blake  <ebb9@byu.net>
9320
9321         * modules/getaddrinfo (Depends-on): Add snprintf.
9322
9323 2006-07-05  Eric Blake  <ebb9@byu.net>
9324
9325         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
9326         to avoid 'header present but could not be compiled' on cygwin.
9327
9328 2006-07-05  Eric Blake  <ebb9@byu.net>
9329
9330         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
9331         missing from netdb.h.
9332         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
9333
9334 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9335
9336         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
9337         no longer needed.
9338         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
9339         * m4/getdate.m4 (gl_GETDATE): Likewise.
9340         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9341         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9342         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9343         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9344         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9345
9346 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9347
9348         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
9349         All uses of is_space replaced by isspace.
9350         * lib/exit.h: Don't talk about STDC_HEADERS.
9351         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
9352         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
9353         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
9354         replaced by isprint etc.
9355         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
9356         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
9357         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
9358         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
9359         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
9360         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
9361
9362 2006-07-05  Bruno Haible  <bruno@clisp.org>
9363
9364         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
9365         the function exists, before testing against AIX.
9366         Reported by Martin Lambers <marlam@marlam.de>.
9367
9368 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
9369
9370         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
9371         From Mark D. Baushke.
9372
9373 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
9374
9375         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
9376         to the absolute name, not just one, to bypass Sun C 5.8's
9377         "warning: #include of /usr/include/... may be non-portable".
9378
9379 2006-07-04  Eric Blake  <ebb9@byu.net>
9380
9381         * modules/dirname-tests: New test module.
9382         * tests/test-dirname.c: New file, replacing dirname.c
9383         TEST_DIRNAME section that was recently deleted.
9384
9385 2006-07-04  Bruno Haible  <bruno@clisp.org>
9386
9387         Assume ANSI C header files and <ctype.h> functions.
9388         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
9389         (mbsnwidth): Use isprint, iscntrl instead.
9390
9391 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9392
9393         Merge from coreutils.
9394         * MODULES.html.sh: Add xstrtold.
9395         * modules/xstrtold: New file.
9396         * modules/cycle-check (Files): Add lib/same-inode.h.
9397         * modules/dirname (Files): Add m4/double-slash-root.m4.
9398         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
9399         * modules/mkdir-p (Files): Add lib/same-inode.h.
9400         * modules/same (Files): Add lib/same-inode.h.
9401
9402 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9403
9404         * m4/absolute-header.m4: Renamed from full-header-path.m4.
9405         This is to keep the terminology clean; POSIX talks about
9406         "absolute pathnames", not "full pathnames", but the GNU
9407         Coding Standards say to use "path" for something else;
9408         so use "absolute" to keep both sides happy.
9409         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
9410         Set gl_absolute_header, not gl_full_header_path.
9411         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
9412         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
9413         All uses changed.
9414
9415         Merge from coreutils.
9416
9417         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9418
9419         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
9420         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
9421         want to require the building of c-strtod.o.
9422         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
9423         needs -lm directly.
9424         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
9425
9426         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9427
9428         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
9429         --as-needed option if available.  Problem reported by Albert Chin in
9430         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
9431         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
9432         cc merely issues a bunch of annoying warnings for --as-needed
9433         (this problem was reported by Bob Proulx).  Also, try linking with
9434         -lm to detect a bug in binutils 2.16 (this problem was reported
9435         by Ralf Wildenhues).
9436
9437         2006-06-18  Jim Meyering  <jim@meyering.net>
9438
9439         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
9440         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
9441         macro.
9442         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
9443         also check for glibc-2.4's abort-inducing bug.
9444
9445         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
9446         Low-probability clean-up should be to use rmdir to get rid of
9447         the just-created directory, not unlink.
9448
9449         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
9450         configure fail, and request a bug report to inform us about it.
9451         Add a comment that, barring reports to the contrary, in 2007 we'll
9452         assume ftruncate is universally available.
9453
9454         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
9455
9456         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
9457
9458         2006-03-12  Jim Meyering  <jim@meyering.net>
9459
9460         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
9461         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
9462         * m4/same.m4 (gl_SAME): Likewise.
9463         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
9464
9465         2006-03-11  Eric Blake  <ebb9@byu.net>
9466
9467         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
9468         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
9469         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
9470         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
9471
9472 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9473
9474         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
9475         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
9476         reported by Mark D. Baushke, one in
9477         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
9478
9479         Merge from coreutils.
9480
9481         * lib/.cppi-disable: Add stdint_.h.
9482         * lib/.cvsignore: Add stdint.h.
9483
9484         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9485
9486         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
9487         both double and long double versions.
9488         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
9489         * lib/xstrtold.c: New file.
9490         * lib/xstrtod.h (xstrtold): New decl.
9491
9492         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
9493
9494         * lib/filemode.c (setst): Remove.
9495         (strmode): Rewrite to avoid setst.  This makes the code shorter,
9496         (arguably) clearer, and the generated code is a bit smaller on my
9497         Debian GNU/Linux stable x86 host.
9498
9499         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
9500
9501         * lib/filemode.c: Include "filemode.h" first, to test the interface.
9502         Assume that filemode.h includes sys/types.h and sys/stat.h.
9503         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
9504         (ftypelet): Reorder to put common cases first, for efficiency.
9505         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
9506         to do 'M'.
9507         (strmode): Renamed from mode_string, and now stores 12 bytes instead
9508         of 10, for compatibility with FreeBSD.  All callers changed.
9509         (filemodestring): Now stores 12 bytes instead of 10, and sets file
9510         types that can't be deduced solely from st_mode.  First arg is now a
9511         const pointer.
9512         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
9513         (strmode): Renamed from mode_string.
9514         (filemodestring): New decl.
9515         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
9516         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
9517         needed.
9518         (S_ISPORT, S_ISWHT): New macros, if not already defined.
9519
9520         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
9521
9522         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
9523         fsusage.h now does that.  Include fsusage.h first, to test interface.
9524         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
9525         at most one method (the old code could have generated decls that
9526         didn't conform to C89, not that this was ever exercised).
9527         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
9528
9529         2006-03-19  Jim Meyering  <jim@meyering.net>
9530
9531         Work even in a chroot where d_ino values for entries in "/"
9532         don't match the stat.st_ino values for the same names.
9533         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
9534         number, iterate through all entries again, using lstat instead.
9535         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
9536         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
9537
9538         * lib/getcwd.c (__getcwd): Clarify a comment.
9539         Use memcpy in place of a call to strcpy.
9540
9541         2006-03-12  Jim Meyering  <jim@meyering.net>
9542
9543         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
9544         matches that of the current directory (which we're about to chdir ".."
9545         out of), then save the dev-ino of the parent, instead.
9546
9547         * lib/same-inode.h (SAME_INODE): New file/macro.
9548         * lib/chdir-safer.c (SAME_INODE): Remove definition.
9549         Include "same-inode.h", instead.
9550         * lib/same.c: Likewise.
9551         * lib/cycle-check.h: Include "same-inode.h".
9552         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
9553         * lib/cycle-check.c (SAME_INODE): Remove definition.
9554         * lib/root-dev-ino.h: Include "same-inode.h".
9555
9556         2006-03-11  Eric Blake  <ebb9@byu.net>
9557
9558         * lib/same.c (same_name): s/base_name/last_component/
9559         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
9560         * lib/filenamecat.c (file_name_concat): Likewise.
9561
9562         2006-03-11  Eric Blake  <ebb9@byu.net>,
9563                     Paul Eggert  <eggert@cs.ucla.edu>
9564
9565         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
9566         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
9567         drive prefix.
9568         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
9569         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
9570         (last_component): New method.
9571         * lib/dirname.c (dir_len): Determine when drive letters need a
9572         subsequent slash.  Preserve // when it is special.
9573         (dir_name): Don't append dot when drive letter is absolute.
9574         [TEST_DIRNAME]: Move into a full-blown gnulib test.
9575         * lib/basename.c (base_name): New semantics - malloc the result.
9576         Preserve // when it is special.  Preserve relative files that look
9577         like drive letters.
9578         (base_len): Preserve // when it is special.
9579         (last_component): New method, similar to old base_name semantics.
9580         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
9581         base_name.  Strip redundant slashes from ///.
9582
9583 2006-07-03  Jim Meyering  <jim@meyering.net>
9584
9585         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
9586         macro is used before the first cycle_check call.
9587
9588 2006-07-03  Eric Blake  <ebb9@byu.net>
9589
9590         * modules/dirname (Depends-on): Add xstrndup.
9591
9592 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9593
9594         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
9595         test cases, so that config.log is a bit easier to follow.
9596
9597 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9598
9599         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
9600         both are 64 bits, since this seems to be the tradition, and this
9601         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
9602         we ever run into a host that prefers long long to long in this
9603         case, we'll need another configure-time test.  Problem reported by
9604         Jim Meyering.
9605
9606 2006-07-02  Eric Blake  <ebb9@byu.net>
9607
9608         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
9609
9610 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9611
9612         * modules/inttypes (Depends-on): No longer depends on stdint.
9613         * modules/stdint (Description): Say more about assumptions.
9614         Say that the fast types might differ.  Say macros are used.
9615         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
9616         (Makefile.am): Revise list of substituted symbols to match
9617         new stdint.m4.
9618         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
9619         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
9620         * tests/test-stdint.c (verify_same_types)
9621         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
9622         the code conforms to C99/C89.
9623         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
9624         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
9625
9626 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9627
9628         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
9629         but fix a bug, by requiring at least 64 bits.
9630         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
9631         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
9632         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
9633         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
9634
9635         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
9636         changes.  Make 2.59 a prerequisite.  Check and substitute for
9637         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
9638         inttypes.h.  Do not use special include files; just use the
9639         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
9640         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
9641         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
9642         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
9643         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
9644         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
9645         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
9646         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
9647         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
9648         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
9649         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
9650         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
9651         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
9652         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
9653         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
9654         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
9655         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
9656         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
9657         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
9658         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
9659         WINT_MAX.  Check for C99 conformance more strictly, by detecting
9660         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
9661         not check for things that C99 does not require, e.g., int8_t.  If
9662         a test isn't needed unless <stdint.h> isn't working, and is
9663         unlikely to be needed for any other reason, then don't do it
9664         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
9665         size_t, since we assume C89 freestanding at least.  Do not check
9666         for sig_atomic_t, wchar_t, or wint_t, since the code now does
9667         the right thing even if the types are not defined.  Instead use:
9668         (gl_STDINT_TYPE_PROPERTIES): New macro.
9669         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
9670         testing whether <sys/types.h> clashes, as Autoconf does this for
9671         us now.  All uses removed.
9672         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
9673         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
9674         (gl_CHECK_TYPE_SAME):
9675         Remove; no longer needed.
9676         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
9677         exists, since we'll return 0 anyway in that case.
9678         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
9679
9680 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9681
9682         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
9683         possible collision with system files.
9684         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
9685         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
9686         WCHAR_MIN and WCHAR_MAX in this case.
9687         (<stddef.h>): Do not include; no longer needed.
9688         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
9689         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
9690         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
9691         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
9692         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
9693         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
9694         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
9695         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
9696         !defined(__c99))]: Include in this case too, since it's harmless
9697         now.
9698         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
9699         dangerous to do so.
9700         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
9701         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
9702         (_STDINT_MIN, _STDINT_MAX): New macros.
9703         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
9704         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
9705         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
9706         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
9707         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
9708         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
9709         macros, not typedefs; this simplifies things quite a bit.
9710         Use long int for all types narrower than int64_t.
9711         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
9712         Define in terms of long long int or int64_t or long int,
9713         not int64_t or int32_t.  This saves some compile-time testing.
9714         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
9715         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
9716         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
9717         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
9718         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
9719         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
9720         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
9721         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
9722         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
9723         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
9724         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9725         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9726         undef any previous version and define our own version, for
9727         simplicity and consistency with the new macros for types.
9728         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9729         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9730         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
9731         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
9732         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
9733         @WINT_T_SUFFIX@ to keep things simple here.
9734         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
9735         Simplify by assuming typical 8/16/32/64 host, since we're
9736         already doing that elsewhere anyway.
9737         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
9738         and assume long long int is 64 bits if available.  This
9739         speeds up 'configure'.
9740
9741 2006-07-01  Eric Blake  <ebb9@byu.net>
9742
9743         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
9744         Reported by Andreas Buening.
9745
9746 2006-07-01  Eric Blake  <ebb9@byu.net>
9747
9748         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
9749
9750 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9751
9752         * lib/getaddrinfo.c: fixed typo
9753
9754 2006-06-29  Jim Meyering  <jim@meyering.net>
9755
9756         * modules/strftime (Maintainer): Add my name, since with the
9757         FPRINTFTIME changes strftime.c has forked from glibc.
9758
9759 2006-06-29  Eric Blake  <ebb9@byu.net>
9760
9761         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
9762
9763 2006-06-29  Eric Blake  <ebb9@byu.net>
9764
9765         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
9766
9767 2006-06-29  Eric Blake  <ebb9@byu.net>
9768
9769         * lib/stat_.h: New file.
9770
9771 2006-06-29  Eric Blake  <ebb9@byu.net>
9772
9773         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
9774         unused static function.
9775
9776 2006-06-29  Eric Blake  <ebb9@byu.net>
9777
9778         * doc/functions.texi (Function Portability): Document missing lstat
9779         on mingw.
9780
9781 2006-06-29  Eric Blake  <ebb9@byu.net>
9782
9783         * MODULES.html.sh: Add sys_stat.
9784         * modules/sys_stat: New module.
9785         * modules/mkstemp (Depends-on): Add sys_stat.
9786
9787 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9788
9789         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
9790
9791 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9792
9793         * m4/c-bs-a.m4: Removed.
9794
9795 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9796
9797         * lib/strftime.c: Assume strftime() exists.
9798
9799 2006-06-29  Derek Price  <derek@ximbiot.com>
9800
9801         * modules/c-bs-a: Removed - \a is C89.
9802         * MODULES.html.sh: Remove c-bs-a.
9803
9804 2006-06-29  Bruno Haible  <bruno@clisp.org>
9805
9806         * modules/wcwidth (License): Change to LGPL.
9807
9808 2006-06-28  Simon Josefsson  <jas@extundo.com>
9809
9810         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
9811         on _WIN32.
9812
9813         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
9814         getnameinfo.
9815
9816 2006-06-28  Simon Josefsson  <jas@extundo.com>
9817
9818         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
9819
9820 2006-06-28  Simon Josefsson  <jas@extundo.com>
9821
9822         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
9823         functions there.  It will succeed on Windows XP, but on Windows
9824         2000 and (presumably) earlier, it will fail, and use the internal
9825         re-implementation.
9826         (use_win32_p): New function.
9827         (getaddrinfo): Use strtoul on servname, to support numeric ports.
9828         Support AI_NUMERICSERV to disable getservbyname.
9829         (getnameinfo): New function, only supports
9830         NI_NUMERICHOST|NI_NUMERICSERV for now.
9831
9832         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
9833         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
9834         getnameinfo.
9835
9836 2006-06-28  Eric Blake  <ebb9@byu.net>
9837
9838         * modules/wcwidth: New file.
9839         * modules/mbchar (Depends-on): Add wcwidth.
9840         * modules/mbswidth (Depends-on): Add wcwidth.
9841         * MODULES.html.sh: Add wcwidth.
9842
9843 2006-06-28  Eric Blake  <ebb9@byu.net>
9844
9845         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
9846         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
9847
9848 2006-06-28  Eric Blake  <ebb9@byu.net>
9849
9850         * lib/xvasprintf.h: Fix comments.
9851
9852 2006-06-28  Eric Blake  <ebb9@byu.net>
9853
9854         * lib/mbchar.h (wcwidth): Include wcwidth.h.
9855         * lib/mbswidth.c (wcwidth): Move from here...
9856         * lib/wcwidth.h: ...to this new file.
9857
9858 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9859
9860         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
9861
9862         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
9863         it's obsolete.
9864         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
9865
9866 2006-06-28  Derek R. Price  <derek@ximbiot.com>
9867
9868         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
9869         Autoconf 2.60 says this stuff was obsolete.
9870
9871 2006-06-28  Bruno Haible  <bruno@clisp.org>
9872
9873         * modules/wcwidth (Files): Add m4/wchar_t.m4.
9874
9875 2006-06-28  Bruno Haible  <bruno@clisp.org>
9876
9877         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
9878         gt_TYPE_WCHAR_T.
9879
9880 2006-06-28  Bruno Haible  <bruno@clisp.org>
9881
9882         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
9883         declaration for wcwidth.
9884         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
9885
9886 2006-06-28  Bruno Haible  <bruno@clisp.org>
9887
9888         * lib/mkdtemp.c [MINGW]: Include <io.h>.
9889         (mkdir): Define using _mkdir.
9890
9891 2006-06-28  Bruno Haible  <bruno@clisp.org>
9892
9893         * lib/getaddrinfo.h: Fix POSIX URL.
9894         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
9895         _WIN32.
9896         (use_win32_p): Make static.
9897         (getaddrinfo): Reject service name if it is empty or does not consist
9898         solely of decimal digits, or if its value is > 65535.
9899         (getnameinfo): Remove useless casts.
9900
9901 2006-06-27  Simon Josefsson  <jas@extundo.com>
9902
9903         * modules/sys_select: New file, suggested by Bruno Haible, Paul
9904         Eggert and Martin Lambers.
9905
9906 2006-06-27  Simon Josefsson  <jas@extundo.com>
9907
9908         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
9909         Eggert and Martin Lambers.
9910
9911 2006-06-27  Bruno Haible  <bruno@clisp.org>
9912
9913         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
9914         result to 0, not to empty.
9915         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
9916
9917 2006-06-27  Bruno Haible  <bruno@clisp.org>
9918
9919         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
9920
9921 2006-06-26  Simon Josefsson  <jas@extundo.com>
9922
9923         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
9924         present.
9925
9926 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
9927
9928         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
9929         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
9930         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
9931
9932 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
9933
9934         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
9935
9936 2006-06-26  Bruno Haible  <bruno@clisp.org>
9937
9938         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
9939
9940 2006-06-26  Bruno Haible  <bruno@clisp.org>
9941
9942         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
9943
9944 2006-06-26  Bruno Haible  <bruno@clisp.org>
9945
9946         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
9947         SGI C compiler in pre-C99 mode.
9948         Suggested by Mark D. Baushke and Larry Jones.
9949
9950 2006-06-26  Bruno Haible  <bruno@clisp.org>
9951
9952         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
9953         WCHAR_MAX.
9954         Reported by Mark D. Baushke and Larry Jones.
9955
9956 2006-06-26  Bruno Haible  <bruno@clisp.org>
9957
9958         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
9959         in pre-C99 mode.
9960         Suggested by Mark D. Baushke and Larry Jones.
9961
9962 2006-06-23  Simon Josefsson  <jas@extundo.com>
9963             Bruno Haible  <bruno@clisp.org>
9964
9965         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
9966         Emit mostlyclean-local rule.
9967         (func_emit_tests_Makefile_am): Likewise.
9968         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
9969
9970 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
9971
9972         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
9973
9974 2006-06-23  Bruno Haible  <bruno@clisp.org>
9975
9976         * tests/test-stdint.c: Update to match ISO C 99 Technical
9977         Corrigendum 1.
9978
9979 2006-06-23  Bruno Haible  <bruno@clisp.org>
9980
9981         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
9982
9983 2006-06-23  Bruno Haible  <bruno@clisp.org>
9984
9985         * lib/stdint_.h: Treat IRIX like OpenBSD.
9986
9987 2006-06-23  Bruno Haible  <bruno@clisp.org>
9988
9989         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
9990         ISO C 99 Technical Corrigendum 1.
9991
9992 2006-06-22  Simon Josefsson  <jas@extundo.com>
9993
9994         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
9995         MinGW.
9996
9997 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
9998
9999         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
10000         needed.  Some compiler complained about some of them.  Problem reported
10001         by Larry Jones in
10002         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
10003
10004 2006-06-21  Simon Josefsson  <jas@extundo.com>
10005
10006         * tests/test-getaddrinfo.c: New file.
10007
10008         * modules/getaddrinfo-tests: New file.
10009
10010         * MODULES.html.sh: Add inet_pton.
10011
10012         * modules/inet_pton: New file.
10013
10014 2006-06-21  Simon Josefsson  <jas@extundo.com>
10015
10016         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
10017         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
10018         of using the (limited) gnulib implementation on Windows XP.
10019
10020         * m4/inet_pton.m4: New file.
10021
10022 2006-06-21  Simon Josefsson  <jas@extundo.com>
10023
10024         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
10025         variable.
10026
10027         * lib/socket_.h: Don't define WINVER.
10028
10029         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
10030         slightly modified to work in gnulib.
10031
10032 2006-06-21  Simon Josefsson  <jas@extundo.com>
10033
10034         * doc/gnulib.texi (Windows sockets): Add.
10035
10036 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
10037
10038         * lib/read-file.c (fread_file): Start with buffer allocation of
10039         0 bytes rather than 1 byte; this simplifies the code.
10040         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
10041         code to free buffer and save/restore errno.
10042         (internal_read_file): Remove unused local.
10043
10044 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
10045
10046         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
10047         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
10048         Problem reported by Denis Excoffier in
10049         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
10050
10051 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10052
10053         * modules/sys_socket, modules/socklen: Include sys/types since
10054         FreeBSD 4.x's sys/socket.h needs it.
10055
10056 2006-06-19  Simon Josefsson  <jas@extundo.com>
10057
10058         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
10059
10060 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10061
10062         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
10063
10064 2006-06-19  Bruno Haible  <bruno@clisp.org>
10065
10066         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
10067         and FULL_PATH_INTTYPES_H in angle brackets.
10068         Reported by Mark D. Baushke <mdb@gnu.org>.
10069
10070 2006-06-17  Eric Blake  <ebb9@byu.net>
10071
10072         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
10073         errno.
10074
10075 2006-06-17  Bruno Haible  <bruno@clisp.org>
10076
10077         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
10078         <sys/inttypes.h>.
10079
10080 2006-06-17  Bruno Haible  <bruno@clisp.org>
10081
10082         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
10083         whether errno is declared. Assume <errno.h> declares errno.
10084
10085 2006-06-17  Bruno Haible  <bruno@clisp.org>
10086
10087         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
10088
10089 2006-06-17  Bruno Haible  <bruno@clisp.org>
10090
10091         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
10092         problem on Solaris 2.5.1.
10093
10094 2006-06-16  Eric Blake  <ebb9@byu.net>
10095
10096         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
10097         * lib/unicodeio.c [!defined errno]: Likewise.
10098         * lib/strtol.c [!defined errno]: Likewise.
10099         * lib/strtod.c [!defined errno]: Likewise.
10100
10101 2006-06-15  Eric Blake  <ebb9@byu.net>
10102
10103         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
10104
10105 2006-06-15  Eric Blake  <ebb9@byu.net>
10106
10107         * config/srclist.txt (ssize_t.m4): Lose sync.
10108
10109 2006-06-15  Bruno Haible  <bruno@clisp.org>
10110
10111         * modules/stdint (Files): Include m4/full-header-path.m4,
10112         m4/size_max.m4, m4/wchar_t.m4.
10113         (Makefile.am): Many more substitutions.
10114         * modules/stdint-tests: New file.
10115         * tests/test-stdint.c: New file.
10116
10117 2006-06-15  Bruno Haible  <bruno@clisp.org>
10118
10119         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
10120         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
10121         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
10122         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
10123         gl_CHECK_TYPE_SAME): New macros.
10124
10125 2006-06-15  Bruno Haible  <bruno@clisp.org>
10126
10127         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
10128
10129 2006-06-15  Bruno Haible  <bruno@clisp.org>
10130
10131         * lib/stdint_.h: Rewritten to be fully auto-configured.
10132         Fixes bug on HP-UX/IA64.
10133
10134 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
10135
10136         * lib/getdate.y (__attribute__): Don't define if already defined.
10137         Problem reported by Larry Jones.
10138         * lib/utimens.c (__attribute__): Likewise.
10139
10140 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
10141
10142         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
10143         reported by Andreas Schwab.
10144
10145 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10146             Bruno Haible  <bruno@clisp.org>
10147
10148         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
10149         check for the declaration of strnlen and a run test that exposes the
10150         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
10151         rpl_strndup.
10152
10153 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10154             Bruno Haible  <bruno@clisp.org>
10155
10156         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
10157
10158 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10159
10160         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
10161         compile test, for Tru64 4.0D.
10162
10163 2006-05-28  Karl Berry  <karl@gnu.org>
10164
10165         * config/srclist.txt (printf-args.c): lose sync.
10166
10167 2006-05-26  Martin Lambers  <marlam@marlam.de>
10168
10169         * lib/getpass.c: Updates the test for the native W32 API, and adds
10170         missing includes, thus fixing compilation warnings.
10171
10172 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10173
10174         * lib/exclude.c (exclude_fnmatch): New function.
10175         (excluded_file_name): Call exclude_fnmatch.
10176         * lib/exclude.h (excluded_file_name): New prototype
10177
10178 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
10179
10180         * lib/tempname.c (small_open, large_open): New macros.
10181         (__open, __open64) [!_LIBC]: Remove.
10182         (__gen_tempname): Use small_open and large_open instead of __open
10183         and __open64.  This fixes a portability bug on HP-UX 11.11i
10184         reported by Simon Wing-Tang in
10185         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
10186
10187 2006-05-24  Bruno Haible  <bruno@clisp.org>
10188
10189         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
10190         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
10191         Reported by Thorsten Maerz <torte@netztorte.de> via
10192         Aaron Stone <aaron@serendipity.cx>.
10193
10194 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10195
10196         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
10197         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
10198         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
10199         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
10200         not really conditional on the cache.
10201         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
10202
10203 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10204
10205         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
10206         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
10207         (my_usleep): Don't mishandle maximum value.
10208
10209 2006-05-19  Jim Meyering  <jim@meyering.net>
10210
10211         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
10212
10213 2006-05-17  Bruno Haible  <bruno@clisp.org>
10214
10215         Cygwin portability.
10216         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
10217
10218 2006-05-17  Bruno Haible  <bruno@clisp.org>
10219
10220         * lib/stdint_.h: Fix recognition of Cygwin.
10221
10222 2006-05-15  Bruno Haible  <bruno@clisp.org>
10223
10224         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
10225         on libtool patch by Ralf Wildenhues.
10226
10227 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10228
10229         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
10230         test for C99 conformance; (bool) 0.5 is an integer constant
10231         expression, but (bool) -0.5 is not.  Problem reported by Fedor
10232         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
10233
10234 2006-05-11  Simon Josefsson  <jas@extundo.com>
10235
10236         * m4/xvasprintf.m4: Fix obvious typo.
10237
10238 2006-05-11  Jim Meyering  <jim@meyering.net>
10239
10240         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
10241         James Lemley.
10242
10243 2006-05-10  Simon Josefsson  <jas@extundo.com>
10244
10245         * lib/md4.c: Typo fix, update copyright years.
10246         (K1, K2): Don't use L because it turn computations into 64-bit on
10247         64-bit platforms.
10248
10249 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
10250
10251         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
10252         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
10253         unwanted sign propagation, e.g., on hosts with 64-bit int.
10254         There still are some problems with reeelly weird theoretical hosts
10255         (e.g., 33-bit int) but it's not worth worrying about now.
10256         * lib/sha1.c (rol): Likewise.
10257         (K1, K2, K3, K4): Remove unnecessary L suffix.
10258
10259 2006-05-10  Bruno Haible  <bruno@clisp.org>
10260
10261         * lib/des.c: Cast to avoid warnings.
10262
10263 2006-05-09  Bruno Haible  <bruno@clisp.org>
10264
10265         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
10266         (Depends-on): Depend also on xsize, stdarg.
10267         (configure.ac): Add gl_XVASPRINTF.
10268
10269 2006-05-09  Bruno Haible  <bruno@clisp.org>
10270
10271         * m4/xvasprintf.m4: New file.
10272
10273 2006-05-09  Bruno Haible  <bruno@clisp.org>
10274
10275         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
10276         (EOVERFLOW): Define fallback value.
10277         (xstrcat): New function.
10278         (xvasprintf): Recognize the special case of a string concatenation.
10279
10280 2006-05-08  Eric Blake  <ebb9@byu.net>
10281
10282         * gnulib-tool (func_version): Base copyright year on CVS date.
10283         (func_emit_copyright_notice): New function.
10284         (func_emit_lib_Makefile_am): Use it.
10285         (func_emit_tests_Makefile_am): Likewise.
10286         (func_import): Likewise.
10287
10288 2006-05-08  Bruno Haible  <bruno@clisp.org>
10289
10290         * modules/stdarg: New file.
10291         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
10292
10293 2006-05-08  Bruno Haible  <bruno@clisp.org>
10294
10295         * m4/stdarg.m4: New file, from GNU gettext.
10296
10297 2006-05-08  Bruno Haible  <bruno@clisp.org>
10298
10299         * config/srclist.txt (build-aux/config.rpath): different from latest
10300         release.
10301
10302 2006-05-08  Bruno Haible  <bruno@clisp.org>
10303
10304         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
10305
10306 2006-05-05  Jim Meyering  <jim@meyering.net>
10307
10308         * m4/warning.m4: New file, derived from bison's file by the same name.
10309
10310 2006-05-03  Bruno Haible  <bruno@clisp.org>
10311
10312         * lib/stdint_.h: Shorter URL.
10313         * lib/inttypes.h: Likewise.
10314
10315 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10316
10317         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
10318
10319 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10320
10321         * lib/verify.h: Document the internals better.  Most of this change
10322         was written by Bruno Haible.
10323
10324 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10325
10326         * doc/verify.texi: New file, partly based on a proposal by
10327         Bruno Haible.
10328
10329 2006-05-02  Bruno Haible  <bruno@clisp.org>
10330
10331         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
10332         test from here...
10333         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
10334
10335 2006-04-29  Bruno Haible  <bruno@clisp.org>
10336
10337         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
10338         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
10339
10340 2006-04-29  Bruno Haible  <bruno@clisp.org>
10341
10342         * gnulib-tool: Make --update option actually work.
10343
10344 2006-04-29  Bruno Haible  <bruno@clisp.org>
10345
10346         * doc/gcd.texi: New file.
10347         * doc/gnulib.texi: Include it.
10348
10349 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
10350
10351         * lib/getdate.y (get_date): When adding relative date, start with the
10352         initial time, not with the result of the first mktime call.
10353
10354 2006-04-25  Bruno Haible  <bruno@clisp.org>
10355
10356         * gnulib-tool (func_import): Output the include directives in three
10357         blocks, sorted separately.
10358         Reported by Ben Pfaff <blp@cs.stanford.edu>.
10359
10360 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
10361
10362         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
10363         to define main with arguments, for C++.  Reported by Eric Blake.
10364         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
10365         Prefer 'int main ()' to 'int main (void)', for C++.
10366         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
10367         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
10368         for 'main', for C99 and C++.
10369
10370 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
10371
10372         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
10373         Don't assume that exit status -1 is valid.
10374         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10375         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
10376         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
10377         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
10378         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
10379         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
10380         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
10381         functions can be used without declaring them, or that you can
10382         exit with status -1.
10383         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
10384
10385 2006-04-24  Karl Berry  <karl@gnu.org>
10386
10387         * config/srclist.txt (longdouble.m4): sync lost.
10388
10389 2006-04-24  Eric Blake  <ebb9@byu.net>
10390
10391         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
10392
10393 2006-04-24  Bruno Haible  <bruno@clisp.org>
10394
10395         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
10396         poll() implementation in AIX.
10397         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10398
10399 2006-04-24  Bruno Haible  <bruno@clisp.org>
10400
10401         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
10402         assigned exactly once.
10403
10404 2006-04-23  Claudio Fontana  <claudio@gnu.org>
10405             Bruno Haible  <bruno@clisp.org>
10406
10407         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
10408         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
10409         for AM_CPPFLAGS.
10410
10411 2006-04-23  Bruno Haible  <bruno@clisp.org>
10412
10413         * modules/copy-file: Depend on unistd.
10414         * modules/execute: Likewise.
10415         * modules/fatal-signal: Likewise.
10416         * modules/findprog: Likewise.
10417         * modules/mkdtemp : Likewise.
10418         * modules/pipe: Likewise.
10419         * modules/wait-process: Likewise.
10420
10421 2006-04-23  Bruno Haible  <bruno@clisp.org>
10422
10423         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
10424         condition was already detected.
10425         Reported by Ben Pfaff <blp@cs.stanford.edu>.
10426
10427 2006-04-23  Bruno Haible  <bruno@clisp.org>
10428
10429         * lib/copy-file.c: Include <unistd.h> unconditionally.
10430         * lib/execute.c: Likewise.
10431         * lib/fatal-signal.c: Likewise.
10432         * lib/findprog.c: Likewise.
10433         * lib/mkdtemp.c: Likewise.
10434         * lib/pipe.h: Likewise.
10435         * lib/pipe.c: Likewise.
10436         * lib/wait-process.h: Likewise.
10437
10438 2006-04-23  Bruno Haible  <bruno@clisp.org>
10439
10440         * gnulib-tool (func_usage): Fix --import description. Document
10441         --update.
10442         (func_import): Create temporary file in a temporary directory, if
10443         --dry-run is specified. Silence errors from 'grep' when there are no
10444         m4 files in $m4dir.
10445         (func_create_testdir): Silence errors from 'grep' when there are no
10446         m4 files in $m4dir.
10447         Reported by Karl Berry <karl@freefriends.org>.
10448
10449 2006-04-20  Bruno Haible  <bruno@clisp.org>
10450
10451         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
10452         one argument, so that the code will be portable to Autoconf 2.60.
10453         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
10454         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10455         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
10456
10457 2006-04-19  Derek Price  <derek@ximbiot.com>
10458             Eric Blake  <ebb9@byu.net>
10459
10460         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
10461         rather than "/full/path.h".  Update comment to match.  Shorten &
10462         generalize m4_translit call via AS_TR_CPP.
10463
10464 2006-04-19  Derek Price  <derek@ximbiot.com>
10465             Eric Blake  <ebb9@byu.net>
10466
10467         * lib/inttypes.h: Correct grammar in comment.
10468
10469 2006-04-18  Derek Price  <derek@ximbiot.com>
10470             Paul Eggert  <eggert@cs.ucla.edu>
10471
10472         * modules/inttypes: New file.
10473         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
10474
10475 2006-04-18  Derek Price  <derek@ximbiot.com>
10476             Paul Eggert  <eggert@cs.ucla.edu>
10477
10478         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
10479         New files.
10480
10481 2006-04-18  Derek Price  <derek@ximbiot.com>
10482             Paul Eggert  <eggert@cs.ucla.edu>
10483
10484         * lib/inttypes.h: New file.
10485         * lib/strtoimax.c: Assume <inttypes.h>.
10486
10487 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
10488
10489         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
10490         isn't mounted.  Problem reported by Kir Kolyshkin.
10491
10492 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
10493
10494         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
10495         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
10496         Derek R. Price.
10497         * lib/regex.h (RE_DUP_MAX): Update comment to match current
10498         implementation.
10499
10500 2006-04-12  Eric Blake  <ebb9@byu.net>
10501
10502         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
10503         is now done automatically by the corresponding Autoconf macro.
10504
10505 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
10506
10507         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
10508         time_r.h.
10509
10510 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10511
10512         Merge regex changes from libc, removing some of our
10513         POSIX-conformance changes that were rejected and redoing them in a
10514         less-intrusive way.
10515
10516         * lib/regcomp.c (re_compile_internal, init_dfa):
10517         Length arg is now size_t, not Idx.  All uses changed.
10518         (peek_token): Forward decl now says internal_function.
10519         (__re_error_msgid, __re_error_msgid_idx):
10520         Now static rather than extern with attribute_hidden.
10521         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
10522         For some reason libc prefers K&R style defns for external functions.
10523         (regerror) [!defined _LIBC]: Likewise.
10524         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
10525         (seek_collating_symbol_entry, lookup_collation_sequence_value):
10526         (build_range_exp, build_collating_symbol):
10527         Use K&R-style defn.
10528         (re_compile_fastmap): Use '\0' to memset, not 0.
10529         (utf8_sb_map): Make the calculations more obvious.
10530         (init_dfa, parse_bracket_exp, build_charclass_op):
10531         Call calloc and cast result, as glibc does.
10532         (init_word_char, fetch_token, peek_token, peek_token_bracket):
10533         (build_range_exp, build_collating_symbol):
10534         Now internal functions.
10535
10536         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
10537
10538         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
10539         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
10540         Don't depend on VMS; depend on __VMS instead, for POSIX
10541         namespace cleanness.
10542         (regoff_t): Define to ssize_t, not long int.
10543
10544         Remove the REG_ macros named below.  Instead, make the old names
10545         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
10546         __USE_GNU_REGEX.
10547         (REG_BACKSLASH_ESCAPE_IN_LISTS):
10548         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
10549         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
10550         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
10551         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
10552         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
10553         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
10554         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
10555         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
10556         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
10557         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
10558         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
10559         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
10560         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
10561         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
10562         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
10563         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
10564         (REG_NREGS):
10565         Remove.  All uses replaced by the old RE_* names.
10566         (RE_BACKSLASH_ESCAPE_IN_LISTS):
10567         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
10568         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
10569         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
10570         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
10571         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
10572         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
10573         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
10574         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
10575         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
10576         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
10577         Don't bother having these macros be independent of each others'
10578         values, since they no longer exist in the POSIX name space.
10579
10580         Rename the following member names back to their old names,
10581         unless !__USE_GNU_REGEX.  All uses changed back.
10582         (buffer): Renamed from re_buffer.
10583         (allocated): Renamed from re_allocated.
10584         (used): Renamed from re_used.
10585         (syntax): Renamed from re_syntax.
10586         (fastmap): Renamed from re_fastmap.
10587         (translate): Renamed from re_translate.
10588         (can_be_null): Renamed from re_can_be_null.
10589         (regs_allocated): Renamed from re_regs_allocated.
10590         (fastmap_accurate): Renamed from re_fastmap_accurate.
10591         (no_sub): Renamed from re_no_sub.
10592         (not_bol): Renamed from re_not_bol.
10593         (not_eol): Renamed from re_not_eol.
10594         (newline_anchor): Renamed from re_newline_anchor.
10595         (num_regs): Renamed from rm_num_regs.
10596         (start): Renamed from rm_start.
10597         (end): Renamed from rm_end.
10598
10599         (free_state): Move up a bit.
10600
10601         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
10602         #define to be empty.
10603         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
10604         when that is what is intended.
10605         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
10606         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
10607         (MAX): New macro.
10608         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
10609         All uses changed back to re_malloc, etc.  It's now the caller's
10610         responsibility to check for overflow; all callers changed.
10611         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
10612         (re_x2nrealloc): Remove.
10613         (free_state): Remove decl.
10614
10615         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
10616         (re_set_registers, re_exec):
10617         Use K&R-style defn.
10618
10619         2006-01-31  Roland McGrath  <roland@redhat.com>
10620
10621         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
10622         Reported by Mike Frysinger <vapier@gentoo.org>.
10623
10624         2006-01-15  Andreas Jaeger  <aj@suse.de>
10625
10626         [BZ #1950]
10627         * lib/regex_internal.c (re_string_reconstruct): Adjust for
10628         build_wcs_upper_buffer change.
10629         (build_wcs_upper_buffer): Change return type.
10630
10631         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
10632
10633         * lib/regex_internal.h: Include <stdint.h> if available.
10634
10635         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
10636
10637         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
10638
10639         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
10640
10641         * lib/regcomp.c: Adjust for changed secondary hash function.
10642
10643         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
10644
10645         * lib/regex.h: Pretty printing.
10646         Clean up namespace a bit.
10647
10648         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
10649
10650         * lib/regexec.c (update_cur_sifted_state, check_arrival,
10651         check_arrival_add_next_nodes): Avoid using uninitialized variable.
10652
10653         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10654                     Ulrich Drepper  <drepper@redhat.com>
10655
10656         [BZ #1302]
10657         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
10658         changed.
10659         (bitset_word_t): Renamed from bitset_word.  All uses changed.
10660
10661         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
10662
10663         [BZ #281]
10664         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
10665         * lib/regcomp.c: Remove unnecessary uses of
10666         unsigned RE_TRANSLATE_TYPE.
10667         * lib/regex_internal.h: Likewise.
10668         * lib/regex_internal.c: Likewise.
10669         * lib/regexec.c: Likewise.
10670         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
10671
10672         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
10673
10674         * lib/regexec.c (find_recover_state): Remove unnecessary
10675         initialization.
10676         (transit_state_bkref): Make DFA a const pointer.
10677         (get_subexp): Likewise.
10678         (check_arrival): Likewise.
10679         (update_cur_sifted_state): Likewise.
10680         (re_search_internal): Likewise.
10681         (prune_impossible_nodes): Likewise.
10682         (acquire_init_state_context): Likewise.
10683         (proceed_next_node): Likewise.
10684         (set_regs): Likewise.
10685         (free_fail_stack_return): Likewise.
10686         (check_arrival_expand_ecl): Mark DFA parameter as const.
10687         (check_arrival_expand_ecl_sub): Likewise.
10688         (check_subexp_limits): Likewise.
10689         (sub_epsilon_src_nodes):  Likewise.
10690         (add_epsilon_src_nodes):  Likewise.
10691         (merge_state_array): Likewise.
10692         (update_regs): Likewise.
10693         (build_trtable): Likewise.
10694         (sift_states_backward): Mark MCTX parameter as const.
10695         (build_sifted_states): Likewise.
10696         (update_cur_sifted_state): Likewise.
10697         (sift_states_mkref): Likewise.
10698         (check_arrival_expand_ecl): Mark eclosure as const.
10699         (check_dst_limits_calc_pos_1): Likewise.
10700         * lib/regex_internal.h (re_match_context_t): Make dfa a const
10701         pointer.
10702
10703         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
10704
10705         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
10706         (transit_state_sb): Likewise.
10707         (transit_state_mb): Likewise.
10708         (sift_states_iter_mb): Likewise.
10709         (check_arrival_add_next_nodes): Likewise.
10710         (check_node_accept_bytes): Change first parameter to pointer-to-const.
10711         [_LIBC] (re_search_2_stub): Use mempcpy.
10712
10713         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
10714         mbrtowc for very simple UTF-8 case.
10715
10716         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
10717         a pointer-to-const.
10718         (re_acquire_state_context): Likewise.
10719         * lib/regex_internal.h: Adjust prototypes.
10720
10721         * lib/regex.c: Prevent using C++ compilers.
10722
10723         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
10724         (re_acquire_state_context): Likewise.
10725
10726 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10727
10728         * modules/regex (Depends-on): Add ssize_t.
10729
10730 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10731
10732         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
10733         translation table.
10734
10735 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10736
10737         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
10738
10739 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
10740             Bruno Haible  <bruno@clisp.org>
10741
10742         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
10743         <sys/types.h> and <inttypes.h>.
10744
10745 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10746
10747         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
10748         `__error_t_defined', so argp.h will not typedef the former.
10749
10750 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
10751
10752         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
10753         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
10754         glibc names.  Even if glibc is changed to conform to POSIX, the
10755         traditional names will be available anyway, since regex depends on
10756         the extensions module.  Also, fix a longstanding typo in the
10757         implementation of Spencer ERE test #75 from grep 2.3.  Problems
10758         reported by Emanuele Giaquinta.  Also, change sense of cached
10759         variable, so that the message makes sense.
10760
10761 2006-03-24  Simon Josefsson  <jas@extundo.com>
10762
10763         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
10764         including some doc fixes.
10765         (base64_encode_alloc): Fix +1 bug on allocation failures.
10766
10767 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10768
10769         * lib/base64.c (base64_encode): Do not read past end of array with
10770         unsanitized input on systems with CHAR_BIT > 8.
10771
10772 2006-03-24  Eric Blake  <ebb9@byu.net>
10773
10774         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
10775
10776 2006-03-22  Karl Berry  <karl@gnu.org>
10777
10778         * config/srclist.txt (*setenv.[ch]): get from coreutils.
10779         * config/srclistvars.sh (COREUTILS): new var.
10780
10781 2006-03-17  Jim Meyering  <jim@meyering.net>
10782
10783         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
10784         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
10785
10786 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10787
10788         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
10789         no longer needs it.  Instead, check that regoff_t is as least
10790         as wide as ptrdiff_t.
10791
10792         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
10793         so that our regex.h stays compatible with the installed regex.
10794         This is helpful for installers who configure --without-included-regex.
10795         Problem reported by Emanuele Giaquinta.
10796
10797 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10798
10799         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
10800         Typedef to long int, not to off_, as POSIX will likely change
10801         in that direction.
10802
10803 2006-03-15  Eric Blake  <ebb9@byu.net>
10804
10805         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
10806
10807 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10808
10809         * lib/argp-help.c (validate_uparams): Fix typo
10810         * lib/argp-parse.c (argp_default_options): Consistently begin help
10811         messages with a lowercase letter.
10812
10813 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
10814
10815         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
10816         overrun buffers and shouldn't be used (much as gets shouldn't be
10817         used).
10818         * lib/time_r.c (asctime_r, ctime_r): Likewise.
10819
10820 2006-03-08  Simon Josefsson  <jas@extundo.com>
10821
10822         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
10823         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10824
10825 2006-03-08  Simon Josefsson  <jas@extundo.com>
10826
10827         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
10828         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10829
10830 2006-03-08  Simon Josefsson  <jas@extundo.com>
10831
10832         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
10833         signal that configure disabled the device.
10834
10835 2006-03-08  Simon Josefsson  <jas@extundo.com>
10836
10837         * build-aux/maint.mk: Fix refresh-po, to handle no translated
10838         languages.
10839
10840 2006-03-07  Simon Josefsson  <jas@extundo.com>
10841
10842         * modules/getopt (Depends-on): Add unistd.
10843
10844         * modules/unistd: New file.
10845
10846 2006-03-07  Simon Josefsson  <jas@extundo.com>
10847
10848         * modules/gc-random: New file.
10849
10850 2006-03-07  Simon Josefsson  <jas@extundo.com>
10851
10852         * m4/unistd_h.m4: New file.
10853
10854 2006-03-07  Simon Josefsson  <jas@extundo.com>
10855
10856         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
10857         test to be side-effect free by storing the result in the cache
10858         variable gl_cv_lib_readline, and moving the assignment of
10859         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
10860         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10861
10862 2006-03-07  Simon Josefsson  <jas@extundo.com>
10863
10864         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
10865         error on missing devices (the functions will return an error).
10866
10867         * m4/gc.m4: Move random stuff to gc-random.m4
10868
10869 2006-03-07  Simon Josefsson  <jas@extundo.com>
10870
10871         * lib/unistd_.h: New file.
10872
10873 2006-03-07  Simon Josefsson  <jas@extundo.com>
10874
10875         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
10876
10877 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10878
10879         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
10880         Problem reported by Juan Manuel Guerrero.
10881
10882 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10883
10884         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
10885         the unistd module.
10886         * lib/getlogin_r.c: Likewise.
10887         * lib/getlogin_r.h: Likewise.
10888         * lib/glob.c: Likewise.
10889         * lib/pagealign_alloc.c: Likewise.
10890         * lib/unistd_.h: Remove; no longer needed.
10891
10892 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
10893
10894         * MODULES.html.sh (Support for systems lacking POSIX:2001):
10895         Add unistd.
10896         * modules/c-stack (Depends-on): Add unistd.
10897         * modules/getlogin_r: Likewise.
10898         * modules/glob: Likewise.
10899         * modules/pagealign_alloc: Likewise.
10900         * modules/unistd (Files): Remove lib/unistd_.h.
10901         (EXTRA_DIST): Remove.
10902         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
10903         need unistd_.h.
10904         (MOSTLYCLEANFILES): Remove unistd.h-t.
10905
10906 2006-03-03  Simon Josefsson  <jas@extundo.com>
10907
10908         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
10909
10910 2006-03-03  Simon Josefsson  <jas@extundo.com>
10911
10912         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
10913         libidn and bison.
10914
10915 2006-03-03  Simon Josefsson  <jas@extundo.com>
10916
10917         * build-aux/maint.mk: Add indent target.
10918
10919 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
10920
10921         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
10922         our replacement poll.h in any case, to avoid a differing
10923         declaration from a system header.  Seen on AIX.
10924
10925 2006-03-01  Simon Josefsson  <jas@extundo.com>
10926
10927         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
10928         <kasal@ucw.cz>.
10929
10930 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10931
10932         * modules/gettime (Depends-on): Add extensions module.
10933         * modules/nanosleep (Depends-on): Likewise.
10934         * modules/settime (Depends-on): Likewise.
10935
10936 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10937
10938         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
10939         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
10940         pedantically.
10941         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10942         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
10943
10944         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
10945         not "==".  Reported by Ralf Wildenhues.
10946
10947 2006-03-01  Karl Berry  <karl@gnu.org>
10948
10949         * doc/Copyright/request-*: new files, synced from gnuorg.
10950
10951 2006-03-01  Karl Berry  <karl@gnu.org>
10952
10953         * config/srclist.txt (Copyright/*): new entries.
10954
10955 2006-02-28  Simon Josefsson  <jas@extundo.com>
10956
10957         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
10958
10959 2006-02-27  Simon Josefsson  <jas@extundo.com>
10960
10961         * lib/base64.h: Indent #define's.  From Jim Meyering
10962         <jim@meyering.net>.
10963
10964 2006-02-27  Jim Meyering  <jim@meyering.net>
10965
10966         Revert the change of 2006-02-24, so these files can continue
10967         to be sync'd from gettext.
10968         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
10969         of `config.h'.
10970
10971 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
10972
10973         * modules/intprops: New file.
10974         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
10975         Add intprops.
10976         * modules/getloadavg (Files): Remove lib/intprops.h.
10977         (Depends-on): Add intprops.
10978         * modules/human: Likewise.
10979         * modules/inttostr: Likewise.
10980         * modules/openat: Likewise.
10981         * modules/sig2str: Likewise.
10982         * modules/userspec: Likewise.
10983         * modules/utimecmp: Likewise.
10984         * modules/xnanosleep: Likewise.
10985         * modules/xstrtol: Likewise.
10986
10987 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
10988
10989         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
10990         * modules/lock-tests (TESTS): Use $(EXEEXT).
10991         * modules/tls-tests: Likewise.
10992         * modules/argp-tests: Likewise.
10993         (check_PROGRAMS): New var, replacing...
10994         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
10995
10996 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10997
10998         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
10999         `config.h'.
11000
11001 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
11002
11003         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
11004
11005 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11006
11007         Sync from coreutils.
11008         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
11009         gl_CHDIR_SAFER.
11010
11011 2006-02-22  Jim Meyering  <jim@meyering.net>
11012
11013         Sync from coreutils.
11014         * m4/chdir-safer.m4: New file.
11015
11016 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
11017
11018         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
11019         AT_FDCWD exceeds INT_MAX.
11020         * lib/openat.h (AT_FDCWD): Likewise.
11021
11022 2006-02-17  Eric Blake  <address@hidden>
11023
11024         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
11025
11026 2006-02-16  Simon Josefsson  <jas@extundo.com>
11027
11028         * modules/getaddrinfo (Depends-on): Add sys_socket.
11029
11030 2006-02-15  Simon Josefsson  <jas@extundo.com>
11031
11032         * build-aux/maint.mk: Add dsyntax-check rule.
11033
11034 2006-02-15  Eric Blake  <ebb9@byu.net>
11035
11036         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
11037         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
11038         'present but cannot compile' warnings on cygwin.
11039         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
11040         use ws2tcpip.h if sys/socket.h works.
11041         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
11042         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
11043
11044 2006-02-14  Simon Josefsson  <jas@extundo.com>
11045
11046         * modules/maintainer-makefile (Files): Rename.
11047
11048         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
11049         and (the local) Makefile.cfg to maint-cfg.mk.
11050
11051         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
11052         to the latter.
11053
11054         * modules/maintainer-makefile: New module.
11055
11056         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
11057         severaly stripped to make it possible to build it up from scratch
11058         with reliable tests.
11059
11060         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
11061         fixes to permit overriding the default actions when configure and
11062         makefile are not available.
11063
11064 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
11065
11066         Sync from coreutils.
11067         * modules/lstat (Depends-on): Don't depend on xalloc.
11068         (License): Change from GPL to LGPL, since this is now simply a
11069         replacement for a libc function.
11070
11071 2006-02-14  Jim Meyering  <jim@meyering.net>
11072
11073         Sync from coreutils.
11074
11075         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
11076         failure on deficient systems, and simplify gnulib lgpl dependencies.
11077         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
11078         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
11079
11080         * lib/xalloc-die.c: Remove unused definition of N_.
11081
11082 2006-02-14  Jim Meyering  <jim@meyering.net>
11083
11084         Sync from coreutils.
11085         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
11086         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
11087         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
11088         double-quote uses of that variable, to accommodate the rare case in
11089         which getmntent is available in none of the libraries checked.  This
11090         happens at least on FreeBSD 5.0.
11091
11092 2006-02-13  Simon Josefsson  <jas@extundo.com>
11093
11094         * gnulib-tool (Usage): Fix --import, from
11095         karl@freefriends.org (Karl Berry).
11096
11097 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11098
11099         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
11100
11101 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11102
11103         * lib/argp-namefrob.h: Restore changes accidentally lost during the
11104         "autoupdate" on 2005-12-12.
11105
11106 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11107
11108         * modules/closeout (Depends-on): Remove atexit.
11109
11110 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11111
11112         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
11113         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
11114
11115 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
11116
11117         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
11118         __EXTENSIONS__ if this causes compilation to fail.  Problem
11119         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
11120         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
11121
11122 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
11123
11124         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
11125         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
11126         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
11127         All uses changed.
11128
11129 2006-01-26  Simon Josefsson  <jas@extundo.com>
11130
11131         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
11132         prototype is visible on mingw32.
11133
11134         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
11135         for mingw32.
11136
11137         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
11138         mingw32).
11139
11140 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
11141
11142         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
11143         attempt to open for write; this always fails, at least on POSIX
11144         hosts.  This reinstates the 2006-01-09 change, which was
11145         inadvertently removed.
11146
11147 2006-01-26  Bruno Haible  <bruno@clisp.org>
11148
11149         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
11150         Reported by Paul Eggert.
11151
11152 2006-01-26  Bruno Haible  <bruno@clisp.org>
11153             Paul Eggert  <eggert@cs.ucla.edu>
11154
11155         * lib/stdbool_.h (_Bool)
11156         [(! (defined __cplusplus || defined __BEOS__)
11157           && !defined __GNUC__
11158           && !(defined __HP_cc || defined __xlc__
11159                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
11160                || defined __sgi))]:
11161         #define to signed char in these cases too; this simplifies
11162         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
11163         etc., separately) and makes it more conservative.
11164
11165 2006-01-25  Simon Josefsson  <jas@extundo.com>
11166
11167         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
11168         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
11169         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
11170
11171 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11172
11173         * lib/argp-namefrob.h: Bugfix. Remove stray #
11174
11175 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
11176
11177         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
11178         so that we test the test.
11179         Check for yet another HP-UX cc bug involving *bool |= bool.
11180
11181 2006-01-25  Karl Berry  <karl@gnu.org>
11182
11183         * config/srclist.txt (vasnprintf.c): sync lost.
11184
11185 2006-01-25  Jim Meyering  <jim@meyering.net>
11186
11187         Sync from the stable (b5) branch of coreutils:
11188
11189         * lib/fts.c (fts_children): Don't let close() clobber errno from
11190         failed fchdir().
11191
11192         * lib/fts.c (fts_stat): When following a symlink-to-directory,
11193         don't necessarily interpret stat-fails+lstat-succeeds as indicating
11194         a dangling symlink.  That can also happen at least for ELOOP.
11195         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
11196         FYI, this bug predates the inclusion of fts.c in coreutils.
11197
11198         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
11199         in their own block, so pre-c99 compilers don't object.
11200
11201         Avoid the double-free (first in fts_read, second in fts_close) that
11202         would occur when an `active' directory is made inaccessible (e.g.,
11203         via chmod a-x) during a traversal.
11204         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11205         before returning.  Reproduce this failure by
11206         mkdir -p a/b; cd a; chmod a-x . b
11207         Reported by Stavros Passas.
11208
11209 2006-01-25  Jim Meyering  <jim@meyering.net>
11210
11211         * lib/fileblocks.c: Remove more useless parentheses.
11212         * lib/readutmp.h: Likewise.
11213
11214 2006-01-25  Bruno Haible  <bruno@clisp.org>
11215
11216         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
11217         warnings.
11218         Reported by Paul Eggert.
11219
11220 2006-01-25  Bruno Haible  <bruno@clisp.org>
11221
11222         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
11223         rid of a trap command. For Solaris sh.
11224         Reported by Mark D. Baushke <mdb@gnu.org>.
11225
11226 2006-01-24  Simon Josefsson  <jas@extundo.com>
11227
11228         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
11229         Bruno.
11230
11231 2006-01-24  Karl Berry  <karl@gnu.org>
11232
11233         * config/srclist.txt (argp-namefrob.h): sync lost.
11234
11235 2006-01-24  Jim Meyering  <jim@meyering.net>
11236
11237         * modules/openat (Files): Add lib/intprops.h.
11238         From Mark D. Baushke.
11239
11240 2006-01-24  Jim Meyering  <jim@meyering.net>
11241
11242         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
11243         Reported by Mark D. Baushke.
11244
11245 2006-01-24  Jim Meyering  <jim@meyering.net>
11246
11247         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
11248
11249 2006-01-24  Bruno Haible  <bruno@clisp.org>
11250
11251         * modules/strnlen (Maintainer): Change from glibc to all.
11252
11253 2006-01-24  Bruno Haible  <bruno@clisp.org>
11254
11255         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
11256         Patch by Paul Eggert.
11257
11258 2006-01-24  Bruno Haible  <bruno@clisp.org>
11259
11260         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
11261         already has it.
11262         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
11263         2005-11-26.
11264
11265         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
11266         'signed char' to avoid problems with the built-in _Bool type.
11267         Reported by Paul Eggert on 2005-11-26.
11268
11269 2006-01-24  Bruno Haible  <bruno@clisp.org>
11270
11271         * gnulib-tool (func_import): Avoid constructing complicated sed
11272         expressions inside backquote.
11273         Report and solution by Mark D. Baushke <mdb@gnu.org>.
11274
11275 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
11276
11277         These changes imported from libc.
11278         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
11279         test and two separate function calls.
11280         * lib/strndup.c (__strndup): Add libc_hidden_def.
11281
11282 2006-01-23  Simon Josefsson  <jas@extundo.com>
11283
11284         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
11285         Remove the test_*_SOURCES variable: automake infers it by default.
11286         * modules/tls-tests: Likewise.
11287
11288 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11289
11290         Work around porting bugs reported by Dieter in
11291         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
11292         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
11293         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
11294         Include "getopt.h" first, to check interface.
11295         (getenv): Declare only if defined HAVE_DECL_GETENV &&
11296         !HAVE_DECL_GETENV.
11297         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
11298         (__strndup): Revert to K&R-style function dfns, the glibc style.
11299         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
11300         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
11301         Include strnlen.h first, to get prototype properly.
11302         (strnlen): Renamed from __strnlen.
11303         Remove weak alias.
11304
11305 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11306
11307         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
11308
11309 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11310
11311         * config/srclist.txt: Adjust to reflect glibc reorganization.
11312         This affects only comments.
11313
11314 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11315
11316          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
11317          Reported by Bruce Korb <bkorb@gnu.org>.
11318
11319 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
11320
11321         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
11322         to pacify gcc -Wswitch-default.
11323
11324 2006-01-22  Bruno Haible  <bruno@clisp.org>
11325
11326         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
11327         temporary buffer for sprintf, take into account the precision also
11328         for 'd', 'i', 'u', 'o', 'x', 'X'.
11329
11330 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11331
11332         * modules/argp-tests: New module
11333         * tests/test-argp.c: New file
11334         * tests/test-argp-2.sh: New file
11335
11336 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11337
11338         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
11339         (__argp_base_name): Removed
11340         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
11341         typo.
11342         (__argp_base_name): Provide macro definition or extern declaration
11343         depending on the configuration
11344
11345 2006-01-20  Simon Josefsson  <jas@extundo.com>
11346
11347         * modules/inet_ntop (Depends-on): Depend on sys_socket.
11348
11349 2006-01-20  Simon Josefsson  <jas@extundo.com>
11350
11351         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
11352
11353 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11354
11355         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
11356         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
11357         Suggested by Bruno Haible.
11358
11359 2006-01-20  Karl Berry  <karl@gnu.org>
11360
11361         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
11362         until changes propagate, I guess.
11363
11364 2006-01-19  Simon Josefsson  <jas@extundo.com>
11365
11366         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
11367
11368 2006-01-19  Simon Josefsson  <jas@extundo.com>
11369
11370         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
11371
11372 2006-01-19  Simon Josefsson  <jas@extundo.com>
11373
11374         * gnulib-tool: Set check_PROGRAMS.
11375
11376         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
11377         modules/des-tests, modules/gc-arcfour-tests,
11378         modules/gc-arctwo-tests, modules/gc-des-tests,
11379         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
11380         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
11381         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
11382         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
11383         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
11384         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
11385         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
11386         test_*_SOURCES.
11387
11388 2006-01-18  Simon Josefsson  <jas@extundo.com>
11389
11390         * modules/socklen (Depends-on): Depend on sys_socket.
11391
11392 2006-01-18  Simon Josefsson  <jas@extundo.com>
11393
11394         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
11395         modules/des-tests, modules/gc-arcfour-tests,
11396         modules/gc-arctwo-tests, modules/gc-des-tests,
11397         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
11398         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
11399         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
11400         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
11401         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
11402         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
11403         $(EXEEXT) to automake TESTS variable, for mingw32.
11404
11405 2006-01-17  Simon Josefsson  <jas@extundo.com>
11406
11407         * modules/socklen (Include): Need sys/socket.h.
11408
11409 2006-01-17  Bruno Haible  <bruno@clisp.org>
11410
11411         * modules/ssize_t (Include): Add <sys/types.h>.
11412
11413 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
11414
11415         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
11416         it's not portable and it doesn't work with cross-compiles.
11417         Problem reported by Bruno Haible.  Fix missing-$ typo in
11418         'test "gl_cv_ignore_unused_libraries" ...' that prevented
11419         -zignore from being used with Sun's C compiler.
11420
11421 2006-01-12  Simon Josefsson  <jas@extundo.com>
11422
11423         * lib/base64.c: Fix warning, reported by Bruno Haible
11424         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
11425
11426 2006-01-12  Bruno Haible  <bruno@clisp.org>
11427
11428         * modules/ldd: New file.
11429         * build-aux/ldd.sh.in: New file.
11430         * MODULES.html.sh (Support for building libraries and executables): Add
11431         ldd.
11432
11433 2006-01-12  Bruno Haible  <bruno@clisp.org>
11434
11435         * m4/ldd.m4: New file.
11436
11437 2006-01-12  Bruno Haible  <bruno@clisp.org>
11438
11439         * gnulib-tool (func_import, func_create_testdir): Don't go into an
11440         endless loop while replacing $auxdir with build-aux.
11441
11442 2006-01-11  Simon Josefsson  <jas@extundo.com>
11443
11444         * lib/stdint_.h (SIZE_MAX): Add missing (.
11445
11446 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
11447
11448         Sync from coreutils.
11449         * lib/md5.c: Fix commentary typos.
11450         (alignof, UNALIGNED_P): No need for a GCC-specific version.
11451         * lib/md5.h (__attribute__): Remove; unused.
11452         * lib/sha1.c: Fix commentary to match md5 better.
11453         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
11454         so that we don't need to worry about alignment.  All uses changed.
11455         This merges the 2005-10-28 md5 change into sha1.
11456
11457 2006-01-11  Jim Meyering  <jim@meyering.net>
11458
11459         Sync from coreutils.
11460         * lib/md5.c (OP): Fix spacing.
11461
11462 2006-01-11  Bruno Haible  <bruno@clisp.org>
11463
11464         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11465         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
11466         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
11467
11468 2006-01-11  Bruno Haible  <bruno@clisp.org>
11469
11470         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11471         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
11472         the "early" section as well.
11473
11474 2006-01-11  Bruno Haible  <bruno@clisp.org>
11475
11476         Avoid "ar: no archive members specified" error on MacOS X.
11477         * gnulib-tool (func_modules_add_dummy): New function.
11478         (func_import, func_create_testdir): Invoke it.
11479
11480 2006-01-11  Bruno Haible  <bruno@clisp.org>
11481
11482         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
11483         with $auxdir in AC_CONFIG_FILES statements.
11484
11485 2006-01-11  Bruno Haible  <bruno@clisp.org>
11486
11487         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11488         Initialize also noinst_HEADERS to empty.
11489
11490 2006-01-11  Bruno Haible  <bruno@clisp.org>
11491
11492         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
11493         variables.
11494         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
11495         autoreconf.
11496
11497 2006-01-11  Bruno Haible  <bruno@clisp.org>
11498
11499         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
11500         overridable by the user.
11501         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11502
11503 2006-01-10  Simon Josefsson  <jas@extundo.com>
11504
11505         * modules/sys_socket: New file.
11506
11507 2006-01-10  Simon Josefsson  <jas@extundo.com>
11508
11509         * m4/sys_socket_h.m4: New file.
11510
11511 2006-01-10  Simon Josefsson  <jas@extundo.com>
11512
11513         * lib/socket_.h: New file.
11514
11515 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11516
11517         * modules/readutmp (Maintainer): Add myself.
11518
11519 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11520
11521         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
11522         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
11523         People who are still concerned with buggy memcmp implementations
11524         can invoke gl_FUNC_MEMCMP themselves.
11525
11526 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11527
11528         * lib/regex_internal.h (BITSET_WORD_BITS):
11529         Work around a bug in 64-bit PGC (before version 6.1-2), where the
11530         preprocessor mishandles large unsigned values as if they were signed.
11531         Problem reported by Claudio Fontana in
11532         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
11533
11534 2006-01-10  Jim Meyering  <jim@meyering.net>
11535
11536         Avoid the double-free (first in fts_read, second in fts_close) that
11537         would occur when an `active' directory is made inaccessible (e.g.,
11538         via chmod a-x) during a traversal.
11539         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11540         before returning.  Reproduce this failure by
11541         mkdir -p a/b; cd a; chmod a-x . b
11542         Reported by Stavros Passas.
11543
11544         Sync from coreutils.
11545         * lib/sha1.c: Tweak grammar in a comment.
11546
11547 2006-01-10  Jim Meyering  <jim@meyering.net>
11548
11549         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
11550         Patch by Joerg Sonnenberger.
11551
11552 2006-01-10  Bruno Haible  <bruno@clisp.org>
11553
11554         * modules/readutmp: Depend on module free.
11555         * modules/strtok_r: Depend on module restrict.
11556
11557 2006-01-10  Bruno Haible  <bruno@clisp.org>
11558
11559         * modules/gettext (configure.ac): Add an invocation of
11560         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
11561
11562 2006-01-10  Bruno Haible  <bruno@clisp.org>
11563
11564         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
11565         Reported by Werner Lemberg <wl@gnu.org>.
11566
11567 2006-01-10  Bruno Haible  <bruno@clisp.org>
11568
11569         * lib/localcharset.c: Update from GNU gettext.
11570
11571 2006-01-10  Bruno Haible  <bruno@clisp.org>
11572
11573         * lib/argp.h (__const): Remove macro. Use const instead.
11574         * lib/argp-fmtstream.h (__const): Likewise.
11575         * lib/glob_.h (__const): Remove macro.
11576         * lib/glob-libc.h: Use const instead of __const.
11577
11578 2006-01-10  Bruno Haible  <bruno@clisp.org>
11579
11580         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
11581         variable.
11582         Needed to avoid an automake error regarding the 'gettext' module.
11583
11584 2006-01-09  Simon Josefsson  <jas@extundo.com>
11585
11586         * modules/inet_ntop (Depends-on): Add restrict.
11587
11588 2006-01-09  Simon Josefsson  <jas@extundo.com>
11589
11590         * modules/gc-rijndael-tests (License): Put under LGPL.
11591
11592         * modules/gc-des-tests (License): Likewise.
11593
11594         * modules/gc-arcfour-tests (License): Likewise.
11595
11596         * modules/gc-arctwo-tests (License): Likewise.
11597
11598         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
11599
11600         * modules/gc-hmac-sha1-tests (Files): Likewise.
11601
11602         * modules/gc-hmac-md5-tests (License): Likewise.
11603
11604         * modules/gc-sha1-tests (License): Likewise.
11605
11606         * modules/gc-md5-tests (License): Likewise.
11607
11608         * modules/gc-md4-tests (License): Likewise.
11609
11610         * modules/gc-md2-tests (License): Likewise.
11611
11612         * modules/gc-tests (License): Likewise.
11613
11614         * modules/des-tests (License): Likewise.
11615
11616         * modules/md4-tests (License): Likewise.
11617
11618         * modules/md2-tests (License): Likewise.
11619
11620 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11621
11622         Sync from coreutils:
11623
11624         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
11625         * modules/lib-ignore: New file.
11626         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
11627         chdir-safer.m4, lchmod.m4.
11628         * modules/openat: Add mkdirat.c, openat-priv.h.
11629
11630 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11631
11632         Sync from coreutils.
11633         * m4/lib-ignore.m4: New file.
11634         * m4/lchmod.m4: New file.
11635
11636 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11637
11638         Sync from coreutils.
11639         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
11640         for write access: POSIX says that must fail.
11641         * lib/fts.c (diropen): Likewise.
11642         * lib/save-cwd.c (save_cwd): Likewise.
11643         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
11644         well, for minor improvements on hosts that lack O_DIRECTORY.
11645         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
11646         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
11647         Fall back on chown if open failed with EACCES.
11648
11649         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
11650         Report an error at compile-time if only a 1-second nominal clock
11651         resolution is found.
11652
11653         * lib/lchmod.h: New file.
11654         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
11655         (make_dir_parents): Use lchown rather than chown, and
11656         lchmod rather than chmod.
11657
11658         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
11659         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
11660         "proc" reported by n0dalus.
11661
11662         * lib/mountlist.c: Include <limits.h>.
11663         (dev_from_mount_options)
11664         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
11665         New function.  It no longer assumes "dev=" has the System V meaning
11666         on Linux (since it doesn't).  It also parses "dev=" more carefully.
11667         (read_file_system_list)
11668         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
11669         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
11670         dev= in that case.
11671
11672         * lib/posixtm.h (PDS_PRE_2000): New macro.
11673         * lib/posixtm.c (year): Arg is now syntax_bits rather than
11674         allow_century.  All usages changed.  Reject dates outside the range
11675         1969-1999 if PDS_PRE_2000 is used.
11676
11677 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11678
11679         Sync from coreutils.
11680         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
11681         (Time of day items): Mention the possibility of leap seconds.
11682         Problem reported by Dr. David Alan Gilbert.
11683
11684 2006-01-09  Jim Meyering  <jim@meyering.net>
11685
11686         Sync from coreutils.
11687
11688         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
11689
11690         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
11691
11692         * lib/modechange.c (mode_compile): Reject an invalid mode string
11693         that starts with an octal digit.  From Andreas Gruenbacher.
11694
11695         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
11696         and dup to open_safer and dup_safer, respectively.
11697         (openat_permissive): Fix typo in comment.
11698
11699         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
11700         "gettext.h"; either no longer needed or are guaranteed by openat.h.
11701         (_): Remove; no longer needed.
11702         (openat): Renamed from rpl_openat; no need for rpl_openat
11703         since openat.h renames openat for us.
11704         Replace most of the body with a call to openat_permissive,
11705         to avoid duplicate code.
11706         Port to (probably hypothetical) environments were mode_t is
11707         wider than int.
11708         (openat_permissive): Require mode arg, so that we can check
11709         types better.  Put it just after flags.  Change cwd failure
11710         indicator from pointer-to-bool to pointer-to-errno-value.
11711         All callers changed.
11712         Invoke openat_save_fail and/or openat_restore_fail if
11713         cwd_errno is null, so that openat can call us.
11714         (openat_permissive, fdopendir, fstatat, unlinkat):
11715         Simplify errno handling to avoid some duplicate code,
11716         as it's OK to set errno on success.
11717         * lib/openat.h: Revamp code so that function macros depend on
11718         __OPENAT_PREFIX only, not also on AT_FDCWD.
11719         (openat_ro): Remove.  Caller changed to use openat_permissive.
11720         (openat_permissive): Now a macro, if not a function.
11721         (openat_restore_fail, openat_save_fail): Now always functions,
11722         since mkdirat needs them even if __OPENAT_PREFIX is defined.
11723
11724         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
11725         and openat.c.
11726         * lib/mkdirat.c: Include openat-priv.h.
11727         Remove definitions of macros defined therein.
11728         * lib/openat.c: Likewise.
11729
11730         * lib/mkdirat.c (mkdirat): New file and function.
11731         * lib/openat.h (mkdirat): Declare.
11732
11733         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
11734
11735         * lib/openat.h (openat_permissive): Declare.
11736         (openat_ro): Define.
11737
11738         * lib/openat.c (EXPECTED_ERRNO): New macro.
11739         (openat_permissive): New function -- used in remove.c rewrite.
11740         (all functions): Set errno just before returning, only if there
11741         was an actual failure.
11742         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
11743
11744         Emulate openat-family functions using Linux's procfs, if possible.
11745         Idea and some code based on Ulrich Drepper's glibc changes.
11746
11747         * lib/openat.c: (BUILD_PROC_NAME): New macro.
11748         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
11749         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
11750         before falling back on save_cwd and restore_cwd.
11751         (fdopendir, fstatat, unlinkat): Likewise.
11752
11753         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
11754         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
11755
11756         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
11757         as second argument to va_arg.  Otherwise, some versions of gcc
11758         warn that `if this code is reached, the program will abort'.
11759
11760 2006-01-09  Jim Meyering  <jim@meyering.net>
11761
11762         Sync from coreutils.
11763         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
11764         Require openat-priv.h.
11765
11766 2006-01-09  Bruno Haible  <bruno@clisp.org>
11767
11768         * modules/strnlen (Include): Use strnlen.h.
11769
11770 2006-01-09  Bruno Haible  <bruno@clisp.org>
11771
11772         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
11773
11774 2006-01-09  Bruno Haible  <bruno@clisp.org>
11775
11776         * lib/sysexit_.h (EX_OK): New macro.
11777         Suggested by Martin Lambers <marlam@marlam.de>.
11778
11779 2006-01-09  Bruno Haible  <bruno@clisp.org>
11780
11781         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
11782         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
11783
11784 2006-01-09  Bruno Haible  <bruno@clisp.org>
11785
11786         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
11787         numbers.
11788
11789 2006-01-09  Bruno Haible  <bruno@clisp.org>
11790
11791         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
11792         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
11793         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
11794         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
11795
11796 2006-01-09  Bruno Haible  <bruno@clisp.org>
11797
11798         * build-aux/javacomp.sh.in: New file, moved from lib/.
11799         * modules/javacomp-script (Files): Update.
11800         (configure.ac): Add AC_CONFIG_FILES invocation.
11801         (EXTRA_DIST): Remove variable.
11802
11803         * build-aux/javaexec.sh.in: New file, moved from lib/.
11804         * modules/javaexec (Files): Update.
11805         (configure.ac): Add AC_CONFIG_FILES invocation.
11806         (EXTRA_DIST): Remove javaexec.sh.in.
11807
11808         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
11809         * modules/csharpcomp-script (Files): Update.
11810         (configure.ac): Add AC_CONFIG_FILES invocation.
11811         (EXTRA_DIST): Remove variable.
11812
11813         * build-aux/csharpexec.sh.in: New file, moved from lib/.
11814         * modules/csharpexec (Files): Update.
11815         (configure.ac): Add AC_CONFIG_FILES invocation.
11816         (EXTRA_DIST): Remove csharpexec.sh.in.
11817
11818 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11819
11820         Sync from coreutils.
11821
11822         Add POSIX ACL support
11823         * lib/acl.h (copy_acl, set_acl): Add declarations.
11824         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
11825         systems other than Linux.
11826         (chmod_or_fchmod): New function: use fchmod when possible,
11827         and chmod otherwise.
11828         (file_has_acl): Add a POSIX ACL implementation, with a
11829         Linux-specific subcase.
11830         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
11831         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
11832         acls are unsupported.
11833         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
11834         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
11835         are unsupported.
11836
11837 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11838
11839         Sync from coreutils.
11840         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
11841
11842 2006-01-07  Bruno Haible  <bruno@clisp.org>
11843
11844         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
11845         gl_EARLY.
11846
11847 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11848
11849         * lib/strftime.c (tzname): Don't declare if it is already #defined.
11850         Problem reported for Mingw by Mark Junker.
11851
11852 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11853
11854         * README: Gnulib normally doesn't generate a tarball.
11855
11856 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
11857
11858         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
11859         long int, not int, for nanosecond counts, so that people who are
11860         used to POSIX struct timespec won't be surprised.  Reported by Jim
11861         Meyering.
11862
11863 2005-12-28  Bruno Haible  <bruno@clisp.org>
11864
11865         * build-aux/config.rpath: Update from GNU gettext.
11866
11867 2005-12-16  Jim Meyering  <jim@meyering.net>
11868
11869         * modules/fprintftime: New module.
11870         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
11871
11872 2005-12-16  Jim Meyering  <jim@meyering.net>
11873
11874         * m4/fprintftime.m4: New file.
11875
11876 2005-12-16  Jim Meyering  <jim@meyering.net>
11877
11878         * lib/fprintftime.c, lib/fprintftime.h: New files.
11879
11880 2005-12-15  Simon Josefsson  <jas@extundo.com>
11881
11882         * modules/socklen (configure.ac): Fix M4 macro name, to align with
11883         new m4/socklen.m4.
11884
11885 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11886
11887         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
11888         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
11889
11890 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11891
11892         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
11893         * lib/argp-help.c (fill_in_uparams): Check if the constructed
11894         struct uparams is valid. Fall back to the default values if it is
11895         not.
11896
11897 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11898
11899         * modules/argp (Files): Add argp-pin.c
11900         (Depends-on): dirname
11901         (lib_SOURCES): Add argp-pin.c
11902
11903 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11904
11905         * m4/argp.m4:  Check if program_invocation_name and
11906         program_invocation_short_name are declared and define appropriate
11907         macros if they are not.
11908
11909 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11910
11911         * lib/argp-help.c (__argp_base_name): New function
11912         (__argp_short_program_name): Rewrite using __argp_base_name
11913         * lib/argp-namefrob.h: Define program_invocation_name and
11914         program_invocation_short_name if requested
11915         (__argp_base_name): Add prototype
11916         * lib/argp-parse.c (argp_def): Use gettext wrappers
11917         (argp_default_parser): Use __argp_base_name
11918         * lib/argp-pin.c: New file. Defines program_invocation_name and
11919         program_invocation_short_name on systems that lack them.
11920
11921 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11922
11923         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
11924         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11925         porting problem reported by Georg Schwarz in
11926         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11927
11928 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11929
11930         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
11931         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
11932         porting problem reported by Georg Schwarz in
11933         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
11934
11935 2005-12-05  Bruno Haible  <bruno@clisp.org>
11936
11937         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
11938         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
11939         Reported by Mark Junker <mjscod@gmx.de>.
11940
11941 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
11942
11943         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
11944         Use implementation from Albert Chin, with some
11945         comments/corrections by Stepan Kasal and myself.
11946
11947 2005-12-02  Bruno Haible  <bruno@clisp.org>
11948
11949         * gnulib-tool (func_import): Accept GPLed build tool modules when
11950         --lgpl is given.
11951         * modules/csharpcomp-script: New file.
11952         * modules/csharpcomp: Depend on it.
11953         * modules/javacomp-script: New file.
11954         * modules/javacomp: Depend on it.
11955         Suggested by Simon Josefsson.
11956
11957 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
11958
11959         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
11960         statement, to work around an HP-UX 10.20 compiler bug reported by
11961         Peter O'Gorman.
11962
11963 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11964
11965         * modules/savedir (Depends-on): Add openat.
11966
11967 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
11968
11969         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
11970         (uintmax_t) [defined uintmax_t]: Do not declare.
11971         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
11972         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
11973         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
11974         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
11975         sake of portability to weird hosts that C allows (though we don't
11976         know of any practical examples).
11977
11978         * lib/savedir.h (fdsavedir): New decl.
11979         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
11980         contains most of the former guts of savedir.
11981         (savedir): Use savedirstream.
11982         Include "openat.h".
11983
11984 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11985
11986         * modules/obstack (Files): Add m4/ulonglong.m4.
11987         Problem reported by Davide Angelocola.
11988
11989 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
11990
11991         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
11992         coreutils no longer futzes with rounding modes.
11993
11994 2005-11-14  Jim Meyering  <jim@meyering.net>
11995
11996         * lib/mkstemp-safer.c: Include <config.h>, required for possible
11997         replacement of mkstemp.
11998
11999 2005-11-10  Simon Josefsson  <jas@extundo.com>
12000
12001         * lib/readline.c: Remove EOL.
12002
12003 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12004
12005         * modules/gethrxtime (Depends-on): Add gettime.
12006
12007 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12008
12009         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
12010         or gettimeofday; no longer needed.
12011
12012 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12013
12014         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
12015         time business.
12016         (gethrxtime) [! (HAVE_NANOUPTIME
12017         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
12018         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
12019         our own approximation.
12020
12021 2005-11-08  Eric Blake  <ebb9@byu.net>
12022
12023         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12024
12025 2005-11-08  Eric Blake  <ebb9@byu.net>
12026
12027         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12028
12029 2005-11-04  Bruno Haible  <bruno@clisp.org>
12030
12031         * gnulib-tool: Implement --update mode.
12032
12033 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12034
12035         Fix porting problem reported by Theodoros V. Kalamatianos.
12036         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
12037         Don't assume that futimes failing means we must fail.
12038
12039 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12040
12041         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
12042         variables to suggest the intended function of the PATH_MAX check.
12043
12044 2005-10-30  Kean Johnston  <jkj@sco.com>
12045
12046         Trivial changes to support SCO systems.
12047         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
12048         as PATH_MAX.
12049         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
12050         where __ptr is null when no I/O is pending.
12051
12052 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12053
12054         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
12055         leave errno alone.  Problem reported by Dmitry V. Levin.
12056
12057 2005-10-28  Simon Josefsson  <jas@extundo.com>
12058
12059         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
12060         Test more.
12061
12062         * tests/test-gc-md2.c, tests/test-md2.c: New files.
12063
12064         * modules/md2, modules/md2-tests: New files.
12065
12066 2005-10-28  Simon Josefsson  <jas@extundo.com>
12067
12068         * m4/inet_ntop.m4: More tests.
12069
12070         * m4/gc-md2.m4, md2.m4: New file.
12071
12072 2005-10-28  Simon Josefsson  <jas@extundo.com>
12073
12074         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
12075         "restrict" keywords, as per POSIX.  Protect the function
12076         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
12077         Don't use K&R prototypes.  Check the sprintf return values.
12078         Re-define EAFNOSUPPORT if not present.  Indent.
12079
12080         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
12081         suggested by Bruno Haible <bruno@clisp.org>.
12082
12083         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
12084
12085         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
12086
12087         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
12088         libgcrypt).
12089
12090         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
12091
12092         * lib/md2.h, lib/md2.c: New files.
12093
12094 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
12095
12096         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
12097         errno alone.  Problem reported by Frederic Jolliton.
12098
12099 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
12100
12101         * modules/verify (License): Change from GPL to LGPL.  This is a
12102         tiny module and there are apparently near-equivalents that are
12103         under the BSD license.
12104
12105 2005-10-24  Simon Josefsson  <jas@extundo.com>
12106
12107         * modules/sha1: Relicense to LGPL.
12108
12109 2005-10-24  Simon Josefsson  <jas@extundo.com>
12110
12111         * lib/md4.h: Shrink buffer size, now that we changed the type.
12112
12113 2005-10-23  Simon Josefsson  <jas@extundo.com>
12114
12115         * gnulib-tool (func_import): Fix --tests-base.
12116
12117 2005-10-22  Simon Josefsson  <jas@extundo.com>
12118
12119         * modules/arcfour (Depends-on): Need stdint.
12120
12121 2005-10-22  Simon Josefsson  <jas@extundo.com>
12122
12123         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
12124         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
12125
12126 2005-10-22  Simon Josefsson  <jas@extundo.com>
12127
12128         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
12129         suggested by Bruno Haible <bruno@clisp.org>.
12130
12131 2005-10-22  Simon Josefsson  <jas@extundo.com>
12132
12133         * lib/crc.h: Include stddef.h, for size_t.
12134
12135 2005-10-22  Simon Josefsson  <jas@extundo.com>
12136
12137         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
12138         arcfour_context struct (simplify test vector testing in GNU
12139         Shishi).
12140
12141 2005-10-21  Simon Josefsson  <jas@extundo.com>
12142
12143         * modules/des, modules/des-tests: New files.
12144
12145         * modules/gc-des, modules/gc-des-tests: New files.
12146
12147         * tests/test-des.c, tests/test-gc-des.c: New file.
12148
12149 2005-10-21  Simon Josefsson  <jas@extundo.com>
12150
12151         * modules/arctwo, modules/arctwo-tests: New files.
12152
12153         * tests/test-arctwo.c: New file.
12154
12155         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
12156
12157         * tests/test-gc-arctwo.c: New file.
12158
12159 2005-10-21  Simon Josefsson  <jas@extundo.com>
12160
12161         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
12162         Bruno Haible <bruno@clisp.org>.
12163
12164         * m4/gc-des.m4: New file.
12165
12166 2005-10-21  Simon Josefsson  <jas@extundo.com>
12167
12168         * m4/arctwo.m4: New file.
12169
12170         * m4/gc-arctwo.m4: New file.
12171
12172 2005-10-21  Simon Josefsson  <jas@extundo.com>
12173
12174         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
12175         block.
12176
12177 2005-10-21  Simon Josefsson  <jas@extundo.com>
12178
12179         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
12180         <bruno@clisp.org>.
12181
12182         * lib/hmac-sha1.c (hmac_sha1): Likewise.
12183
12184         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
12185         Bruno Haible <bruno@clisp.org>.
12186
12187         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
12188         <bruno@clisp.org>.
12189
12190 2005-10-21  Simon Josefsson  <jas@extundo.com>
12191
12192         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
12193
12194 2005-10-21  Simon Josefsson  <jas@extundo.com>
12195
12196         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
12197
12198 2005-10-21  Simon Josefsson  <jas@extundo.com>
12199
12200         * lib/des.h, lib/des.c: New files.
12201
12202         * lib/gc-gnulib.c: Support DES.c
12203
12204 2005-10-21  Simon Josefsson  <jas@extundo.com>
12205
12206         * lib/arctwo.h, lib/arctwo.c: New files.
12207
12208         * lib/gc-gnulib.c: Support ARCTWO.
12209
12210 2005-10-21  Simon Josefsson  <jas@extundo.com>
12211
12212         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
12213         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12214
12215 2005-10-21  Simon Josefsson  <jas@extundo.com>
12216
12217         * gnulib-tool (func_import, func_create_testdir): Define automake
12218         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
12219         Makefile.am snippet),
12220         suggested by Bruno Haible <bruno@clisp.org>.
12221
12222         * modules/gc (Makefile.am): Use it.
12223
12224 2005-10-21  Bruno Haible  <bruno@clisp.org>
12225
12226         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
12227         patch.
12228
12229 2005-10-19  Simon Josefsson  <jas@extundo.com>
12230
12231         * tests/test-gc-rijndael.c: New file.
12232
12233         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
12234
12235 2005-10-19  Simon Josefsson  <jas@extundo.com>
12236
12237         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
12238         interface too.
12239
12240 2005-10-19  Simon Josefsson  <jas@extundo.com>
12241
12242         * tests/test-gc-arcfour.c: New file.
12243
12244         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
12245
12246 2005-10-19  Simon Josefsson  <jas@extundo.com>
12247
12248         * modules/gc-md4, modules/gc-md4-tests: New file.
12249
12250         * tests/test-gc-md4.c: New file.
12251
12252 2005-10-19  Simon Josefsson  <jas@extundo.com>
12253
12254         * m4/gc-md4.m4: New file.
12255
12256 2005-10-19  Simon Josefsson  <jas@extundo.com>
12257
12258         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
12259         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
12260         <kasal@ucw.cz>.
12261
12262 2005-10-19  Simon Josefsson  <jas@extundo.com>
12263
12264         * m4/gc-arcfour.m4: New file.
12265
12266         * m4/gc-rijndael.m4: New file.
12267
12268 2005-10-19  Simon Josefsson  <jas@extundo.com>
12269
12270         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
12271
12272 2005-10-19  Simon Josefsson  <jas@extundo.com>
12273
12274         * lib/gc-gnulib.c: Support ARCFOUR.
12275
12276 2005-10-19  Simon Josefsson  <jas@extundo.com>
12277
12278         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
12279         support.
12280
12281         * lib/gc.h: Add ECB enum type.
12282
12283         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
12284
12285 2005-10-18  Simon Josefsson  <jas@extundo.com>
12286
12287         * tests/test-md5.c: New file.
12288
12289         * modules/md5-tests: New file.
12290
12291 2005-10-18  Simon Josefsson  <jas@extundo.com>
12292
12293         * tests/test-md4.c: New file.
12294
12295         * modules/md4, modules/md4-tests: New files.
12296
12297 2005-10-18  Simon Josefsson  <jas@extundo.com>
12298
12299         * m4/md4.m4: New file.
12300
12301 2005-10-18  Simon Josefsson  <jas@extundo.com>
12302
12303         * lib/md4.h, lib/md4.c: New files, based on md5.?.
12304
12305 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
12306
12307         * gnulib-tool (func_create_testdir): Omit the second check whether
12308         BUILT_SOURCES in nonempty.
12309
12310 2005-10-17  Simon Josefsson  <jas@extundo.com>
12311
12312         * tests/test-rijndael.c: New file.
12313
12314 2005-10-17  Simon Josefsson  <jas@extundo.com>
12315
12316         * modules/sha1: Depend on stdint instead of md5.
12317
12318         * modules/md5: Depend on stdint, remove uint32_t.
12319
12320 2005-10-17  Simon Josefsson  <jas@extundo.com>
12321
12322         * modules/gc-sha1-tests: New file.
12323
12324         * tests/test-gc-sha1.c: New file.
12325
12326 2005-10-17  Simon Josefsson  <jas@extundo.com>
12327
12328         * m4/md5.m4: Remove call to uint32_t.m4.
12329
12330 2005-10-17  Simon Josefsson  <jas@extundo.com>
12331
12332         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
12333
12334         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
12335         md5.h.
12336
12337         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
12338
12339         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
12340
12341 2005-10-17  Simon Josefsson  <jas@extundo.com>
12342
12343         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
12344
12345 2005-10-17  Simon Josefsson  <jas@extundo.com>
12346
12347         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
12348
12349 2005-10-17  Simon Josefsson  <jas@extundo.com>
12350
12351         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
12352
12353         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
12354
12355 2005-10-17  Bruno Haible  <bruno@clisp.org>
12356
12357         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
12358         that it can also be used in a test.
12359
12360 2005-10-16  Bruno Haible  <bruno@clisp.org>
12361
12362         * gnulib-tool (func_emit_tests_Makefile_am): Also define
12363         TESTS_ENVIRONMENT, so that individual tests can augment it.
12364
12365         * gnulib-tool (func_create_testdir): Use an intermediate target for
12366         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
12367         macros, like $(ALLOCA_H), which cannot be passed through the command
12368         line.
12369
12370 2005-10-15  Simon Josefsson  <jas@extundo.com>
12371
12372         * modules/rijndael-tests: New file.
12373
12374         * modules/rijndael: New file.
12375
12376 2005-10-15  Simon Josefsson  <jas@extundo.com>
12377
12378         * m4/rijndael.m4: New file.
12379
12380 2005-10-15  Simon Josefsson  <jas@extundo.com>
12381
12382         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
12383
12384         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
12385
12386 2005-10-14  Simon Josefsson  <jas@extundo.com>
12387
12388         * tests/test-arcfour.c: New file.
12389
12390         * modules/arcfour, modules/arcfour-tests: New files.
12391
12392 2005-10-14  Simon Josefsson  <jas@extundo.com>
12393
12394         * m4/arcfour.m4: New file.
12395
12396 2005-10-14  Simon Josefsson  <jas@extundo.com>
12397
12398         * lib/arcfour.h, lib/arcfour.c: New files.
12399
12400 2005-10-14  Roland McGrath  <roland@redhat.com>
12401
12402         Import from libc.  [BZ #1331]
12403         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
12404         macro argument.
12405         Reported by Matej Vela <vela@debian.org>.
12406
12407 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12408
12409         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
12410         include <wchar.h>; no longer needed.
12411
12412 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12413
12414         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
12415
12416 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
12417         and  Ulrich Drepper  <drepper@redhat.com>
12418
12419         Import from libc.
12420         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
12421         instead of inline stream orientation test and two separate
12422         function calls.  Pay no attention to USE_IN_LIBIO.
12423
12424 2005-10-13  Simon Josefsson  <jas@extundo.com>
12425
12426         * modules/gc-hmac-md5-tests: New file.
12427
12428         * tests/test-gc-hmac-sha1.c: New file.
12429
12430         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
12431
12432         * modules/gc-hmac-md5-tests: New file.
12433
12434         * tests/test-gc-md5.c: New file.
12435
12436         * modules/gc-md5-tests: New file.
12437
12438 2005-10-13  Simon Josefsson  <jas@extundo.com>
12439
12440         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
12441         Move memory allocation outside of loop.
12442
12443 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
12444
12445         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
12446         intermediate directory is in a read-only file system.  Problem
12447         reported by Eric Blake.
12448
12449 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
12450
12451         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
12452
12453 2005-10-12  Simon Josefsson  <jas@extundo.com>
12454
12455         * tests/test-hmac-sha1.c: New file.
12456
12457         * modules/hmac-sha1-tests: New file.
12458
12459         * modules/hmac-sha1: New file.
12460
12461 2005-10-12  Simon Josefsson  <jas@extundo.com>
12462
12463         * modules/gc-sha1: New file.
12464
12465 2005-10-12  Simon Josefsson  <jas@extundo.com>
12466
12467         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
12468
12469         * tests/test-gc-pbkdf2-sha1.c: New file.
12470
12471 2005-10-12  Simon Josefsson  <jas@extundo.com>
12472
12473         * modules/gc-md5, modules/gc-hmac-md5: New files.
12474
12475         * modules/gc (Files): Remove md5, memxor and hmac files.
12476
12477 2005-10-12  Simon Josefsson  <jas@extundo.com>
12478
12479         * m4/gc-pbkdf2-sha1.m4: New file.
12480
12481         * m4/gc-hmac-sha1.m4: New file.
12482
12483         * m4/gc-sha1: New file.
12484
12485         * m4/hmac-sha1.m4: New file.
12486
12487 2005-10-12  Simon Josefsson  <jas@extundo.com>
12488
12489         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
12490
12491         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
12492
12493 2005-10-12  Simon Josefsson  <jas@extundo.com>
12494
12495         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
12496         suggested by Bruno Haible <bruno@clisp.org>.
12497
12498 2005-10-12  Simon Josefsson  <jas@extundo.com>
12499
12500         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
12501
12502 2005-10-12  Simon Josefsson  <jas@extundo.com>
12503
12504         * lib/gc-pbkdf2-sha1.c: New file.
12505
12506         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
12507
12508 2005-10-12  Simon Josefsson  <jas@extundo.com>
12509
12510         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
12511
12512         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
12513
12514 2005-10-12  Simon Josefsson  <jas@extundo.com>
12515
12516         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
12517         GC_USE_HMAC_MD5, respectively.
12518
12519         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
12520         (gc_md5): Fix typo.
12521
12522         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
12523
12524         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
12525
12526         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
12527
12528 2005-10-12  Bruno Haible  <bruno@clisp.org>
12529
12530         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
12531         Reported by Stepan Kasal <kasal@ucw.cz>.
12532
12533 2005-10-11  Simon Josefsson  <jas@extundo.com>
12534
12535         * tests/test-crc.c: New file.
12536
12537         * modules/crc, modules/crc-tests: New files.
12538
12539 2005-10-11  Simon Josefsson  <jas@extundo.com>
12540
12541         * m4/crc.m4: New file.
12542
12543 2005-10-11  Simon Josefsson  <jas@extundo.com>
12544
12545         * lib/gc.h: Add gc_hash and gc_hash_buffer.
12546
12547         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
12548
12549         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
12550
12551 2005-10-11  Simon Josefsson  <jas@extundo.com>
12552
12553         * lib/crc.h, lib/crc.c: New files.
12554
12555         * lib/gc.h (gc_hash_buffer): Add doc.
12556
12557 2005-10-11  Bruno Haible  <bruno@clisp.org>
12558
12559         * modules/c-strcasestr: New file.
12560         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
12561
12562 2005-10-11  Bruno Haible  <bruno@clisp.org>
12563
12564         * modules/c-strcase: New file.
12565         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
12566
12567 2005-10-11  Bruno Haible  <bruno@clisp.org>
12568
12569         * lib/strcasecmp.c: Include limits.h.
12570         (strcasecmp): Avoid integer overflow on exotic platforms.
12571         * lib/strncasecmp.c: Include limits.h.
12572         (strncasecmp): Avoid integer overflow on exotic platforms.
12573         Reported by Paul Eggert.
12574
12575 2005-10-11  Bruno Haible  <bruno@clisp.org>
12576
12577         * lib/c-strcasestr.h: New file, from GNU gettext.
12578         * lib/c-strcasestr.c: New file, from GNU gettext.
12579
12580 2005-10-11  Bruno Haible  <bruno@clisp.org>
12581
12582         * lib/c-strcase.h: New file, from GNU gettext.
12583         * lib/c-strcasecmp.c: New file, from GNU gettext.
12584         * lib/c-strncasecmp.c: New file, from GNU gettext.
12585
12586 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12587
12588         * modules/mempcpy (License): GPL -> LGPL.
12589         * modules/strchrnul (License): Likewise.
12590         * modules/sysexits (License): Likewise.
12591
12592 2005-10-08  Simon Josefsson  <jas@extundo.com>
12593
12594         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
12595
12596 2005-10-07  Simon Josefsson  <jas@extundo.com>
12597
12598         * m4/memxor.m4: Remove gl_C_RESTRICT call.
12599
12600 2005-10-06  Simon Josefsson  <jas@extundo.com>
12601
12602         * tests/test-hmac-md5.c: New file.
12603
12604         * modules/hmac-md5-tests: New file.
12605
12606         * modules/hmac-md5: New file.
12607
12608 2005-10-06  Simon Josefsson  <jas@extundo.com>
12609
12610         * m4/hmac-md5.m4: New file.
12611
12612         * m4/memxor.m4: Require gl_C_RESTRICT.
12613
12614 2005-10-06  Simon Josefsson  <jas@extundo.com>
12615
12616         * lib/memxor.c (memxor): Avoid casts and warnings.
12617
12618 2005-10-06  Simon Josefsson  <jas@extundo.com>
12619
12620         * lib/hmac-md5.c: New file.
12621
12622         * lib/hmac.h: New file.
12623
12624 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12625
12626         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
12627         promotes to int, not unsigned int, to catch the AIX 5.3
12628         compiler bug.
12629
12630 2005-10-05  Simon Josefsson  <jas@extundo.com>
12631
12632         * modules/memxor: New file.
12633
12634         * modules/iconv (Files): Move config.rpath to havelib, it is used
12635         there.
12636
12637         * modules/havelib (Files): Add config.rpath.
12638
12639 2005-10-05  Simon Josefsson  <jas@extundo.com>
12640
12641         * m4/memxor.m4: New file.
12642
12643 2005-10-05  Simon Josefsson  <jas@extundo.com>
12644
12645         * lib/memxor.c (memxor): Fix compiler error.
12646
12647         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
12648         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
12649
12650         * lib/memxor.h, lib/memxor.c: New files.
12651
12652         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
12653         we assume all systems have it, suggested by Jim Meyering
12654         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
12655         any systems lack sys/socket.h; mingw32 is known to lack it, but we
12656         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
12657         same reasons.
12658
12659 2005-10-05  Simon Josefsson  <jas@extundo.com>
12660
12661         * config/srclist.txt: Add glibc bug 1423 for md5.h.
12662
12663 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
12664
12665         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
12666         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
12667         needed, since the source code now assumes these .h files.
12668
12669 2005-10-05  Derek Price  <derek@ximbiot.com>
12670
12671         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
12672
12673 2005-10-05  Bruno Haible  <bruno@clisp.org>
12674
12675         * modules/stdint (License): Change to LGPL.
12676
12677 2005-10-04  Simon Josefsson  <jas@extundo.com>
12678
12679         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
12680         D. Baushke" <mdb@gnu.org>.
12681
12682 2005-10-04  Bruno Haible  <bruno@clisp.org>
12683
12684         * lib/verify.h (verify_true): Provide alternative definition for C++.
12685
12686 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
12687
12688         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
12689         (SSIZE_MAX): New macro, if not already defined.
12690         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
12691         than 2 GiB.
12692
12693 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12694
12695         Sync from coreutils.
12696         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
12697         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
12698         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
12699         ULLONG_MAX doesn't work with 2.7.2.1.
12700
12701 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12702
12703         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
12704         From Ben Pfaff.
12705
12706         * modules/exclude (Depends-on): Depend on verify.
12707         * modules/strtoimax (Depends-on): Likewise.
12708         * modules/utimecmp (Depends-on): Likewise.
12709
12710 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12711
12712         * lib/exclude.c: Include verify.h.
12713         (verify): Remove.  All callers changed to use verify.h's version.
12714         * lib/strtoimax.c: Likewise.
12715         * lib/utimecmp.c: Likewis.e
12716
12717         Sync from coreutils.
12718         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
12719         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
12720         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
12721         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
12722         bother returning ENOSYS if settimeofday or stime fails; just let
12723         them return whatever errno they want to return.
12724         * lib/utimens.c: Include unistd.h, for dup2.
12725         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
12726         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
12727
12728 2005-10-02  Jim Meyering  <jim@meyering.net>
12729
12730         Sync from coreutils.
12731         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
12732         from glibc-2.2.5 that fails for read-only files.
12733
12734 2005-10-02  Jim Meyering  <jim@meyering.net>
12735
12736         Sync from coreutils.
12737         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
12738         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
12739         `#if HAVE_CONFIG_H'.
12740         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
12741         Remove AT_FDCWD test.
12742         Do not consume the fd unless successful.
12743         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
12744         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
12745         block, so that we don't even try to compile it if settimeofday is
12746         available.  This works around a compilation failure on OSF1 V5.1,
12747         due to stime requiring a `long int*' while tv_sec is `int'.
12748
12749 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
12750
12751         Sync from coreutils.
12752         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
12753         against `yes', rather than just testing for nonempty.
12754
12755 2005-10-01  Simon Josefsson  <jas@extundo.com>
12756
12757         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
12758         and Darwin.
12759
12760         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
12761         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
12762         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
12763         freeaddrinfo and gai_strerror are declared by the POSIX headers.
12764         Check if struct addrinfo is declared.
12765
12766 2005-10-01  Simon Josefsson  <jas@extundo.com>
12767
12768         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
12769         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
12770         AI_* and EAI_* definitions.  Protect function declarations.
12771
12772 2005-10-01  Jim Meyering  <jim@meyering.net>
12773
12774         Sync from coreutils.
12775
12776         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
12777         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
12778         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
12779         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12780         in the inet and nsl libraries.  Required on Solaris 5.7.
12781
12782 2005-10-01  Jim Meyering  <jim@meyering.net>
12783
12784         Sync from coreutils.
12785         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12786         in the inet and nsl libraries.  Required on Solaris 5.7.
12787
12788 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
12789
12790         * lib/getdelim.c (getdelim): Remove unused variables.
12791
12792 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
12793
12794         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
12795         so that the code works even with ancient cpp.  Portability problem
12796         with GCC 2.7.2.1 reported by Thomas M.Ott.
12797
12798 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
12799
12800         * modules/regex (Depends-on): Add strcase.
12801
12802         * modules/gethostname (Licence): Change from GPL to LGPL, since
12803         gethostname.c is a trivial implementation of a standard library
12804         function.
12805         * modules/poll (License): Change from GPL to LGPL, since it's
12806         derived from LGPL code.
12807
12808 2005-09-27  Jim Meyering  <jim@meyering.net>
12809
12810         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
12811         HAVE_CONFIG_H.
12812
12813         * lib/intprops.h (signed_type_or_expr__): Define.
12814         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
12815         for unsigned types.
12816
12817 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
12818
12819         * lib/verify.h (verify_expr): Remove, replacing with:
12820         (verify_true): New macro that returns true instead of void.
12821         (verify_type__): Remove.
12822         (verify): Use verify_true rather than verify_type__.
12823
12824 2005-09-26  Bruno Haible  <bruno@clisp.org>
12825
12826         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
12827         is necessary.
12828         (lib_SOURCES): Remove mbchar.c.
12829         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
12830         (Files): Add m4/mbrtowc.m4.
12831         * modules/mbiter: Likewise.
12832         * modules/mbuiter: Likewise.
12833
12834 2005-09-26  Bruno Haible  <bruno@clisp.org>
12835
12836         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
12837         compile mbchar.c if they are not both present.
12838         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
12839         * m4/mbiter.m4 (gl_MBITER): Likewise.
12840         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
12841         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
12842         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
12843
12844 2005-09-25  Jim Meyering  <jim@meyering.net>
12845
12846         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
12847         also uses socklen_t.
12848
12849 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
12850
12851         * lib/utimens.c (ENOSYS): Define if not already defined.
12852         (futimens): Support having a null PATH if the file descriptor
12853         is nonnegative.
12854
12855         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
12856         Remove.
12857         (__attribute): Define to empty unless GCC 3.1 or later.
12858         This works around a core dump on OpenBSD 3.4, which has GCC
12859         2.95.3, which dumps core when given __attribute__(()).  It also
12860         simplifies other tests, since we really don't want to bother with
12861         worrying about which ancient version of GCC supported what.
12862         Original problem reported by Yoann Vandoorselaere, with part of
12863         the fix suggested by Derek Price.
12864
12865 2005-09-24  Jim Meyering  <jim@meyering.net>
12866
12867         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
12868         so we can once again use a positive bitfield width of 1 -- now we
12869         don't have to explain why we were using a bitfield width of 2.
12870
12871 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12872
12873         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
12874         and similarly for the other external symbols.  Problem reported
12875         by James Gallager.
12876
12877         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
12878         bug reported by Jim Meyering.
12879
12880         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
12881         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
12882         not needed, since socklen is a prerequisite module.
12883
12884 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
12887         Problem reported by Eric Blake.
12888         (getaddrinfo): Initialize se so that it's not garbage.
12889         Redo internal storage allocation so that it doesn't make unportable
12890         assumptions about alignment.
12891         Fix a memory leak.
12892
12893         * lib/utimens.c (futimens): Use futimesat if available.
12894         Prefer it to futimes since it doesn't have the futimes bug.
12895
12896         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
12897         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
12898         Instead, declare a function that returns a pointer to an array,
12899         and use verify_type__ to declare the size of the array.
12900         Problem and germ of a solution reported by Bruno Haible.
12901         (verify_type__): Use 2, not 1, for bitfield size, to avoid
12902         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
12903
12904 2005-09-23  Jim Meyering  <jim@meyering.net>
12905
12906         Sync from coreutils.
12907         Correct build failure (socklen_t not defined) on at least
12908         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
12909         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
12910
12911 2005-09-23  Jim Meyering  <jim@meyering.net>
12912
12913         * modules/getaddrinfo (Depends-on): Add socklen.
12914
12915 2005-09-23  Bruno Haible  <bruno@clisp.org>
12916
12917         * tests/test-verify.c: New file.
12918
12919 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12920
12921         Sync from coreutils.
12922
12923         * modules/argmatch (Depends-on): Add verify.
12924         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
12925         unistd-safer.
12926         * modules/save-cwd (Depends-on): Likewise.
12927
12928         * modules/openat (Files): Add lib/openat-die.c.
12929         (Depends-on): Remove error, exitfail.
12930         Add dirname.
12931
12932         * modules/verify: New file.
12933         * MODULES.html.sh (Diagnostics <assert.h>): New section,
12934         with "verify" module.
12935
12936 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12937
12938         Sync from coreutils.
12939
12940         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
12941         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
12942         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
12943         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
12944         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
12945         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
12946         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
12947         Don't bother checking for string.h, stdlib.h, unistd.h.
12948         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
12949         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
12950         module's job.
12951         * m4/jm-macros.m4 (gl_MACROS): Likewise.
12952         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
12953
12954         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
12955         (gl_GETDATE): Use it.
12956
12957         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
12958
12959 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
12960
12961         Sync from coreutils.
12962
12963         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
12964         stat-time.h.
12965         * lib/argmatch.h: Include verify.h
12966         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
12967         (ARGMATCH_ASSERT): Remove; unused.
12968         * lib/canonicalize.c: Assume STDC_HEADERS.
12969         * lib/exclude.c: Include "strcase.h".
12970         * lib/regex_internal.h [!defined _LIBC]: Likewise.
12971         * lib/getusershell.c: Include stdio--.h rather than stdio.h
12972         and stdio-safer.h.
12973         (getusershell): Call fopen, not fopen_safer.
12974         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
12975         Do not include unistd-safer.h.
12976         (save_cwd): Don't call fd_safer; no longer needed
12977         now that we include fcntl--.h.
12978
12979         * lib/getdate.y (relative_time): New type.
12980         (RELATIVE_TIME_0): New constant.
12981         (parser_control): Use relative_time instead of doing it ourselves.
12982         (%union): Add new relative_time rel member.
12983         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
12984         Now typeless.
12985         (relunit, relunit_snumber): Now of type rel.
12986         (zone, rel, relunit, get_date): Adjust to above changes.
12987
12988         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
12989         Do not include unistd-safer.h.
12990         (getloadavg): Don't call fd_safer; no longer needed
12991         now that we include fcntl--.h.
12992
12993         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
12994         (make_dir_parents): Treat ENOSYS like EEXIST.
12995
12996         Improve quality of diagnostics on restore_cwd failure.
12997         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
12998         (make_dir_parents): Last arg is now int * (for errno), not bool *.
12999         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
13000         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
13001         each time through the loop.  Do not diagnose restore_cwd failure;
13002         that is the caller's job (and perhaps the caller does not care).
13003
13004         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
13005         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
13006         If the file already exists but is not a directory, don't bother
13007         to try to make its parents.
13008         Close potential file descriptor leak if we can't chdir("/") (!).
13009         Don't always return true if chdir($PWD) fails; return true only
13010         if the requested action was done successfully (except for the
13011         chdir($PWD)).
13012         Don't log final directory unless we actually made it.
13013         Refactor to avoid duplicate code to fix up permissions.
13014         Don't attempt to fix up parent permissions if chdir($PWD) fails.
13015
13016         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
13017         to make it a bit faster and (I hope) clearer.
13018         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
13019         Fix bug in formats like %2N.
13020
13021         * lib/verify.h: New file.
13022
13023 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13024
13025         Sync from coreutils.
13026         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
13027
13028 2005-09-22  Jim Meyering  <jim@meyering.net>
13029
13030         Sync from coreutils.
13031
13032         * m4/lstat.m4 (gl_FUNC_LSTAT):
13033         Use AC_LIBSOURCES to require lstat.c and lstat.h.
13034         Remove obsolete comment.
13035         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
13036         * m4/xstrtod.m4: Likewise.
13037
13038         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
13039
13040 2005-09-22  Jim Meyering  <jim@meyering.net>
13041
13042         Sync from coreutils.
13043
13044         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
13045
13046         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
13047         the .tm_year member, since otherwise gcc-4.0 would now warn about
13048         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
13049
13050         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
13051         order to avoid an unsuppressible warning from gcc on 64-bit systems.
13052
13053         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
13054         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
13055         when run in a time zone for which daylight savings time is in effect
13056         for the starting date.
13057
13058         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
13059         stop us from restricting permissions of just-created absolute-named
13060         directories.
13061         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
13062         to restore initial working directory.
13063         * lib/mkdir-p.c (make_dir_parents): New parameter:
13064         different_working_dir, to tell caller if/when we change the working
13065         directory and are unable to return to the initial one.
13066         * lib/mkdir-p.h (make_dir_parents): Update prototype.
13067         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
13068         `return false'.  This fixes a bug introduced on 2004-07-30.
13069
13070         * lib/openat.c (fdopendir): Be sure to close the supplied
13071         file descriptor before returning.  This makes our replacement
13072         implementation a little closer to Solaris's, where fdopendir
13073         ties the file descriptor to the returned DIR* pointer.
13074         * lib/openat.c (unlinkat): New function.
13075         * lib/openat.h (unlinkat): Add prototype.
13076         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
13077         (openat_restore_fail): Rename from openat_restore_die.
13078         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
13079
13080         Provide an alternative to exiting immediately upon save_cwd or
13081         restore_cwd failure.  Now, an application can arrange e.g.,
13082         to perform a longjump in that case.
13083         * lib/openat.c: Include dirname.h.
13084         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
13085         (rpl_openat, fdopendir, fstatat): Call openat_save_die
13086         and openat_restore_die rather than calling error directly.
13087         Don't include "error.h" or "exitfail.h"; they're no longer needed.
13088
13089         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
13090         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
13091         define.
13092
13093         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
13094         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
13095                             int utc, int nanoseconds);
13096         Background:
13097         date should not have to allocate a megabyte of virtual memory to
13098         handle a format argument like +%1048575T.  When implemented with
13099         strftime, it must allocate such a buffer, use strftime to fill it
13100         in, print it, then free it.
13101         With fprintftime, it simply prints everything and exits.
13102         With no need for memory allocation, that's one fewer way to fail.
13103         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
13104         optional field width, not before, so we accept %9:z, not %:9z.
13105         (my_strftime): Be sure to use L_('x') for literals.
13106
13107         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
13108         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
13109         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
13110         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
13111         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
13112         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
13113         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
13114         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
13115         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
13116         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
13117         * lib/xgethostname.c, lib/xreadlink.c:
13118         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
13119
13120         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
13121         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
13122         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
13123         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13124         and don't include <sys/file.h>).
13125
13126 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
13127
13128         Sync from coreutils.
13129
13130         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
13131         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
13132         [!LDAV_DONE]: Avoid unused variable warning.
13133
13134 2005-09-21  Bruno Haible  <bruno@clisp.org>
13135
13136         * lib/unicodeio.h (unicode_to_mb): New declaration.
13137
13138 2005-09-20  Derek Price  <derek@ximbiot.com>
13139
13140         * lib/getaddrinfo.c: Don't include <netdb.h> included from
13141         getaddrinfo.h.
13142
13143 2005-09-20  Bruno Haible  <bruno@clisp.org>
13144
13145         * gnulib-tool: Remove trailing slashes from the values specified for
13146         --source-base, --m4-base, --tests-base, --aux-dir.
13147         Suggested by Simon Josefsson <jas@extundo.com>.
13148
13149 2005-09-20  Bruno Haible  <bruno@clisp.org>
13150
13151         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
13152         func_modules_to_filelist, func_import, func_create_testdir): Make all
13153         sorting results locale-independent, so that gnulib-cache.m4 doesn't
13154         change when gnulib-tool is invoked in a different locale.
13155
13156 2005-09-19  Simon Josefsson  <jas@extundo.com>
13157
13158         * m4/socklen.m4: Fix typo.
13159
13160 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13161
13162         Use a consistent style for including <config.h>.
13163         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
13164         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
13165         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
13166         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
13167         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
13168         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
13169         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
13170         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
13171         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
13172         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
13173         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
13174         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
13175         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
13176         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
13177         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
13178         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
13179         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
13180         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
13181         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
13182         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
13183         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
13184         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
13185         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
13186         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
13187         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
13188         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
13189         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
13190         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
13191         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
13192         lib/xstrtoumax.c, lib/yesno.c:
13193         Standardize inclusion of config.h.
13194         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
13195         lib/inttostr.h:  Removed inclusion of config.h from header files.
13196         * lib/inttostr.c:  Adjusted in-tree users.
13197         * lib/timespec.h: Remove superfluous warning to include config.h.
13198         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
13199         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
13200         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
13201         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
13202         config.h with HAVE_CONFIG_H.
13203
13204 2005-09-19  Jim Meyering  <jim@meyering.net>
13205
13206         * modules/pathmax (License): Change to LGPL.
13207
13208 2005-09-19  Derek Price  <derek@ximbiot.com>
13209
13210         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
13211
13212 2005-09-19  Bruno Haible  <bruno@clisp.org>
13213
13214         * gnulib-tool (import): Provide default for --tests-base.
13215
13216 2005-09-19  Bruno Haible  <bruno@clisp.org>
13217
13218         * doc/quote.texi: New file, extracted from gnulib.texi.
13219         * doc/ctime.texi: New file, extracted from gnulib.texi.
13220         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
13221         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
13222         * doc/gnulib.texi: Include them.
13223
13224 2005-09-18  Bruno Haible  <bruno@clisp.org>
13225
13226         Portability fix.
13227         * gnulib-tool (func_readlink): New function.
13228         (func_ln_if_changed): Use it.
13229
13230 2005-09-18  Bruno Haible  <bruno@clisp.org>
13231
13232         * gnulib-tool: Support --with-tests also with --import.
13233         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
13234         (func_import): Use variables $testsbase and $inctests. Emit a
13235         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
13236         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
13237         SUBDIRS += $testsdir.
13238         (func_create_testdir): Update.
13239
13240 2005-09-18  Bruno Haible  <bruno@clisp.org>
13241
13242         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
13243         instead of $dry_run.
13244         (func_cp_if_changed, func_mv_if_changed): Remove functions.
13245         (func_ln_if_changed): Don't handle dry-run here.
13246         (func_import): In dry-run mode, detect more precisely which actions
13247         would be performed, and don't use "...ing" verbs.
13248
13249 2005-09-18  Bruno Haible  <bruno@clisp.org>
13250
13251         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
13252         (func_import): Use join on two temporary files instead of three nested
13253         loops, in order to determine which files are new or old.
13254
13255 2005-09-18  Bruno Haible  <bruno@clisp.org>
13256
13257         * gnulib-tool (func_import): Comment out code that spits out the
13258         new files with --dry-run.
13259
13260 2005-09-18  Bruno Haible  <bruno@clisp.org>
13261
13262         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
13263
13264 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13265
13266         * lib/stat-time.h: New file.
13267         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
13268         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
13269         in a different way.
13270         (timespec_cmp): New function.
13271         * lib/utimecmp.c: Include stat-time.h.
13272         (SYSCALL_RESOLUTION): Depend on whether various struct stat
13273         members exist, not on the obsolescent ST_MTIM_NSEC.
13274         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
13275
13276 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13277
13278         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
13279
13280 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13281
13282         * MODULES.html.sh (File system functions): Add stat-time.
13283         * modules/stat-time: New file.
13284         * modules/timespec (Files): Remove m4/st_mtim.m4; this
13285         is now done in a different way, by the stat-time module.
13286         * modules/utimecmp (Depends-on): Add stat-time.
13287
13288 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
13289
13290         * m4/st_mtim.m4: Remove.  Superseded by...
13291         * m4/stat-time.m4: New file.
13292         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
13293         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
13294
13295 2005-09-15  Derek Price  <derek@ximbiot.com>
13296
13297         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
13298
13299 2005-09-15  Derek Price  <derek@ximbiot.com>
13300
13301         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
13302         * lib/regex_internal.c: Ditto, using this...
13303         (__GNUC_PREREQ): ...new macro.
13304         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
13305         using...
13306         (__GNUC_PREREQ): ...this new macro.
13307
13308         * lib/strstr.h: Include string.h. Define strstr as a macro here.
13309
13310 2005-09-15  Derek Price  <derek@ximbiot.com>
13311             Paul Eggert  <eggert@cs.ucla.edu>
13312
13313         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
13314         changes, consolidating in...
13315         * lib/regex_internal.h: ...this file.
13316
13317 2005-09-13  Jim Meyering  <jim@meyering.net>
13318
13319         * lib/canon-host.c: Filter through gnu indent and reword comments
13320         slightly.
13321         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
13322
13323 2005-09-13  Derek Price  <derek@ximbiot.com>
13324
13325         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
13326         failure.
13327         Reported by Jim Meyering  <jim@meyering.net>.
13328
13329 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13330
13331         * lib/base64.c: Typo.
13332         (base64_encode): Put b64str in initialized data section.
13333
13334 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
13335
13336         Merge glibc and coreutils changes into gnulib, plus a few
13337         extra fixes.
13338         * lib/md5.c: Use #error rather than a string.
13339         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
13340         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
13341         (__attribute__): Define to empty for non recent-GCC.
13342         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
13343         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
13344         Renamed from their non-__ counterparts, with new macros replacing
13345         them if not _LIBC.  Add __THROW attribute.
13346         (rol): Remove.
13347         (struct md5_ctx): Align buffer if using GCC.
13348         * lib/sha1.h (struct sha1_ctx): Likewise.
13349         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
13350         The old name was backwards.
13351         (NOTSWAP): Remove; not used.
13352         (rol): New macro, moved here from md5.h.
13353         (sha1_process_block): Remove a FIXME that doesn't make sense.
13354
13355 2005-09-12  Derek Price  <derek@ximbiot.com>
13356
13357         Return usable errors from canon-host.
13358         * lib/canon-host.h: New file.
13359         * lib/canon-host.c (canon_host): Wrap...
13360         (canon_host_r): ...this new function, which now relies exclusively on
13361         getaddrinfo.
13362         (ch_strerror): New function.
13363         (last_cherror): New global.
13364         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
13365         interface.
13366         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
13367         void *.
13368         (freeaddrinfo): Free ai->ai_canonname when set.
13369
13370 2005-09-12  Derek Price  <derek@ximbiot.com>
13371
13372         Make canon-host require getaddrinfo.
13373         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
13374         AC_LIBSOURCE canon-host.h.  Call...
13375         (gl_PREREQ_CANON_HOST): ...this new function, which requires
13376         gl_GETADDRINFO.
13377         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
13378
13379 2005-09-12  Derek Price  <derek@ximbiot.com>
13380
13381         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
13382         LGPL.
13383         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
13384
13385 2005-09-12  Derek Price  <derek@ximbiot.com>
13386
13387         * lib/gai_strerror.c: Include config.h when available.  Include
13388         getaddrinfo.h before other headers to test interface.
13389         Reported by Larry Jones <lawrence.jones@ugs.com>.
13390
13391 2005-09-12  Derek Price  <derek@ximbiot.com>
13392             Paul Eggert  <eggert@cs.ucla.edu>
13393
13394         * modules/glob (Files): Add glob-libc.h.
13395
13396 2005-09-12  Derek Price  <derek@ximbiot.com>
13397             Paul Eggert  <eggert@cs.ucla.edu>
13398
13399         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
13400         glob_.h, glob-libc.h.
13401         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
13402
13403 2005-09-12  Derek Price  <derek@ximbiot.com>
13404             Paul Eggert  <eggert@cs.ucla.edu>
13405
13406         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
13407         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
13408         protecting things that should be done only in gnulib contexts.
13409         * lib/glob_.h: New file, containing only the glob things needed for
13410         gnulib.
13411         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
13412         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
13413         (glob, globfree, glob_pattern_p): Now defined simply in terms of
13414         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
13415         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
13416         and to respect the namespace rules better.
13417
13418 2005-09-08  Simon Josefsson  <jas@extundo.com>
13419
13420         * modules/socklen: New file.
13421
13422 2005-09-08  Simon Josefsson  <jas@extundo.com>
13423
13424         * m4/socklen.m4: New file.
13425
13426 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13427
13428         * modules/utimens (Files): Add m4/utimbuf.m4, since
13429         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
13430         Reported by Sergey Poznyakoff.
13431
13432 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13433
13434         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
13435         definitions, since that's the preferred style in glibc.
13436         Fix a minor spacing issue, and update copyright notice to match
13437         glibc's.
13438
13439 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13440
13441         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
13442
13443 2005-09-06  Simon Josefsson  <jas@extundo.com>
13444
13445         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
13446         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
13447
13448 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13449
13450         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
13451         warning.
13452
13453 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13454
13455         * config/srclist.txt: Add glibc bug 1302.
13456
13457 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
13458
13459         Change bitset word type from unsigned int to unsigned long int,
13460         as this has better performance on typical 64-bit hosts.
13461         Port bitset code to hosts with unusual word sizes.
13462         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
13463         (build_collating_symbol):
13464         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
13465         argument is a bitset.  This is merely a style issue, but it makes
13466         it clearer that an entire array is expected.
13467         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
13468         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
13469         Port to the case where bitset_word is not the same as unsigned int.
13470         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13471         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
13472         Likewise.
13473         * lib/regexec.c (check_dst_limits_calc_pos_1,
13474         check_subexp_matching_top):
13475         (build_trtable, group_nodes_into_DFAstates):
13476         Likewise.
13477         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
13478         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
13479         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
13480         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
13481         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
13482         * lib/regcomp.c (optimize_subexps, lower_subexp):
13483         Work even if bitset_word has holes in its bitwise representation.
13484         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
13485         * lib/regexec.c (check_dst_limits_calc_pos_1,
13486         check_subexp_matching_top):
13487         Likewise.
13488         * lib/regex_internal.c (re_string_reconstruct):
13489         Don't assume UCHAR_MAX == 255.
13490         * lib/regex_internal.h (bitset_set_all): Likewise.
13491         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
13492         All uses changed.
13493         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
13494         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
13495         All uses changed.
13496         (BITSET_WORD_MAX): New macro.
13497         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
13498         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
13499         (bitset_empty, bitset_copy):
13500         Prefer sizeof (bitset) to multiplying it out ourselves.
13501         (bitset_not_merge): Remove; unused.
13502         (bitset_contain): Return bool, not unsigned int with one bit on.
13503         All callers changed.
13504         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
13505         alignment than re_node_set; do this by defining a new internal
13506         type struct dests_alloc and using it to allocate memory.
13507
13508 2005-09-05  Bruno Haible  <bruno@clisp.org>
13509
13510         * gnulib-tool (func_import): Fix comparison in handling of symbolic
13511         links.
13512
13513 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
13514
13515         * modules/size_max (Makefile.am): Add size_max.h
13516
13517 2005-09-04  Derek Price  <derek@ximbiot.com>
13518
13519         * gnulib-tool (func_import): Fix reversed $symbolic logic.
13520
13521 2005-09-03  Simon Josefsson  <jas@extundo.com>
13522
13523         * gnulib-tool: Fix typo.
13524
13525 2005-09-03  Simon Josefsson  <jas@extundo.com>
13526
13527         * config/srclist.txt: Add glibc bug 1293.
13528
13529 2005-09-03  Derek Price  <derek@ximbiot.com>
13530
13531         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
13532         From Larry Jones <lawrence.jones@ugs.com>.
13533
13534 2005-09-02  Simon Josefsson  <jas@extundo.com>
13535
13536         * modules/socklen: New file.
13537
13538 2005-09-02  Simon Josefsson  <jas@extundo.com>
13539
13540         * modules/havelib: New module.
13541
13542         * modules/gettext, modules/iconv, modules/lock, modules/readline:
13543         Use havelib.
13544
13545 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13546
13547         Check for arithmetic overflow when calculating sizes, to prevent
13548         some buffer-overflow issues.  These patches are conservative, in the
13549         sense that when I couldn't determine whether an overflow was possible,
13550         I inserted a run-time check.
13551         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
13552         macros.
13553         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
13554         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
13555         (re_xnrealloc, re_x2nrealloc): New inline functions.
13556         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
13557         parse_bracket_exp):
13558         (build_equiv_class, build_charclass): Check for arithmetic overflow
13559         in size expression calculations.
13560         * lib/regex_internal.c (re_string_realloc_buffers):
13561         (build_wcs_upper_buffer, re_node_set_add_intersect):
13562         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
13563         (re_dfa_add_node, register_state): Likewise.
13564         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
13565         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
13566         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
13567         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
13568
13569 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13570
13571         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13572         m4/ulonglong.m4.  Problem reported by Martin Lambers.
13573
13574 2005-09-02  Bruno Haible  <bruno@clisp.org>
13575
13576         Support for lib vs. lib64 distinction on biarch platforms.
13577         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
13578         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
13579         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
13580
13581 2005-09-02  Bruno Haible  <bruno@clisp.org>
13582
13583         * gnulib-tool (import): In the other first-use case, provide defaults
13584         as well.
13585
13586 2005-09-02  Bruno Haible  <bruno@clisp.org>
13587
13588         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
13589         patches not yet found in the latest gettext release.
13590
13591 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13592
13593         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
13594         to avoid a collision with bits/local_lim.h in glibc.
13595         All uses changed.  Problem reported by Dmitry V. Levin in
13596         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
13597
13598         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
13599         bugs in int versus size_t comparisons.
13600         (re_string_context_at): Fix bug where the code assumed that
13601         Idx is signed.
13602
13603         Use bool where appropriate.
13604         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
13605         All callers changed.
13606         (calc_eclosure_iter): Likewise, for ROOT arg.
13607         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
13608         (build_charclass_op): Likewise, for NON_MATCH arg.
13609         * lib/regex_internal.c (re_string_allocate, re_string_construct):
13610         (re_string_construct_common): Likewise, for ICASE arg.
13611         * lib/regexec.c (re_search_2_stub, re_search_stub):
13612         Likewise, for RET_LEN arg.
13613         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
13614         (set_regs): Likewise, for FL_BACKTRACK arg.
13615         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
13616         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
13617         (calc_eclosure_iter, parse_bracket_exp):
13618         Use bool for internal variables that are booleans.
13619         * lib/regexec.c (re_search_internal, check_matching,
13620         proceed_next_node):
13621         (set_regs, build_sifted_states, sift_states_bkref):
13622         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
13623         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13624         (find_collation_sequence_value):
13625         Likewise.
13626         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
13627         (re_node_set_compare):
13628         Return bool, not int. All callers changed.
13629         * lib/regexec.c (check_halt_node_context, check_dst_limits):
13630         (build_trtable, check_node_accept): Likewise.
13631         * lib/regex_internal.h: Include stdbool.h.
13632
13633         Fix bugs uncovered when converting to bool.
13634         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
13635         failure instead of charging ahead blindly.
13636         * lib/regex_internal.c (register_state): Likewise.
13637         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
13638         for freeing internal storage.
13639         (group_nodes_into_DFA_states): Use unsigned int, not int, for
13640         bitset pieces used as boolean, to avoid undefined behavior
13641         on hosts that do int overflow checking.
13642
13643 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13644
13645         * config/srclist.txt: Add glibc bugs 1285-1287.
13646
13647 2005-09-01  Jim Meyering  <jim@meyering.net>
13648
13649         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
13650         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
13651         Require gl_STAT_MACROS, too.
13652
13653 2005-09-01  Bruno Haible  <bruno@clisp.org>
13654
13655         * gnulib-tool (import): In the first-use case, provide defaults.
13656
13657 2005-09-01  Bruno Haible  <bruno@clisp.org>
13658
13659         * gnulib-tool (func_import): Remove the .tmp files.
13660
13661 2005-09-01  Bruno Haible  <bruno@clisp.org>
13662
13663         * gnulib-tool (func_import): Fix handling of symbolic links.
13664
13665 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13666
13667         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
13668         old glibc regex code mishandles strings longer than 2**31 bytes.
13669         This patch fixes this when the regex code is used in gnulib
13670         (i.e., outside glibc).
13671
13672         This patch should not affect the use of the regex code inside
13673         glibc.  No doubt this problem also needs to be handled for glibc
13674         as well, but the result will be an incompatible change to the
13675         glibc ABI, and the old ABI will have to be supported too.  That
13676         can be the the subject for another patch.
13677
13678         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
13679         governing whether the rest of this patch is active.  By default,
13680         the macro is disabled and the patch has no effect.
13681         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
13682         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
13683         (struct re_pattern_buffer, re_search, re_search_2, re_match):
13684         (re_match_2, re_set_registers): Use the new types.
13685         * lib/regex_internal.h (Idx, re_hashval_t): New types.
13686         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
13687         New macros.
13688         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
13689         (re_string_context_at, bin_tree_t, re_dfastate_t):
13690         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
13691         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
13692         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
13693         (re_string_char_size_at, re_string_wchar_at):
13694         (re_string_elem_size_at):
13695         Use the new types and macros to port to 64-bit hosts.
13696         Use unsigned types for internal values, so that the code
13697         mostly works even for arrays larger than SSIZE_MAX.
13698         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
13699         (search_duplicated_node, calc_eclosure_iter, fetch_number):
13700         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
13701         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
13702         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
13703         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
13704         (calc_inveclosure, parse_dup_op, build_range_exp):
13705         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
13706         (fetch_number, create_token_tree, mark_opt_subexp):
13707         Likewise.
13708         * lib/regex_internal.c (re_string_construct_common,
13709         create_ci_newstate):
13710         (create_cd_newstate, re_string_allocate, re_string_construct):
13711         (re_string_realloc_buffers, build_wcs_upper_buffer):
13712         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13713         (re_string_reconstruct, re_string_peek_byte_case):
13714         (re_string_fetch_byte_case, re_string_context_at):
13715         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13716         (re_node_set_init_copy, re_node_set_add_intersect):
13717         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13718         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13719         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13720         (re_acquire_state, re_acquire_state_context, register_state):
13721         Likewise.
13722         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
13723         search_cur_bkref_entry):
13724         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
13725         (re_search_internal, re_search_2_stub, re_search_stub)
13726         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
13727         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
13728         (update_cur_sifted_state, check_dst_limits):
13729         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13730         (check_subexp_limits, sift_states_bkref, merge_state_array):
13731         (check_subexp_matching_top, get_subexp, get_subexp_sub):
13732         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
13733         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13734         (expand_bkref_cache, check_node_accept_bytes):
13735         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
13736         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
13737         (acquire_init_state_context, check_halt_node_context):
13738         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
13739         (sift_states_backward, clean_state_log_if_needed):
13740         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
13741         (find_recover_state, transit_state_sb, transit_state_mb):
13742         (transit_state_bkref, build_trtable, match_ctx_clean):
13743         Likewise.
13744         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
13745         to work around an assumption that REG_MISSING is negative.
13746
13747         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
13748         (seek_collating_symbol_entry) [defined _LIBC]:
13749         (lookup_collation_sequence_value) [defined _LIBC]:
13750         (build_range_exp, build_collating_symbol) [defined _LIBC]:
13751         Use prototypes rather than old-style function definitions.
13752         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
13753         (transit_state_sb) [0]:
13754         (find_collation_sequence_value) [defined _LIBC]: Likewise.
13755
13756         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
13757         rm_eo.
13758
13759         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
13760         (optimize_subexps, lower_subexp):
13761         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
13762         since the signed shift might overflow.  Use 1u<<31 instead.
13763         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13764         Likewise.
13765         * lib/regexec.c (check_dst_limits_calc_pos_1,
13766         check_subexp_matching_top): Likewise.
13767
13768         * lib/regcomp.c (optimize_subexps, lower_subexp):
13769         Use CHAR_BIT rather than 8, for clarity.
13770         * lib/regexec.c (check_dst_limits_calc_pos_1):
13771         (check_subexp_matching_top): Likewise.
13772         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
13773         have to worry about portability issues when shifting it left.
13774         Remove no-longer-needed test for table_size > 0.
13775         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
13776         in a word, as the resulting behavior is undefined.
13777         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
13778         in one case, a <= should have been an <, and in another case the
13779         whole test was missing.
13780         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
13781         the standard name CHAR_BIT.
13782         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
13783         this is not true on one's complement and signed-magnitude hosts.
13784
13785         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
13786         next_last_offset.
13787         (struct re_dfa_t): Remove unused member states_alloc.
13788         * lib/regcomp.c (init_dfa): Don't initialize unused members.
13789
13790 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13791
13792         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
13793         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
13794         and large-file glibc and in 32-bit large-file Solaris.
13795
13796 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13797
13798         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
13799         lengths fit in regoff_t; this isn't true if regoff_t is the same
13800         width as size_t.
13801         * lib/regex.c (re_search_internal): 5th arg is LAST_START
13802         (= START + RANGE) instead of RANGE.  This avoids overflow
13803         problems when regoff_t is the same width as size_t.
13804         All callers changed.
13805         (re_search_2_stub): Check for overflow when adding the
13806         sizes of the two strings.
13807         (re_search_stub): Check for overflow when adding START
13808         to RANGE; if it occurs, substitute the extreme value.
13809
13810 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13811
13812         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
13813
13814 2005-08-31  Jim Meyering  <jim@meyering.net>
13815
13816         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
13817         a pointer-to-const.
13818         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
13819         (register_state): Likewise.
13820         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
13821         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13822         (group_nodes_into_DFAstates): Likewise.
13823
13824 2005-08-31  Jim Meyering  <jim@meyering.net>
13825
13826         * check-module: Add a FIXME comment.
13827
13828 2005-08-31  Eric Blake  <ebb9@byu.net>
13829
13830         * modules/unistd-safer (Files): Add unistd--.h.
13831         * modules/stdio-safer (Files): Add stdio--.h.
13832
13833 2005-08-31  Derek Price  <derek@ximbiot.com>
13834
13835         * lib/getdelim.c (getdelim): Return EOF on EOF.
13836         Reported by Larry Jones <lawrence.jones@ugs.com>.
13837
13838 2005-08-31  Bruno Haible  <bruno@clisp.org>
13839
13840         Avoid unnecessary diffs in the generated lib/Makefile.am.
13841         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
13842         the generated files.
13843         (func_import): Don't set cmd.
13844
13845 2005-08-31  Bruno Haible  <bruno@clisp.org>
13846
13847         * lib/strstr.c: Include <stddef.h>, for NULL.
13848         * lib/strcasestr.c: Likewise.
13849         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13850
13851 2005-08-31  Bruno Haible  <bruno@clisp.org>
13852
13853         * gnulib-tool: New option --macro-prefix.
13854         (func_import): Use macro_prefix.
13855         (import): Handle option --macro-prefix.
13856
13857 2005-08-31  Bruno Haible  <bruno@clisp.org>
13858
13859         * gnulib-tool (import): Rename most ac_* variables to cached_*.
13860         Also use new variables cached_lgpl, cached_libtool.
13861
13862 2005-08-31  Bruno Haible  <bruno@clisp.org>
13863
13864         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
13865         always instantiating them.
13866
13867 2005-08-31  Bruno Haible  <bruno@clisp.org>
13868
13869         * gnulib-tool (func_import): Read the previous cached settings
13870         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
13871         earlier added by gnulib but are now dropped. Warn when a gnulib file
13872         overwrites a non-gnulib file.
13873
13874 2005-08-31  Bruno Haible  <bruno@clisp.org>
13875
13876         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
13877         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
13878         projects that don't keep autogenerated files in CVS. Put into
13879         actioncmd only the specified modules, not the transitive closure.
13880
13881 2005-08-31  Bruno Haible  <bruno@clisp.org>
13882
13883         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
13884         Create directories that shall be filled.
13885         (import): Don't look for gl_* macros in configure.ac. Recurse across
13886         all directories containing a gnulib-cache.m4 files, if meaningful.
13887
13888 2005-08-31  Bruno Haible  <bruno@clisp.org>
13889
13890         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
13891         (import): Set seen_libtool when we see gl_LIBTOOL.
13892
13893 2005-08-31  Bruno Haible  <bruno@clisp.org>
13894
13895         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
13896         declaration macro definitions from generated gnulib.m4.
13897
13898 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
13899
13900         * lib/iconvme.h: Add prototype for iconv_alloc.
13901
13902 2005-08-29  Simon Josefsson  <jas@extundo.com>
13903
13904         * lib/iconvme.c: Fix errno.
13905
13906 2005-08-29  Bruno Haible  <bruno@clisp.org>
13907
13908         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
13909         that it works when the directory contains spaces.
13910
13911 2005-08-29  Bruno Haible  <bruno@clisp.org>
13912
13913         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
13914
13915 2005-08-29  Bruno Haible  <bruno@clisp.org>
13916
13917         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
13918         Emit more advice.
13919
13920 2005-08-29  Bruno Haible  <bruno@clisp.org>
13921         and Stepan Kasal  <kasal@ucw.cz>
13922
13923         * check-module: If more parameters are given, check each of them
13924         separately; add more exceptions, as noted by Jim Meyering.
13925         (check_module): New procedure.
13926         (%exempt_header): Now contains all exceptions.
13927
13928 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
13929
13930         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
13931
13932 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
13933
13934         * lib/iconvme.c: Split iconv_string into iconv_alloc.
13935
13936 2005-08-28  Bruno Haible  <bruno@clisp.org>
13937
13938         * m4/gnulib-tool.m4: New file.
13939
13940 2005-08-27  Jim Meyering  <jim@meyering.net>
13941
13942         * modules/unistd-safer (Files): Add pipe-safer.c.
13943         * modules/fcntl-safer (Files): Add creat-safer.c.
13944
13945 2005-08-27  Jim Meyering  <jim@meyering.net>
13946
13947         * m4/stdlib-safer.m4: New file.  From coreutils.
13948         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
13949         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
13950         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
13951         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
13952         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
13953
13954 2005-08-27  Jim Meyering  <jim@meyering.net>
13955
13956         * lib/fopen-safer.c: Merge minor changes from coreutils.
13957         * lib/dup-safer.c: Likewise.
13958         * lib/fd-safer.c: Likewise.
13959
13960         Merge from coreutils.
13961         * lib/stdio--.h: New file.
13962         * lib/stdlib--.h: New file.
13963         * lib/mkstemp-safer.c: New file.
13964
13965         GNU tar needs these.
13966         * lib/pipe-safer.c: New file.
13967         * lib/creat-safer.c: New file.
13968         * lib/fcntl--.h (creat): Define to creat_safer.
13969         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
13970         * lib/unistd--.h (pipe): Define to pipe_safer.
13971         * lib/unistd-safer.h: Declare pipe_safer.
13972
13973 2005-08-26  Simon Josefsson  <jas@extundo.com>
13974
13975         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
13976         Haible <bruno@clisp.org>.
13977
13978 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
13979
13980         * lib/regex_internal.h: Remove all references to
13981         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
13982         or better.
13983         (bitset_not, bitset_merge, bitset_not_merge):
13984         (bitset_mask, re_string_allocate, re_string_construct):
13985         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
13986         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
13987         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
13988         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
13989         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13990         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13991         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
13992         (re_acquire_state_context):
13993         Remove unnecessary forward decls.
13994         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
13995         Put __attribute at function definition,
13996         now that the function decl has been removed.
13997         * lib/regex_internal.c (re_string_peek_byte_case):
13998         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
13999         Likewise.
14000
14001 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
14002
14003         * m4/regex.m4: Add AC_PREREQ(2.50).
14004         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
14005
14006 2005-08-25  Simon Josefsson  <jas@extundo.com>
14007
14008         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
14009         __fsetlocking.
14010
14011 2005-08-25  Simon Josefsson  <jas@extundo.com>
14012
14013         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
14014         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
14015         GLIBC specific code.
14016
14017 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14018
14019         Make regex safe for g++.  This fixes one real bug (an "err"
14020         that should have been "*err").  g++ problem reported by
14021         Sam Steingold.
14022         * lib/regex_internal.h (re_calloc): New macro, consistent with
14023         re_malloc etc.  All callers of calloc changed to use re_calloc.
14024         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
14025         not int.  All callers changed.
14026         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
14027         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
14028         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
14029         (find_recover_state): Change "err" to "*err"; this fixes what
14030         appears to be a real bug.
14031         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
14032         versus int.
14033
14034 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14035
14036         * modules/regex (Depends-on): Add malloc, since the code
14037         assumes that !malloc(0) means failure.
14038
14039 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14040
14041         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
14042
14043         alloca modernization/simplification for regex.
14044         * lib/regex.c: Remove portability cruft for alloca.  This no longer
14045         needs to be at the start of the file, and can be moved into
14046         regex_internal.h and simplified.
14047         * lib/regex_internal.h: Include <alloca.h>.
14048         (__libc_use_alloca) [!defined _LIBC]: New macro.
14049         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
14050         now works outside glibc.
14051
14052 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14053
14054         * config/srclist.txt: Add glibc bugs 1241, 1245.
14055
14056 2005-08-25  Jim Meyering  <jim@meyering.net>
14057
14058         * lib/open-safer.c: Include <config.h>.
14059         Otherwise, we'd lose LARGEFILE support in any file using
14060         e.g. "fcntl--.h"
14061
14062 2005-08-25  Bruno Haible  <bruno@clisp.org>
14063
14064         * m4/minmax.m4: Require autoconf 2.52.
14065         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
14066         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
14067         alternatives of translit over the alphabet.
14068         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
14069
14070 2005-08-24  Simon Josefsson  <jas@extundo.com>
14071
14072         * tests/test-getpass.c: New file.
14073
14074 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14075
14076         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
14077         for GNU regex features.
14078
14079 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14080
14081         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
14082         * lib/regex.h (regerror): Likewise.
14083
14084         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
14085         requires this.  (The code never needed it.)
14086
14087         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
14088         All uses of recently-renamed identifiers changed to use the new,
14089         POSIX-compliant names.  The code will build and run just fine
14090         without these changes, but it's better to eat our own dog food
14091         and use the standard-conforming names.
14092
14093         * lib/regex.h: Fix a multitude of POSIX name space violations.
14094         These changes have an effect only for programs that define
14095         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
14096         do not change anything for programs compiled in the normal way.
14097         Also, there is no effect on the ABI.
14098
14099         (_REGEX_SOURCE): New macro.
14100         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
14101         defined and _GNU_SOURCE is not; this fixes a name space violation.
14102
14103         Rename the following macros to obey POSIX requirements.
14104         The old names are still visible as macros if _REGEX_SOURCE is defined.
14105         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
14106         RE_BACKSLASH_ESCAPE_IN_LISTS.
14107         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
14108         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
14109         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
14110         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
14111         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
14112         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
14113         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
14114         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
14115         (REG_INTERVALS): renamed from RE_INTERVALS.
14116         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
14117         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
14118         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
14119         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
14120         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
14121         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
14122         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
14123         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
14124         RE_UNMATCHED_RIGHT_PAREN_ORD.
14125         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
14126         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
14127         (REG_DEBUG): renamed from RE_DEBUG.
14128         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
14129         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
14130         unusual, since we can't clash with the POSIX REG_ICASE.
14131         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
14132         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
14133         (REG_NO_SUB): renamed from RE_NO_SUB.
14134         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
14135         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
14136         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
14137         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
14138         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
14139         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
14140         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
14141         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
14142         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
14143         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
14144         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
14145         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
14146         RE_SYNTAX_POSIX_MINIMAL_BASIC.
14147         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
14148         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
14149         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
14150         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
14151         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
14152         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
14153         (REG_FIXED): Renamed from REGS_FIXED.
14154         (REG_NREGS): Renamed from RE_NREGS.
14155
14156         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
14157         of other REG_* macros, since POSIX says the user is allowed to
14158         #undef these macros selectively.
14159
14160         (reg_errcode_t): Update comment stating what other tables need
14161         to be consistent.
14162
14163         Rename the following enum values to obey POSIX requirements.
14164         The old names are still visible as macros.
14165         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
14166         is not defined, since GNU is supposed to be a superset of POSIX as
14167         much as possible, and since we want reg_errcode_t to be a signed
14168         type for implementation consistency.
14169         (_REG_NOERROR): Renamed from REG_NOERROR.
14170         (_REG_NOMATCH): Renamed from REG_NOMATCH.
14171         (_REG_BADPAT): Renamed from REG_BADPAT.
14172         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
14173         (_REG_ECTYPE): Renamed from REG_ECTYPE.
14174         (_REG_EESCAPE): Renamed from REG_EESCAPE.
14175         (_REG_ESUBREG): Renamed from REG_ESUBREG.
14176         (_REG_EBRACK): Renamed from REG_EBRACK.
14177         (_REG_EPAREN): Renamed from REG_EPAREN.
14178         (_REG_EBRACE): Renamed from REG_EBRACE.
14179         (_REG_BADBR): Renamed from REG_BADBR.
14180         (_REG_ERANGE): Renamed from REG_ERANGE.
14181         (_REG_ESPACE): Renamed from REG_ESPACE.
14182         (_REG_BADRPT): Renamed from REG_BADRPT.
14183         (_REG_EEND): Renamed from REG_EEND.
14184         (_REG_ESIZE): Renamed from REG_ESIZE.
14185         (_REG_ERPAREN): Renamed from REG_ERPAREN.
14186         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
14187         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
14188         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
14189         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
14190
14191         (_REG_RE_NAME, _REG_RM_NAME): New macros.
14192         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
14193         changed.  But support the old name if the new one is not defined
14194         and if _REGEX_SOURCE.
14195
14196         Change the following member names in struct re_pattern_buffer.
14197         The old names are still supported if !_REGEX_SOURCE.
14198         The new names are always supported, regardless of _REGEX_SOURCE.
14199         (re_buffer): Renamed from buffer.
14200         (re_allocated): Renamed from allocated.
14201         (re_used): Renamed from used.
14202         (re_syntax): Renamed from syntax.
14203         (re_fastmap): Renamed from fastmap.
14204         (re_translate): Renamed from translate.
14205         (re_can_be_null): Renamed from can_be_null.
14206         (re_regs_allocated): Renamed from regs_allocated.
14207         (re_fastmap_accurate): Renamed from fastmap_accurate.
14208         (re_no_sub): Renamed from no_sub.
14209         (re_not_bol): Renamed from not_bol.
14210         (re_not_eol): Renamed from not_eol.
14211         (re_newline_anchor): Renamed from newline_anchor.
14212
14213         Change the following member names in struct re_registers.
14214         The old names are still supported if !_REGEX_SOURCE.
14215         The new names are always supported, regardless of _REGEX_SOURCE.
14216         (rm_num_regs): Renamed from num_regs.
14217         (rm_start): Renamed from start.
14218         (rm_end): Renamed from end.
14219
14220         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
14221         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
14222         Prepend __ to parameter names.
14223
14224         Undo yesterday's changes.
14225
14226 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14227
14228         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
14229         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
14230         lib/regex.c.
14231
14232 2005-08-24  Jim Meyering  <jim@meyering.net>
14233
14234         Sync from coreutils.
14235         * m4/fcntl-safer.m4: New file.
14236
14237         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
14238         and object files for this module.
14239
14240 2005-08-24  Jim Meyering  <jim@meyering.net>
14241
14242         Sync from coreutils.
14243         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
14244
14245 2005-08-24  Jim Meyering  <jim@meyering.net>
14246
14247         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
14248         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
14249
14250 2005-08-24  Jim Meyering  <jim@meyering.net>
14251
14252         * modules/fcntl-safer: New module.
14253         * modules/fts (Depends-on): Add fcntl-safer.
14254         * MODULES.html.sh (File descriptor based Input/Output):
14255         Add fcntl-safer.
14256
14257 2005-08-24  Bruno Haible  <bruno@clisp.org>
14258
14259         Support for unit test modules.
14260         * modules/README: Mention tests modules.
14261         * modules/TEMPLATE-TESTS: New file.
14262         * gnulib-tool: New options --extract-tests-module, --with-tests and
14263         --tests-base (unused for the moment).
14264         (testsbase, inctests): New variables.
14265         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
14266         (func_verify_module): Exclude TEMPLATE-TESTS.
14267         (func_verify_nontests_module, func_verify_tests_module): New functions.
14268         (func_get_dependencies): Add implicit dependency for tests modules.
14269         (func_get_tests_module): New function.
14270         (func_modules_transitive_closure): When --with-tests was specified,
14271         include the unit tests as well, unless explicitly avoided.
14272         (func_emit_lib_Makefile_am): Ignore the tests modules here.
14273         (func_emit_tests_Makefile_am): New function.
14274         (func_create_testdir): When --with-tests was specified, emit a
14275         tests/ directory.
14276         * MODULES.html.sh (Future developments): Update.
14277
14278 2005-08-24  Bruno Haible  <bruno@clisp.org>
14279
14280         * modules/tls-tests: New file.
14281         * tests/test-tls.c: New file, from GNU gettext.
14282
14283 2005-08-24  Bruno Haible  <bruno@clisp.org>
14284
14285         * modules/lock-tests: New file.
14286         * tests/test-lock.c: New file, from GNU gettext.
14287
14288 2005-08-24  Bruno Haible  <bruno@clisp.org>
14289
14290         * lib/lock.h: Add multiple inclusion guard.
14291         * lib/tls.h: Add multiple inclusion guard.
14292
14293 2005-08-24  Bruno Haible  <bruno@clisp.org>
14294
14295         * gnulib-tool: Add support for the --aux-dir option to
14296         --create-testdir, --create-megatestdir, --test, --megatest.
14297         (func_create_testdir, func_create_megatestdir): Optionally emit a
14298         AC_CONFIG_AUX_DIR directive.
14299         (create-testdir, create-megatestdir, test, megatest): Provide a
14300         default value for $auxdir.
14301
14302 2005-08-24  Bruno Haible  <bruno@clisp.org>
14303
14304         * gnulib-tool (import): Use compound statement instead of subshell
14305         where possible.
14306
14307 2005-08-24  Bruno Haible  <bruno@clisp.org>
14308
14309         * gnulib-tool (import): Change --aux-dir default to "build-aux".
14310
14311 2005-08-24  Bruno Haible  <bruno@clisp.org>
14312
14313         * gnulib-tool (func_version): Update.
14314
14315 2005-08-24  Bruno Haible  <bruno@clisp.org>
14316
14317         * gnulib-tool (func_import, func_create_testdir,
14318         func_create_megatestdir): Quote all autoconf macro arguments.
14319
14320 2005-08-24  Bruno Haible  <bruno@clisp.org>
14321
14322         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
14323         option --force, because --force causes the aclocal.m4 of each
14324         subdirectory to be newer than the corresponding config.h.in.
14325
14326 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14327
14328         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
14329         All contents moved to gl_REGEX.
14330         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
14331         assume that it does.
14332
14333 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14334
14335         * lib/regex.h (REG_NOSYS)
14336         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
14337         Define, since POSIX requires it as of 2001.
14338         (_REG_ENOSYS)
14339         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
14340         New private symbol, used to keep the enum signed in all cases.
14341         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
14342         Youngman in
14343         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
14344
14345         * lib/regex_internal.c (re_string_skip_chars, register_state):
14346         (calc_state_hash):
14347         Remove forward decls; no longer needed now that we use prototypes.
14348         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
14349         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
14350         (clean_state_log_if_needed): Likewise.
14351
14352 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14353
14354         * config/srclist.txt: Add glibc bugs 1231-1233.
14355
14356 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14357
14358         Fix problems reported by Sam Steingold in
14359         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
14360         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
14361         assumed that reg_errcode_t is a signed type, which is not
14362         necessarily true if _XOPEN_SOURCE is not defined.
14363         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
14364         since some compilers warn about it otherwise.
14365
14366 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14367
14368         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
14369         (init_word_char, create_initial_state, duplicate_node_closure):
14370         (fetch_token, peek_token_bracket, build_range_exp):
14371         (build_collating_symbol): Remove forward decls; no longer needed
14372         now that we use prototypes.
14373
14374         * lib/regcomp.c:
14375         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
14376         (re_compile_fastmap_iter, regcomp, regerror, regfree):
14377         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
14378         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
14379         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
14380         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
14381         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
14382         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
14383         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
14384         (build_range_exp, build_collating_symbol, parse_bracket_exp):
14385         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
14386         (build_charclass, build_charclass_op, fetch_number, create_tree):
14387         (create_token_tree, mark_opt_subexp, duplicate_tree):
14388         Use prototypes rather than old-style definitions.
14389
14390         * lib/regex_internal.c:
14391         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
14392         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
14393         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14394         (re_string_reconstruct, re_string_peek_byte_case):
14395         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
14396         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14397         (re_node_set_init_copy, re_node_set_add_intersect):
14398         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14399         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14400         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14401         (re_acquire_state, re_acquire_state_context, register_state):
14402         (create_ci_newstate, create_cd_newstate, free_state):
14403         Likewise.
14404         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
14405         re_search_2):
14406         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
14407         (re_search_internal, prune_impossible_nodes):
14408         (acquire_init_state_context, check_matching, static):
14409         (check_halt_node_context, check_halt_state_context, proceed_next_node):
14410         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
14411         (update_regs, sift_states_backward, build_sifted_states):
14412         (clean_state_log_if_needed, merge_state_array):
14413         (update_cur_sifted_state, add_epsilon_src_nodes):
14414         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
14415         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
14416         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
14417         (find_recover_state, check_subexp_matching_top, transit_state_mb):
14418         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
14419         (check_arrival, check_arrival_add_next_nodes):
14420         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14421         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14422         (check_node_accept_bytes, check_node_accept, extend_buffers):
14423         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
14424         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
14425         (sift_ctx_init):
14426         Likewise.
14427
14428         * lib/regex_internal.h:
14429         (re_string_allocate, re_string_construct, re_string_reconstruct):
14430         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
14431         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
14432         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
14433         (re_string_context_at, re_string_peek_byte_case):
14434         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
14435         is defined, since we now use prototypes always.
14436
14437         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
14438         C89 or better.  All uses removed.
14439
14440 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14441
14442         * config/srclist.txt: Add glibc bugs 1220-1227.
14443
14444 2005-08-20  Jim Meyering  <jim@meyering.net>
14445
14446         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
14447         of unused local, dfa.
14448
14449 2005-08-20  Bruno Haible  <bruno@clisp.org>
14450
14451         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
14452
14453 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14454
14455         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
14456         (re_node_set_insert_last, re_dfa_add_node):
14457         Rename local variables to avoid GCC shadowing warnings.
14458
14459 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14460
14461         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
14462         [defined lint]: Suppress bogus uninitialized-variable warnings.
14463
14464         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
14465         and let the caller return REG_ESPACE if out of space.  This
14466         removes an uninitialied-variable warning with GCC 4.0.1, and also
14467         avoids taking the address of a local variable.  All callers
14468         changed.
14469
14470 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14471
14472         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
14473         $LIBCSRC/posix/regexec.c.
14474         Add glibc bug 1217 for regcomp.c.
14475
14476 2005-08-19  Jim Meyering  <jim@meyering.net>
14477
14478         * lib/regexec.c (proceed_next_node): Redo local variables to
14479         avoid GCC shadowing warnings.
14480
14481 2005-08-18  Bruno Haible  <bruno@clisp.org>
14482
14483         * lib/strstr.c (strstr): Fix return value in multibyte case.
14484         * lib/strcasestr.c (strcasestr): Likewise.
14485
14486 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14487
14488         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
14489
14490 2005-08-17  Jim Meyering  <jim@meyering.net>
14491
14492         Make the %s format (seconds since the epoch) work for a negative
14493         number and when used with a zero-padded field width, e.g. %015s.
14494
14495         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
14496         label so that it precedes the code to set `digits'.  Otherwise,
14497         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
14498         print `00-22'.  Now, it prints `-0022', as it should.
14499
14500 2005-08-17  Bruno Haible  <bruno@clisp.org>
14501
14502         * modules/strstr (Files): Add m4/mbrtowc.m4.
14503         (Depends-on): Add mbuiter.
14504
14505 2005-08-17  Bruno Haible  <bruno@clisp.org>
14506
14507         * modules/strcasestr: New file.
14508         * MODULES.html.sh (String handling, based on ANSI C 89): Add
14509         strcasestr.
14510
14511 2005-08-17  Bruno Haible  <bruno@clisp.org>
14512
14513         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
14514
14515 2005-08-17  Bruno Haible  <bruno@clisp.org>
14516
14517         * modules/mbuiter: New file.
14518         * MODULES.html.sh (Extended multibyte and wide character utilities):
14519         Add mbuiter.
14520
14521 2005-08-17  Bruno Haible  <bruno@clisp.org>
14522
14523         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
14524         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
14525
14526 2005-08-17  Bruno Haible  <bruno@clisp.org>
14527
14528         * m4/strcasestr.m4: New file.
14529
14530 2005-08-17  Bruno Haible  <bruno@clisp.org>
14531
14532         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
14533         * lib/strstr.c: Completely rewritten, with multibyte locale support.
14534
14535 2005-08-17  Bruno Haible  <bruno@clisp.org>
14536
14537         * lib/strcasestr.h: New file.
14538         * lib/strcasestr.c: New file.
14539
14540 2005-08-17  Bruno Haible  <bruno@clisp.org>
14541
14542         * lib/strcasecmp.c: Use mbuiter.h.
14543
14544 2005-08-17  Bruno Haible  <bruno@clisp.org>
14545
14546         * lib/mbuiter.h: New file.
14547
14548 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
14549
14550         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
14551         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
14552         and gl_GETOPT are both invoked via different paths (as happens
14553         with GNU tar CVS because it uses both argp and getopt), the former
14554         wins.
14555
14556 2005-08-16  Bruno Haible  <bruno@clisp.org>
14557
14558         * modules/tls: New file.
14559         * MODULES.html.sh (Multithreading): Add tls.
14560
14561 2005-08-16  Bruno Haible  <bruno@clisp.org>
14562
14563         * modules/strnlen1: New file.
14564         * MODULES.html.sh (String handling): Add strnlen1.
14565
14566 2005-08-16  Bruno Haible  <bruno@clisp.org>
14567
14568         * modules/strcase (Files): Add m4/mbrtowc.m4.
14569         (Depends-on): Add strnlen1, mbchar.
14570
14571 2005-08-16  Bruno Haible  <bruno@clisp.org>
14572
14573         * modules/mbiter: New file.
14574         * MODULES.html.sh (Extended multibyte and wide character utilities):
14575         Add mbiter.
14576
14577 2005-08-16  Bruno Haible  <bruno@clisp.org>
14578
14579         * modules/mbfile: New file.
14580         * MODULES.html.sh (Extended multibyte and wide character utilities):
14581         Add mbfile.
14582
14583 2005-08-16  Bruno Haible  <bruno@clisp.org>
14584
14585         * modules/mbchar: New file.
14586         * MODULES.html.sh (Extended multibyte and wide character utilities):
14587         New section.
14588
14589 2005-08-16  Bruno Haible  <bruno@clisp.org>
14590
14591         * m4/tls.m4: New file, from GNU gettext.
14592
14593 2005-08-16  Bruno Haible  <bruno@clisp.org>
14594
14595         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
14596         always.
14597         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
14598
14599 2005-08-16  Bruno Haible  <bruno@clisp.org>
14600
14601         * m4/mbiter.m4: New file.
14602
14603 2005-08-16  Bruno Haible  <bruno@clisp.org>
14604
14605         * m4/mbfile.m4: New file.
14606
14607 2005-08-16  Bruno Haible  <bruno@clisp.org>
14608
14609         * m4/mbchar.m4: New file.
14610
14611 2005-08-16  Bruno Haible  <bruno@clisp.org>
14612
14613         * lib/tls.h: New file, from GNU gettext.
14614         * lib/tls.c: New file, from GNU gettext.
14615
14616 2005-08-16  Bruno Haible  <bruno@clisp.org>
14617
14618         * lib/strnlen1.h: New file.
14619         * lib/strnlen1.c: New file.
14620
14621 2005-08-16  Bruno Haible  <bruno@clisp.org>
14622
14623         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
14624         (mbi_init): Update.
14625         (mbi_avail, mbi_advance): Let the iteration end before the terminating
14626         NUL byte, not after it.
14627
14628 2005-08-16  Bruno Haible  <bruno@clisp.org>
14629
14630         * lib/strcase.h (strcasecmp): Add note in comments.
14631         * lib/strncasecmp.c: Use code from strcasecmp.c.
14632         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
14633         (strcasecmp): Work correctly in multibyte locales.
14634
14635 2005-08-16  Bruno Haible  <bruno@clisp.org>
14636
14637         * lib/mbiter.h: New file.
14638
14639 2005-08-16  Bruno Haible  <bruno@clisp.org>
14640
14641         * lib/mbfile.h: New file.
14642
14643 2005-08-16  Bruno Haible  <bruno@clisp.org>
14644
14645         * lib/mbchar.h: New file.
14646         * lib/mbchar.c: New file.
14647
14648 2005-08-16  Bruno Haible  <bruno@clisp.org>
14649
14650         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
14651         the valid ones. Makes the comparison operations transitive:
14652         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
14653         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
14654
14655 2005-08-15  Simon Josefsson  <jas@extundo.com>
14656
14657         * modules/ssize_t (License): Change to 'unlimited'.
14658
14659         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
14660
14661 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
14662
14663         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
14664         Add comments for each pending glibc patch.
14665
14666 2005-08-15  Bruno Haible  <bruno@clisp.org>
14667
14668         * lib/regex.h (__restrict_arr): Don't define to __restrict if
14669         __cplusplus is defined.
14670
14671 2005-08-14  Jim Meyering  <jim@meyering.net>
14672
14673         Sync from coreutils.
14674
14675         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
14676         Use the hash-table-based cycle-detection code not just when
14677         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
14678         Reported by James Youngman in
14679         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
14680         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
14681         FTS_TIGHT_CYCLE_CHECK.
14682         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
14683         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
14684         once again.
14685         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
14686         * lib/fts.c (fd_safer): Remove decl.
14687         Include fcntl--.h rather than unistd-safer.h
14688         (fts_safe_changedir): Don't call fd_safer; no longer needed
14689         now that we include fcntl--.h.
14690
14691 2005-08-12  Simon Josefsson  <jas@extundo.com>
14692
14693         * modules/getndelim2: Use ssize_t module.
14694         * modules/getnline: Likewise.
14695         * modules/safe-read: Likewise.
14696         * modules/xreadlink: Likewise.
14697
14698         * modules/ssize_t: New file.
14699
14700 2005-08-12  Simon Josefsson  <jas@extundo.com>
14701
14702         * m4/readline.m4: Look for termcap, curses or ncurses if required.
14703
14704 2005-08-12  Simon Josefsson  <jas@extundo.com>
14705
14706         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14707         ssize_t.
14708
14709 2005-08-12  Simon Josefsson  <jas@extundo.com>
14710
14711         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
14712         readline, getdelim and check_version.
14713         (Support for systems lacking ISO C 99: Sizes of integer types):
14714         Add size_max.
14715
14716 2005-08-12  Bruno Haible  <bruno@clisp.org>
14717
14718         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
14719
14720 2005-08-11  Simon Josefsson  <jas@extundo.com>
14721
14722         * modules/readline: New file.
14723
14724         * modules/strnlen (Files): Add strnlen.h.
14725
14726 2005-08-11  Simon Josefsson  <jas@extundo.com>
14727
14728         * m4/readline.m4: New file.
14729
14730 2005-08-11  Simon Josefsson  <jas@extundo.com>
14731
14732         * lib/readline.h, readline.c: New file.
14733
14734 2005-08-11  Simon Josefsson  <jas@extundo.com>
14735
14736         * doc/gnulib.texi (Initial import, Finishing touches): Mention
14737         gl_AVOID.
14738
14739 2005-08-11  Bruno Haible  <bruno@clisp.org>
14740
14741         * lib/strnlen.h (strnlen): Change parameter name to match comment.
14742
14743 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
14744
14745         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
14746
14747 2005-08-10  Simon Josefsson  <jas@extundo.com>
14748
14749         * tests/test-iconvme.c: New file.
14750
14751 2005-08-10  Simon Josefsson  <jas@extundo.com>
14752
14753         * m4/strnlen.m4: New file.
14754
14755         * m4/strndup.m4: Don't check for strnlen declaration, done in
14756         strnlen.m4.
14757
14758 2005-08-10  Simon Josefsson  <jas@extundo.com>
14759
14760         * lib/strndup.c: Use strnlen.h.
14761
14762         * lib/strnlen.h: New file.
14763
14764 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14765
14766         * README: Typos.
14767
14768 2005-08-02  Simon Josefsson  <jas@extundo.com>
14769
14770         * modules/readline: New file.
14771
14772 2005-08-02  Simon Josefsson  <jas@extundo.com>
14773
14774         * modules/getdelim: New file.
14775
14776         * modules/getline: Rewrite, don't use getndelim2.
14777
14778 2005-08-02  Simon Josefsson  <jas@extundo.com>
14779
14780         * m4/getline.m4: Separate out getdelim stuff into separate module.
14781
14782         * m4/getdelim.m4: New file.
14783
14784 2005-08-02  Simon Josefsson  <jas@extundo.com>
14785
14786         * lib/getline.h, getline.c: Rewrite.
14787
14788         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
14789
14790 2005-07-31  Bruno Haible  <bruno@clisp.org>
14791
14792         * lib/lock.h (gl_lock_initializer): New macro.
14793         (gl_lock_define_initialized): Use it.
14794         (gl_rwlock_initializer): New macro.
14795         (gl_rwlock_define_initialized): Use it.
14796         (gl_recursive_lock_initializer): New macro.
14797         (gl_recursive_lock_define_initialized): Use it.
14798
14799 2005-07-30  Karl Berry  <karl@gnu.org>
14800
14801         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
14802         Report from Ben Pfaff, regarding getopt.
14803
14804 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
14805
14806         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
14807         normal way.
14808         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
14809         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
14810         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
14811         (gl_GETOPT): Use the new macros.  Most of the implementation
14812         is moved to the new macros.  This is for programs like Emacs
14813         that don't want all the functionality of gl_GETOPT.
14814
14815 2005-07-26  Bruno Haible  <bruno@clisp.org>
14816
14817         * m4/lock.m4: Update from GNU gettext.
14818
14819 2005-07-26  Bruno Haible  <bruno@clisp.org>
14820
14821         * lib/lock.h: Update from GNU gettext.
14822         * lib/lock.c: Update from GNU gettext.
14823
14824 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
14825
14826         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
14827         obsolescent AC_TRY_RUN.  Include the default includes files, for
14828         'exit'.
14829
14830 2005-07-24  Bruno Haible  <bruno@clisp.org>
14831
14832         * modules/visibility: New file.
14833         * MODULES.html.sh (Misc): Add visibility.
14834
14835 2005-07-24  Bruno Haible  <bruno@clisp.org>
14836
14837         * m4/visibility.m4: New file.
14838
14839 2005-07-24  Bruno Haible  <bruno@clisp.org>
14840
14841         * doc/visibility.texi: New file.
14842
14843 2005-07-22  Bruno Haible  <bruno@clisp.org>
14844
14845         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
14846         $(ALLOCA_H), redundant through BUILT_SOURCES.
14847         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
14848         redundant through BUILT_SOURCES.
14849         * modules/byteswap (Makefile.am): Remove explicit dependency on
14850         $(BYTESWAP_H), redundant through BUILT_SOURCES.
14851         * modules/fnmatch (Makefile.am): Remove explicit dependency on
14852         $(FNMATCH_H), redundant through BUILT_SOURCES.
14853         * modules/getopt (Makefile.am): Remove explicit dependency on
14854         $(GETOPT_H), redundant through BUILT_SOURCES.
14855         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
14856         redundant through BUILT_SOURCES.
14857         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
14858         redundant through BUILT_SOURCES.
14859         * modules/stdbool (Makefile.am): Remove explicit dependency on
14860         $(STDBOOL_H), redundant through BUILT_SOURCES.
14861         * modules/stdint (Makefile.am): Remove explicit dependency on
14862         $(STDINT_H), redundant through BUILT_SOURCES.
14863         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
14864         Remove explicit dependency on $(SYSEXITS_H).
14865         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
14866
14867 2005-07-18  Simon Josefsson  <jas@extundo.com>
14868
14869         * lib/check-version.c (check_version): Accept identical versions too.
14870
14871 2005-07-18  Bruno Haible  <bruno@clisp.org>
14872
14873         * modules/lock: New file.
14874         * MODULES.html.sh (Multithreading): New section.
14875
14876 2005-07-18  Bruno Haible  <bruno@clisp.org>
14877
14878         * m4/lock.m4: New file, from GNU gettext.
14879
14880 2005-07-18  Bruno Haible  <bruno@clisp.org>
14881
14882         * lib/lock.h: New file, from GNU gettext.
14883         * lib/lock.c: New file, from GNU gettext.
14884
14885 2005-07-18  Bruno Haible  <bruno@clisp.org>
14886
14887         * lib/lock.h (gl_once_t): New type.
14888         (gl_once_define, gl_once): New macros.
14889         * lib/lock.c (fresh_once): New variable.
14890         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
14891         functions.
14892
14893 2005-07-16  Simon Josefsson  <jas@extundo.com>
14894
14895         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
14896         workaround, suggested by Bruno.
14897
14898 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14899
14900         * modules/xalloc (Depends-on): Add xalloc-die.
14901         * modules/xvasprintf (Depends-on): Add xalloc-die.
14902
14903 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
14904
14905         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
14906         with a minor change.
14907
14908 2005-07-15  Bruno Haible  <bruno@clisp.org>
14909
14910         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
14911         When using lib/poll.c, define poll as rpl_poll.
14912
14913 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
14914
14915         * modules/argp (Depends-on): Remove unlocked-io.
14916
14917 2005-07-14  Derek Price  <derek@ximbiot.com>
14918
14919         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
14920         for glob symlink bug.
14921
14922 2005-07-14  Bruno Haible  <bruno@clisp.org>
14923
14924         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
14925         Instead, test for *_unlocked function declarations directly.
14926
14927 2005-07-11  Simon Josefsson  <jas@extundo.com>
14928
14929         * modules/size_max: New file.
14930
14931         * modules/xsize: Depend on size_max module for size_max.m4.
14932
14933 2005-07-11  Simon Josefsson  <jas@extundo.com>
14934
14935         * lib/size_max.h: New file.
14936
14937 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
14938
14939         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
14940         copyright symbol and the year.
14941         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
14942         (version_etc_va): Use parameterized copyright notice.
14943         Reword to conform to the current GNU coding standards.
14944
14945 2005-07-11  Karl Berry  <karl@gnu.org>
14946
14947         * doc/gnulib.texi (Quoting): new node.
14948         (Initial import): more info, from Patrice.
14949
14950 2005-07-11  Bruno Haible  <bruno@clisp.org>
14951
14952         * gnulib-tool (func_usage): Document option --avoid.
14953         (Command line options): Handle --avoid.
14954         (func_acceptable): New function.
14955         (func_modules_transitive_closure): Use it.
14956
14957 2005-07-11  Bruno Haible  <bruno@clisp.org>
14958
14959         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
14960         Reported by Jim Meyering.
14961
14962 2005-07-10  Bruno Haible  <bruno@clisp.org>
14963
14964         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
14965         Needed when size_t is smaller than 'unsigned int'.
14966         Reported by Paul Eggert.
14967
14968 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14969
14970         * modules/argp (Depends-on): Add unlocked-io
14971
14972 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
14973
14974         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
14975         block of defines.
14976
14977 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14978
14979         * config/srclist.txt: Comment out regcomp.c, since we have a porting
14980         fix now.
14981
14982 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
14983         and Paul Eggert  <eggert@cs.ucla.edu>
14984
14985         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
14986         in wint_t, not wchar_t.  Remove now-unnecessary cast.
14987
14988 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14989
14990         * modules/regex (Files): Add lib/regex_internal.c,
14991         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
14992         (Depends-on): Add extensions.
14993         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
14994
14995 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
14996
14997         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
14998         pathconf.
14999         * m4/same.m4 (gl_SAME): Likewise.
15000         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
15001
15002         * m4/regex.m4: Adjust to new libc regex implementation.
15003         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
15004         all the .c and .h parts of (the new) regex.
15005         Quote the m4 stuff better.
15006         Check for RE_ICASE bug of old gnulib.
15007         Check for REG_STARTEND of recent libc.
15008         Rename local variables from jm_* to gl_*.
15009         Quote operand of "test -f".
15010         Say "recent enough" version of libc, not "version 2".
15011         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
15012         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
15013         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
15014         Remove check for btowc, isascii.
15015         Require AM_LANGINFO_CODESET.
15016
15017 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15018
15019         * lib/regex.c, regex.h: Sync from libc.
15020         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
15021         * lib/regexec.c:
15022         New files, synced from libc, except that regex_internal.h
15023         currently has a small porting fix.
15024
15025 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15026
15027         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
15028         regex_internal.c, regexec.c.
15029         Add regex_internal.h too, but as a comment, since the libc version
15030         is currently broken in gnulib mode.
15031
15032 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
15033
15034         Support programs like Emacs that use gnulib but not gettext.
15035         * MODULES.html.sh (Internationalization functions): Add gettext-h.
15036         * modules/gettext-h: New file.
15037         * modules/gettext (Files): Remove lib/gettext.h.
15038         (Depends-on): Add gettext-h.
15039         (Makefile.am): Remove lib_SOURCES.
15040         * modules/argmatch, modules/c-stack, modules/closeout:
15041         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
15042         * modules/execute, modules/file-type, modules/getaddrinfo:
15043         * modules/getopt, modules/human, modules/javacomp:
15044         * modules/javaexec, modules/mkdir-p, modules/obstack:
15045         * modules/openat, modules/pagealign_alloc, modules/pipe:
15046         * modules/quotearg, modules/regex, modules/rpmatch:
15047         * modules/unicodeio, modules/userspec, modules/version-etc:
15048         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
15049         * modules/xsetenv:
15050         Depend on gettext-h, not gettext.
15051
15052 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
15053
15054         * gnulib-tool (func_import): Add support for 'public domain' license.
15055         * modules/alloca, modules/atexit, modules/memmove:
15056         Now public domain, not GPL.
15057         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
15058         * modules/realloc, modules/strerror, modules/strtod:
15059         Now LGPL, not GPL.
15060
15061 2005-07-05  Bruno Haible  <bruno@clisp.org>
15062
15063         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
15064         autoconf CVS. Needed for mingw.
15065
15066 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15067
15068         Remove the dependency of the strftime module on the tzset module.
15069         * modules/strftime (Depends-on): Remove dependency on tzset.
15070
15071 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15072
15073         Remove the dependency of the strftime module on the tzset module.
15074         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
15075         gl_FUNC_TZSET_CLOBBER.
15076
15077 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15078
15079         Remove the dependency of the strftime module on the tzset module.
15080         * lib/strftime.c (my_strftime)
15081         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
15082         Copy the input structure, to work around some of the bug with
15083         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
15084         Solaris releases, you should also use the tzset module, but we won't
15085         require it as a dependency any more since we don't want LGPLed code
15086         to depend on GPLed code.
15087
15088 2005-07-02  Jim Meyering  <jim@meyering.net>
15089
15090         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
15091         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
15092         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
15093         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
15094
15095 2005-07-02  Jim Meyering  <jim@meyering.net>
15096
15097         * lib/backupfile.c (backup_args): Change a `0' to NULL.
15098
15099 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
15100
15101         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
15102         declares only 'struct timespec;' (!).
15103
15104 2005-07-01  Jim Meyering  <jim@meyering.net>
15105
15106         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
15107         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
15108         * lib/save-cwd.c, tempname.c:
15109         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
15110         and don't include <sys/file.h>).
15111
15112 2005-06-29  Jim Meyering  <jim@meyering.net>
15113
15114         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
15115         type name.  Use the variable name instead.
15116         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
15117         Likewise.
15118
15119 2005-06-28  Simon Josefsson  <jas@extundo.com>
15120
15121         * modules/check-version (Files): Add check-version.m4.
15122
15123 2005-06-28  Simon Josefsson  <jas@extundo.com>
15124
15125         * m4/check-version.m4: New file, suggested by Jim Meyering
15126         <jim@meyering.net>.
15127
15128 2005-06-28  Simon Josefsson  <jas@extundo.com>
15129
15130         * lib/check-version.h, lib/check-version.c: New files.
15131
15132 2005-06-28  Simon Josefsson  <jas@extundo.com>
15133
15134         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
15135         collision with global variable.  Better indentation.  Don't
15136         increment buffer pointer beyond buffer end.  Based on comments
15137         from Paul Eggert <eggert@cs.ucla.edu>.
15138
15139         * lib/base64.h: Indent.
15140
15141 2005-06-28  Simon Josefsson  <jas@extundo.com>
15142
15143         * doc/gnulib.texi (Library version handling): New section.
15144
15145 2005-06-28  Jim Meyering  <jim@meyering.net>
15146
15147         * check-module (find_included_lib_files): Hard-code another
15148         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
15149         but modules/fts-lgpl (correctly) does not list those files.
15150
15151         * modules/canonicalize (Files): Add lib/pathmax.h.
15152
15153 2005-06-25  Simon Josefsson  <jas@extundo.com>
15154
15155         * modules/check-version: New file.
15156
15157 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
15158
15159         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
15160         initializer of struct addrinfo, as an indication that we don't
15161         care how many members the structure has.
15162
15163 2005-06-24  Derek Price  <derek@ximbiot.com>
15164         and Bruno Haible  <bruno@clisp.org>
15165
15166         Remove stat module & update lstat.
15167         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
15168         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
15169         * m4/stat.m4: Remove this file.
15170
15171 2005-06-24  Derek Price  <derek@ximbiot.com>
15172         and Bruno Haible  <bruno@clisp.org>
15173
15174         Remove stat module & update lstat.
15175         * lib/stat.c: Remove this file...
15176         (slash_aware_lstat): ...moving this content and its support...
15177         * lib/lstat.c (rpl_lstat): ...into here.
15178         * lib/lstat.h: New file.
15179
15180 2005-06-24  Derek Price  <derek@ximbiot.com>
15181         and Bruno Haible  <bruno@clisp.org>
15182
15183         Remove stat module & update lstat.
15184         * config/srclist.txt (libc sources): Remove stat.
15185
15186 2005-06-24  Derek Price  <derek@ximbiot.com>
15187         and Bruno Haible  <bruno@clisp.org>
15188
15189         Remove stat module & update lstat.
15190         * MODULES.html.sh (stat): Remove.
15191         * MODULES.html: Regenerated.
15192         * modules/lstat (Description): Correct function name.
15193         (Files): Add "lstat.h".
15194         (Depends-on): Remove stat, add xalloc, stat-macros.
15195         * modules/stat: Remove this file.
15196         (Include): Add "lstat.h", remove <sys/stat.h>.
15197
15198 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
15199
15200         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
15201         (ranged_convert): Don't save conversion in a temporary struct.
15202         This causes a warning with GCC 4.0.0, and anyway in the typical
15203         case it's not worth the extra 100 bytes or so of code.
15204         (ranged_convert, __mktime_internal): When calling a function via a
15205         pointer P, use P () rather than (*P) (), as we now assume C89 or
15206         better.
15207
15208 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15209
15210         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
15211         "who -r" failed to give output.  Problem reported by Tim Waugh.
15212
15213         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
15214         (xcalloc): Use it to avoid needless tests.
15215         Problem reported by Jim Meyering.
15216
15217 2005-06-20  Derek Price  <derek@ximbiot.com>
15218
15219         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
15220         unnecessary for Autoconfs > 2.59c.
15221
15222 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15223
15224         * lib/argp.h (__option_is_short): Check upper limit of
15225         __key. Isprint() requires its argument to have the value
15226         of an unsigned char or EOF.
15227
15228 2005-06-16  Jim Meyering  <jim@meyering.net>
15229
15230         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
15231         when either N or S is zero.
15232
15233 2005-06-16  Derek Price  <derek@ximbiot.com>
15234
15235         * m4/bison.m4: Declare YACC & YFLAGS precious.
15236
15237 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
15238
15239         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
15240         multibyte string or pattern, fall back on unibyte matching.
15241         Problem reported by James Youngman.
15242
15243 2005-06-08  Bruno Haible  <bruno@clisp.org>
15244
15245         * modules/csharpcomp: New file.
15246         * MODULES.html.sh (C#): Add csharpcomp.
15247
15248 2005-06-08  Bruno Haible  <bruno@clisp.org>
15249
15250         * m4/csharpcomp.m4: New file, from GNU gettext.
15251
15252 2005-06-08  Bruno Haible  <bruno@clisp.org>
15253
15254         * lib/csharpcomp.h: New file, from GNU gettext.
15255         * lib/csharpcomp.c: New file, from GNU gettext.
15256         * lib/csharpcomp.sh.in: New file, from GNU gettext.
15257
15258 2005-06-08  Bruno Haible  <bruno@clisp.org>
15259
15260         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
15261         warning on mingw.
15262
15263 2005-06-07  Derek Price  <derek@ximbiot.com>
15264
15265         Sync from CVS.
15266         * lib/glob_.h: Indent nested #ifdef.
15267
15268 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15269
15270         Sync from coreutils.
15271         Use "file name" when talking about file names, instead of "filename"
15272         or "path", as per the GNU coding standards.
15273         * lib/mkdir-p.c: Renamed from makepath.c.
15274         (make_dir_parents): Renamed from make_path.  All callers changed.
15275         * lib/mkdir-p.h: Likewise.  All includers changed.
15276         * lib/filenamecat.c: Renamed from path-concat.c.
15277         (file_name_concat): Renamed from path_concat.  All callers changed.
15278         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
15279         * lib/filenamecat.h: Likewise.  All includers changed.
15280         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
15281         in comments or local variable names.
15282         * lib/basename.c: Likewise.
15283         * lib/canonicalize.c, canonicalize.h: Likewise.
15284         * lib/dirname.c, dirname.h: Likewise.
15285         * lib/euidaccess.c: Likewise.
15286         * lib/exclude.c: Likewise
15287         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
15288         * lib/fsusage.c, fsuage.h: Likewise.
15289         * lib/fts.c, fts_.h: Likewise.
15290         * lib/getcwd.c: Likewise.
15291         * lib/getloadavg.c: Likewise.
15292         * lib/mkstemp.c: Likewise.
15293         * lib/mountlist.c, mountlist.h: Likewise.
15294         * lib/openat.c, openat.h: Likewise.
15295         * lib/readlink-stub.c: Likewise.
15296         * lib/readutmp.c, readutmp.h: Likewise.
15297         * lib/rename.c: Likewise.
15298         * lib/rmdir.c: Likewise.
15299         * lib/same.c: Likewise.
15300         * lib/savedir.c: Likewise.
15301         * lib/stripslash.c: Likewise.
15302         * lib/tempname.c: Likewise.
15303         * lib/xreadlink.c: Likewise.
15304         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
15305         All uses changed.
15306         * lib/exclude.h: Likewise.
15307
15308         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
15309         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15310         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
15311         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15312         * lib/pathmax.h: Include <limits.h> unconditionally, since other
15313         files have been getting away with it for years (MORE/BSD 4.3
15314         is extinct now).
15315         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
15316         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15317
15318         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
15319         Define to 256, not 255, as per modern POSIX.
15320
15321 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15322
15323         Sync from coreutils.
15324         Use "file name" when talking about file names, instead of "filename"
15325         or "path", as per the GNU coding standards.
15326         * MODULES.html.sh: mkdir-p renamed from makepath.
15327         filenamecat renamed from path-concat.
15328         * modules/filenamecat: Renamed from modules/path-concat.
15329         (Files): filenamecat.h and filenamecat.c renamed from
15330         path-concat.h and path-concat.c.
15331         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
15332         (Include): filenamecat.h, not path-concat.h.
15333         * modules/mkdir-p: Renamed from modules/makepath.
15334         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
15335         makepath.c.
15336         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
15337         (Include): mkdir-p.h, not makepath.h.
15338
15339 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15340
15341         Sync from coreutils.
15342         * m4/mkdir-p.m4: Renamed from makepath.m4.
15343         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
15344         Rename files from makepath.c to mkdir-p.c, and from
15345         makepath.h to mkdir-p.h.
15346         * m4/filenamecat.m4: Renamed from path-concat.m4.
15347         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
15348         Rename files from path-concat.c to filenamecat.c,
15349         and from path-concat.h to filenamecat.h.
15350         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
15351         "file name" in local variables or comments.
15352         * m4/rename.m4: Likewise.
15353
15354 2005-06-01  Bruno Haible  <bruno@clisp.org>
15355
15356         * modules/csharpexec: New file.
15357         * MODULES.html.sh (C#): New section.
15358
15359 2005-06-01  Bruno Haible  <bruno@clisp.org>
15360
15361         * m4/csharp.m4: New file, from GNU gettext.
15362         * m4/csharpexec.m4: New file, from GNU gettext.
15363
15364 2005-06-01  Bruno Haible  <bruno@clisp.org>
15365
15366         * lib/csharpexec.h: New file, from GNU gettext.
15367         * lib/csharpexec.c: New file, from GNU gettext.
15368         * lib/csharpexec.sh.in: New file, from GNU gettext.
15369
15370 2005-05-31  Derek Price  <derek@ximbiot.com>
15371             Paul Eggert  <eggert@cs.ucla.edu>
15372
15373         Sync from cvs.
15374         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
15375
15376 2005-05-31  Derek Price  <derek@ximbiot.com>
15377             Paul Eggert  <eggert@cs.ucla.edu>
15378
15379         Sync from cvs.
15380         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
15381
15382 2005-05-29  Derek Price  <derek@ximbiot.com>
15383
15384         * config/srclist.txt (glob_.h, glob.c): Add these files.
15385
15386 2005-05-29  Derek Price  <derek@ximbiot.com>
15387
15388         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
15389         * modules/glob: New file.
15390         * modules/getlogin_r: Add link to POSIX spec in description.
15391
15392 2005-05-29  Derek Price  <derek@ximbiot.com>
15393             Paul Eggert  <eggert@cs.ucla.edu>
15394
15395         * m4/glob.m4: New file.
15396
15397 2005-05-29  Derek Price  <derek@ximbiot.com>
15398             Paul Eggert  <eggert@cs.ucla.edu>
15399
15400         * lib/glob_.h, lib/glob.c: New files.
15401
15402 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15403
15404         * modules/fts (Files): Remove m4/inttypes-pri.m4.
15405         * modules/fts-lgpl (Depends-on): Remove gettext.
15406
15407 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15408
15409         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
15410         and don't require gt_INTTYPES_PRI.
15411
15412 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15413
15414         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
15415
15416         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
15417         the configuration hassle isn't worth it.
15418         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
15419         (LONGEST_MODIFIER, PRIuMAX): Remove.
15420
15421 2005-05-27  Bruno Haible  <bruno@clisp.org>
15422
15423         * lib/getlogin_r.h: Remove second include of <stddef.h>.
15424
15425 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
15426
15427         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
15428         _POSIX_PTHREAD_SEMANTICS for Solaris.
15429
15430 2005-05-25  Derek Price  <derek@ximbiot.com>
15431
15432         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
15433
15434 2005-05-25  Derek Price  <derek@ximbiot.com>
15435             Paul Eggert  <eggert@cs.ucla.edu>
15436
15437         * modules/getlogin_r, m4/getlogin_r.m4: New files.
15438         * lib/getlogin_r.c, getlogin_r.h: New files.
15439
15440 2005-05-25  Bruno Haible  <bruno@clisp.org>
15441             Derek Price  <derek@ximbiot.com>
15442
15443         * lib/getlogin_r.h: Simplify API documentation.
15444
15445 2005-05-23  Derek Price  <derek@ximbiot.com>
15446
15447         * modules/minmax (Files): Add m4/minmax.m4.
15448         (configure.ac): Add gl_MINMAX.
15449
15450 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
15451
15452         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
15453         so that unistd-safer.h (GPL'ed code) need not be included.
15454
15455 2005-05-22  Bruno Haible  <bruno@clisp.org>
15456
15457         * m4/minmax.m4: New file.
15458         Based on a patch by Derek Price <derek@ximbiot.com>.
15459
15460 2005-05-22  Bruno Haible  <bruno@clisp.org>
15461
15462         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
15463         (INT64_MIN): Fix definition.
15464         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
15465
15466         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
15467         NEED_SIGNED_INT_TYPES.
15468
15469         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
15470         HAVE_SYSTEM_INTTYPES.
15471
15472 2005-05-22  Bruno Haible  <bruno@clisp.org>
15473
15474         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
15475         Also include <sys/param.h> if it defines MIN, MAX.
15476         Based on a patch by Derek Price <derek@ximbiot.com>.
15477
15478 2005-05-21  Jim Meyering  <jim@meyering.net>
15479
15480         * modules/fts (Files): Add m4/inttypes-pri.m4.
15481         (Depends-on): Add lstat and remove gettext.  Alphabetize.
15482
15483 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15484
15485         New fts module.
15486         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
15487         (setup_dir, free_dir): New functions.
15488         (enter_dir, leave_dir): Define trivial
15489         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
15490         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
15491         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
15492         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
15493         Move to fts-cycle.c.
15494         (fts_open): Use setup_dir.
15495         (fts_close): Use free_dir.
15496         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
15497         This adds a label and some gotos, but the alternatives were messier.
15498         Check for memory allocation failure when entering a dir.
15499         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
15500         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
15501         (FTS): New member fts_cycle, that is a union that contains the
15502         old active_dir_ht and cycle_state.  All uses changed to mention
15503         fts_cycle.ht and fts_cycle.state.
15504         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
15505         fts.c, with the following changes:
15506         (setup_dir, free_dir): New functions.
15507         (enter_dir): Now returns bool.  Return true if successful, false
15508         if memory exhausted.  All callers changed.
15509         Do not bother partly cleaning up on
15510         memory allocation failure; that is free_dir's job.
15511         However, free ad if hash_insert fails, to avoid memory leak.
15512         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
15513         fts->fts_options to see which union member to use.
15514
15515 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15516
15517         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
15518         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
15519
15520 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15521
15522         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
15523
15524 2005-05-20  Jim Meyering  <jim@meyering.net>
15525
15526         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
15527         Now a macro, to pacify GCC.
15528
15529 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15530
15531         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
15532         of -1.
15533
15534 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15535
15536         * lib/chown.c (rpl_chown): Return -1 on failure.
15537
15538 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15539
15540         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
15541         Don't check for stddef.h.
15542         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
15543         don't use its results.
15544         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
15545         since we include them unconditionally.  Don't require
15546         AM_STDBOOL_H, since stdbool is a prerequisite.
15547         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
15548         since we assume C89 or better.
15549         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
15550         as we don't use their results.
15551         Don't check for fchdir, memmove, memset, strrchr, as we use
15552         them unconditionally.
15553         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
15554         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
15555
15556 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15557
15558         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
15559         Include <stddef.h> unconditionally, since we assume C89 now.
15560         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
15561         * lib/fts.c: Include fts_.h first, to check interface.
15562         Do not include intprops.h; no longer needed.
15563         Include cycle-check.h and hash.h, since fts_.h no longer does.
15564         Remove unnecessary casts of closedir to void.
15565         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
15566         decide whether to decrement nlinks.
15567         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
15568         (FTS): Use struct hash_table * instead of Hash_table, so that
15569         we no longer need to include hash.h here.
15570
15571 2005-05-18  Jim Meyering  <jim@meyering.net>
15572
15573         * modules/dirfd (License): Change to LGPL.  Most of the code
15574         is already in the public domain.
15575
15576 2005-05-18  Jim Meyering  <jim@meyering.net>
15577
15578         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
15579         Reported by Yoann Vandoorselaere.
15580
15581 2005-05-17  Jim Meyering  <jim@meyering.net>
15582
15583         * m4/fts.m4: New file, from coreutils.
15584
15585 2005-05-17  Jim Meyering  <jim@meyering.net>
15586
15587         * lib/fts.c, lib/fts_.h: New files, from coreutils.
15588
15589 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15590
15591         Sync from coreutils.
15592         * m4/unlinkdir.m4: New file.
15593
15594 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15595
15596         Sync from coreutils.
15597         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
15598         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
15599         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
15600         White space changes only.
15601         * lib/makepath.c (make_path): Port to hosts where leading "//" is
15602         special.
15603         * lib/yesno.c: Include getline.h, not ctype.h.
15604         (yesno): Don't remove leading white space; POSIX doesn't allow it.
15605         Use getline to remove arbitrary restriction on response length.
15606
15607 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15608
15609         * config/srclist-update: Spell out "Street" in FSF postal
15610         mail address; this is the style the FSF seems to prefer.
15611
15612         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
15613         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
15614         this updates FSF postal mail address.
15615
15616         Sync from coreutils.
15617         * modules/unlinkdir: New file.
15618         * modules/yesno (Depends-on): Add getline.
15619         * MODULES.html.sh (File system functions): Add unlinkdir.
15620
15621 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15622
15623         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
15624         lib/strsep.h:
15625         Change the initial comment to refer to GPL, not LGPL.
15626         gnulib-tool will change it to LGPL as needed.
15627
15628         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
15629         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
15630         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
15631         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
15632         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
15633         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
15634         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
15635         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
15636         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
15637         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
15638         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
15639         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
15640         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
15641         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
15642         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
15643         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
15644         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
15645         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
15646         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
15647         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
15648         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
15649         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
15650         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
15651         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
15652         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
15653         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
15654         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
15655         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
15656         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
15657         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
15658         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
15659         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
15660         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
15661         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
15662         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
15663         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
15664         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
15665         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
15666         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
15667         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
15668         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
15669         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
15670         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
15671         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
15672         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
15673         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
15674         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
15675         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
15676         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
15677         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
15678         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15679         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
15680         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
15681         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
15682         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
15683         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
15684         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
15685         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
15686         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
15687         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
15688         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
15689         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
15690         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
15691         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
15692         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
15693         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
15694         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
15695         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
15696         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
15697         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
15698         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
15699         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
15700         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
15701         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
15702         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
15703         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
15704         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
15705         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
15706         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
15707         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
15708         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
15709         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
15710         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
15711         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
15712         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
15713         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
15714         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
15715         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
15716         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
15717         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
15718         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
15719         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
15720         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
15721         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
15722         lib/yesno.c, lib/yesno.h:
15723         Update FSF postal mail address.
15724
15725 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15726
15727         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
15728         tests/test-memmem.c, tests/test-stpncpy.c:
15729         Update FSF postal mail address.
15730
15731 2005-05-13  Bruno Haible  <bruno@clisp.org>
15732
15733         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
15734         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
15735         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
15736         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
15737         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
15738         Add support for 64-bit integers in the MSVC compiler.
15739
15740 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15741
15742         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
15743
15744 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
15745
15746         * gnulib-tool (func_import): Sort and uniquify recommended includes.
15747
15748 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
15749
15750         * doc/getdate.texi (General date syntax): Don't say that date
15751         date --iso-8601=ns generates acceptable dates; it doesn't yet.
15752         Problem reported by Nic Ferrier.
15753
15754 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15755
15756         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
15757         specified in ai_socktype. Fix invalid ai_protocol
15758         check. ai_protocol is usually set to 0 or depending on
15759         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
15760         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
15761         ai_socktype / ai_protocol in the returned addrinfo structure.
15762
15763 2005-05-10  Simon Josefsson  <jas@extundo.com>
15764
15765         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
15766         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15767
15768 2005-05-10  Karl Berry  <karl@gnu.org>
15769
15770         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
15771         (from http://www.gnu.org/licenses).
15772         * doc/COPYING.LIB: also rename to COPYING.LESSER.
15773         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
15774         fdl.texi suffices.
15775
15776 2005-05-10  Karl Berry  <karl@gnu.org>
15777
15778         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
15779         (COPYING.DOC): remove.
15780
15781         * config/srclist-update: new FSF address.
15782
15783 2005-05-10  Derek Price  <derek@ximbiot.com>
15784
15785         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
15786         possible.
15787
15788 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15789             Bruno Haible  <bruno@clisp.org>
15790
15791         * modules/inet_ntop: New file.
15792         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15793         inet_ntop.
15794
15795 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15796             Bruno Haible  <bruno@clisp.org>
15797
15798         * m4/inet_ntop.m4: New file.
15799
15800 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15801             Bruno Haible  <bruno@clisp.org>
15802
15803         * lib/inet_ntop.h: New file.
15804         * lib/inet_ntop.c: New file, from glibc with modifications.
15805
15806 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
15807
15808         * modules/time_r (License): Change to LGPL.
15809         * modules/extensions (License): Change to LGPL.  Actually,
15810         the license is more permissive than that, but currently gnulib-tool
15811         doesn't know how to handle more-permissive licenses.
15812
15813         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
15814         Problem reported by Dave Love.
15815
15816 2005-05-08  Jim Meyering  <jim@meyering.net>
15817
15818         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
15819         blank.
15820
15821 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15822
15823         * modules/argmatch (Depends-on): Add stdbool.
15824         * modules/backupfile (Depends-on): Likewise.
15825         * modules/chdir-long (Depends-on): Likewise.
15826         * modules/closeout (Depends-on): Likewise.
15827         * modules/cycle-check (Depends-on): Likewise.
15828         * modules/dirname (Depends-on): Likewise.
15829         * modules/fnmatch (Depends-on): Likewise.
15830         * modules/fsusage (Depends-on): Likewise.
15831         * modules/fwriteerror (Depends-on): Likewise.
15832         * modules/getcwd (Depends-on): Likewise.
15833         * modules/getloadavg (Depends-on): Likewise.
15834         * modules/hard-locale (Depends-on): Likewise.
15835         * modules/makepath (Depends-on): Likewise.
15836         * modules/mountlist (Depends-on): Likewise.
15837         * modules/nanosleep (Depends-on): Likewise.
15838         * modules/posixtm (Depends-on): Likewise.
15839         * modules/quotearg (Depends-on): Likewise.
15840         * modules/readtokens (Depends-on): Likewise.
15841         * modules/readtokens0 (Depends-on): Likewise.
15842         * modules/readutmp (Depends-on): Likewise.
15843         * modules/save-cwd (Depends-on): Likewise.
15844         * modules/strftime (Depends-on): Likewise.
15845         * modules/userspec (Depends-on): Likewise.
15846         * modules/utimecmp (Depends-on): Likewise.
15847         * modules/xgetcwd (Depends-on): Likewise.
15848         * modules/xnanosleep (Depends-on): Likewise.
15849         * modules/xstrtod (Depends-on): Likewise.
15850         * modules/yesno (Depends-on): Likewise.
15851
15852 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
15853
15854         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
15855         needless checks.
15856
15857 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15858
15859         Merge from coreutils.  Among other things,
15860         add bulletproofing for cases where stdin, stdout, or stderr are closed.
15861         * lib/fd-safer.c: New file.
15862         * lib/fcntl-safer.h, open-safer.c: Remove.
15863         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
15864         * lib/dup-safer.c: Include unistd-safer.h first.
15865         Don't include errno.h.
15866         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
15867         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
15868         * lib/file-type.c: Rely on file-type.h change.
15869         * lib/getloadavg.c: Include unistd-safer.h.
15870         (getloadavg): Use safer open.
15871         * lib/getusershell.c: Include "stdio-safer.h".
15872         (getusershell): Use safer fopen.
15873         * lib/long-options.c (long_options): Use NULL rather than 0.
15874         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
15875         'free'.
15876         * lib/modechange.c: Likewise.
15877         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
15878         (MODE_DONE): New constant.
15879         (struct mode_change): Remove 'next' member.
15880         (make_node_op_equals): New function; like the old one of the
15881         same name, except it allocates an array.
15882         (mode_compile, mode_create_from_ref): Use it.
15883         (mode_compile): Allocate result as an array, not a linked list.
15884         Parse octal string ourself, so that we catch mistakes like "+0".
15885         (mode_adjust): Arg is an array, not a linked list.
15886         * lib/modechange.c: Include stat-macros.h, xalloc.h.
15887         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
15888         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
15889         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
15890         Remove.  This is now stat-macros.h's job.
15891         (talloc): Remove.  All callers replaced by xalloc, so that
15892         our invokers don't have to worry about reporting memory failures.
15893         (make_node_op_equals): Remove.
15894         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15895         New constants.
15896         (struct mode_change): Moved here from modechange.h.
15897         (mode_append_entry): Remove.
15898         (mode_compile): Remove MASKED_OPS arg, since it encouraged
15899         apps to have incorrect behavior.  Use simpler algorithm for head
15900         and tail.  Don't futz with umask; that's now the job of mode_adjust.
15901         Detect more invalid usages rather than having somewhat-random behavior.
15902         Don't insert an "a=" action, as that leads to incorrect behavior.
15903         (mode_compile, mode_create_from_ref): Return NULL on error instead
15904         of an enum, since now there's only one way to have an error.  All
15905         callers changed.
15906         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
15907         at the correct time.  Simplify calculation of "+u" and its ilk.
15908         Don't mishandle "+X".
15909         (mode_free): Remove "register" and localize decls.
15910         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
15911         (struct mode_change): Move to modechange.c; callers don't
15912         need to see this stuff.
15913         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
15914         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
15915         (mode_change, mode_adjust): Reflect the new signatures noted above.
15916         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
15917         that might redefine system include files.
15918         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
15919         (my_usleep): Use NULL rather than (void *) 0.
15920         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
15921         Use siginterrupt to specify that system calls should be interrupted.
15922         (rpl_nanosleep): Move initialization of suspended closer to call of
15923         my_usleep.
15924         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
15925         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
15926         (desirable_utmp_entry): New function.
15927         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
15928         using x2nrealloc, to simplify logic.
15929         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
15930         size calculation.  Do not assume utmp file is a regular file.
15931         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
15932         (READ_UTMP_CHECK_PIDS): New constant.
15933         * lib/save-cwd.c: Include unistd-safer.h.
15934         (save_cwd): Use fd_safer.
15935         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
15936         [!_LIBC] Include "stat-macros.h" instead.
15937         * lib/unistd-safer.h (fd_safer): New decl.
15938
15939 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15940
15941         * modules/getloadavg (Depends-on): Add unistd-safer.
15942         * modules/getusershell (Depends-on): Add stdio-safer.
15943         * modules/lstat (Depends-on): Remove xalloc.
15944         * modules/mkstemp (Depends-on): Add stat-macros.
15945         * modules/modechange (Depends-on): Remove xstrtol.
15946         Add stat-macros, xalloc.
15947         * modules/save-cwd (Depends-on): Add unistd-safer.
15948         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
15949         * modules/unistd-safer (Files): Add lib/fd-safer.c
15950         (Makefile.am): Remove lib_SOURCES.
15951
15952         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
15953         Remove fcntl-safer; unistd-safer supersedes it.
15954
15955 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
15958         AC_HEADER_STAT.
15959         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
15960         (gl_PREREQ_CHOWN): Remove.
15961         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
15962         it.  Don't require AC_HEADER_STAT.
15963         (gl_PREREQ_LSTAT): Remove.
15964         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
15965         Don't require AC_HEADER_STAT.
15966         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
15967         (gl_PREREQ_RMDIR): Remove.
15968         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
15969         mention stat-macros.h or AC_HEADER_STAT, since we'll make
15970         the stat-macros module a prerequisite.
15971         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
15972         * m4/filemode.m4 (gl_FILEMODE): Likewise.
15973         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
15974         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
15975         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
15976         variable names.
15977         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
15978         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
15979         variable prefixes.
15980         * m4/fcntl-safer.m4: Remove.
15981         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
15982         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
15983         Invoke gl_PREREQ_FD_SAFER.
15984         (gl_PREREQ_FD_SAFER): New macro.
15985         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
15986         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
15987         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
15988         Remove duplicate call to AC_LIBOBJ(readutmp).
15989         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
15990
15991         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
15992         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
15993
15994 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
15995
15996         * MODULES.html.sh (Misc): Add byteswap.
15997
15998 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
15999
16000         * modules/getcwd (Depends-on): Add extensions.
16001         * modules/openat (Depends-on): Likewise.
16002
16003 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16004
16005         * modules/byteswap: New file.
16006
16007 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16008
16009         * m4/byteswap.m4: New file.
16010
16011 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16012
16013         * lib/byteswap_.h: New file.
16014
16015 2005-04-25  Karl Berry  <karl@gnu.org>
16016
16017         * m4/gettext.m4: Update from GNU gettext 0.14.4.
16018
16019 2005-04-25  Albert Chin  <china@thewrittenword.com>
16020
16021         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
16022         Toolkit C bug.
16023
16024 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
16025
16026         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
16027         (func_ln_if_changed) Remove forcibly for no error message
16028         in case file does not exist.
16029
16030 2005-04-19  Simon Josefsson  <jas@extundo.com>
16031
16032         * gnulib-tool (Options): Make --symlink mean --symbolic.
16033
16034 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
16035
16036         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
16037
16038 2005-04-16  Simon Josefsson  <jas@extundo.com>
16039
16040         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
16041
16042 2005-04-15  Simon Josefsson  <jas@extundo.com>
16043
16044         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
16045
16046 2005-04-15  Simon Josefsson  <jas@extundo.com>
16047
16048         * gnulib-tool: Rename --symlink to --symbolic.
16049
16050 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
16051
16052         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
16053         symbolic links to files instead of copying/moving.  Add --aux-dir,
16054         specifying directory relative --dir where auxiliary build tools
16055         are placed.
16056
16057 2005-04-14  Bruno Haible  <bruno@clisp.org>
16058
16059         * modules/allocsa (License): Change to LGPL.
16060         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
16061
16062 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
16063
16064         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
16065         that "UTC +1 second" continues to work.  Problem reported
16066         by Dmitry V. Levin.
16067         (relunit_snumber): New rule.
16068         (relunit): Use it.
16069
16070 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
16071
16072         * lib/getdate.y (universal_time_zone_table): New constant.
16073         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
16074         universal_time_zone_table.
16075         (lookup_zone): Prefer universal_time_zone_table to
16076         local_time_zone_table, so that "GMT" time stamps are allowed in
16077         London during the summer.  Problem reported by Ian Abbott.
16078
16079 2005-04-12  Jim Meyering  <jim@meyering.net>
16080
16081         * lib/human.c (humblock): Set *options even when returning due to
16082         xstrtoumax conversion failure.  Thanks to a used-uninitialized
16083         warning from gcc-4.
16084
16085 2005-04-09  Jim Meyering  <jim@meyering.net>
16086
16087         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
16088         -Wuninitialized: initialize tm0.tm_year.
16089
16090 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
16091
16092         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
16093         count, since there's no maximum.  All uses changed.
16094         Add member dsts_seen.
16095         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
16096         not being INT_MAX.
16097         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
16098         Use pc_rels_seen to decide whther a date is absolute.
16099
16100         * lib/getdate.y (number): Don't overwrite year.
16101         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
16102         check.
16103
16104 2005-04-02  Simon Josefsson  <jas@extundo.com>
16105
16106         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
16107         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
16108
16109 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
16110
16111         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
16112         where no absolute path name can be longer than PATH_MAX.
16113
16114 2005-03-27  Jim Meyering  <jim@meyering.net>
16115
16116         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
16117
16118 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
16119
16120         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
16121         "one's complement" -> "ones' complement" in comment, as per Knuth.
16122         "value of type" -> "type or expression" in comment.
16123         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
16124
16125 2005-03-26  Jim Meyering  <jim@meyering.net>
16126
16127         Comment nits.
16128         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
16129         Correct typos: s/or/of/.
16130
16131 2005-03-26  Jim Meyering  <jim@meyering.net>
16132
16133         * modules/check-include-files: Move to ../ and rename to...
16134         * check-module: ...this.
16135
16136 2005-03-25  Jim Meyering  <jim@meyering.net>
16137
16138         * modules/xvasprintf (Files): Add xalloc.h.
16139
16140 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
16141
16142         * modules/gettext (Files): config/config.rpath ->
16143         build-aux/config.rpath
16144         * modules/iconv (Files): Likewise.
16145         Problem reported by Oskar Liljeblad.
16146
16147 2005-03-23  Jim Meyering  <jim@meyering.net>
16148
16149         * modules/check-include-files: New script to check for
16150         missing dependencies, multiple includes, etc.
16151
16152         * modules/c-strtold (Depends-on): Add xalloc.
16153         * modules/c-strtod (Depends-on): Add xalloc.
16154         * modules/hash (Depends-on): Add xalloc.
16155         (Files): Remove lib/xalloc.h.
16156
16157         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
16158         * modules/userspec (Files): Add lib/inttostr.h.
16159
16160 2005-03-23  Jim Meyering  <jim@meyering.net>
16161
16162         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
16163
16164 2005-03-22  Jim Meyering  <jim@meyering.net>
16165
16166         * modules/stat-macros: New module.
16167         * modules/canonicalize, modules/euidaccess, modules/file-type,
16168         * modules/filemode, modules/lchown, modules/makepath,
16169         * modules/rmdir, modules/stat: Depend on new stat-macros module
16170         rather than listing lib/stat-macros.h manually.
16171         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
16172
16173 2005-03-22  Jim Meyering  <jim@meyering.net>
16174
16175         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
16176
16177 2005-03-22  Bruno Haible  <bruno@clisp.org>
16178
16179         * config/srclist.txt: Replace target directory 'config' with
16180         'build-aux'.
16181         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
16182         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
16183         ../build-aux/.
16184
16185 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
16186
16187         * modules/chdir-long (Depends-on): Add mempcpy.
16188
16189         * modules/acl, modules/backupfile, modules/c-strtod,
16190         modules/c-strtold, modules/canon-host, modules/canonicalize,
16191         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
16192         modules/exclude, modules/exitfail, modules/file-type,
16193         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
16194         modules/getdate, modules/getline, modules/getpagesize,
16195         modules/getpass, modules/getugroups, modules/group-member,
16196         modules/hard-locale, modules/hash, modules/human, modules/idcache,
16197         modules/inttostr, modules/long-options, modules/makepath,
16198         modules/md5, modules/memcasecmp, modules/memcoll,
16199         modules/modechange, modules/mountlist, modules/path-concat,
16200         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
16201         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
16202         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
16203         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
16204         modules/strftime, modules/strndup, modules/strverscmp,
16205         modules/timespec, modules/unlocked-io, modules/userspec,
16206         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
16207         modules/yesno:
16208         Remove lib_SOURCES line from Makefile.am section, as this is now
16209         done automatically by the corresponding Autoconf macro.
16210
16211 2005-03-21  Jim Meyering  <jim@meyering.net>
16212
16213         Changes imported from coreutils.
16214
16215         * lib/cycle-check.c: Don't include xalloc.h.
16216
16217         * lib/path-concat.c: Don't include assert.h.
16218         (path_concat): Remove assertion that would have triggered
16219         for ABASE starting with more than one slash.
16220         Reported by Andreas Schwab.
16221
16222         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
16223         properly when ABASE is an absolute file name.
16224         Correct the description of this function.
16225         Include <assert.h>.
16226         Add an assertion and a test driver.
16227         This fixes a bug introduced on 2004-07-02.
16228         Andreas Schwab reported the resulting failure of cp --parents:
16229         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
16230
16231 2005-03-21  Jim Meyering  <jim@meyering.net>
16232
16233         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
16234         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
16235
16236 2005-03-21  Jim Meyering  <jim@meyering.net>
16237         and  Paul Eggert  <eggert@cs.ucla.edu>
16238
16239         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
16240         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
16241         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
16242         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
16243         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
16244         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
16245         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
16246         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
16247         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
16248         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
16249         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
16250         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
16251         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
16252         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
16253         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
16254         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
16255         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
16256         for these modules.
16257
16258 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
16259
16260         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
16261         (which shouldn't happen), generate nothing instead of returning 0
16262         immediately, so that nstrftime (NULL, ...) doesn't return 0.
16263
16264 2005-03-16  Bruno Haible  <bruno@clisp.org>
16265
16266         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
16267         HAVE_LONGLONG_64BIT.
16268
16269 2005-03-16  Bruno Haible  <bruno@clisp.org>
16270
16271         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
16272         HAVE_LONGLONG_64BIT.
16273
16274 2005-03-16  Bruno Haible  <bruno@clisp.org>
16275
16276         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
16277         HAVE_LONGLONG_64BIT.
16278
16279 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16280
16281         * lib/strftime.c (my_strftime): Prepend space to format so that we can
16282         reliably distinguish strftime failure from empty output on POSIX
16283         hosts.
16284
16285 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16286
16287         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
16288         (iconv_string): Don't guess a size-zero buffer, as that might cause
16289         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
16290         result would be 'too large', where 'too large' is (heuristically)
16291         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
16292         overflow concerns.  This will prevent some unwanted malloc failures
16293         when the inputs are very large.
16294
16295 2005-03-15  Karl Berry  <karl@gnu.org>
16296
16297         * config/srclist.txt (config.rpath): from gettext.
16298         * config/config.rpath: update.
16299
16300 2005-03-15  Bruno Haible  <bruno@clisp.org>
16301
16302         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
16303         to 'negate'.
16304
16305         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
16306         variable.
16307
16308         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
16309         results.
16310
16311 2005-03-14  Simon Josefsson  <jas@extundo.com>
16312
16313         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
16314         <fx@gnu.org>.
16315
16316 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
16317
16318         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
16319         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
16320         intprops.h.
16321         * lib/strtol.c: Likewise.
16322
16323 2005-03-14  Jim Meyering  <jim@meyering.net>
16324
16325         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
16326         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
16327         to be nonzero so that we (and caller) can detect the difference
16328         between a valid zero-length expansion and an error return, even
16329         when the underlying strftime fails before writing anything into
16330         that location.
16331
16332 2005-03-14  Bruno Haible  <bruno@clisp.org>
16333
16334         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
16335         Update from GNU gettext 0.14.3.
16336
16337 2005-03-10  Jim Meyering  <jim@meyering.net>
16338
16339         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
16340
16341 2005-03-10  Jim Meyering  <jim@meyering.net>
16342
16343         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
16344         so that this module works on systems without fchdir.
16345
16346 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
16347
16348         Factor int-properties macros into a single file, except for
16349         glibc-related files.
16350         * lib/intprops.h: New file.
16351         * lib/getloadavg.c: Include it instead of limits.h.
16352         (INT_STRLEN_BOUND): Remove.
16353         * lib/human.c: Include intprops.h.
16354         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
16355         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
16356         302/1000.
16357         * lib/inttostr.h: Include intprops.h instead of limits.h.
16358         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
16359         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
16360         for consistency with intprops.h.
16361         (time_t_is_integer, twos_complement_arithmetic): Use them.
16362         * lib/sig2str.h: Include <signal.h>, intprops.h.
16363         (INT_STRLEN_BOUND): Remove.
16364         * lib/strftime.c (TYPE_SIGNED): Remove.
16365         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
16366         * lib/strtol.c: Adjust comments to match intprops.h.
16367         * lib/userspec.c: Include intprops.h.
16368         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
16369         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
16370         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
16371         instead of rolling our own expressions.
16372         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
16373
16374         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
16375         instead of int.
16376         (my_strftime): Do not mishandle years close to INT_MAX, by doing
16377         the right thing even if adding 1900 would overflow.  Similarly
16378         for tm_mon + 1 and tm_yday + 1.
16379         Make %Y always equivalent to %C%y, and similarly for %G and %g.
16380         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
16381         (DO_SIGNED_NUMBER): New macro.
16382         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
16383
16384 2005-03-07  Bruno Haible  <bruno@clisp.org>
16385
16386         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
16387
16388 2005-03-07  Bruno Haible  <bruno@clisp.org>
16389
16390         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
16391
16392 2005-03-04  Derek R. Price  <derek@ximbiot.com>
16393
16394         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
16395         (func_import): Only replace files via --import when they have actually
16396         changed.
16397
16398 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16399
16400         * m4/mmap-anon.m4: New file.
16401         * m4/pagealign_alloc.m4: New file.
16402
16403 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16404             Bruno Haible  <bruno@clisp.org>
16405
16406         * modules/pagealign_alloc: New file.
16407         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
16408
16409 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16410             Bruno Haible  <bruno@clisp.org>
16411
16412         * lib/pagealign_alloc.h: New file.
16413         * lib/pagealign_alloc.c: New file.
16414
16415 2005-03-03  Bruno Haible  <bruno@clisp.org>
16416
16417         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
16418         Use an all-permissive copyright notice, recommended by RMS.
16419
16420 2005-03-02  Bruno Haible  <bruno@clisp.org>
16421
16422         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
16423         of AIX, the replacement has to be done only after <string.h> is
16424         included, therefore not in config.h. stpncpy.h does the replacement,
16425         and stpncpy.c uses it.
16426
16427 2005-03-02  Bruno Haible  <bruno@clisp.org>
16428
16429         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
16430         stpncpy.c uses it.
16431
16432 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16433
16434         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
16435         The workaround isn't strictly needed for POSIX conformance, and
16436         it's too much of a pain to configure and maintain.  We'll ask
16437         people to fix their kernels instead.
16438         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
16439         (NANOSLEEP_BUG_WORKAROUND): Remove.
16440         (xnanosleep): Remove the workaround.
16441
16442 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16443
16444         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
16445         Reported by Derek Price.
16446         (Include): Add "timespec.h".
16447
16448         * modules/xnanosleep (Depends-on): Remove gethrxtime.
16449
16450 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16451
16452         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
16453         to detect nanosleep bug.
16454
16455 2005-03-01  Bruno Haible  <bruno@clisp.org>
16456
16457         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
16458
16459 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
16460
16461         * modules/gethrxtime: New file.
16462         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
16463         (Depends-on): Add gethrxtime.
16464         (configure.ac): Add gl_XNANOSLEEP.
16465         (Makefile.am): Remove lib_SOURCES line.
16466
16467 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16468
16469         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
16470         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
16471
16472 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16473
16474         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
16475         * lib/timespec.h (gettime): Return void, since it always
16476         succeeds now.  All uses changed.
16477         * lib/gettime.c (gettime) Likewise.
16478         [HAVE_NANOTIME]: Prefer nanotime.
16479         Assume gettimeofday succeeds, as POSIX requires.
16480         Assime time () succeeds, since other code already does.
16481         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
16482         (timespec_subtract): Remove.
16483         (NANOSLEEP_BUG_WORKAROUND): New constant.
16484         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
16485         things considerably.  Use it only on GNU/Linux hosts, since the
16486         workaround shouldn't be needed elsewhere.
16487
16488 2005-02-24  Bruno Haible  <bruno@clisp.org>
16489
16490         * modules/gettext (Files): Add m4/glibc2.m4.
16491
16492 2005-02-24  Bruno Haible  <bruno@clisp.org>
16493
16494         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
16495         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
16496         * m4/progtest.m4:
16497         Update from GNU gettext 0.14.2.
16498         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
16499
16500 2005-02-24  Bruno Haible  <bruno@clisp.org>
16501
16502         * lib/localcharset.c: Update from GNU gettext 0.14.2.
16503         * lib/config.charset: Update from GNU gettext 0.14.2.
16504
16505 2005-02-24  Bruno Haible  <bruno@clisp.org>
16506
16507         * lib/gettext.h: Update from GNU gettext 0.14.2.
16508
16509 2005-02-23  Simon Josefsson  <jas@extundo.com>
16510
16511         * m4/iconvme.m4: New file.
16512
16513 2005-02-23  Jim Meyering  <jim@meyering.net>
16514
16515         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
16516         change.
16517         Thanks to Bruno Haible for catching it.
16518
16519 2005-02-22  Simon Josefsson  <jas@extundo.com>
16520
16521         * modules/iconvme: New file.
16522
16523         * MODULES.html.sh: Add iconvme.
16524
16525 2005-02-22  Simon Josefsson  <jas@extundo.com>
16526
16527         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
16528
16529 2005-02-22  Simon Josefsson  <jas@extundo.com>
16530
16531         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
16532
16533 2005-02-22  Jim Meyering  <jim@meyering.net>
16534
16535         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
16536         s/ifndef/ifdef/.
16537
16538 2005-02-20  Neil Conway  <neilc@samurai.com>
16539
16540         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
16541         returned by OSX/Darwin if the specified buffer is not large
16542         enough for the hostname.
16543
16544 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16545
16546         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
16547         pass it to _help, otherwise the latter coredumps trying to
16548         dereference state.root_argp.
16549
16550 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16551
16552         * modules/chdir-long (Depends-on): Add memrchr.
16553         * modules/memrchr (Files): Add lib/memrchr.h.
16554         (Include): "memrchr.h".
16555
16556 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16557
16558         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
16559
16560 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16561
16562         * lib/memrchr.h: New file.
16563         * lib/chdir-long.c: Include it.
16564         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
16565         Don't bother including stddef.h.
16566
16567 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
16568
16569         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
16570         inclusion.
16571         Include <sys/types.h>, for dev_t.
16572         (ME_DUMMY, ME_REMOTE): Move from here....
16573         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
16574         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
16575         Dmitry V. Levin.
16576         Include mountlist.h first, to test the interface.
16577
16578 2005-01-29  Bruno Haible  <bruno@clisp.org>
16579
16580         * lib/progname.c (program_name): Initialize.
16581         Needed when linking statically on MacOS X.
16582
16583 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16584
16585         Sync from coreutils.
16586         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
16587         (Depends-on): Add c-strtod.
16588         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
16589
16590 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16591
16592         Sync from coreutils.
16593         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
16594
16595         Remove files that are specific to coreutils.
16596         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
16597
16598 2005-01-28  Bruno Haible  <bruno@clisp.org>
16599
16600         * modules/javacomp: New file.
16601         * MODULES.html.sh (Java): Add javacomp.
16602
16603 2005-01-28  Bruno Haible  <bruno@clisp.org>
16604
16605         * m4/javacomp.m4: New file, from GNU gettext.
16606
16607 2005-01-28  Bruno Haible  <bruno@clisp.org>
16608
16609         * lib/javacomp.sh.in: New file, from GNU gettext.
16610         * lib/javacomp.h: New file, from GNU gettext.
16611         * lib/javacomp.c: New file, from GNU gettext.
16612
16613 2005-01-26  Simon Josefsson  <jas@extundo.com>
16614
16615         * lib/gai_strerror.c: Use GPL in header.
16616
16617 2005-01-26  Bruno Haible  <bruno@clisp.org>
16618
16619         * modules/javaexec: New file.
16620         * MODULES.html.sh (Java): Add javaexec.
16621
16622 2005-01-26  Bruno Haible  <bruno@clisp.org>
16623
16624         * m4/javaexec.m4: New file, from GNU gettext.
16625
16626 2005-01-26  Bruno Haible  <bruno@clisp.org>
16627
16628         * lib/javaexec.sh.in: New file, from GNU gettext.
16629         * lib/javaexec.h: New file, from GNU gettext.
16630         * lib/javaexec.c: New file, from GNU gettext.
16631
16632 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16633
16634         * modules/lchown (Depends-on): Remove lchown.h
16635
16636 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16637
16638         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
16639         must be defined if the header file was not found, in order
16640         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
16641
16642 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16643
16644         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
16645         initializers for struct pentry_state.
16646         (__argp_error): Check return value of __asprintf
16647         (__argp_failure): Translate error message
16648
16649         * lib/argp-parse.c: Removed braces around the expansion of N_()
16650
16651 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16652
16653         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
16654         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
16655         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
16656         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
16657         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
16658         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
16659         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
16660         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
16661         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
16662         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
16663         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
16664         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
16665         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
16666         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
16667         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
16668         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
16669         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
16670         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
16671         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
16672         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
16673         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
16674         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
16675         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
16676         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
16677         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
16678         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
16679         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
16680         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
16681         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
16682         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
16683         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
16684         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
16685         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
16686         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
16687         xstrtol.m4, xstrtoumax.m4, yesno.m4:
16688         Use an all-permissive copyright notice, recommended by RMS.
16689
16690 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
16691
16692         * modules/chdir-long (Depends-on): Remove mempcpy.
16693
16694 2005-01-21  Jim Meyering  <jim@meyering.net>
16695
16696         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
16697         same value as for Solaris 9.
16698
16699         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
16700         component length.  This included changing the parameter to be
16701         of type `char *' rather than `char const *'.
16702         * lib/chdir-long.h (chdir_long): Update prototype.
16703
16704         * lib/openat.c (fdopendir, fstatat): New functions.
16705         * lib/openat.h: Include headers required for use of DIR and struct
16706         stat.
16707         [AT_SYMLINK_NOFOLLOW]: Define.
16708         (fdopendir, fstatat): Add prototypes.
16709
16710 2005-01-21  Bruno Haible  <bruno@clisp.org>
16711
16712         * modules/classpath: New file.
16713         * MODULES.html.sh (Java): Add classpath.
16714
16715 2005-01-21  Bruno Haible  <bruno@clisp.org>
16716
16717         * lib/classpath.h: New file, from GNU gettext.
16718         * lib/classpath.c: New file, from GNU gettext.
16719
16720 2005-01-20  Simon Josefsson  <jas@extundo.com>
16721
16722         * modules/version-etc-fsf: New file.
16723
16724 2005-01-20  Simon Josefsson  <jas@extundo.com>
16725
16726         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
16727         * lib/version-etc.c: Remove version_etc_copyright.
16728         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
16729         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
16730
16731 2005-01-20  Simon Josefsson  <jas@extundo.com>
16732
16733         * lib/base64.h (isbase64): Add.
16734
16735         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
16736         using a unsigned prototype, don't inline.
16737         (base64_decode): Use it.
16738
16739 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16740
16741         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
16742         it.
16743
16744 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16745
16746         * lib/save-cwd.c (save_cwd): Remove code to support the case
16747         where fchdir is missing or flaky.
16748
16749 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16750
16751         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
16752
16753 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
16754
16755         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
16756         AC_LIBSOURCES now does this.
16757         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
16758         with new ullong_max module.
16759
16760 2005-01-19  Bruno Haible  <bruno@clisp.org>
16761
16762         * modules/sh-quote: New file.
16763         * MODULES.html.sh (Executing programs): Add sh-quote.
16764
16765 2005-01-19  Bruno Haible  <bruno@clisp.org>
16766
16767         * lib/sh-quote.h: New file, from GNU gettext.
16768         * lib/sh-quote.c: New file, from GNU gettext.
16769
16770 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16771
16772         Merge from coreutils.
16773         * m4/ullong_max.m4: New file.
16774         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
16775         (gl_MACROS): Assume localeconv exists.
16776
16777 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16778
16779         Merge changes from coreutils, as described below in several
16780         changelogs dated today.
16781
16782         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
16783         (O_DIRECTORY): Remove; not needed here, since "." must be
16784         a directory.  All uses removed.
16785         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
16786         universal on Suns, and we also need to test for IRIX.
16787         Revamp code to use 'if' rather than '#if'.
16788         Avoid unnecessary comparison of cwd->desc to 0.
16789
16790         * lib/utimens.c (futimens): Robustify the previous patch, by checking
16791         for known valid error numbers rather than observed invalid ones.
16792
16793 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16794
16795         * modules/ullong_max: New file.
16796
16797         * modules/chdir-long, modules/openat: New files.
16798         * modules/save-cwd (Depends-on): Depend on chdir-long.
16799         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
16800
16801 2005-01-18  Jim Meyering  <jim@meyering.net>
16802
16803         Merge from coreutils.
16804         * m4/chdir-long.m4, m4/openat.m4: New files.
16805         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
16806         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
16807         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
16808         is sane and DOES follow symlinks.  Besides, testing 20 different
16809         systems found no broken chown implementations.
16810         Prompted by a change in rsync's copy of this macro.
16811         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
16812
16813         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
16814
16815         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
16816         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
16817         NULL-means-set-to-current-time semantics.
16818         Remove temporary file immediately, rather than waiting
16819         for configure's at-exit trap code to do it.
16820
16821 2005-01-18  Jim Meyering  <jim@meyering.net>
16822
16823         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16824
16825         * lib/utimens.c (futimens): Account for the fact that futimes
16826         can also fail with errno == ENOSYS or errno == ENOENT.
16827         Patch from Dmitry V. Levin.
16828
16829         Change the name of the robust chdir function from chdir to chdir_long.
16830         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
16831         (restore_cwd): Use chdir_long, not chdir.
16832         * lib/chdir-long.c: Renamed from chdir.c.
16833         * lib/chdir-long.h: Renamed from chdir.h.
16834         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
16835         Hurd.
16836
16837 2005-01-18  Bruno Haible  <bruno@clisp.org>
16838
16839         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
16840         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
16841         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
16842         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
16843         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
16844         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
16845         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
16846         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
16847         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
16848         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
16849         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
16850         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
16851         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
16852         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
16853         Use an all-permissive copyright notice, recommended by RMS.
16854
16855 2005-01-18  Bob Proulx  <bob@proulx.com>
16856
16857         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
16858         simplify offsetof() macro construct to avoid compile failure with
16859         native HP-UX 11.0 ANSI C compiler.
16860
16861 2005-01-17  Bruno Haible  <bruno@clisp.org>
16862
16863         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
16864         redundant because stpncpy.m4 takes care of it.
16865
16866 2005-01-17  Bruno Haible  <bruno@clisp.org>
16867
16868         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
16869
16870 2005-01-17  Bruno Haible  <bruno@clisp.org>
16871
16872         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
16873         used.
16874
16875 2005-01-17  Bruno Haible  <bruno@clisp.org>
16876
16877         * lib/fwriteerror.h (fwriteerror): Change specification to include
16878         fclose.
16879         * lib/fwriteerror.c: Include <stdbool.h>.
16880         (fwriteerror): At the end, close the file stream. Record whether
16881         stdout was already closed.
16882
16883 2005-01-17  Bruno Haible  <bruno@clisp.org>
16884
16885         * lib/execute.c (environ): Declare if needed.
16886         * lib/pipe.c (environ): Likewise.
16887         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
16888
16889 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16890
16891         * modules/argp: Depend on vsnprintf
16892
16893 2005-01-10  Jim Meyering  <jim@meyering.net>
16894
16895         * modules/closeout (Depends-on): Add atexit.
16896
16897 2005-01-06  Bruno Haible  <bruno@clisp.org>
16898
16899         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
16900
16901 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16902
16903         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
16904         definitions to be after all include files, to avoid collisions.
16905         Problem reported by Bob Proulx.
16906
16907 2005-01-04  Jim Meyering  <jim@meyering.net>
16908
16909         Changes imported from coreutils.
16910         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
16911         as the mkstemp template, use a temporary directory and an
16912         8.3-friendly template to avoid trouble on systems like DJGPP.
16913         Reported by Juan M. Guerrero via Stepan Kasal.
16914         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
16915         close. Remove the temporary directory right away, rather than waiting
16916         for configure's at-exit trap code to do it.
16917         Suggestion from Stepan Kasal.
16918
16919 2005-01-01  Simon Josefsson  <jas@extundo.com>
16920
16921         * gnulib-tool: Print #include directives when --import'ing.
16922
16923 2004-12-28  Simon Josefsson  <jas@extundo.com>
16924
16925         * tests/test-base64.c: Include required header files.  Remove
16926         unused variables.
16927
16928 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16929
16930         * modules/error (Depends-on): Remove gettext.
16931
16932 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
16933
16934         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
16935         not needed.  This removes a dependency on the gettext module.
16936         [defined _LIBC]: Do not include <libintl.h>; not needed.
16937
16938 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16939
16940         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
16941         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
16942
16943 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
16944
16945         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
16946         HAVE_DECL_STRTOLD.
16947
16948 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16949
16950         * modules/getdate (Depends-on): Remove alloca-opt.
16951
16952 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16953
16954         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
16955
16956 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
16957
16958         * lib/argp-parse.c: Include <stddef.h>.
16959         (alignof, alignto): New macros.
16960         (parser_init): Don't assume that void * is aligned sufficiently
16961         for struct option.
16962
16963         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
16964         need to extend the stack.
16965         (YYINITDEPTH): New macro, so that the initial stack isn't overly
16966         large.
16967
16968 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16969
16970         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
16971
16972 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16973
16974         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
16975         (2004-10-24) change.  Apparently this was a false alarm.
16976
16977         * modules/getdate: Depend on alloca-opt, not alloca.
16978
16979 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
16980
16981         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
16982         Remove now-obsolete comment about AIX.
16983         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
16984         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
16985         (YYMAXDEPTH): New macro.
16986
16987 2004-12-18  Simon Josefsson  <jas@extundo.com>
16988
16989         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
16990
16991 2004-12-18  Bruno Haible  <bruno@clisp.org>
16992
16993         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
16994
16995 2004-12-18  Bruno Haible  <bruno@clisp.org>
16996
16997         * lib/fatal-signal.c (fatal_signals): Make non-const.
16998         (init_fatal_signals): New function.
16999         (uninstall_handlers, install_handlers): Ignore signals that were set to
17000         SIG_IGN.
17001         (at_fatal_signal): Call init_fatal_signals.
17002         (init_fatal_signal_set): Likewise. Ignore signals that were set to
17003         SIG_IGN.
17004         Reported by Paul Eggert.
17005
17006 2004-12-18  Bruno Haible  <bruno@clisp.org>
17007
17008         * doc/alloca.texi: New file.
17009         * doc/alloca-opt.texi: New file.
17010
17011 2004-12-17  Jim Meyering  <jim@meyering.net>
17012
17013         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
17014         Otherwise, install-sh could exit with improper exit status when
17015         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
17016
17017 2004-12-16  Simon Josefsson  <jas@extundo.com>
17018
17019         * tests/test-base64.c: Add license.
17020
17021 2004-12-15  Stepan Kasal  <address@hidden>
17022
17023         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
17024
17025 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
17026
17027         * modules/getcwd (Files): Add m4/d-ino.m4.
17028         Suggested by Mark D. Baushke.
17029
17030 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17031
17032         * lib/getdate.y (textint): New member "negative".
17033         (time_zone_hhmm): New function.
17034         Expect 14 shift-reduce conflicts, not 13.
17035         (o_colon_minutes): New rule.
17036         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
17037         (yylex): Set the "negative" member of signed numbers.
17038
17039 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17040
17041         * doc/getdate.texi (Time of day items, Time zone items):
17042         Describe new formats +00:00, UTC+00:00.
17043
17044 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
17045
17046         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
17047         spurious "-l"s.  Problem reported by Stepan Kasal.
17048
17049 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
17050
17051         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
17052         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
17053
17054 2004-12-04  Simon Josefsson  <jas@extundo.com>
17055
17056         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
17057         Vandoorselaere <yoann@prelude-ids.org>.
17058
17059 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17060
17061         Changes imported from coreutils.
17062         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
17063         exist.
17064         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
17065
17066 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17067
17068         Changes imported from coreutils.
17069         * lib/hard-locale.c: Assume <locale.h> exists.
17070         Include "strdup.h".
17071         (GLIBC_VERSION): New macro.
17072         (hard_locale): Assume setlocale exists.
17073         Rewrite to avoid #ifdef.
17074         Use strdup rather than malloc + strcpy.
17075         * lib/human.c: Assume <locale.h> exists.
17076         (human_readable): Assume localeconv exists.
17077
17078 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17079
17080         * modules/hard-locale (Depends-on): Add strdup.
17081
17082 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
17083
17084         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
17085         convert T2, not T.  (Imported from libc.)
17086
17087 2004-11-30  Simon Josefsson  <jas@extundo.com>
17088
17089         * modules/restrict (License): Change to LGPL.
17090
17091 2004-11-30  Simon Josefsson  <jas@extundo.com>
17092
17093         * m4/restrict.m4: Add copyright and copying conditions.
17094
17095 2004-11-30  Simon Josefsson  <jas@extundo.com>
17096
17097         * m4/base64.m4: New file.
17098
17099 2004-11-30  Simon Josefsson  <jas@extundo.com>
17100
17101         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
17102         base64.
17103
17104         * tests/test-base64.c: New file.
17105
17106         * modules/base64: New file.
17107
17108 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17109
17110         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
17111         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
17112
17113         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
17114
17115 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17116
17117         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
17118         (__getcwd.c): Don't restore errno; glibc doesn't.
17119         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
17120         first, falling back to our code only if its results look suspicious.
17121         Ensure that the resulting buffer is only as large as necessary.
17122
17123         * lib/readutmp.c: Include readutmp.h first.
17124         Include <errno.h>, since readutmp.h no longer does that.
17125         * lib/readutmp.h: Don't include <errno.h>,
17126         <sys/param.h>, <time.h>; not needed to establish interface.
17127         (errno): Remove decl.
17128         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
17129         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
17130         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
17131
17132 2004-11-28  Simon Josefsson  <jas@extundo.com>
17133
17134         * lib/base64.h, base64.c: New file.
17135
17136 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17137
17138         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
17139
17140 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
17141
17142         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
17143         (Depends-on): Remove pathmax, same.  Add mempcpy.
17144         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
17145         (Makefile.am): Append getcwd.h to lib_SOURCES.
17146         (Include): Add getcwd.h.
17147         (Maintainer): Change from Jim Meyering to "all, glibc",
17148         since getdate now uses intended-for-glibc code.
17149         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
17150         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
17151
17152 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17153
17154         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
17155         HP's ANSI C compiler.
17156         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
17157         Declaring int functions causes warnings on some modern systems and
17158         shouldn't be needed to compile on ancient ones.
17159         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
17160         defined.
17161
17162         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
17163         with the following changes.
17164         (__set_errno): Parenthesize properly.
17165         Include <stdbool.h>.
17166         (MIN, MAX, MATCHING_INO): New macros.
17167         (__getcwd): Define with prototype, not K&R form.
17168         Use heuristics to allocate default buffer on stack if possible.
17169         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
17170         behavior, and to avoid the PATH_MAX limit when computing
17171         ../../../../...
17172         Use MATCHING_INO to compare inode number to file.
17173         Check for arithmetic overflow in size calculations.
17174         Fix bug in reallocation of dot array that caused getcwd to fail
17175         on directories nested deeper than 75.
17176         Be more careful about saving errno on error.
17177         Do not use realloc; use only free+malloc, as this is a bit
17178         more flexible and avoids a needless copy operation.
17179         Do not inspect st_dev and st_ino for symbolic links; POSIX
17180         doesn't specify the latter.
17181         Check for closedir errors.
17182         Avoid needless casts.
17183         Use "#ifdef weak_alias" around weak_alias, to be like other
17184         glibc code.
17185         The following changes to getcwd.c have effect only when used in
17186         gnulib; they have no effect inside glibc proper.
17187         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
17188         as alloca isn't used.
17189         (alloca, __alloca): Likewise.
17190         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
17191         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17192         unconditionally, as gnulib assumes C89 or better.
17193         Do not include <sys/param.h>.
17194         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
17195         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
17196         better.
17197         (NULL) [!defined NULL]: Remove; we assume C89 or better.
17198         Include <dirent.h> in a way that is compatible with modern Autoconf.
17199         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
17200         New macros, if not already defined.
17201         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
17202         Use "_LIBC", not "defined _LIBC", for consistency.
17203         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
17204         a mempcpy module.
17205         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
17206         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
17207         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
17208         credit only to Jim Meyering and adjust the copyright dates.
17209         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
17210         <stdlib.h>, <unistd.h>, "pathmax.h".
17211         Instead, include "xgetcwd.h" (first) and "getcwd.h".
17212         (INITIAL_BUFFER_SIZE): Remove.
17213         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
17214
17215 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17216
17217         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
17218         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
17219         Use the _ONCE methods, for efficiency.
17220         Check for fcntl.h.  In test program, include <errno.h>
17221         and <fcntl.h> if available.  Remove old K&R cruft from
17222         test program.  Check for common errors in GNU/Linux,
17223         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
17224         don't do AC_LIBOBJ, as that's getcwd.m4's job.
17225         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
17226         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
17227         name accordingly.
17228         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
17229         accommodate new getcwd.c.
17230         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
17231         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
17232         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
17233         that's all we need now.
17234
17235 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17236
17237         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
17238         argp-parse.c depends on getopt internals, that means we should
17239         always use our getopt, to be on the safe side.
17240         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
17241         order not to spoil the result of an eventual previous invocation
17242         of gl_GETOPT_SUBSTITUTE.
17243
17244 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17245
17246         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
17247         redefinition warnings. To avoid them, include the defines
17248         in `#if !defined __need_getopt ... #endif'. The only place
17249         where __getopt_argv_const is used is in definitions
17250         of getopt_long and getopt_long_only below, which are as well
17251         protected by `#ifndef __need_getopt'.
17252         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
17253         __need_getopt after including <stdio.h> and <unistd.h> These
17254         headers might have defined it.
17255
17256 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17257
17258         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
17259
17260 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17261
17262         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
17263         (futimens): New function, which uses futimes if available.
17264         (futimens, utimens): Support timespec==NULL, with same semantics
17265         as utime and utimens.
17266         * lib/utimens.h (futimens): New decl.
17267
17268 2004-11-23  Jim Meyering  <jim@meyering.net>
17269
17270         * lib/getopt_.h: Remove trailing blanks.
17271
17272 2004-11-23  Jim Meyering  <jim@meyering.net>
17273
17274         * lib/__fpending.c: Add comment.
17275
17276 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
17277
17278         * modules/canonicalize (Depends-on): Add xreadlink.
17279         Problem reported by James Youngman.
17280
17281 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
17282
17283         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
17284         New macros.
17285         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
17286         optopt): Use them instead of invoking ## directly; otherwise, the
17287         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
17288
17289 2004-11-19  Bruno Haible  <bruno@clisp.org>
17290
17291         * lib/strtok_r.c: Move comments from here...
17292         * lib/strtok_r.h: ... to here.
17293
17294 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17295
17296         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
17297         implementations that mishandle size_t overflow.
17298
17299 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17300
17301         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
17302         might fail.  Problem reported by Yoann Vandoorselaere.
17303         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
17304         implementations that mishandle size_t overflow.
17305
17306 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17307
17308         * modules/canon-host (Depends-on): Add strdup.
17309
17310 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17311
17312         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
17313
17314 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17315
17316         * lib/canon-host.c: Include "strdup.h".
17317         (canon_host): Use getaddrinfo if available, so that IPv6 works.
17318         Use strdup instead of malloc/strcpy to duplicate strings.
17319
17320         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
17321         (human_space_before_unit): New constant.
17322         * lib/human.c (human_readable): Support it.
17323
17324         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
17325         (xgetcwd): Set errno correctly when failing.
17326         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
17327         the failure is actually due to a PATH_MAX problem.
17328
17329         Further getopt changes to make it more likely that glibc will
17330         buy the changes back.
17331         * lib/getopt.c (POSIXLY_CORRECT): New constant.
17332         (getopt): Use it, so to preserve glibc semantic
17333         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
17334         when compiling for libc.
17335         * lib/getopt_.h (__getopt_argv_const): Bring it back.
17336         (getopt_long, getopt_long_only): Use it.
17337
17338         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17339         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
17340         (getopt): Argv is now char * const *, as per standard.
17341         (_getopt_internal_r, _getopt_internal): Argv is now char **,
17342         not char *__getopt_argv_const *.
17343         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17344         _getopt_long_only_r): Likewise.
17345         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
17346         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17347         _getopt_long_r, _getopt_long_only_r): Likewise.
17348         * lib/getopt_.h (__getopt_argv_const): Remove.
17349         (getopt): Argv is now char * const *, as per standard.
17350
17351         * lib/getdate.y (tORDINAL): New token.
17352         (day, relunit): Allow it for relative times.
17353         (relative_time_table): Use tORDINAL for ordinals.
17354
17355 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17356
17357         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
17358         Document that "second" isn't allowed as an ordinal number.
17359
17360 2004-11-16  Jim Meyering  <jim@meyering.net>
17361
17362         * modules/closeout (Depends-on): Add fpending.
17363
17364 2004-11-15  Jim Meyering  <jim@meyering.net>
17365
17366         * lib/closeout.c: Include "__fpending.h" once again.
17367         Include <stdbool.h>.
17368         (close_stdout): Don't fail just because stdout was closed initially,
17369         since some programs don't write to stdout in the normal course of
17370         operation (other than --version and --help), and we don't want this
17371         function to make e.g. `touch file >&-' fail.
17372         But do fail if it was closed and someone has tried to write to it.
17373         E.g., `printf foo >&-' must fail.
17374
17375 2004-11-13  Jim Meyering  <jim@meyering.net>
17376
17377         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
17378
17379 2004-11-12  Simon Josefsson  <jas@extundo.com>
17380
17381         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
17382         small doc fix is still pending.
17383
17384 2004-11-11  Simon Josefsson  <jas@extundo.com>
17385
17386         * modules/strtok_r: New file.
17387
17388         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17389         strtok_r.
17390
17391 2004-11-11  Simon Josefsson  <jas@extundo.com>
17392
17393         * m4/strtok_r.m4: New file.
17394
17395         * m4/getopt.m4: Replace opterr.
17396
17397 2004-11-11  Simon Josefsson  <jas@extundo.com>
17398
17399         * lib/strtok_r.h, strtok_r.c: New file.
17400
17401 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17402
17403         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
17404         of replacing opterr, getopt, etc.  This should handle the
17405         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
17406
17407 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17408
17409         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
17410         we can stop lying to compilers about the constness of argv when we
17411         are compiled outside glibc.
17412         (getopt, getopt_long, getopt_long_only): Use it.
17413         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17414         _getopt_internal, getopt): Likewise.
17415         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17416         _getopt_long_only_r): Likewise.
17417         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17418         _getopt_long_r, _getopt_long_only_r): Likewise.
17419
17420         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
17421         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
17422         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
17423         the other external symbols.
17424         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
17425         declaration, since the above renaming now works around collisions.
17426
17427 2004-11-11  Jim Meyering  <jim@meyering.net>
17428
17429         * lib/linebreak.c: Remove trailing blanks.
17430         * lib/alloca_.h: Likewise.
17431         * lib/acosl.c: Likewise.
17432         * lib/euidaccess.c: Likewise.
17433         * lib/allocsa.h: Likewise.
17434
17435 2004-11-10  Simon Josefsson  <jas@extundo.com>
17436
17437         * m4/getaddrinfo.m4: New file.
17438
17439 2004-11-10  Simon Josefsson  <jas@extundo.com>
17440
17441         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
17442
17443 2004-11-10  Simon Josefsson  <jas@extundo.com>
17444
17445         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17446         getaddrinfo.
17447
17448         * modules/getaddrinfo: New file.
17449
17450 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17451
17452         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
17453
17454 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17455
17456         * lib/mktime.c (SHR): New macro, which is a portable
17457         substitute for >> that should work even on Crays.
17458         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
17459         Problem reported by Mark D. Baushke in
17460         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
17461         * lib/getdate.y (SHR): Likewise.
17462         (tm_diff): Use it.
17463         * lib/strftime.c (SHR): Likewise.
17464         (tm_diff): Use it.
17465         * lib/quotearg.c (struct quoting_options): Use unsigned int for
17466         quote_these_too, so that right shifts are well defined.  All uses
17467         changed.
17468
17469 2004-11-10  Jim Meyering  <jim@meyering.net>
17470
17471         Ensure that no close failure goes unreported.
17472         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
17473         return early when it seems there's nothing to flush.
17474         Don't include __fpending.h.
17475
17476 2004-11-10  Jim Meyering  <jim@meyering.net>
17477
17478         * modules/closeout (Depends-on): Remove fpending.
17479
17480 2004-11-10  Jim Meyering  <jim@meyering.net>
17481
17482         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
17483
17484 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17485
17486         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
17487         gl_FUNC_STRFTIME.
17488         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
17489         and AC_REQUIRE when possible, to avoid duplicate checks.
17490         Check for <wchar.h>.
17491
17492 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17493
17494         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
17495
17496 2004-11-09  Bruno Haible  <bruno@clisp.org>
17497
17498         * m4/sockpfaf.m4: New file.
17499
17500 2004-11-05  Bruno Haible  <bruno@clisp.org>
17501
17502         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
17503         Reported by Mark D. Baushke <mdb@cvshome.org>.
17504
17505 2004-11-04  Bruno Haible  <bruno@clisp.org>
17506
17507         2004-09-11  Bruno Haible  <bruno@clisp.org>
17508                 * allocsa.valgrind: New file.
17509         2004-02-06  Bruno Haible  <bruno@clisp.org>
17510                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
17511                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
17512                 Reported by Christopher Seip <chris.seip@hp.com>.
17513
17514 2004-11-04  Bruno Haible  <bruno@clisp.org>
17515
17516         * modules/allocsa (Files): Add lib/allocsa.valgrind.
17517         (Makefile.am): Distribute it.
17518
17519 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
17520
17521         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
17522         with errno == ERANGE if the buffer is too small.
17523         Problem reported by Mark D. Baushke.
17524
17525 2004-11-03  Albert Chin  <china@thewrittenword.com>
17526             Paul Eggert  <eggert@cs.ucla.edu>
17527
17528         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
17529         equivalent, substitute $ac_type for equivalent type rather than
17530         blindly using uint32_t *always* which won't work if uint32_t is not
17531         available.  Define _UINT32_T to work around typedef of uint32_t if
17532         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
17533         2.5.1.
17534
17535 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17536
17537         * m4/jm-macros.m4: Sync from coreutils.
17538         (gl_MACROS): Check for mbrlen, for pathchk.
17539         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
17540
17541 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17542
17543         * lib/xreadlink.c (MAXSIZE): New macro.
17544         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
17545         size does not exceed MAXSIZE.  Avoid cast.
17546         As suggested by Mark D. Baushke in
17547         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
17548         if readlink fails with buffer size just under MAXSIZE, try again
17549         with MAXSIZE.
17550
17551 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17552
17553         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
17554
17555 2004-11-02  Derek R. Price  <derek@ximbiot.com>
17556         and  Paul Eggert  <eggert@cs.ucla.edu>
17557
17558         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
17559         (get_date): Overparenthesize to avoid GCC warning.
17560
17561 2004-11-02  Bruno Haible  <bruno@clisp.org>
17562
17563         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
17564         returns void.
17565
17566 2004-11-02  Bruno Haible  <bruno@clisp.org>
17567
17568         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
17569         function returns void.
17570
17571 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17572
17573         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
17574         fflush_unlocked, flockfile, funlockfile, funlockfile,
17575         fputs_unlocked, putc_unlocked.
17576
17577 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17578
17579         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17580         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
17581         already declared.
17582
17583 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17584
17585         * modules/getdate (Files): Add doc/getdate.texi.
17586         (Depends-on): Add setenv, xalloc.
17587
17588 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17589
17590         * lib/getdate.y: Add support for TZ="foo" within a date string.
17591         Fix some bugs near time_t boundaries.  Reject dates with
17592         out-of-range components, e.g., "Sept 31".
17593         Include <stdlib.h>, "setenv.h", "xalloc.h".
17594         (ISDIGIT_LOCALE): Remove; unused.
17595         Note that the TZ and time functions used here are not reentrant.
17596         (mktime_ok, get_tz): New functions.
17597         (TZBUFSIZE): New constant.
17598         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
17599         This requires that we sometimes generate our own TZ="XXX..." setting.
17600
17601 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17602
17603         * doc/getdate.texi: New file, from coreutils with modifications for
17604         the new TZ parsing.
17605
17606 2004-10-27  Derek R. Price  <derek@ximbiot.com>
17607
17608         * lib/mktime.c (not_equal_tm): Remove redundant check.
17609
17610 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17611
17612         * modules/regex (lib_SOURCES): Add regex.c.
17613         Reported by James Youngman in
17614         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
17615
17616 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17617
17618         * lib/getdate.y: Use Bison 1.875 features, and some minor
17619         code cleanups.  This change does not affect semantics.
17620         Don't include <stdlib.h>; no longer needed.
17621         Don't include unlocked-io.h; only the "#if TEST" code uses
17622         stdio, and performance isn't crucial there.
17623         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
17624         Bison 1.875 features as described below.
17625         All uses of "PC." replaced by "pc->".
17626         (YYSTYPE): Add a forward declaration.
17627         (yylex, yyerror): Use full prototypes in forward decls.
17628         Use "%pure-parser" rather than obsolescent "%pure_parser".
17629         Use %parse-param and %lex-param instead of obsolescent
17630         YYPARSE_PARAM and YYLEX_PARAM.
17631         (meridian_table, month_and_day_table, time_units_table,
17632         relative_time_table, time_zone_table, military_table,
17633         lookup_zone, lookup_word, get_date):
17634         Use NULL instead of 0 where appropriate.
17635         (to_hour): Avoid abort (), to avoid a dependency on
17636         stdlib.h.
17637         (yyerror, yylex): Now accepts parser_control * arg.
17638         (main) [TEST]: Use '\0' rather than 0 for char.
17639
17640 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17641
17642         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
17643
17644 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17645
17646         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
17647         It's now the caller's responsibility to handle the case where
17648         !HAVE_GETPAGESIZE && !defined getpagesize.
17649
17650         * lib/mktime.c (leapyear): Arg is long int, not int.
17651
17652 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
17653
17654         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
17655
17656 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
17657
17658         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
17659         missing.  Problem reported by James Youngman.
17660
17661 2004-10-16  Simon Josefsson  <jas@extundo.com>
17662
17663         * gnulib-tool: Fix comments.  Fix parse problem.
17664         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
17665
17666 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
17667
17668         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
17669         implementation of getopt_long.  Problem reported by Alexander Taler in:
17670         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
17671
17672 2004-10-15  Bruno Haible  <bruno@clisp.org>
17673
17674         * gnulib-tool: Untabify. Initialize supplied_libname.
17675         (func_usage): More homogenous output.
17676         (func_modules_transitive_closure, func_modules_to_filelist,
17677         func_emit_lib_Makefile_am): New functions.
17678         (func_import): New function, extracted from big case statement. Use
17679         func_get_license, func_modules_transitive_closure,
17680         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
17681         opt_lgpl. Don't use test -a, as it's not portable.
17682         (func_create_testdir): Use func_modules_transitive_closure,
17683         func_modules_to_filelist, func_emit_lib_Makefile_am.
17684
17685 2004-10-15  Bruno Haible  <bruno@clisp.org>
17686
17687         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
17688
17689 2004-10-15  Bruno Haible  <bruno@clisp.org>
17690
17691         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
17692         the portions belonging to each module.
17693         Suggested by Derek Robert Price <derek@ximbiot.com>.
17694
17695 2004-10-12  Simon Josefsson  <jas@extundo.com>
17696
17697         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17698         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
17699         to real functions.
17700
17701 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17702
17703         * modules/vsnprintf: New file.
17704
17705 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17706
17707         * m4/vsnprintf.m4: New file.
17708
17709 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17710
17711         * lib/vsnprintf.h: New file.
17712         * lib/vsnprintf.c: New file.
17713
17714 2004-10-11  Bruno Haible  <bruno@clisp.org>
17715
17716         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
17717         vsnprintf.
17718
17719 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17720
17721         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
17722
17723 2004-10-07  Bruno Haible  <bruno@clisp.org>
17724
17725         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
17726         fits into the provided buffer.
17727
17728 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17729
17730         * lib/diacrit.c, diacrit.h: Add GPL notice.
17731
17732         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
17733         notice.
17734         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
17735         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
17736         This avoids a potential constant-folding bug.
17737
17738 2004-10-05  Bruno Haible  <bruno@clisp.org>
17739
17740         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
17741         for the declaration of strsep.
17742
17743 2004-10-05  Bruno Haible  <bruno@clisp.org>
17744
17745         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
17746
17747 2004-10-04  Simon Josefsson  <jas@extundo.com>
17748
17749         * modules/memmem: New file.
17750         * tests/test-memmem.c: New file.
17751         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
17752
17753 2004-10-04  Simon Josefsson  <jas@extundo.com>
17754
17755         * m4/memmem.m4: New file.
17756
17757 2004-10-04  Simon Josefsson  <jas@extundo.com>
17758
17759         * lib/memmem.h: New file.
17760         * lib/memmem.c: New file, taken from glibc.
17761
17762 2004-10-04  Simon Josefsson  <jas@extundo.com>
17763
17764         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
17765         '#ifdef USE_UNLOCKED_IO'.
17766
17767 2004-10-04  Simon Josefsson  <jas@extundo.com>
17768
17769         * config/srclist.txt: Add memmem from glibc.
17770
17771 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17772
17773         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
17774
17775         * modules/argmatch, modules/argp, modules/closeout, modules/error,
17776         modules/exclude, modules/getdate, modules/getline,
17777         modules/getndelim2, modules/getpass, modules/getpass-gnu,
17778         modules/getusershell, modules/linebuffer, modules/md5,
17779         modules/mountlist, modules/posixtm, modules/readtokens,
17780         modules/readutmp, modules/regex, modules/sha1,
17781         modules/version-etc, modules/yesno:
17782         Remove dependency on unlocked-io.
17783
17784 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17785
17786         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
17787
17788         * m4/unlocked-io.m4: Add copyright notice.
17789         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
17790
17791 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17792
17793         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
17794         * lib/xmalloc.c (xmemdup): Likewise.
17795         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
17796         XFREE): Remove these long-obsolescent macros.
17797         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
17798         * lib/xstrdup.c: Remove.
17799
17800         * lib/regex.c (re_comp): Cast gettext return value to char *,
17801         Problem reported by Martin Neitzel via Mark D. Baushke.
17802
17803 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17804
17805         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
17806         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
17807         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
17808         regex.c, sha1.c, version-etc.c, yesno.c:
17809         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
17810         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
17811         the includer's responsibility.
17812
17813         Sync from coreutils.
17814
17815         * lib/modechange.c (mode_compile): Don't decrement a pointer that
17816         points to the start of a string, as the C Standard says the
17817         resulting behavior is undefined.
17818
17819         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
17820         simple -> simple_backups, numbered_existing ->
17821         numbered_existing_backups, numbered -> numbered_backups
17822         to avoid shadowing problems.  All uses changed.
17823         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
17824         * lib/backupfile.c (check_extension, numbered_backup):
17825         Rename locals to avoid shadowing 'basename'.
17826         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
17827         once.
17828
17829         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
17830         * lib/.cvsignore: Add getopt.h.
17831
17832 2004-10-04  Bruno Haible  <bruno@clisp.org>
17833
17834         * modules/README: New file.
17835         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
17836         not a module.
17837
17838 2004-10-02  Jim Meyering  <jim@meyering.net>
17839
17840         * lib/dirfd.h, getpagesize.h: Add copyright notice.
17841
17842 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17843
17844         * modules/strsep: New file.
17845
17846 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17847
17848         * m4/strsep.m4: New file.
17849
17850 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17851
17852         * lib/strsep.h: New file.
17853         * lib/strsep.c: New file.
17854
17855 2004-10-01  Simon Josefsson  <jas@extundo.com>
17856
17857         * lib/snprintf.c (snprintf): Handle size==0.
17858
17859 2004-10-01  Simon Josefsson  <jas@extundo.com>
17860             Bruno Haible  <bruno@clisp.org>
17861
17862         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
17863         (snprintf): Declare 'args'.
17864
17865 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
17866
17867         * lib/snprintf.c: Remove comments as to why each header is needed.
17868
17869 2004-10-01  Bruno Haible  <bruno@clisp.org>
17870
17871         * MODULES.html.sh: Add strsep.
17872
17873 2004-09-30  Simon Josefsson  <jas@extundo.com>
17874
17875         * modules/snprintf: New file.
17876
17877 2004-09-30  Simon Josefsson  <jas@extundo.com>
17878
17879         * m4/snprintf.m4: New file.
17880
17881 2004-09-30  Simon Josefsson  <jas@extundo.com>
17882
17883         * lib/snprintf.h, lib/snprintf.c: New files.
17884
17885 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17886
17887         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
17888         (hol_entry_help): Never translate an empty string.
17889         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
17890         * lib/argp.h (OPTION_NO_TRANS): New option.
17891
17892 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17893
17894         * modules/argp (Maintainer): Replace Simon Josefsson
17895         by Sergey Poznyakoff.
17896
17897 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17898
17899         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
17900         changes merged back into glibc.
17901
17902 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
17903
17904         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
17905
17906 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
17907
17908         * lib/xvasprintf.c: Include xalloc.h.
17909         (xvasprintf): Use xalloc_die, not xmalloc_die.
17910
17911 2004-09-29  Bruno Haible  <bruno@clisp.org>
17912
17913         * modules/alloca-opt: New file, derived from modules/alloca.
17914         * modules/allocsa: Depend on alloca-opt instead of alloca.
17915         * modules/setenv: Likewise.
17916         * modules/vasnprintf: Likewise.
17917         * MODULES.html.sh: Add alloca-opt.
17918
17919 2004-09-28  Simon Josefsson  <jas@extundo.com>
17920
17921         * gnulib-tool: New parameter --lgpl, to asseert that modules are
17922         LGPL, and to replace license template from GPL to LGPL.
17923
17924 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17925
17926         * modules/dummy: Change license to LGPL.
17927
17928 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
17929
17930         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
17931
17932 2004-09-24  Simon Josefsson  <jas@extundo.com>
17933
17934         * modules/minmax (License): Change from GPL to LGPL.
17935
17936 2004-09-23  Simon Josefsson  <jas@extundo.com>
17937
17938         * gnulib-tool (--import): Typo.
17939
17940 2004-09-23  Simon Josefsson  <jas@extundo.com>
17941
17942         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
17943
17944 2004-09-22  Bruno Haible  <bruno@clisp.org>
17945
17946         * modules/*: Add 'License' field.
17947         * gnulib-tool: Accept --extract-license option.
17948         (func_get_license): New function.
17949
17950 2004-09-21  Bruno Haible  <bruno@clisp.org>
17951
17952         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
17953         Reported by Simon Josefsson.
17954
17955 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17956
17957         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
17958         gl_AC_TYPE_LONG_LONG.
17959
17960 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
17961
17962         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
17963
17964 2004-09-18  Simon Josefsson  <jas@extundo.com>
17965         and  Paul Eggert  <eggert@cs.ucla.edu>
17966
17967         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
17968         calls with autoreconf.  Define GL_LIB.
17969
17970 2004-09-14  Karl Berry  <karl@gnu.org>
17971
17972         * config/srclist.txt: unsync setenv.c, sigh.
17973
17974 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17975
17976         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
17977         Problem reported by Bruno Haible in:
17978         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
17979
17980 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
17981
17982         * config/srclist.txt: Comment out argp-pvh.c.
17983
17984 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
17985
17986         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
17987         in case some system header has #define'd it.  Problem reported by
17988         Soeren D. Schulze in
17989         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
17990
17991 2004-09-09  Karl Berry  <karl@gnu.org>
17992
17993         * regex.[ch]: delete from the root.  These were supposed to be
17994                 synced with emacs cvs, but this has not happened for about
17995                 a year, and anyway nothing else uses emacs regex.[ch].
17996                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
17997                 lib/regex[.ch] is untouched.
17998
17999 2004-09-09  Bruno Haible  <bruno@clisp.org>
18000
18001         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
18002
18003 2004-09-09  Bruno Haible  <bruno@clisp.org>
18004
18005         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
18006         modifications.
18007         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
18008
18009 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18010
18011         * modules/xvasprintf: New file.
18012         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
18013
18014 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18015
18016         * lib/xvasprintf.h: New file.
18017         * lib/xvasprintf.c: New file.
18018         * lib/xasprintf.c: New file.
18019
18020 2004-09-08  Bruno Haible  <bruno@clisp.org>
18021
18022         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
18023
18024 2004-09-08  Bruno Haible  <bruno@clisp.org>
18025
18026         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
18027         length is > INT_MAX.
18028         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
18029         more.
18030
18031 2004-09-08  Bruno Haible  <bruno@clisp.org>
18032
18033         * lib/stdint_.h: New file, taken from GNU clisp.
18034
18035 2004-09-08  Bruno Haible  <bruno@clisp.org>
18036             Oskar Liljeblad  <oskar@osk.mine.nu>
18037
18038         * modules/stdint: New file.
18039         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
18040
18041 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18042
18043         Import from coreutils.
18044         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
18045         strings on unbounded length.  alloca's performance benefits aren't
18046         that important here.
18047         (V_STRDUP): Remove.
18048         (parse_with_separator): New function, with most of the internals
18049         of the old parse_user_spec.  Allow user to omit both user and group,
18050         for compatibility with FreeBSD.
18051         Clone only the user name, not the entire spec.
18052         Do not set *uid, *gid unless entirely successful.
18053         Avoid memory leak in some failing cases.
18054         Fix regression for USER.GROUP reported by Dmitry V. Levin in
18055         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
18056         (parse_user_spec): Rewrite to use parse_with_separator.
18057
18058 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18059
18060         * modules/userspec: Don't depend on alloca.
18061
18062 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18063
18064         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
18065
18066 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18067
18068         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
18069         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
18070         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
18071
18072 2004-08-16  Simon Josefsson  <jas@extundo.com>
18073
18074         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
18075         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
18076         Add --dry-run for --import.
18077         Let user provided command line parameters override configure.ac
18078         settings.
18079
18080 2004-08-12  Simon Josefsson  <jas@extundo.com>
18081
18082         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
18083         as discussed with Paul Eggert in threads rooted at
18084         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
18085         and
18086         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
18087         Before, the test was empty, and relied on ELIDE_CODE in source
18088         code.)
18089         (gl_PREREQ_GETOPT): New macro.
18090         (gl_GETOPT): Use them.
18091
18092 2004-08-12  Simon Josefsson  <jas@extundo.com>
18093
18094         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
18095         * lib/getopt_.h: Renamed from getopt.h.
18096
18097 2004-08-12  Simon Josefsson  <jas@extundo.com>
18098
18099         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
18100         Change default library name from libfoo to libgnu.
18101         Now, if you have a configure.ac that says:
18102                 gl_SOURCE_BASE(gl)
18103                 gl_M4_BASE(gl/m4)
18104                 gl_MODULES(error getopt etcetera)
18105                 gl_INIT
18106         you can import all you need by running:
18107                 ../gnulib/gnulib-tool --import
18108
18109         * modules/getopt (Files): Rename getopt.h to getopt_.h.
18110         (Makefile.am): Rewrite, use logic from argz.
18111         (Include): Use <getopt.h> instead of "getopt.h".
18112
18113 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18114
18115         * modules/argp (Files): Add m4/unlocked-io.m4.
18116         (Depends-on): Add extensions.
18117
18118 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18119
18120         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
18121         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
18122         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
18123         Check for program_invocation_name, program_invocation_short_name,
18124         flockfile, funlockfile, features.h, _getopt_long_only_r.
18125
18126 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18127
18128         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
18129         its complicated substitute.
18130         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
18131         and program_invocation_name.
18132         (__argp_basename) [!_LIBC]: Remove; the only use was
18133         replaced by its body.
18134         (__argp_short_program_name): Change condition from
18135         !defined __argp_short_program_name to
18136         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
18137         to match argp-namefrob.h.
18138         (__argp_failure): Don't assume strerror_r returns char *.
18139         * lib/argp-parse.c (N_): Define unconditionally.
18140         (argp_default_options): Fill out initializers with 0 to avoid
18141         gcc warnings.
18142
18143 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18144
18145         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
18146         getopt1.c.
18147
18148 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18149
18150         Merge from coreutils.
18151
18152         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
18153
18154         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
18155         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
18156
18157 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18158
18159         Merge from coreutils.
18160
18161         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
18162         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
18163         for Reliant Unix 5.43.
18164
18165         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
18166         (union fooround): Use uintmax_t, not long int.
18167         The rest is a merge from libc:
18168         [defined _LIBC]: Include <shlib-compat.h>.
18169         (_obstack) [defined _LIBC]: Remove after 2.3.4.
18170
18171         * lib/settime.c (settime): Recode to avoid warning with
18172         Sun Forte C 6U2.
18173
18174         * lib/strverscmp.c: Convert to UTF-8.
18175
18176 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18177
18178         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18179         m4/uintmax_t.m4.
18180
18181 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18182
18183         * modules/xalloc-die: New file.
18184         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
18185
18186         * modules/md5 (Files): Add m4/uint32_t.m4.
18187         * modules/sha1: Renamed from modules/sha.
18188         (Files):
18189         Rename lib/sha.h to lib/sha1.h.
18190         Rename lib/sha.c to lib/sha1.c.
18191         Rename m4/sha.m4 to m4/sha1.m4.
18192         (lib_SOURCES): Likewise.
18193         (configure.ac): Rename gl_SHA to gl_SHA1.
18194         (Include): sha.h -> sha1.h.
18195
18196 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18197
18198         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
18199         * m4/sha1.m4: Renamed from sha.m4.
18200         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
18201
18202 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18203
18204         * lib/obstack.h (obstack_empty_p):
18205         Don't assume that chunk->contents is suitably aligned.
18206         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
18207         Likewise. Problem reported by Benno in
18208         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
18209
18210         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
18211         readable.  This could be improved further but it'd take some work.
18212
18213 2004-08-08  Simon Josefsson  <jas@extundo.com>
18214
18215         * modules/xgethostname (Depends-on): Remove exit and error (not
18216         used).
18217
18218         * modules/getpass-gnu: Add getpass.h.
18219         (Depends-on): Add stdbool.
18220         * modules/getpass: Add getpass.h.
18221
18222 2004-08-08  Simon Josefsson  <jas@extundo.com>
18223
18224         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
18225         Check getpass declaration.
18226
18227 2004-08-08  Simon Josefsson  <jas@extundo.com>
18228
18229         * lib/xgethostname.c: Don't include error.h (not used).
18230
18231         * lib/getpass.h: Add.
18232         * lib/getpass.c: Include getpass.h first.
18233
18234 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
18235
18236         * lib/xalloc-die.c: New file.
18237         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
18238         All uses removed.
18239         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
18240         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
18241         xalloc-die.c.
18242         (_, N_, xalloc_die): Move to xalloc-die.c.
18243         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
18244         so that we needn't mess with xalloc_msg_memory_exhausted.
18245
18246         * lib/sha1.h: Renamed from sha.h.
18247         (SHA1_H): Renamed from _SHA_H.
18248         (sha1_ctx): Renamed from sha_ctx.
18249         (sha1_init_ctx): Renamed from sha_init_ctx.
18250         (sha1_process_block): Renamed from sha_process_block.
18251         (sha1_process_bytes): Renamed from sha_process_bytes.
18252         (sha1_finish_ctx): Renamed from sha_finish_ctx.
18253         (sha1_read_ctx): Renamed from sha_read_ctx.
18254         (sha1_stream): Renamed from sha_stream.
18255         (sha1_buffer): Renamed from sha_buffer.
18256         * lib/sha1.c: Likewise; renamed from sha.c.
18257         Do not include <sys/types.h>.
18258         Include <stddef.h> rather than <stdlib.h>.
18259
18260 2004-08-08  Bruno Haible  <bruno@clisp.org>
18261
18262         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
18263         FILESYSTEM_PREFIX_LEN.
18264         * lib/progreloc.c: Likewise.
18265         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
18266
18267 2004-08-06  Simon Josefsson  <jas@extundo.com>
18268
18269         * modules/progname (Depends-on): Don't depend on stdbool.
18270
18271 2004-08-06  Simon Josefsson  <jas@extundo.com>
18272
18273         * modules/getsubopt: New file.
18274         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18275         getsubopt.
18276
18277 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18278
18279         More merge from coreutils.
18280
18281         * m4/utimens.m4, m4/utimecmp.m4: New files.
18282         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
18283         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
18284         prereq.m4, sha.m4: Import changes from coreutils.
18285
18286 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18287
18288         More merge from coreutils.
18289         * modules/raise, modules/readtokens0, modules/utimens:
18290         * modules/utimecmp, module/xnanosleep: New files.
18291         * modules/strftime: Add lib/strftime.h.
18292         Change include from <time.h> to "strftime.h".
18293         * modules/yesno: Add lib/yesno.h.
18294         * modules/backupfile: Remove lib/addext.c.
18295         * modules/euidaccess: Add stat-macros.h.
18296         * modules/canonicalize, modules/euidaccess,
18297         modules/filemode, modules/lchown, modules/makepath,
18298         modules/rmdir, modules/stat: Likewise.
18299
18300 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18301
18302         Merge from tar.
18303         * lib/argp-help.c (make_hol, hol_append): Don't assume that
18304         SIZE_MAX is a valid preprocessor constant.
18305         (__argp_basename): Change from "#ifndef _LIBC"
18306         to "#ifndef __argp_short_program_name", so that
18307         we don't compile these functions for tar.
18308
18309         More merges from coreutils.
18310         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
18311         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
18312         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
18313         * lib/addext.c: Remove; no longer needed.
18314         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
18315         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
18316         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
18317         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
18318         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
18319         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
18320         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
18321         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
18322         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
18323         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
18324         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
18325         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
18326         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
18327         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
18328         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
18329         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
18330         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
18331         Import changes from coreutils.
18332
18333 2004-08-05  Simon Josefsson  <jas@extundo.com>
18334
18335         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
18336
18337 2004-08-05  Simon Josefsson  <jas@extundo.com>
18338
18339         * m4/getsubopt.m4: New file.
18340
18341 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18342
18343         Merge from coreutils.
18344
18345         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
18346         * m4/getcwd-path-max.m4: New files.
18347
18348         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
18349         FILESYSTEM_PREFIX_LEN ->
18350         FILE_SYSTEM_PREFIX_LEN.
18351         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
18352         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
18353         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
18354         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
18355
18356         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
18357         prerequisite modules now handle the DOS stuff.
18358         Don't check for unistd.h.
18359
18360 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18361
18362         Merge from coreutils.
18363
18364         * lib/.gdb-history: Remove; this doesn't belong here.
18365
18366         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
18367         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
18368         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
18369         * lib/getcwd.c: New files.
18370
18371         * lib/dirname.h: Include <stdbool.h>.
18372         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
18373         for consistency with POSIX terminology.  All uses changed.
18374         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
18375         (strip_trailing_slashes): Use bool for booleans.
18376         * lib/stripslash.c (strip_trailing_slashes): Likewise.
18377
18378         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
18379         sometimes returns a positive errno value even when it succeeds.
18380         (print_errno_message) [!LIBC]: Fall back on strerror if
18381         __strerror_r fails.
18382
18383         * lib/path-concat.c (mempcpy): Don't define if a system header defines
18384         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
18385         (longest_relative_suffix): New function.
18386         (path_concat): Use it.  Assume first argument is not NULL.
18387         Port to DOS.  Omit redundant separators.
18388         Report an error instead of returning NULL.
18389         Use mempcpy instead of memcpy.
18390         (xpath_concat): Remove: not declared or used.
18391
18392         * lib/same.h: Include <stdbool.h>
18393         (same_name): Return bool, not int.
18394         * lib/same.c (same_name): Likewise.
18395         (errno): Don't declare; we assume C89 or better now.
18396
18397         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
18398         if not already defined.
18399
18400         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
18401         * lib/dup-safer.c (errno): Likewise.
18402
18403 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18404
18405         Merge from coreutils.
18406         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
18407         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
18408         * modules/path-concat: Don't depend on strdup.
18409
18410 2004-08-03  Simon Josefsson  <jas@extundo.com>
18411
18412         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
18413         * lib/progname.h: Don't include stdbool.h.
18414
18415 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18416
18417         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
18418         * MODULES.html.sh (func_all_modules): Remove fatal.
18419
18420 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18421
18422         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
18423
18424 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18425
18426         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
18427         working.
18428
18429 2004-08-02  Simon Josefsson  <jas@extundo.com>
18430
18431         * lib/getsubopt.h: New file, with comments from Bruno Haible.
18432         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
18433         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
18434
18435 2004-08-01  Simon Josefsson  <jas@extundo.com>
18436
18437         * lib/xgetdomainname.c: Include stdlib.h, for free().
18438
18439 2004-07-19  Bruno Haible  <bruno@clisp.org>
18440
18441         * MODULES.html.sh (func_all_modules): Add dummy.
18442
18443 2004-07-16  Simon Josefsson  <jas@extundo.com>
18444
18445         * modules/dummy: New file.
18446
18447 2004-07-16  Simon Josefsson  <jas@extundo.com>
18448
18449         * lib/dummy.c: New file.
18450
18451 2004-07-16  Bruno Haible  <bruno@clisp.org>
18452
18453         * lib/backupfile.h: Add extern "C" for C++.
18454         * lib/closeout.h: Likewise.
18455         * lib/copy-file.h: Likewise.
18456         * lib/findprog.h: Likewise.
18457         * lib/full-write.h: Likewise.
18458         * lib/pathname.h: Likewise.
18459         * lib/progname.h: Likewise.
18460         * lib/stpcpy.h: Likewise.
18461         * lib/stpncpy.h: Likewise.
18462         * lib/strcase.h: Likewise.
18463         * lib/strstr.h: Likewise.
18464         * lib/xalloc.h: Likewise.
18465
18466         * lib/mbswidth.h: Add extern "C" for C++.
18467         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
18468
18469 2004-07-13  Robert Millan  <robertmh@gnu.org>
18470
18471         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
18472
18473 2004-07-09  Simon Josefsson  <jas@extundo.com>
18474
18475         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
18476         failed without this.)
18477
18478 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18479
18480         * modules/chown (Files): Add lib/fchown-stub.c, since
18481         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
18482
18483 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18484
18485         * lib/fchown-stub.c: New file.
18486
18487 2004-06-24  Jim Meyering  <jim@meyering.net>
18488
18489         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
18490
18491 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18492
18493         * modules/argz: Omit "#include".
18494
18495         * MODULES.html.sh (func_all_modules): Add calloc, to match
18496         2004-06-01 addition of calloc module.
18497
18498 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18499
18500         * m4/argz.m4: New file, which is autoupdated from libtool.
18501
18502 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18503
18504         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
18505         libtool.
18506
18507 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18508
18509         * config/srclist-update: Don't insist on "USA." before the
18510         close-comment, as libtool omits the period and puts the */ on a
18511         separate line.
18512         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
18513         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
18514
18515 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
18516
18517         * modules/argz: New file.
18518         * MODULES.html.sh (func_all_modules): Add argz.
18519
18520 2004-06-12  Jim Meyering  <jim@meyering.net>
18521         and  Paul Eggert  <eggert@cs.ucla.edu>
18522
18523         * modules/hash (Files): Add lib/xalloc.h.
18524         * modules/pipe (Depends-on): Add wait-process.
18525         * modules/stat (Depends-on): Add xalloc.
18526         * modules/userspec (Files): Add lib/userspec.h.
18527         * modules/xstrto
18528
18529         Upgrade from gettext-0.13.
18530         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
18531         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
18532         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
18533
18534 2004-06-10  Jim Meyering  <jim@meyering.net>
18535
18536         * lib/calloc.c: New file.
18537
18538 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
18539
18540         * lib/getdate.y (yylex): Allow space between sign and number.
18541         Problem reported by Dan Jacobson.
18542
18543 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18544
18545         Merge from coreutils CVS.
18546
18547         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
18548         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
18549         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
18550         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
18551         xstrtol.m4: Fix copyright date and/or serial number.
18552
18553         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
18554         See if we need an fchown replacement.
18555         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
18556         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
18557         and use the replacement function if we detect either defect.
18558
18559         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
18560         gl_UTIMECMP.
18561
18562 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18563         and  Jim Meyering  <jim@meyering.net>
18564
18565         Merge from coreutils CVS.
18566
18567         * lib/stat-macros.h: New file, with contents from file-type.h
18568         and coreutils' system.h.
18569         * lib/file-type.c: Include "stat-macros.h".
18570         * lib/file-type.h (file_type): Move all macro definitions to new file,
18571         stat-macros.h.
18572
18573         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
18574         Wrap old code with this conditional.
18575         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
18576         function that does not dereference symlinks.
18577         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
18578
18579         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
18580         dependency problems.
18581         (xreadlink): Accept new arg SIZE, for efficiency.
18582         All decls and uses changed.
18583         * lib/xreadlink.h: Include <stddef.h>, for size_t.
18584
18585         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
18586         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
18587
18588         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
18589         sysexits.h.
18590
18591 2004-06-01  Jim Meyering  <jim@meyering.net>
18592
18593         * m4/calloc.m4: New file.
18594
18595 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
18596
18597         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
18598         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
18599         Also, fix a typo in a diagnostic.
18600
18601 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18602
18603         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
18604         or AC_FUNC_REALLOC.
18605
18606 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18607
18608         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
18609         macros to be defined.
18610         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
18611         the allocator returns NULL because the requested size is zero.
18612
18613 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18614
18615         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
18616         var.  Add comment explaining why libc still defines it.  This
18617         merges the following patch from glibc:
18618         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
18619
18620 2004-05-20  Andreas Schwab  <schwab@suse.de>
18621
18622         * m4/free.m4: Replace free if it not known to work, not the other
18623         way round.
18624
18625 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
18626
18627         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
18628         present in glibc since revision 1.1 of this file.
18629         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
18630         obstack_alignment_mask, obstack_alloc, obstack_base,
18631         obstack_blank, obstack_blank_fast, obstack_chunk_size,
18632         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
18633         obstack_grow0, obstack_init, obstack_int_grow,
18634         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
18635         obstack_next_free, obstack_object_size, obstack_ptr_grow,
18636         obstack_ptr_grow_fast, obstack_room): Remove declarations of
18637         nonexistent functions.
18638
18639 2004-05-18  Karl Berry  <karl@gnu.org>
18640
18641         * config/srclist.txt: break link for vasnprintf.c.
18642
18643 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18644
18645         Port obstack to the AS/400, where pointers are 16 bytes wide and
18646         you cannot cast an integer to a valid pointer.  This patch is
18647         currently waiting to be integrated into glibc; see
18648         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
18649
18650         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
18651         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
18652         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
18653         (struct obstack): temp member is now a union of a pointer and
18654         an integer, instead of an integer.  All integer uses changed.
18655         This does not affect the physical layout of struct obstack,
18656         except on hosts (like the AS/400) where the size or alignment of
18657         void * is greater than that of ptrdiff_t.
18658         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
18659         __STDC__)]: Store temporary in pointer member of union, not
18660         integer member.
18661         * lib/obstack.c: Include <stddef.h>, for offsetof.
18662         (struct fooalign): Remove; it doesn't need a name.
18663         (union fooround): Change double to long double, and add void *.
18664         (DEFAULT_ALIGNMENT): Use offsetof to compute.
18665         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
18666         not a macro.  Hence the values are always int; so remove all
18667         casts-to-int in uses.
18668
18669 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18670
18671         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
18672         we can get this patch merged into glibc.
18673
18674 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18675             Paul Eggert  <eggert@cs.ucla.edu>
18676
18677         * m4/argp: Depend on alloca.
18678
18679 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18680             Paul Eggert  <eggert@cs.ucla.edu>
18681
18682         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
18683         freecoding.
18684
18685 2004-05-17  Bruno Haible  <bruno@clisp.org>
18686
18687         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
18688         precision that consists of a '.' followed by an empty digit string.
18689         Patch by Tor Lillqvist <tml@iki.fi>.
18690
18691 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18692
18693         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
18694         for backward compatibility with older code.  We need our own
18695         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
18696         it under some other name, and our alloca.h will define it.
18697
18698 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18699             Derek Price  <derek@ximbiot.com>
18700
18701         * lib/alloca.c: Include <alloca.h>, to get our interface.
18702         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
18703         include <alloca.h> first.  Use C89 prototype for alloca; this
18704         requires including <stddef.h> for size_t.  Use extern "C" if C++.
18705         Use #elif for simplicity, since we can assume C89 now.
18706         Don't try to source the system alloca.h since it will not be found
18707         and to prevent recursively including its replacement.
18708         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
18709         * lib/regex.c: Likewise.
18710
18711 2004-05-16  Derek Price  <derek@ximbiot.com>
18712             Paul Eggert  <eggert@cs.ucla.edu>
18713
18714         getline cleanup.  This changes the getndelim2 API: both order of
18715         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
18716         no delimiter).
18717
18718         * lib/getline.c: Don't include stddef.h or stdio.h, since our
18719         interface does that.
18720         (getline): Always use getdelim, so that we don't have two
18721         copies of this code.
18722         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
18723         if available.
18724         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
18725         (GETNDELIM2_MAXIMUM): New macro.
18726         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
18727         instead of the old practice of delim2==0.  All callers changed.
18728         Return -1 on overflow, instead of returning junk.
18729         Do not set *linesize unless allocation succeeds.
18730         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
18731         that we include sys/types.h.
18732         * lib/getnline.h: Likewise.
18733         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
18734         (getndelim2): Reorder arguments.
18735         * lib/getnline.c (getnline, getndelim):
18736         Don't discard the NMAX argument.
18737         (getnline): Invoke getndelim, to avoid code duplication.
18738         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
18739         of (size_t) -1 by callers of the getnline family.
18740
18741 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18742
18743         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
18744         Check for gettimeofday.
18745         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
18746         Check for settimeofday, stime.
18747
18748 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18749
18750         * lib/nanosleep.c (suspended): Change its type from int to
18751         sig_atomic_t volatile.
18752         (first_call): Make it private to rpl_nanosleep, and have it
18753         be zero initially as that's a bit faster.
18754         (my_usleep): Round up fractional times instead of truncating them,
18755         as this is the usual meaning for 'sleep'.
18756
18757         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
18758         doesn't work.
18759         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
18760         (ENOSYS): Define if not defined.
18761         (settime): Fall back on stime if it exists and settimeofday fails.
18762         But don't bother with fallbacks if a method fails with errno == EPERM.
18763
18764 2004-05-11  Jim Meyering  <jim@meyering.net>
18765
18766         Prior to this change, the save_cwd caller required read access to the
18767         current directory on most systems (ones with the fchdir function).
18768
18769         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
18770         fails, try write-only, and finally, resort to using xgetcwd.
18771
18772 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
18773
18774         * lib/obstack.c, obstack.h: Import changes from libc.
18775
18776 2004-04-28  Bruno Haible  <bruno@clisp.org>
18777
18778         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
18779         also implicitly appends .exe to executables.
18780         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
18781         accepts Windows pathnames.
18782         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18783         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18784         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18785         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18786         Reported by Derek Robert Price <derek@ximbiot.com>.
18787
18788 2004-04-21  Karl Berry  <karl@gnu.org>
18789
18790         * config/srclist.txt (localcharset.c): break sync.
18791
18792 2004-04-20  Paul Eggert  <eggert@twinsun.com>
18793
18794         * m4/host-os.m4: Add a copyright notice.
18795
18796 2004-04-20  Jim Meyering  <jim@meyering.net>
18797
18798         Change UTILS_ to gl_ in AC_DEFINE'd names.
18799         Change utils_- and jm_-prefixed variables, too.
18800         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
18801         UTILS_FUNC_MKDIR_TRAILING_SLASH.
18802         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
18803
18804         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
18805         Don't emit trailing blanks.
18806         Also rename jm_-prefixed variables to have gl_ prefix.
18807
18808         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
18809         Also rename jm_-prefixed variables to have gl_ prefix.
18810
18811         * m4/jm-macros.m4: Reflect the renamings.
18812         * m4/prereq.m4: Likewise.
18813
18814 2004-04-20  Jim Meyering  <jim@meyering.net>
18815
18816         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
18817         memory.
18818
18819 2004-04-20  Jim Meyering  <jim@meyering.net>
18820             Bruno Haible  <bruno@clisp.org>
18821
18822         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
18823         memory when realloc fails.
18824
18825 2004-04-19  Jim Meyering  <jim@meyering.net>
18826
18827         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
18828         now that readutmp.c may call `free (0)'.
18829
18830 2004-04-19  Bruno Haible  <bruno@clisp.org>
18831
18832         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
18833         * m4/inttypes_h.m4: Likewise.
18834         * m4/stdint_h.m4: Likewise.
18835         * m4/intmax_t.m4: Likewise.
18836         * m4/uintmax_t.m4: Likewise.
18837
18838 2004-04-18  Jim Meyering  <jim@meyering.net>
18839
18840         * m4/prereq.m4: Don't forbid jm_ prefix.
18841
18842         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
18843         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
18844         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
18845         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
18846         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
18847         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
18848         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
18849         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
18850         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
18851         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
18852         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
18853         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
18854         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
18855         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
18856         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
18857         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
18858         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
18859         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
18860         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
18861
18862 2004-04-18  Jim Meyering  <jim@meyering.net>
18863
18864         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
18865         failure, don't leak memory and do call END_UTMP_ENT.
18866
18867 2004-04-16  Jim Meyering  <jim@meyering.net>
18868
18869         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
18870         coreutils' stat program.
18871         (gl_PREREQ): Don't require jm_PREREQ_STAT.
18872
18873 2004-04-11  Paul Eggert  <eggert@twinsun.com>
18874
18875         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
18876         C89.
18877         (CHAR_BIT): Remove, since we assume C89.
18878         Include <stdint.h> if available, as per current Autoconf CVS advice.
18879
18880 2004-03-31  Jim Meyering  <jim@meyering.net>
18881
18882         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
18883         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
18884         * m4/xalloc.m4: Likewise.
18885
18886 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18887
18888         Merge from coreutils.
18889
18890         * m4/inttostr.m4: New file.
18891         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
18892         Require AM_STDBOOL_H and gl_TIMESPEC instead.
18893         Require gl_CLOCK_TIME.
18894         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
18895
18896 2004-03-30  Paul Eggert  <eggert@twinsun.com>
18897
18898         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
18899         not bool, to be more consistent with Unix conventions.
18900         Suggested by Bruno Haible.
18901
18902         Merge from coreutils.
18903
18904         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
18905         * lib/umaxtostr.c: New files.
18906
18907         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
18908         the usual <time.h> dance.
18909         (get_date): Change signature to support fractional time stamps.
18910         All callers changed.
18911         * lib/getdate.y: Include "getdate.h" first, as we can now
18912         assume C89 and don't need to worry about 'const'.
18913         Similarly, include "unlocked-io.h" near start, not in middle.
18914         Include <limits.h>.
18915         (textint.value): Use long int rather than int.
18916         (textint.digits): Use size_t rather than int.
18917         (BILLION, LOG10_BILLION): New constants.
18918         (parser_control): New member rel_ns.  Members day_ordinal,
18919         time_zone, month, day, hour, minutes, rel_year, rel_month,
18920         rel_day, rel_hour, rel_minutes, rel_seconds
18921         are now long int, not int.  Member seconds is now struct timespec,
18922         not int.  New member timespec_seen.  Members dates_seen, days_seen,
18923         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
18924         not int.
18925         (%union.intval): Now long int, not int.
18926         New member timespec.
18927         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
18928         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
18929         (spec): Now is a timespec or an item list.
18930         (timespec, items): New nonterminals.
18931         (time, rel, relunit, number, get_date):
18932         Add support for fractional seconds.
18933         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
18934         (gmtime, localtime, mktime): Remove decls; not needed with C89.
18935         (to_hour): First arg is now long int, not int.
18936         (to_year): Returns long int, not int.
18937         Don't treat year -70 like 70.
18938         (tm_diff): Returns long int, not int.
18939         (lookup_word): Use bool instead of int when appropriate.
18940         (yylex): Use size_t for count, not int.
18941         Detect overflow when parsing large integer constants.
18942         Add support for fractions.
18943         (get_date): Make pointers 'const' if possible.
18944         Use more-portable code to detect integer overflow.
18945         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
18946         Don't use ctime; it's not reliable if the year has >4 digits.
18947
18948         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
18949         This is for compatibility with BSD.
18950
18951         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
18952         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
18953         From coreutils' system.h.
18954
18955         * lib/userspec.c: Don't include "posixver.h".
18956         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
18957         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
18958         compatible extension.  Simplify code by removing a boolean int
18959         that was always nonzero if a string was nonnull.
18960
18961 2004-03-30  Jim Meyering  <jim@meyering.net>
18962
18963         Merge from coreutils.
18964
18965         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
18966         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
18967         on some systems one must include <grp.h> before it.
18968         Reported by Christian Krackowizer.
18969
18970 2004-03-30  Jim Meyering  <jim@meyering.net>
18971
18972         Merge from coreutils.
18973
18974         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
18975
18976         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
18977         an empty input stream.
18978
18979         * lib/readtokens.c: Include <stdbool.h>.
18980         (readtoken): Use `size_t' rather than int/long.
18981         All callers adjusted.
18982         Use `bool' rather than `int' where appropriate.
18983         Use memset rather than an explicit loop.
18984         Use x2nrealloc rather than xrealloc.
18985         Allow the use of `\0' as a delimiter.
18986         (readtokens): Likewise.
18987         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
18988
18989 2004-03-30  Jim Meyering  <jim@meyering.net>
18990
18991         * m4/realloc.m4: Remove file, since now it does no more than
18992         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
18993         the `configure.ac' section of module/realloc.
18994         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
18995
18996 2004-03-30  Bruno Haible  <bruno@clisp.org>
18997
18998         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
18999         nonnull.
19000
19001 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19002
19003         Merge changes to getloadavg.c from coreutils and Emacs.
19004
19005         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
19006         Define to an expression, not to the empty string.
19007         Include cloexec.h and xalloc.h.
19008         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
19009         Use set_cloexec_flag rather than rolling our own.
19010         * lib/cloexec.c, lib/cloexec.h: New files.
19011
19012 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19013
19014         * m4/cloexec.m4: New file.
19015
19016 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19017
19018         * lib/getopt.h: Sync with libc CVS.
19019
19020 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19021             Bruno Haible  <bruno@clisp.org>
19022
19023         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
19024         mbswidth.
19025
19026 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19027             Bruno Haible  <bruno@clisp.org>
19028
19029         * lib/mbswidth.h: Include <wchar.h> only if
19030         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
19031         <wchar.h>.
19032         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
19033
19034 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19035
19036         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
19037         Sync with libc CVS.
19038         * lib/getopt_int.h: New file, also synced from libc.
19039
19040 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19041
19042         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
19043         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
19044         Bring back getopt.c, getopt.h, getopt1.c.
19045
19046 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19047
19048         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
19049         All uses changed.  Check for sa_sigaction member; this fixes
19050         a bug first reported by Jason Andrade in
19051         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19052
19053 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19054
19055         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
19056         '#if' expressions.  Unlike the code it replaces, it does not
19057         depend on (defined _SC_PAGESIZE).  However, it does depend on
19058         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
19059         first reported by Jason Andrade in
19060         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19061
19062 2004-02-25  Simon Josefsson  <jas@extundo.com>
19063
19064         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
19065
19066 2004-02-25  Simon Josefsson  <jas@extundo.com>
19067
19068         * lib/strdup.h: New file.
19069         * lib/strdup.c: Include it.
19070         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
19071         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
19072
19073 2004-02-23  Karl Berry  <karl@gnu.org>
19074
19075         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
19076         (from fencepost.gnu.org:/gd/gnuorg).
19077
19078 2004-02-23  Karl Berry  <karl@gnu.org>
19079
19080         * config/srclistvars.sh (GNUORG) [karl]: redefine.
19081         * config/srclist.txt: add maintain/standards documents.
19082
19083 2004-02-18  Bruno Haible  <bruno@clisp.org>
19084
19085         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
19086         Reported by Derek Robert Price <derek@ximbiot.com>.
19087
19088 2004-02-16  Karl Berry  <karl@gnu.org>
19089
19090         * config/mkinstalldirs, install-sh: update from automake.
19091
19092 2004-02-06  Karl Berry  <karl@gnu.org>
19093
19094         * m4/po.m4: update from gettext 0.14.1.
19095
19096 2004-02-06  Karl Berry  <karl@gnu.org>
19097
19098         * lib/config.charset: update from gettext 0.14.1.
19099
19100 2004-02-05  Paul Eggert  <eggert@twinsun.com>
19101
19102         Add comments and code, prompted by suggestions from Bruno Haible
19103         for sh-quote.
19104         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
19105         describing the enum quoting_style values.
19106         * lib/quotearg.c (quotearg_alloc): New function.
19107         (quotearg_buffer_restyled): Treat lone { and } as special.
19108         Treat = as special.  Work around bug with older shells
19109         that "see" a '\' that is really the 2nd byte of a multibyte char.
19110         Quote empty string with shell_quoting_style.
19111
19112 2004-02-03  Bruno Haible  <bruno@clisp.org>
19113
19114         * m4/pipe.m4: New file, from GNU gettext.
19115
19116 2004-02-03  Bruno Haible  <bruno@clisp.org>
19117
19118         * lib/pipe.h: New file, from GNU gettext.
19119         * lib/pipe.c: New file, from GNU gettext.
19120
19121 2004-01-27  Bruno Haible  <bruno@clisp.org>
19122
19123         * m4/execute.m4: New file, from GNU gettext.
19124
19125 2004-01-27  Bruno Haible  <bruno@clisp.org>
19126
19127         * lib/execute.h: New file, from GNU gettext.
19128         * lib/execute.c: New file, from GNU gettext.
19129         * lib/w32spawn.h: New file, from GNU gettext.
19130
19131 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19132
19133         Merge from diffutils.
19134
19135         * lib/file-type.c (file_type): Add typed memory objects.
19136         * lib/file-type.h (S_TYPEISTMO): New macro.
19137
19138         * lib/c-stack.h (c_stack_action): Remove argv argument.
19139         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
19140         (die): Don't calculate message unless segv_action returns.
19141         (get_stack_location, min_address_from_argv, max_address_from_argv,
19142         volatile stack_base, volatile_stack_size): Remove.
19143         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
19144         that every segmentation violation is a stack overflow.  (Ouch!)
19145         See Debian bug 136249 (still outstanding) for more info about why
19146         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
19147
19148 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19149
19150         Exit-status fix from coreutils.
19151
19152         Use exit_failure consistently in place of EXIT_FAILURE,
19153         so that program exit statuses are consistent on failure.
19154
19155         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
19156         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
19157         * lib/argmatch.h: Comment fix to match the above.
19158         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
19159         Now a macro referring to exit_failure, instead of a separate
19160         variable.  Include "exitfail.h" to get it.
19161         * lib/xstrtol.h: Include "exitfail.h".
19162         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
19163
19164         * lib/long-options.c (parse_long_options): Use prototype
19165         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
19166         for clarity.
19167
19168 2004-01-21  Jim Meyering  <jim@meyering.net>
19169
19170         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
19171         so as not to conflict with a different-sized __mktime_internal
19172         function in GNU libc.
19173         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
19174         Problem building statically-linked `ls' reported by Michael Brunnbauer.
19175
19176 2004-01-20  Karl Berry  <karl@gnu.org>
19177
19178         * config/config.guess: update from config.
19179
19180         * config/srclistvars.sh: GNUWWWLICENSES for karl.
19181
19182 2004-01-20  Bruno Haible  <bruno@clisp.org>
19183
19184         Safer stack allocation.
19185         * lib/setenv.c: Include allocsa.h.
19186         (alloca): Remove fallback definition.
19187         (freea): Remove macro.
19188         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
19189         instead of freea.
19190
19191 2004-01-20  Bruno Haible  <bruno@clisp.org>
19192
19193         * m4/eealloc.m4: New file, from GNU gettext.
19194
19195 2004-01-20  Bruno Haible  <bruno@clisp.org>
19196
19197         * m4/allocsa.m4: New file, from GNU gettext.
19198
19199 2004-01-20  Bruno Haible  <bruno@clisp.org>
19200
19201         * lib/xallocsa.h: New file, from GNU gettext.
19202         * lib/xallocsa.c: New file, from GNU gettext.
19203
19204 2004-01-20  Bruno Haible  <bruno@clisp.org>
19205
19206         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
19207
19208 2004-01-20  Bruno Haible  <bruno@clisp.org>
19209
19210         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
19211         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
19212         specially.
19213
19214 2004-01-20  Bruno Haible  <bruno@clisp.org>
19215
19216         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
19217         patch.
19218
19219 2004-01-20  Bruno Haible  <bruno@clisp.org>
19220
19221         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
19222
19223 2004-01-20  Bruno Haible  <bruno@clisp.org>
19224
19225         * lib/eealloc.h: New file.
19226
19227 2004-01-20  Bruno Haible  <bruno@clisp.org>
19228
19229         * lib/binary-io.h: Avoid warnings on Cygwin.
19230
19231 2004-01-20  Bruno Haible  <bruno@clisp.org>
19232
19233         * lib/allocsa.h: New file, from GNU gettext.
19234         * lib/allocsa.c: New file, from GNU gettext.
19235
19236 2004-01-18  Karl Berry  <karl@gnu.org>
19237
19238         * doc/gpl.texi, doc/lgpl.texi: new files.
19239
19240 2004-01-18  Karl Berry  <karl@gnu.org>
19241
19242         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
19243         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
19244
19245 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19246
19247         Merge from coreutils.
19248
19249         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
19250         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
19251         (gl_DEFAULT_POSIX2_VERSION): Move
19252         the documentation from 'configure' into 'config.hin',
19253         so that 'configure --help' isn't burdened by it and
19254         we don't have to worry about its formatting there.
19255         Reword the documentation so that it's more succinct
19256         and can be run together into a single paragraph.
19257         * m4/same.m4 (gl_SAME): Check for pathconf.
19258
19259 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19260
19261         Merge from coreutils.
19262
19263         * lib/posixver.c: Include posixver.h.
19264
19265         * lib/same.c: Include <stdbool.h>, <limits.h>.
19266         (_POSIX_NAME_MAX): Define if not defined.
19267         (MIN): New macro.
19268         (same_name): If file names are silently truncated, report
19269         that the file names are the same if they are the same after
19270         the silent truncation.
19271
19272         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
19273         conversion function.
19274         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
19275         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
19276         longer needed.
19277
19278 2004-01-15  Jim Meyering  <jim@meyering.net>
19279
19280         Merge from coreutils.
19281
19282         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
19283         if no library is required.
19284         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
19285         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
19286         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
19287         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
19288         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
19289         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
19290         value, $ac_cv_search_crypt, if it's "none required".
19291         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
19292         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
19293         not gl_FUNC_GETLOADAVG.
19294         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
19295         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
19296
19297 2004-01-15  Jim Meyering  <jim@meyering.net>
19298
19299         Merge from coreutils.
19300
19301         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
19302         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
19303         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
19304
19305         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
19306         optional configure-time default.
19307
19308         * lib/version-etc.c (version_etc_copyright): Update copyright date.
19309
19310         * lib/xreadlink.c (xreadlink): Correct outdated comment.
19311
19312 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
19313
19314         Merge from coreutils.
19315
19316         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
19317         value, $ac_cv_search_nanosleep, if it's "none required".
19318
19319 2004-01-14  Paul Eggert  <eggert@twinsun.com>
19320
19321         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
19322         with like-named macro in fnmatch.c.
19323         (EXT): Use an internal constant instead.
19324
19325         Merge fnmatch patches from glibc.
19326         * lib/fnmatch.c (mbsinit): Remove define.
19327         Add libc_hidden_ver (__fnmatch, fnmatch).
19328         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
19329         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
19330
19331 2004-01-14  Karl Berry  <karl@gnu.org>
19332
19333         * config/install-sh: update from automake.
19334
19335 2004-01-13  Karl Berry  <karl@gnu.org>
19336
19337         * config/install-sh: update from automake.
19338
19339 2004-01-09  Karl Berry  <karl@gnu.org>
19340
19341         * config/install-sh: update from automake.
19342
19343 2004-01-05  Karl Berry  <karl@gnu.org>
19344
19345         * config/config.{sub,guess}: update from config.
19346
19347 2003-12-31  Karl Berry  <karl@gnu.org>
19348
19349         * config/depcomp: update from automake.
19350
19351 2003-12-14  Karl Berry  <karl@gnu.org>
19352
19353         * lib/config.charset: update from gettext-runtime.
19354
19355 2003-12-03  Paul Eggert  <eggert@twinsun.com>
19356
19357         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
19358         Bug reported by Alfred M. Szmidt.
19359
19360 2003-12-03  Bruno Haible  <bruno@clisp.org>
19361
19362         * m4/gettext.m4: Upgrade from gettext-0.13.
19363         * m4/po.m4: Upgrade from gettext-0.13.
19364         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
19365         * m4/intmax.m4: New file, from gettext-0.13.
19366         * m4/printf-posix.m4: New file, from gettext-0.13.
19367
19368 2003-11-29  Karl Berry  <karl@gnu.org>
19369
19370         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
19371
19372 2003-11-25  Paul Eggert  <eggert@twinsun.com>
19373             Bruno Haible  <bruno@clisp.org>
19374
19375         * lib/printf-parse.h: Don't include sys/types.h.
19376         (ARG_NONE): New macro.
19377         (char_directive): Change type of *arg_index fields to size_t.
19378         * lib/printf-parse.c: Don't include sys/types.h.
19379         (SSIZE_MAX): Remove macro.
19380         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
19381         Remove unnecessary overflow check.
19382         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
19383         fields.
19384
19385 2003-11-25  Bruno Haible  <bruno@clisp.org>
19386
19387         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
19388
19389 2003-11-25  Bruno Haible  <bruno@clisp.org>
19390
19391         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
19392         gt_TYPE_SSIZE_T.
19393
19394 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19395
19396         * modules/alloca: Remove dependency on xalloc.
19397
19398 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19399
19400         * lib/alloca.c: Remove dependency on xalloc module.
19401         (xalloc_die): Remove.
19402         (memory_full) [!defined emacs]: New macro.
19403         [!defined emacs]: Don't include xalloc.h.
19404         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
19405         address arithmetic overflows.  Change datatypes a bit to avoid
19406         unnecessary casts.
19407
19408 2003-11-22  Jim Meyering  <jim@meyering.net>
19409
19410         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
19411         s/size/size_t/.
19412
19413 2003-11-21  Karl Berry  <karl@gnu.org>
19414
19415         * config/config.{sub,guess}: update from config.
19416
19417 2003-11-18  Karl Berry  <karl@gnu.org>
19418
19419         * config/config.{sub,guess}: update from config.
19420
19421         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
19422
19423 2003-11-17  Paul Eggert  <eggert@twinsun.com>
19424
19425         * README: Mention that S+T cannot overflow if S is the size of
19426         an existing object and T is sufficiently small.
19427
19428 2003-11-17  Jim Meyering  <jim@meyering.net>
19429
19430         On systems without utime and without a utimes function capable of
19431         dealing with a NULL struct utimbuf* argument, this utime replacement
19432         could -- in unusual circumstances -- leak a file descriptor.
19433         * lib/utime.c: Include <unistd.h> and <errno.h>.
19434         (utime_null): Be sure to close `fd' and to preserve errno.
19435         Reported by Geoff Collyer via Arnold Robbins.
19436
19437 2003-11-17  Bruno Haible  <bruno@clisp.org>
19438
19439         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
19440         (Depends-on): Add xsize.
19441
19442 2003-11-17  Bruno Haible  <bruno@clisp.org>
19443
19444         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
19445
19446 2003-11-17  Bruno Haible  <bruno@clisp.org>
19447
19448         * lib/vasnprintf.c (alloca): Remove fallback definition.
19449         (freea): Remove definition.
19450         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
19451         Reported by Paul Eggert.
19452
19453 2003-11-16  Paul Eggert  <eggert@twinsun.com>
19454             Bruno Haible  <bruno@clisp.org>
19455
19456         Protect against address arithmetic overflow.
19457         * lib/printf-args.h: Include stddef.h.
19458         (arguments): Change type of field 'count' to size_t.
19459         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
19460         'unsigned int' where appropriate.
19461         * lib/printf-parse.h: Include sys/types.h.
19462         (char_directive): Change type of *arg_index fields to ssize_t.
19463         (char_directives): Change type of fields 'count', max_*_length to
19464         size_t.
19465         * lib/printf-parse.c: Include sys/types.h and xsize.h.
19466         (SSIZE_MAX): Define fallback value.
19467         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
19468         instead of 'int' where appropriate. Check a_allocated, d_allocated
19469         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
19470         * lib/vasnprintf.c: Include xsize.h.
19471         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
19472         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
19473         overflow. Avoid wraparound when converting a width or precision from
19474         decimal to binary.
19475
19476 2003-11-16  Bruno Haible  <bruno@clisp.org>
19477
19478         Update from GNU gettext.
19479         * lib/printf-parse.c: Generalize to it can be compiled for wide
19480         strings.
19481         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
19482         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
19483         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
19484         SNPRINTF): New macros.
19485         Don't include <alloca.h> if the file is used inside libintl.
19486         (local_wcslen): New function, for Solaris 2.5.1.
19487         (VASNPRINTF): Use it instead of wcslen.
19488
19489 2003-11-16  Bruno Haible  <bruno@clisp.org>
19490
19491         * lib/xsize.h (xmax): New function.
19492         (xsum, xsum3, xsum4): Declare as "pure" functions.
19493
19494 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19495
19496         * modules/xalloc (Files): Undo latest change, since xalloc.h
19497         no longer needs SIZE_MAX or PTRDIFF_MAX.
19498
19499 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19500
19501         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
19502         gl_PTRDIFF_MAX.
19503
19504 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19505
19506         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
19507         "return", to pacify some unknown compiler.  Problem reported
19508         by Joerg Schilling.
19509
19510 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19511
19512         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
19513         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
19514         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
19515         heuristic is just as accurate as far as we know, and it removes a
19516         dependency on size_max.m4 and ptrdiff_max.m4.
19517
19518 2003-11-11  Bruno Haible  <bruno@clisp.org>
19519
19520         * modules/xsize (Files): Add m4/size_max.m4.
19521         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
19522
19523 2003-11-11  Bruno Haible  <bruno@clisp.org>
19524
19525         * m4/size_max.m4: New file.
19526         * m4/ptrdiff_max.m4: New file.
19527         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
19528         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
19529         (gl_XALLOC): Invoke it.
19530
19531 2003-11-11  Bruno Haible  <bruno@clisp.org>
19532
19533         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
19534         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
19535         defined.
19536
19537 2003-11-10  Paul Eggert  <eggert@twinsun.com>
19538
19539         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
19540         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
19541         rejected some allocations of exactly SIZE_MAX - 2 bytes.
19542         From Bruno Haible.
19543         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
19544         not (size_t) -1, since it's defined here.
19545
19546 2003-11-09  Karl Berry  <karl@gnu.org>
19547
19548         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
19549
19550 2003-11-06  Paul Eggert  <eggert@twinsun.com>
19551
19552         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
19553         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
19554         Reject sizes of exactly SIZE_MAX bytes.
19555         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
19556         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
19557
19558 2003-11-05  Bruno Haible  <bruno@clisp.org>
19559
19560         * lib/xsize.h: Include limits.h, to avoid a possible collision with
19561         SIZE_MAX defined in <limits.h> on Solaris.
19562
19563 2003-11-04  Jim Meyering  <jim@meyering.net>
19564
19565         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
19566         variable names, rather than @VAR@.
19567         * modules/poll: Likewise.
19568
19569 2003-11-04  Bruno Haible  <bruno@clisp.org>
19570
19571         * modules/xsize: New file.
19572         * modules/linebreak: Depend on xsize.
19573         * MODULES.html.sh (func_all_modules): Add xsize.
19574
19575 2003-11-04  Bruno Haible  <bruno@clisp.org>
19576
19577         * m4/xsize.m4: New file.
19578
19579 2003-11-04  Bruno Haible  <bruno@clisp.org>
19580
19581         * lib/xsize.h: New file.
19582         * lib/linebreak.c: Include xsize.h.
19583         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
19584         argument for overflow.
19585         Suggested by Paul Eggert.
19586
19587 2003-11-03  Karl Berry  <karl@gnu.org>
19588
19589         * config/config.{guess,sub}: update from config.
19590
19591 2003-11-03  Jim Meyering  <jim@meyering.net>
19592
19593         * modules/userspec (lib_SOURCES): Add userspec.h.
19594         (Include): Add "userspec.h".
19595         Improve description.
19596
19597 2003-11-03  Jim Meyering  <jim@meyering.net>
19598
19599         * lib/userspec.c: Include "userspec.h".
19600         * lib/userspec.h: New file.
19601
19602 2003-11-03  Bruno Haible  <bruno@clisp.org>
19603
19604         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
19605
19606 2003-11-03  Bruno Haible  <bruno@clisp.org>
19607
19608         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
19609         available, to avoid (extremely rare) race condition.
19610         Suggested by Paul Eggert.
19611
19612 2003-11-02  Karl Berry  <karl@gnu.org>
19613
19614         * config/srclist.txt (vasprintf.c): sync broken, sigh.
19615
19616 2003-10-31  Paul Eggert  <eggert@twinsun.com>
19617
19618         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
19619         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
19620         (read_filesystem_list): Set and use me_type_malloced.
19621         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
19622         whatever the type happens to be), for brevity and consistency.
19623         Check for size calculation overflow on Alphas running OSF/1.
19624
19625 2003-10-31  Jim Meyering  <jim@meyering.net>
19626
19627         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
19628
19629         * lib/linebuffer.c: Include <string.h> for declaration of memset.
19630
19631 2003-10-30  Paul Eggert  <eggert@twinsun.com>
19632             Bruno Haible  <bruno@clisp.org>
19633
19634         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
19635         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
19636
19637 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
19638
19639         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
19640         netbsd*-gnu*.  Suggested by Robert Millan.
19641
19642 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19643
19644         * modules/group-member: Depend on stdbool.
19645
19646 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19647
19648         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
19649
19650 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19651
19652         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
19653         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
19654         after the 'gnu' in these cases.  This fixes some bugs in the
19655         previous change, and is based on suggestions by Robert Millan.
19656
19657 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19658
19659         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
19660         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
19661         no longer needed.
19662         * lib/quotearg.c (quotearg_n_options): Use it.
19663         * lib/group-member.c: Include <stdbool.h>.
19664         (free_group_info): Arg is now const *; don't free arg.
19665         (get_group_info): Now returns bool and accepts struct group_info *,
19666         rather than returning a malloc'ed struct group_info *.
19667         All uses changed.  Check for overflow in internal size calculation.
19668
19669         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
19670         rather than xmalloc/xrealloc.
19671         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
19672         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
19673         conformance bug: the old code used a pointer after freeing the
19674         storage that it addressed.
19675         * lib/hash.c (hash_initialize): Simplify the code by using
19676         xalloc_oversized rather than doing it by hand.
19677         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
19678         the buffer preserved.  Use free and xmalloc instead.
19679         * lib/quotearg.c (quotearg_n_options): Likewise.
19680         Use a simpler test for size overflow.  Don't use xalloc_oversized
19681         because unsigned int might be wider than size_t (!); this suggests
19682         that we should switch from unsigned int to size_t for slot numbers.
19683
19684 2003-10-28  Paul Eggert  <eggert@twinsun.com>
19685
19686         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
19687         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
19688         NetBSD kernels.  Requested by Richard Stallman.
19689
19690 2003-10-27  Paul Eggert  <eggert@twinsun.com>
19691
19692         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
19693         to allocate the returned structure.  Do not allocate a subarray,
19694         as x2nrealloc will do that.
19695         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
19696         instead of xnrealloc.
19697         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
19698
19699 2003-10-27  Bruno Haible  <bruno@clisp.org>
19700
19701         * lib/stdbool_.h: Better support for BeOS.
19702
19703 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19704
19705         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
19706         now uses inline.
19707
19708 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19709
19710         * lib/xalloc.h (xalloc_oversized): New static inline function, for
19711         callers that want to do their own size-overflow checking.  Include
19712         <stdbool.h>, since xalloc_oversized returns bool.
19713         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
19714         to use xalloc_oversized.
19715
19716         Add two functions x2realloc, x2nrealloc, for programs that grow
19717         arrays dynamically by doubling their sizes.
19718         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
19719         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
19720         New functions.
19721
19722         Port to C99 semantics for 'inline' of external functions.
19723         Bug reported by Bruno Haible.
19724         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
19725         with the old contents of xnmalloc.
19726         (xnmalloc, xmalloc): Use it.
19727         (xnrealloc_inline): New static inline function,
19728         with the old contents of xnrealloc.
19729         (xnrealloc, xrealloc): Use it.
19730
19731         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
19732         that.
19733
19734 2003-10-26  Karl Berry  <karl@gnu.org>
19735
19736         * config/srclist.txt (COPYING.DOC): no longer available from
19737         /gd/gnuorg; don't know where the ultimate source is.
19738
19739 2003-10-25  Paul Eggert  <eggert@twinsun.com>
19740
19741         Fix several address-calculation bugs in the hash modules,
19742         plus some minor code cleanup.
19743
19744         * lib/hash.h: Include <stdbool.h>, for bool.
19745         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
19746         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
19747         hash_get_n_entries, hash_get_max_bucket_length,
19748         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
19749         hash_rehash): Use size_t rather than unsigned.
19750         * lib/hash.c (struct hash_table, hash_get_n_buckets,
19751         hash_get_n_buckets_used, hash_get_n_entries,
19752         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
19753         hash_get_entries, hash_do_for_each, hash_string, is_prime,
19754         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
19755         Likewise.
19756         (SIZE_MAX): Define if not defined.
19757         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
19758         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
19759         hash_print):
19760         Use const * when possible.
19761         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
19762         (check_tuning): Fix bug: if tuning parameters were very close to
19763         0 or 1, rounding errors could have caused subscript violations.
19764         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
19765         (hash_initialize): Add 'fail:' label
19766         to free table and return NULL, and use it to simplify code.
19767         Use calloc rather than clearing the storage ourself.
19768         (hash_initialize, hash_rehash): Check for arithmetic overflow in
19769         buffer size calculations.
19770         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
19771         Include <stddef.h>, for size_t.
19772         * lib/hash-pjw.c (hash_pjw): Likewise.
19773         Switch to method described by Bruno Haible.
19774         Include <limits.h>, for CHAR_BIT.
19775         (SIZE_BITS): New macro.
19776
19777 2003-10-23  Paul Eggert  <eggert@twinsun.com>
19778
19779         * m4/getline.m4 (AM_FUNC_GETLINE):
19780         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
19781         hosts.  Problem reported by Derek Robert Price in
19782         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
19783         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
19784         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
19785
19786 2003-10-21  Paul Eggert  <eggert@twinsun.com>
19787
19788         * lib/getndelim2.c (getndelim2): When size calculation overflows,
19789         ceiling the allocation at NMAX bytes rather than silently
19790         discarding input bytes before NMAX is reached.  This makes
19791         a difference only if NMAX exceeds SIZE_MAX / 2.
19792
19793         * lib/obstack.c: Merge from glibc.
19794         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
19795         Add libc_hidden_def (_obstack_newchunk).
19796         (_obstack_free) [! defined _LIBC]: Remove.
19797         [defined _LIBC]: Make a strong alias from obstack_free, rather than
19798         a clone of the function body.
19799         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
19800         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
19801
19802         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
19803         glibc.
19804         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
19805         arg to memcpy.
19806
19807         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
19808         (obstack_ptr_grow_fast, obstack_int_grow_fast):
19809         Don't use lvalue casts, as GCC plans to remove support for them
19810         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
19811         was also present in the non-GCC version, indicating that this
19812         code had always been buggy and had never been widely used.
19813         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
19814         Use the fast variant of each macro, rather than copying the
19815         definiens of the fast variant; that way, we'll be more likely to
19816         catch future bugs in the fast variants.
19817
19818 2003-10-20  Bruno Haible  <bruno@clisp.org>
19819
19820         * modules/wait-process: New file.
19821         * MODULES.html.sh (func_all_modules): Add wait-process.
19822
19823 2003-10-20  Bruno Haible  <bruno@clisp.org>
19824
19825         * m4/wait-process.m4: New file.
19826
19827 2003-10-20  Bruno Haible  <bruno@clisp.org>
19828
19829         * lib/wait-process.h: New file, from GNU gettext.
19830         * lib/wait-process.c: New file, from GNU gettext.
19831
19832 2003-10-19  Jim Meyering  <jim@meyering.net>
19833
19834         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
19835         HPUX 10.20.
19836
19837 2003-10-18  Karl Berry  <karl@gnu.org>
19838
19839         * config/config.guess: update from config.
19840
19841 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19842
19843         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
19844         (getgroups): First arg is int, not size_t.
19845         Don't let 'free' mangle errno.
19846
19847 2003-10-16  Paul Eggert  <eggert@twinsun.com>
19848
19849         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
19850
19851 2003-10-16  Karl Berry  <karl@gnu.org>
19852
19853         * config/config.{guess,sub}: update from config.
19854
19855 2003-10-16  Jim Meyering  <jim@meyering.net>
19856
19857         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
19858         memcpy.
19859
19860 2003-10-15  Paul Eggert  <eggert@twinsun.com>
19861
19862         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
19863         (SIZE_MAX): Remove.
19864         (new_exclude, add_exclude_file): Initial size no longer needs to
19865         be a power of 2.
19866         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
19867         our own address arithmetic overflow checking.
19868
19869         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
19870         (fnmatch): Do not alloca more than 2000 wide characters;
19871         instead, use malloc for large buffers.
19872         Check for address arithmetic overflow, and return -1
19873         with errno set to ENOMEM in that case.
19874         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
19875         (NEW_PATTERN): Do not alloca more than 8000 bytes;
19876         instead, return -1.  Check for address arithmetic overflow.
19877
19878 2003-10-14  Paul Eggert  <eggert@twinsun.com>
19879
19880         Handle invalid suffixes and overflow independently, so that
19881         callers can treat them independently as needed.  Fix some bugs in
19882         suffix handling, e.g., "100k@" was not diagnosed as an invalid
19883         suffix for a human-readable blocksize.  The major caller-visible
19884         change is the addition of a new
19885         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
19886         that both overflow and suffix chars were found.
19887
19888         * lib/human.c (humblock): Don't check separately for invalid suffix
19889         char; that is xstrtoumax's job (now that its bug is fixed).
19890         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
19891         INTMAX_MAX]: New macros.
19892         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
19893         TYPE_MAXIMUM): New macros.
19894         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
19895         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
19896         if overflow occurs, as it's what __strtol does and it's more useful
19897         in practice.
19898         (__xstrtol): If __strtol reports some error other than ERANGE,
19899         reflect it to the caller as LONGINT_INVALID.  If it reports
19900         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
19901         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
19902         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
19903         value.
19904         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
19905         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
19906         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
19907         [defined UINTMAX_MAX]: New macros.
19908
19909 2003-10-14  Bruno Haible  <bruno@clisp.org>
19910
19911         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
19912
19913 2003-10-14  Bruno Haible  <bruno@clisp.org>
19914
19915         * m4/sig_atomic_t: New file, from GNU gettext.
19916         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
19917
19918 2003-10-14  Bruno Haible  <bruno@clisp.org>
19919
19920         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
19921         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
19922         Also use volatile where needed.
19923
19924 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19925
19926         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
19927         Change maintainer from Bruno Haible to 'all'.
19928
19929 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19930
19931         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
19932
19933 2003-10-12  Paul Eggert  <eggert@twinsun.com>
19934
19935         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
19936         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
19937         and define in terms of the other primitives.
19938         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
19939         (SIZE_MAX): Define if not already defined.
19940         (array_size_overflow): New function.
19941         (xalloc_die): Abort instead of exiting if 'error' returns.
19942         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
19943         (xmalloc, xrealloc): Use them.
19944         (xcalloc): Check for address arithmetic overflow.
19945         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
19946         a bit faster than strcpy.
19947
19948 2003-10-10  Simon Josefsson  <jas@extundo.com>
19949
19950         * modules/argp (Depends-on): Add restrict and strcase.
19951
19952 2003-10-10  Simon Josefsson  <jas@extundo.com>
19953
19954         * m4/argp.m4: Add AC_C_INLINE.
19955
19956 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19957
19958         Merge getpass from libc, plus a few fixes.
19959
19960         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
19961         Include <stdbool.h>.
19962         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
19963         __fsetlocking to empty.
19964         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
19965         do include <bits/libc-lock.h>.
19966         Do not include <fcntl.h>; not needed.
19967         [_LIBC]: Include <wchar.h>.
19968         (NOTCANCEL_MODE): New macro.
19969         (flockfile, funlockfile) [_LIBC]: New macros.
19970         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
19971         [!_LIBC]: New macros.
19972         (call_fclose): New function.
19973         (getpass): Use it.  Save tty stream separately; this simplifies the
19974         code and makes it more reliable if stdin happens to equal stdout.
19975         Invoke __fsetlocking on tty.
19976         Handle thread cancellation if needed.
19977         Namespace cleanup (use __tcgetattr, __getline).
19978         Use bool for Booleans.
19979         [USE_IN_LIBIO]: Handle wide streams.
19980         [!_LIBC]: Unconditionally do the fseek, since we don't know what
19981         stream might go where.
19982
19983         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
19984         doesn't have to include <stdio.h> before us.
19985         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
19986         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
19987         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
19988         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
19989         if not declared, so that we can use getpass.c code from libc without
19990         rewriting it.
19991         (flockfile, ftrylockfile, funlockfile): New macros.
19992
19993 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19994
19995         * modules/getpass: Depend on stdbool.
19996
19997 2003-10-08  Paul Eggert  <eggert@twinsun.com>
19998
19999         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
20000
20001 2003-10-07  Karl Berry  <karl@gnu.org>
20002
20003         * config/config.{guess,sub}: update from config.
20004
20005 2003-10-06  Jim Meyering  <jim@meyering.net>
20006             Bruno Haible  <bruno@clisp.org>
20007
20008         This lets translators provide better translations for the
20009         "Written by ..." part of --version output.
20010         * lib/version-etc.h: Include stdarg.h.
20011         (version_etc_copyright): Declare as readonly.
20012         (version_etc): Make this function variadic with a NULL-terminated list
20013         of author name strings.
20014         (version_etc_va): New declaration.
20015         * lib/version-etc.c: Include stdarg.h, stdlib.h.
20016         (version_etc_copyright): Declare as readonly.
20017         (version_etc_va): New function. Provide a different translatable string
20018         for each possible number of authors < 10. Abbreviate when there are 10
20019         authors or more.
20020         (version_etc): Make this function variadic. Call version_etc_va.
20021         Suggestion from Gary V. Vaughan.
20022
20023         * lib/long-options.h (parse_long_options): Change prototype: the
20024         authors string is moved to the end and becomes variadic.
20025         * lib/long-options.c: Include stdarg.h.
20026         (parse_long_options): Make this function variadic, too.
20027         Call version_etc_va, not version_etc.
20028
20029 2003-10-06  Bruno Haible  <bruno@clisp.org>
20030
20031         * modules/version-etc-2: Remove file.
20032         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
20033
20034 2003-10-06  Bruno Haible  <bruno@clisp.org>
20035
20036         * modules/fatal-signal: New file.
20037         * MODULES.html.sh (func_all_modules): Add fatal-signal.
20038
20039 2003-10-06  Bruno Haible  <bruno@clisp.org>
20040
20041         * m4/fatal-signal.m4: New file.
20042         * m4/signalblocking.m4: New file, from GNU gettext.
20043
20044 2003-10-06  Bruno Haible  <bruno@clisp.org>
20045
20046         * lib/version-etc-2.h: Remove file.
20047         * lib/version-etc-2.c: Remove file.
20048
20049 2003-10-06  Bruno Haible  <bruno@clisp.org>
20050
20051         * lib/fatal-signal.h: New file, from GNU gettext.
20052         * lib/fatal-signal.c: New file, from GNU gettext.
20053
20054 2003-10-05  Paul Eggert  <eggert@twinsun.com>
20055
20056         * README: Rework advice for preventing empty .o files.
20057         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
20058         not <sys/types.h>.
20059
20060 2003-10-04  Karl Berry  <karl@gnu.org>
20061
20062         * lib/argp*: update from libc.
20063
20064 2003-10-04  Karl Berry  <karl@gnu.org>
20065
20066         * config/config.{guess,sub}: update from config.
20067
20068 2003-10-02  Bruno Haible  <bruno@clisp.org>
20069
20070         * modules/lchown (Include): Add lchown.h.
20071         * modules/time_r (Include): Use "..." syntax.
20072         * modules/xgetdomainname (Include): Add xgetdomainname.h.
20073
20074 2003-10-01  Simon Josefsson  <jas@extundo.com>
20075
20076         * MODULES.html.sh (func_all_modules): Move gethostname from section
20077         'based on' to section 'lacking' POSIX:2001.
20078
20079 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
20080
20081         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
20082         to output mode on the same stream.
20083
20084 2003-09-29  Paul Eggert  <eggert@twinsun.com>
20085
20086         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
20087         Fix arg typo in previous patch.
20088
20089 2003-09-28  Jim Meyering  <jim@meyering.net>
20090
20091         * lib/error.c: Correct cpp indentation.
20092
20093 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20094
20095         * modules/free: New file.
20096
20097 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20098
20099         * m4/free.m4: New file.
20100
20101 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20102
20103         * lib/minmax.h (MIN, MAX)
20104         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
20105         Omit the special code that used __typeof__, since we worry that
20106         it could be more trouble than it's worth.  See:
20107         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
20108         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
20109
20110         * lib/free.c: New file.
20111
20112 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
20113
20114         Trivial fixes to Makefile.am parts of module listings.
20115         * modules/strstr: Append strstr.h to lib_SOURCES.
20116         * modules/strcase: Likewise, for strcase.h.
20117
20118 2003-09-27  Karl Berry  <karl@gnu.org>
20119
20120         * config/mkinstalldirs: update from automake.
20121
20122 2003-09-26  Paul Eggert  <eggert@twinsun.com>
20123
20124         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
20125         (error_tail): Do not loop, reallocating temporary buffer, since
20126         the output cannot contain more wide characters than the input
20127         contains bytes, the size must be big enough already.  This avoids
20128         one potential size overflow calculation.  Check for size overflow
20129         when calculating temporary buffer size.  Free temporary buffer
20130         when done, if it was allocated with malloc; this plugs a memory
20131         leak.  Remove casts from void * to pointers, that are no longer
20132         needed now that we're assuming C89 or better.
20133
20134         Merge error changes from glibc.
20135
20136         * lib/error.c, error.h: Update copyright notice header to match glibc.
20137         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
20138         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
20139         Disable cancellation while printing error.
20140         * lib/error.h: Prepend __ to parameter names.
20141
20142 2003-09-26  Jim Meyering  <jim@meyering.net>
20143
20144         * lib/error.c (error_tail): Move some declarations
20145         into inner scope where the local variables are used.
20146
20147 2003-09-26  Bruno Haible  <bruno@clisp.org>
20148
20149         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
20150         stpncpy().
20151         Don't define stpncpy through config.h; it's now done through stpncpy.h.
20152
20153 2003-09-26  Bruno Haible  <bruno@clisp.org>
20154
20155         * lib/stpncpy.h (gnu_stpncpy): New declaration.
20156         (stpncpy): Define as alias for gnu_stpncpy.
20157         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
20158
20159 2003-09-25  Simon Josefsson  <jas@extundo.com>
20160
20161         * lib/xgetdomainname.h: New file.
20162         * lib/xgetdomainname.c: New file.
20163
20164 2003-09-25  Simon Josefsson  <jas@extundo.com>
20165             Bruno Haible  <bruno@clisp.org>
20166
20167         * modules/getdomainname: New file.
20168         * modules/xgetdomainname: New file.
20169         * MODULES.html.sh (func_all_modules): Add getdomainname,
20170         xgetdomainname.
20171
20172 2003-09-25  Simon Josefsson  <jas@extundo.com>
20173             Bruno Haible  <bruno@clisp.org>
20174
20175         * m4/getdomainname.m4: New file.
20176
20177 2003-09-25  Simon Josefsson  <jas@extundo.com>
20178             Bruno Haible  <bruno@clisp.org>
20179
20180         * lib/getdomainname.h: New file.
20181         * lib/getdomainname.c: New file.
20182
20183 2003-09-25  Karl Berry  <karl@gnu.org>
20184
20185         * lib/argp-fmtstream.c, argp-help.c: update from libc.
20186
20187 2003-09-25  Karl Berry  <karl@gnu.org>
20188
20189         * config/install-sh: update from automake.
20190
20191 2003-09-25  Bruno Haible  <bruno@clisp.org>
20192
20193         * modules/version-etc-2: New file, from modules/version-etc with
20194         modifications.
20195         * MODULES.html.sh (func_all_modules): Add version-etc-2.
20196
20197 2003-09-25  Bruno Haible  <bruno@clisp.org>
20198
20199         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
20200         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
20201
20202 2003-09-24  Simon Josefsson  <jas@extundo.com>
20203
20204         * modules/xgethostname: Add xgethostname.h.
20205
20206 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20207
20208         * lib/linebuffer.c (freebuffer): Don't free the argument, just
20209         the buffer associated with the argument.  Bug reported by
20210         Simon Josefsson.
20211
20212 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20213
20214         * README: Document assumptions that 'int' is at least 32 bits
20215         wide, that integer arithmetic is 2's complement without overflow,
20216         that there are no holes in integer values, that adding sizes of
20217         two nonoverlapping objects can't overflow, and that all-bits-zero
20218         yields scalar zero.  Fix spelling and capitalization typos.
20219
20220 2003-09-19  Karl Berry  <karl@gnu.org>
20221
20222         * lib/argp.h: update from libc.
20223
20224 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20225
20226         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
20227         to avoid spurious warnings like "AC_RUN_IFELSE was called before
20228         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
20229
20230 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20231
20232         * gnulib-tool: Use "test -h", not "test -L", for portability
20233         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
20234         (tags_regexp): Remove, since \| doesn't conform to POSIX.
20235         (sed_extract_prog): Issue s commands one-by-one, rather than
20236         using \| in one s command.
20237
20238 2003-09-16  Paul Eggert  <eggert@twinsun.com>
20239
20240         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
20241         input error, instead of returning NULL the next time we are called
20242         (and therefore losing track of errno).
20243
20244 2003-09-16  Bruno Haible  <bruno@clisp.org>
20245
20246         * gnulib-tool (func_create_testdir): Warn about duplicated
20247         dependencies.
20248
20249 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20250
20251         * modules/argmatch, modules/fatal, modules/obstack,
20252         modules/xalloc, modules/xgethostname: Sort dependencies by
20253         importance, not alphabetically.
20254
20255 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20256
20257         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
20258         fails, so that the caller gets the proper errno.
20259
20260         * lib/readutmp.c (read_utmp): Likewise.
20261         Check for fstat error.  Close stream and free storage
20262         when failing.
20263
20264 2003-09-14  Karl Berry  <karl@gnu.org>
20265
20266         * config/srclist.txt (strdup.c): disable for c89 changes.
20267
20268 2003-09-14  Jim Meyering  <jim@meyering.net>
20269
20270         * lib/getloadavg.c: Correct cpp indentation.
20271         * lib/strdup.c: Likewise.
20272         * lib/vasnprintf.c: Likewise.
20273
20274 2003-09-14  Bruno Haible  <bruno@clisp.org>
20275
20276         * modules/fwriteerror: New file.
20277         * MODULES.html.sh (func_all_modules): Add fwriteerror.
20278
20279 2003-09-14  Bruno Haible  <bruno@clisp.org>
20280
20281         * lib/fwriteerror.h: New file.
20282         * lib/fwriteerror.c: New file.
20283
20284 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20285
20286         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
20287         modules/xgethostname, modules/xalloc: Depend on exit.
20288
20289 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20290
20291         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
20292
20293         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
20294         and AC_MINIX, too, so that their extensions are available.
20295
20296         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
20297         This macro has been superseded by gl_BACKUPFILE.
20298
20299         More patches to assume C89 or better.
20300
20301         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
20302
20303         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
20304         unconditionally.
20305         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
20306         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
20307         Include <string.h>, <stdlib.h> unconditionally.
20308         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
20309         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
20310         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
20311         headers or for string.h.
20312         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
20313         or strtoul.
20314
20315         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
20316         headers.
20317         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
20318         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20319         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
20320         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
20321         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20322         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
20323         memcpy, memset.
20324         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
20325         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
20326         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
20327         strtol.
20328         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
20329         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
20330         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
20331         strtoul.
20332
20333 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20334
20335         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
20336         * lib/obstack.c [!defined _LIBC]: Likewise.
20337         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
20338         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
20339         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
20340
20341         More changes to assume C89 or better.
20342
20343         * lib/error.c (error_tail): Assume vprintf.
20344
20345         * lib/argmatch.c (getenv): Remove decl.
20346         * lib/progreloc.c (get_full_program_name): Define via prototype.
20347         * lib/setenv.c (clearenv): Likewise.
20348         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
20349         needed.
20350         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
20351         (malloc, memcpy): Remove decls.
20352         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
20353         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
20354         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
20355         (memcpy): Remove macro.
20356         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
20357         (__P): Remove.  All uses removed.
20358         (PTR): Remove.  All uses changed to void *.
20359         (CHAR_BIT, NULL): Remove.
20360         (spaces, zeros, memset_space, memset_zero)
20361         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
20362         Remove.
20363         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
20364         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
20365         Define with prototype.
20366         Remove now-unnecessary prototype decl.
20367         (extra_args_spec): Assume ANSI C.  All uses changed.
20368         (extra_args_spec_iso): Remove.
20369         (my_strftime, emacs_strftimeu): Define via prototype.
20370         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
20371         unconditionally.
20372         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
20373         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
20374         (strtoul, strtol): Remove decls.
20375         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
20376         LONG_MAX): Remove.
20377         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
20378         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
20379         (LOCALE_PARAM_PROTO): New macro.
20380         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
20381         (INTERNAL (strtol), strtol): Define with a prototype.
20382         (PARAMS): Remove.  All uses removed.
20383         * lib/tempname.c: Include <string.h> unconditionally.
20384         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
20385         * lib/xgethostname.c (main): Define with a prototype.
20386         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
20387         Include <stdlib.h> unconditionally.
20388         (calloc, malloc, realloc, free): Remove decls.
20389         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
20390         Include <stdlib.h> unconditionally.  Sort include file names.
20391         (strtod): Remove.
20392         (xstrtod): Define with a prototype.
20393         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
20394         (strtol, strtoul): Remove decls.
20395
20396 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20397
20398         More patches to assume C89 or better.
20399         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
20400         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
20401         string.h, memchr, STDC_HEADERS.
20402
20403 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20404
20405         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
20406         Include <stdlib.h>, <string.h> unconditionally.
20407         Remove now-unnecessary cast to char *.
20408         * lib/strnlen.c: Include <string.h> unconditionally.
20409         * lib/yesno.c (yesno): Define with a prototype.
20410
20411 2003-09-11  Bruno Haible  <bruno@clisp.org>
20412
20413         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
20414
20415 2003-09-10  Jim Meyering  <jim@meyering.net>
20416
20417         * lib/error.c: Correct indentation of cpp directives.
20418
20419 2003-09-10  Bruno Haible  <bruno@clisp.org>
20420
20421         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
20422         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
20423         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
20424         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
20425         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
20426         <stdlib.h> and <string.h> checks.
20427         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
20428         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
20429
20430 2003-09-10  Bruno Haible  <bruno@clisp.org>
20431
20432         * lib/strcspn.c: Include <string.h> unconditionally.
20433         * lib/strpbrk.c: Include <string.h> unconditionally.
20434         * lib/strstr.c: Include <string.h> unconditionally.
20435         * lib/unicodeio.c: Include <string.h> unconditionally.
20436         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
20437         * lib/unsetenv.c: Likewise.
20438         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
20439         * lib/yesno.c: Include <stdlib.h> unconditionally.
20440         (rpmatch): Add prototype.
20441
20442 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20443
20444         More patches to assume C89 or better.
20445         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
20446         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
20447         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
20448         or for string.h.
20449         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
20450         stdlib.h.
20451         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
20452         C headers.
20453         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
20454         string.h.
20455         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
20456         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
20457         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
20458         or for string.h.
20459         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
20460         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
20461         C headers.
20462         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
20463         memcpy.
20464         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
20465         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
20466         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
20467         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
20468         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
20469         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
20470         string.h, free.
20471         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
20472         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
20473         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
20474         C headers, or for string.h.
20475         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
20476         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
20477         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
20478         headers, memory.h, stdlib.h, string.h, strings.h.
20479         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
20480         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
20481         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
20482         strchr.
20483         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
20484         headers, memory.h, string.h.
20485         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
20486         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
20487         free.
20488         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
20489         headers.
20490         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
20491         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
20492         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
20493         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
20494         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
20495
20496 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20497
20498         More K&R removal.
20499
20500         * lib/acosl.c (main): Use a prototype.
20501         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
20502         tanl.c: Likewise.
20503
20504         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
20505
20506         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
20507         (getopt, etopt_long, getopt_long_only, _getopt_internal)
20508         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
20509         with a prototype.
20510         * lib/getopt.c (const): Remove macro.
20511         Include <string.h> unconditionally.
20512         (my_index): Remove; all uses changed to strchr.
20513         (strlen): Remove decl.
20514         (exchange): Remove forward decl; no longer needed.
20515         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
20516         Define with prototype.
20517         * lib/getopt1.c (const): Remove macro.
20518         (getopt_long, getopt_long_only, main): Define with prototype.
20519
20520         * lib/getugroups.c: Include <string.h> unconditionally.
20521
20522         * lib/getusershell.c: Include <stdlib.h> unconditionally.
20523         (getusershell, setusershell, endusershell, readname, main):
20524         Define with prototypes.
20525
20526         * lib/group-member.c: Include group-member.h first.
20527         Include <stdlib.h> unconditionally.
20528
20529         * lib/hard-locale.c: Include hard-locale.h first.
20530         Include <stdlib.h>, <string.h> unconditionally.
20531
20532         * lib/hash.c (free, malloc): Remove decls.
20533         Include <stdlib.h> unconditionally.
20534
20535         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
20536         (getenv): Do not declare.
20537
20538         * lib/idcache.c: Include <string.h> unconditionally.
20539
20540         * lib/long-options.c: Include long-options.h first, to test interface.
20541         Include <stdlib.h> unconditionally.
20542
20543         * lib/makepath.c: Include makepath.h first, to test interface.
20544         Include <stdlib.h> and <string.h> unconditionally.
20545
20546         * lib/linebuffer.c: Include <stdlib.h>.
20547         (free): Remove decl.
20548
20549         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
20550         stddef.h. rpl_malloc returns void *, not char *.
20551         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
20552         prototype.
20553
20554         * lib/md5.h: Include <limits.h> unconditionally.
20555         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
20556         (__P): Remove; all uses removed.
20557         * lib/md5.c: Include "md5.h" first.
20558         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
20559         md5_buffer, md5_process_bytes, md5_process_block):
20560         Define with prototypes.
20561         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
20562         * lib/sha.c: Include "sha.h" first.
20563         Include <stdlib.h>, <string.h> unconditionally.
20564
20565         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
20566         * lib/memcmp.c (__ptr_t): Likewise.
20567         * lib/memrchr.c (__ptr_t): Likewise.
20568         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
20569         Include <string.h> unconditionally.
20570         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
20571         * lib/memchr.c: Include <stdlib.h> unconditionally.
20572         * lib/memchr.c (LONG_MAX): Remove.
20573         * lib/memrchr.c (LONG_MAX): Likewise.
20574         * lib/memchr.c (__memchr): Define via a prototype.
20575         * lib/memrchr.c (__memrchr): Likewise.
20576         * lib/memcmp.c (__P): Remove, and remove all uses.
20577         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
20578         Remove forward decls; no longer needed.
20579         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
20580         Use types required by C89 in prototype.
20581
20582         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
20583         * lib/savedir.c: Likewise.
20584         * lib/mkdir.c (free): Remove decl.
20585         * lib/rmdir.c (rmdir): Define with a prototype.
20586         * lib/savedir.c: Include savedir.h first, to test interface.
20587
20588         * lib/mktime.c (STDC_HEADERS): Remove.
20589         Include <stdlib.h>, <string.h> unconditionally.
20590
20591         * lib/modechange.c: Include <stdlib.h> unconditionally.
20592         (malloc): Remove decl.
20593
20594         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
20595         (free): Remove decl.
20596
20597         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
20598         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
20599         (This type really should be intptr_t, but that's a C99ism.)
20600         (_obstack_memcpy): Remove: all uses changed to memcpy.
20601         Include <string.h> unconditionally.
20602         (struct obstack): Assume __STDC__ for types of members
20603         chunkfun, freefun, extra_arg.
20604         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
20605         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
20606         obstack_begin, obstack_specify_allocation,
20607         obstack_specify_allocation_with_arg, obstack_chunkfun,
20608         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
20609         Remove unprototyped decls and the macros that use them.
20610         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
20611         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
20612         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
20613         (defined __STDC__ && __STDC__)]:
20614         Remove nonprototyped code.
20615         Include <stdlib.h> unconditionally.
20616         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
20617         _obstack_allocated_p, _obstack_free, obstack_free,
20618         _obstack_memory_used, print_and_abort):
20619         Define using prototypes.
20620         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
20621         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
20622         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
20623         obstack_next_free, obstack_object_size, obstack_room) [0]:
20624         Remove unused, unprototyped code.
20625
20626         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
20627
20628         * lib/physmem.c (physmem_total, physmem_available, main): Define
20629         with prototypes.
20630
20631         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
20632         (main): Define with a prototype.
20633
20634         * lib/posixver.c (getenv): Remove decl.
20635
20636         * lib/putenv.c (malloc): Returns void *, not char *.
20637         Include <string.h> unconditionally.
20638         (strchr, memcpy, NULL): Do not define.
20639
20640         * lib/readtokens.c: Include readtokens.h first, to test interface.
20641         Include <stdlib.h>, <string.h> unconditionally.
20642         (init_tokenbuffer): Define with a prototype.
20643
20644         * lib/regex.c (PARAMS): Remove.  All uses removed.
20645         All uses of _RE_ARGS removed, too.
20646         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20647         unconditionally.
20648         (bzero): Assume memset exists.
20649         (memcmp, memcpy, NULL): Remove.
20650         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
20651         char, or assignments to local vars of type signed char.
20652         (init_syntax_once, PREFIX(extract_number_and_incr),
20653         PREFIX(print_partial_compiled_pattern),
20654         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
20655         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
20656         PREFIX(regex_grow_registers), PREFIX(regex_compile),
20657         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
20658         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
20659         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
20660         wcs_compile_range, byte_compile_range, truncate_wchar,
20661         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
20662         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
20663         count_mbs_length, wcs_re_match_2_internal,
20664         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
20665         PREFIX(alt_match_null_string_p),
20666         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
20667         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
20668         regfree, PREFIX(extract_number)): Define with prototype.  Remove
20669         now-unnecessary declaration, if any.
20670         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
20671         regcomp, regexec):
20672         Remove now-unnecessary casts among pointer types.
20673         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
20674
20675         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
20676         (free): Remove decl.
20677
20678         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
20679
20680         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
20681         (free): Remove decl.
20682
20683         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
20684         * lib/xgetcwd.c: Likewise.
20685
20686         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
20687         (free): Remove decl.
20688
20689         * lib/strchrnul.c (strchrnul): Define with a prototype.
20690         Fix bug: c_in was not converted to char before searching.
20691
20692         The following changes are not K&R related:
20693
20694         * lib/group-member.h: Include <sys/types.h>, so that this file is
20695         self-contained.
20696         * lib/makepath.h: Likewise.
20697
20698         * lib/getusershell.c (readname, default_index, line_size, readname):
20699         Use size_t, not int, for sizes.
20700         (readname): If the size overflows, report an error instead of
20701         looping forever.
20702
20703 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20704
20705         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
20706         libc.
20707
20708 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20709
20710         * README: New section: portability guidelines.
20711
20712 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20713
20714         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
20715         C89 spec.
20716
20717 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20718
20719         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
20720
20721 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20722
20723         Assume C89 or better; remove K&R cruft.
20724         A few of these changes were first proposed by Derek Robert Price
20725         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
20726
20727         * lib/addext.c: Include <string.h> unconditionally.
20728         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
20729         Don't declare getenv or malloc.
20730
20731         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
20732         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
20733         (NULL): Remove.
20734         (find_stack_direction, alloca): Use prototypes.
20735
20736         * lib/atexit.c (atexit): Define using a prototype.
20737
20738         * lib/basename.c, dirname.c, stripslash.c:
20739         Include <string.h> unconditionally.
20740
20741         * lib/bcopy.c: Include <stddef.h>.
20742         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
20743
20744         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
20745
20746         * lib/error.h (error, error_at_line, error_print_progname)
20747         [! (defined (__STDC__) && __STDC__)]: Remove decls.
20748         * lib/error.c: Include error.h first, to check interface.
20749         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20750         (VA_START): Remove; all uses changeed to va_start.
20751         (exit, strerror): Remove decls.
20752         (error_print_progname): Prototype uncondionally.
20753         Don't include <errno.h>; no longer needed.
20754         (private_strerror): Remove.
20755         (error_tail): Always define.
20756         (error, error_at_line): Assume C89 or better; always use prototypes.
20757         * lib/fatal.c: Include "fatal.h" first, to test interface.
20758         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20759         (VA_START): Remove; all uses changed to va_start.
20760         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
20761         this case.
20762         (exit): Remove decl.
20763         (fatal): Prototype unconditionally.  Assume va_start works.
20764         Abort at end, to pacify gcc.
20765
20766         * lib/euidaccess.c (main): Define with a prototype.
20767
20768         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
20769
20770         * lib/exitfail.c: Include <stdlib.h> unconditionally.
20771
20772         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
20773         prototypes.
20774         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
20775         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
20776         (getenv): Remove decl.
20777         (fnmatch): Define using a prototype.
20778         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
20779         (FCT): Define using a prototype.
20780
20781         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
20782
20783         * lib/gethostname.c: Include <stddef.h>.
20784         (gethostname): Define with prototype.  Length is size_t, not int.
20785
20786 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20787
20788         Assume C89 or better; remove K&R cruft.
20789         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
20790         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
20791         string.h, getenv, malloc.
20792         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
20793         headers.
20794         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
20795         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
20796         do not check for strerror.
20797         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
20798         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
20799         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
20800         do not check for doprnt or vprintf.
20801         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
20802         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
20803
20804 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20805
20806         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
20807         getversion.c should have been removed then, but was accidentally
20808         preserved.
20809
20810         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
20811         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
20812
20813 2003-09-08  Karl Berry  <karl@gnu.org>
20814
20815         * config/config.sub, config.guess, srclistvars.sh: update from savannah
20816                 config, forget about prep.
20817
20818         * config/depcomp, missing: update from automake.
20819
20820 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20821
20822         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
20823         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20824
20825 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20826
20827         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
20828         copy_tm_result.  Bug reported by Simon Josefsson in
20829         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20830
20831 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20832
20833         * m4/time_r.m4: New file.
20834         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
20835         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
20836         is. Check for timegm declaration.
20837         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
20838         Do not check for gmtime_r.
20839         Replace mktime if __mktime_internal does not exist and if mktime
20840         hasn't been replaced already.
20841
20842 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20843
20844         * lib/time_r.c, lib/time_r.h: New files.
20845
20846         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
20847         __localtime_r.
20848         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
20849         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
20850
20851         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
20852         __gmtime_r.
20853         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
20854         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
20855         Include <time_r.h>.
20856
20857         * lib/timegm.c: Switch to glibc implementation, with the following
20858         changes:
20859         [defined HAVE_CONFIG_H]: Include <config.h>.
20860         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
20861         (__mktime_internal) [!defined _LIBC]: New decl.
20862         (__gmtime_r) [!defined _LIBC]: New macro and function.
20863         (timegm): Use a prototype, since gnulib assumes C89.
20864         Do not bother declaring tmp to be const, as it's not really usefu.
20865         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
20866         (timegm): Declare only if HAVE_DECL_TIMEGM.
20867
20868 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20869
20870         * MODULES.html.sh (func_all_modules): Add time_r.
20871         * modules/time_r: New file.
20872         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
20873         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
20874
20875 2003-09-03  Paul Eggert  <eggert@twinsun.com>
20876
20877         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
20878         Bug reported by Lute Kamstra in
20879         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
20880
20881         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
20882         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
20883         course with correspondingly smaller numbers for tomorrow and
20884         yesterday.  From Tadayoshi Funaba.  Originally installed into
20885         sh-utils on 1999-08-07, but the patch got lost (I guess during the
20886         coreutils merge?).
20887
20888 2003-08-31  Simon Josefsson  <jas@extundo.com>
20889
20890         * modules/timegm: New file.
20891         * MODULES.html.sh (func_all_modules): Add timegm.
20892
20893 2003-08-31  Simon Josefsson  <jas@extundo.com>
20894
20895         * m4/timegm.m4: New file.
20896
20897 2003-08-31  Simon Josefsson  <jas@extundo.com>
20898
20899         * lib/timegm.h: New file.
20900         * lib/timegm.c: New file.  Based on
20901         wget-1.8.2/src/http.c:mktime_from_utc.
20902
20903 2003-08-31  Karl Berry  <karl@gnu.org>
20904
20905         * lib/argp.h: update from libc.
20906
20907 2003-08-28  Bruno Haible  <bruno@clisp.org>
20908
20909         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
20910         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
20911         followed by '#define fnmatch fnmatch_posix' gives an error.
20912
20913 2003-08-28  Bruno Haible  <bruno@clisp.org>
20914
20915         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
20916         warning on QNX, which defines O_BINARY to 000000.
20917
20918 2003-08-27  Jim Meyering  <jim@meyering.net>
20919
20920         * m4/mkstemp.m4: Require that the system mkstemp be able to create
20921         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
20922         would fail after 32.  Reported by Danny Levinson.  Details here:
20923         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
20924
20925 2003-08-24  Bruno Haible  <bruno@clisp.org>
20926
20927         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
20928         MSVC7 <stdio.h> is included later.
20929
20930 2003-08-22  Simon Josefsson  <jas@extundo.com>
20931
20932         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
20933
20934 2003-08-20  Karl Berry  <karl@gnu.org>
20935
20936         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
20937
20938 2003-08-20  Bruno Haible  <bruno@clisp.org>
20939
20940         * modules/progname: New file.
20941         * MODULES.html.sh (func_all_modules): Add progname.
20942
20943 2003-08-20  Bruno Haible  <bruno@clisp.org>
20944
20945         * lib/progname.h: New file, from GNU gettext.
20946         * lib/progname.c: New file, from GNU gettext.
20947         * lib/progreloc.c: New file, from GNU gettext.
20948
20949 2003-08-19  Jim Meyering  <jim@meyering.net>
20950
20951         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
20952         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
20953
20954 2003-08-19  Bruno Haible  <bruno@clisp.org>
20955
20956         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
20957         more.
20958
20959 2003-08-19  Bruno Haible  <bruno@clisp.org>
20960
20961         * lib/xstrdup.c: Assume <string.h> exists.
20962
20963 2003-08-18  Paul Eggert  <eggert@twinsun.com>
20964
20965         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
20966         in makefile rules.
20967
20968 2003-08-18  Jim Meyering  <jim@meyering.net>
20969
20970         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
20971         * m4/lib-ld.m4: Likewise.
20972
20973 2003-08-18  Jim Meyering  <jim@meyering.net>
20974
20975         * lib/setenv.h: Indent nested cpp directive.
20976         * lib/vasnprintf.c: Remove trailing blanks.
20977
20978 2003-08-17  Simon Josefsson  <jas@extundo.com>
20979
20980         * modules/xstrndup: New file.
20981         * MODULES.html.sh (func_all_modules): Add xstrndup.
20982
20983 2003-08-17  Simon Josefsson  <jas@extundo.com>
20984
20985         * modules/argp: Fix autoconf macro name. Add more dependencies.
20986
20987 2003-08-17  Simon Josefsson  <jas@extundo.com>
20988
20989         * m4/xstrndup.m4: New file.
20990
20991 2003-08-17  Simon Josefsson  <jas@extundo.com>
20992
20993         * m4/argp.m4: New file.
20994
20995 2003-08-17  Simon Josefsson  <jas@extundo.com>
20996             Bruno Haible  <bruno@clisp.org>
20997
20998         * lib/xstrndup.h: New file.
20999         * lib/xstrndup.c: New file.
21000
21001 2003-08-17  Bruno Haible  <bruno@clisp.org>
21002
21003         * modules/strndup (Files, Include): Add lib/strndup.h.
21004
21005 2003-08-17  Bruno Haible  <bruno@clisp.org>
21006
21007         * modules/euidaccess (Files): Add lib/euidaccess.h.
21008
21009 2003-08-17  Bruno Haible  <bruno@clisp.org>
21010
21011         * lib/strndup.h: New file.
21012
21013 2003-08-17  Bruno Haible  <bruno@clisp.org>
21014
21015         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
21016         like AC_GNU_SOURCE.
21017         * modules/extensions (configure.ac): Comment out the invocation of
21018         gl_USE_SYSTEM_EXTENSIONS.
21019
21020 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21021
21022         Merges from coreutils, etc.
21023         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
21024         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
21025         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
21026         fixing a typo.
21027         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
21028         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
21029
21030 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21031
21032         Document merge from coreutils.
21033         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
21034         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
21035         * modules/utime: Add m4/utimes-null.m4.
21036
21037 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21038
21039         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
21040         space, undoing this 2003-08-12 change:
21041         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21042
21043 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21044
21045         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
21046         strtoul.c from libc, undoing this 2003-08-12 change:
21047         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21048
21049 2003-08-16  Jim Meyering  <jim@meyering.net>
21050
21051         Merges from coreutils.
21052         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
21053         prefix.  Adjust cache variables similarly.  Create 500 rather than
21054         just 300 files, to exercise bug on Darwin6.5, too.
21055         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
21056         $missing_dir.
21057         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
21058         AM_SYS_POSIX_TERMIOS.
21059         Reported by mkc@mathdogs.com.
21060         Also change use of $am_cv_sys_posix_termios
21061         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
21062         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
21063         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
21064         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
21065         in /proc/mounts until it finds one with matching device number.  This
21066         is unnecessary when the FILE argument *is* a mount point.  No stat call
21067         is necessary in that case.  So, disable the statvfs-testing code on
21068         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
21069         as RedHat bug# 84846.
21070         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21071         to 1MB, so as not to render systems with no stack size limit (e.g.,
21072         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21073         Include <unistd.h>.  On some systems,
21074         it is required for the definition of _SC_PAGESIZE.
21075
21076 2003-08-16  Jim Meyering  <jim@meyering.net>
21077
21078         Merge from coreutils.
21079         * lib/xstrtoimax.c: #else #if -> #elif.
21080         * lib/xstrtoumax.c: Likewise.
21081
21082 2003-08-16  Jim Meyering  <jim@meyering.net>
21083
21084         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
21085         * m4/utimes.m4: Removed.
21086         * m4/utimes-null.m4: Renamed from utimes.m4.
21087
21088         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21089         to 1MB, so as not to render systems with no stack size limit (e.g.,
21090         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21091         Include <unistd.h>.  On some systems,
21092         it is required for the definition of _SC_PAGESIZE.
21093
21094 2003-08-16  Jim Meyering  <jim@meyering.net>
21095         and Paul Eggert  <eggert@cs.ucla.edu>
21096
21097         Merges from coreutils, etc.
21098
21099         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
21100         using the latest version from cvs.  This avoids problems with #line
21101         directives using a vendor (Sun) compiler.
21102         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
21103         Don't set GETGROUPS_LIB here; now it's
21104         done via getgroups.m4's wrapper function.
21105         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
21106         rather than just in sh-util/configure.in, so that the
21107         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
21108         same.
21109         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
21110         AC_FUNC_GETLOADAVG where to find getloadavg.c.
21111         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
21112         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
21113         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
21114         Remove code that is now done by the newly-required macros.
21115         Append $(EXEEXT) to DF_PROG.
21116         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
21117         Do not invoke or require the following here,
21118         since prereq.m4 or some gnulib .m4 now does this for us:
21119         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
21120         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
21121         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
21122         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
21123         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
21124         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
21125         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
21126         AC_FUNC_OBSTACK.
21127         Do not replace the following functions, as this is now the job
21128         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
21129         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
21130         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
21131         atexit getpass, strdup, getpagesize.
21132         Replace 'raise'.
21133         Do not check for the following functions, as this is now the job
21134         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
21135         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
21136         setregid.
21137         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
21138         Check for sys/sysctl.h.
21139         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
21140         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
21141         of checking for ssize_t ourselves.
21142
21143         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
21144         Require every macro that gnulib/modules/* suggests for us.
21145         (jm_PREREQ_ADDEXT): New macro.
21146         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
21147         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
21148
21149         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
21150         (gl_PHYSMEM): Use it.
21151         Also check for `table' function.
21152         Check for new headers and functions.
21153         Add check for sys/sysmp.h.
21154         With suggestions from Kaveh Ghazi.
21155         Ignore headers that are present but cannot be compiled.  This
21156         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
21157         C 5.4.
21158
21159 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21160
21161         Document merge from coreutils.
21162         * modules/userspec: Depend on posixver.
21163         * modules/strftime: Depend on tzset.
21164
21165 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21166
21167         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
21168         rather than tab, after '#' in shell-script copyright notices.
21169         Suggested by Bruno Haible.
21170
21171 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21172
21173         * config/srclist-update: Use three spaces, rather than tab, after '#'
21174         in shell-script copyright notices.  Suggested by Bruno Haible.
21175         Remove unnecessary parenthesization in regular expression.
21176
21177 2003-08-15  Jim Meyering  <jim@meyering.net>
21178
21179         Merge from coreutils.
21180         * lib/xgethostname.c: Include <stdlib.h>.
21181         (xghostname): Don't exit for anything other than memory-related
21182         failure; just return NULL.
21183         * lib/userspec.c: Include "posixver.h".
21184         (parse_user_spec): Accept `.' as a separator only
21185         in pre-POSIX-200112 mode.
21186         * lib/strtoimax.c: Use #elif rather than #else #if.
21187         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
21188         Remove function, now that we can rely on a working tzset function.
21189         [!_LIBC]: Ensure that the required autoconf test has been run.
21190         [!defined _NL_CURRENT && HAVE_STRFTIME]:
21191         Use underlying_strftime for %r.
21192         * lib/sha.c: Merge in some clean-up and optimization changes from
21193         glibc.
21194         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
21195         Ensure that it is a multiple of 64.
21196         Rearrange loop exit tests so as to avoid performing an
21197         additional fread after encountering an error or EOF.
21198         * lib/realloc.c: Update copyright date.
21199
21200 2003-08-15  Jim Meyering  <jim@meyering.net>
21201         and Paul Eggert  <eggert@twinsun.com>
21202
21203         Merge from coreutils.
21204         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
21205         member but strut utmpx does not.  Needed for AIX 4.3.3.
21206         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
21207
21208 2003-08-15  Jim Meyering  <jim@meyering.net>
21209         and Paul Eggert  <eggert@cs.ucla.edu>
21210
21211         Merges from coreutils, etc.
21212         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
21213         Require gl_FUNC_TZSET_CLOBBER.
21214         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
21215         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
21216         members.
21217
21218 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21219
21220         Help the merge from coreutils.
21221         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
21222         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
21223         * m4/tzset.m4: Use it too.
21224
21225 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21226
21227         * modules/tzset: New file.
21228
21229 2003-08-14  Jim Meyering  <jim@meyering.net>
21230
21231         Merges from coreutils.
21232         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
21233         variable names, rather than @FNMATCH_H@.
21234         * modules/alloca: Likewise for $(ALLOCA_H).
21235
21236         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
21237         the three copies of the literal target, `fnmatch.h'.
21238         * modules/alloca (alloca.h): Likewise.
21239
21240 2003-08-14  Jim Meyering  <jim@meyering.net>
21241
21242         Merge from coreutils.
21243         * m4/tzset.m4: New file.
21244         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
21245         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
21246         otherwise, AIX 5.1 systems would end up using the latter.
21247         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
21248         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
21249         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
21250         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
21251
21252 2003-08-14  Jim Meyering  <jim@meyering.net>
21253
21254         Merge from coreutils.
21255         * lib/obstack.h: Whitespace changes.
21256         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
21257         and xcalloc return values.
21258         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
21259         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
21260         hang on OSF/1 5.1 for DIR on both local and remote file systems.
21261         Reported by (and fix confirmed by) Nelson H. F. Beebe.
21262         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21263         error from mntctl.
21264         Use mntctl's return value to drive the entry-processing loop, since
21265         we can't rely on the value of the vmt_length member in the last
21266         entry.  On some systems doing so could result in exhausting
21267         virtual memory.  Based in part on a patch from Mike Jetzer.
21268
21269 2003-08-14  Jim Meyering  <jim@meyering.net>
21270         and Paul Eggert  <eggert@twinsun.com>
21271
21272         Merges from coreutils, plus other fixes.
21273         * lib/physmem.c: Merge in portability changes from gcc/libiberty
21274         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
21275         for credits and details.  Thanks to Kaveh Ghazi for helping
21276         to keep these files in sync.
21277         (ARRAY_SIZE): Define it.
21278         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
21279         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
21280         (memcasecmp): Don't assume size_t fits in unsigned int.
21281         Remove casts and duplicate code.
21282         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
21283         (memcpy): Remove definition.
21284         Merge in some clean-up and optimization changes from glibc.
21285         [BLOCKSIZE]: Move definition to top of file.
21286         Ensure that it is a multiple of 64.
21287         Rearrange loop exit tests so as to avoid performing an
21288         additional fread after encountering an error or EOF.
21289         * lib/md5.h (md5_uintptr): Define.
21290         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
21291         return to the initial working directory.  Preserve errno
21292         for caller.
21293         * lib/idcache.c: Include "xalloc.h".
21294         (xmalloc, xrealloc): Remove decls.
21295         (getuser): Remove casts no longer required in C89.
21296         * lib/human.c: Include stdio.h, for sprintf.
21297         * lib/group-member.c: Include "xalloc.h".
21298         (xmalloc, xrealloc): Remove decls.
21299         (get_group_info): Remove casts no longer required in C89.
21300         * lib/getusershell.c (readname): Remove casts no longer required in
21301         C89.
21302         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
21303         * lib/getline.c: Whitespace fix, from coreutils.
21304
21305 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21306
21307         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
21308         Check for isascii.
21309
21310         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21311         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21312         Undo previous (whitespace-only) change.
21313
21314 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21315
21316         * lib/exclude.c: Include <ctype.h>
21317         (IN_CTYPE_DOMAIN): New macro.
21318         (is_space): New fn.
21319         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
21320         and empty lines.
21321
21322         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21323         Undo previous (whitespace-only) change.
21324
21325 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21326
21327         * config/srclist-update: Change update back to the old behavior,
21328         leaving whitespace alone.  Use one 'sed' command rather than a
21329         pipeline.
21330         (fixlicense): Now a variable, not a function.
21331         (remove_trailing_blanks): Remove.
21332         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
21333         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21334         Undo previous (whitespace-only) change.
21335
21336 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21337
21338         Merge from coreutils.
21339         * modules/euidaccess: Add lib_SOURCES, include for new
21340         file euidaccess.h
21341
21342 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21343
21344         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21345         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21346         Normalize leading white space and remove trailing white space.
21347
21348         Merge from coreutils
21349         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
21350
21351         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
21352         0.12.1.  These files are now being upgraded automatically by
21353         ../config/srclist-update.
21354
21355 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21356
21357         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21358         Normalize leading white space and remove trailing white space.
21359         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
21360         notice, as per ../config/srclist-update.
21361
21362         Merge from coreutils.
21363         * lib/euidaccess.h: New file.
21364         * lib/euidaccess.c: Include it.
21365         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
21366         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
21367         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
21368
21369 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21370
21371         * config/srclist-update: Add copyright notice.
21372         (remove_id_lines, remove_trailing_blanks): New constants.
21373         (fixfile): Use them to normalize spacing a bit in copied files.
21374         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21375         Normalize leading white space and remove trailing white space.
21376
21377         * config/texinfo.tex: Sync with texinfo.
21378
21379         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
21380         strtoul.c from libc, to merge coreutils whitespace changes.
21381
21382         * config/srclist.txt: Get the following m4 files from gettext:
21383         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
21384         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
21385         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
21386         wint_t.m4.
21387
21388 2003-08-12  Karl Berry  <karl@gnu.org>
21389
21390         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
21391         been made.
21392
21393 2003-08-11  Paul Eggert  <eggert@twinsun.com>
21394
21395         * modules/gnu-source, m4/gnu-source.m4:
21396         Remove; we're assuming Autoconf 2.54 or later now.
21397         Suggested by Bruno Haible.
21398         * MODULES.html.sh (func_all_modules): Remove gnu-source.
21399
21400 2003-08-11  Bruno Haible  <bruno@clisp.org>
21401
21402         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
21403
21404 2003-08-11  Bruno Haible  <bruno@clisp.org>
21405
21406         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
21407         (vasnprintf): Use it instead of wcslen.
21408
21409 2003-08-11  Bruno Haible  <bruno@clisp.org>
21410
21411         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
21412         value to ensure that _Bool promotes to int. Use #define for _Bool when
21413         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
21414
21415 2003-08-10  Karl Berry  <karl@gnu.org>
21416
21417         * lib/regex.h: update from libc (whitespace fix).
21418
21419 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21420
21421         Merge some files from coreutils.  These changes were
21422         originally made by Jim Meyering.
21423         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
21424         many older Unixes require this.
21425         * lib/alloca.c (alloca): Remove cast to argument of free;
21426         no longer needed in C89.
21427         * lib/alloca_.h, regex.h: Fix white space to match
21428         what GNU indent does.
21429
21430 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21431
21432         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
21433         apparently Emacs's Unicode mode got confused before my 2003-08-05
21434         checkin.
21435
21436 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21437
21438         * m4/extensions.m4: New file.
21439         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
21440         Require gl_USE_SYSTEM_EXTENSIONS.
21441         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
21442         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
21443
21444 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21445
21446         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
21447         * modules/extensions, modules/gnu-source: New files.
21448         * modules/timespec, modules/unlocked-io: Depend on extensions.
21449
21450 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21451
21452         * modules/restrict: New file.
21453         * MODULES.html.sh (func_all_modules): Add restrict.
21454         * modules/regex: Depend on restrict.
21455
21456 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21457
21458         * m4/restrict.m4: New file.
21459         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
21460
21461 2003-08-07  Bruno Haible  <bruno@clisp.org>
21462
21463         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
21464         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
21465
21466 2003-08-07  Bruno Haible  <bruno@clisp.org>
21467
21468         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
21469         makes the module 'getndelim2' compatible with the module 'getline'.
21470
21471 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21472
21473         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
21474         byte with "\201" to avoid glitches when editing that source file
21475         with multi-gnome-terminal.
21476
21477 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21478
21479         * lib/bumpalloc.h: Remove.
21480
21481 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21482
21483         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
21484         * modules/bumpalloc: Remove.
21485
21486 2003-08-04  Paul Eggert  <eggert@twinsun.com>
21487
21488         * lib/getloadavg.c: Change copyright notice and spacing to conform to
21489         GNU coding style.
21490
21491         Merge from coreutils.
21492         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
21493         1. From glibc.
21494         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
21495         from Karl Berry, implemented by Jim Meyering.
21496         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
21497         from Dmitry V. Levin.
21498         Remove anachronistic cast of xrealloc.
21499         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
21500         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
21501         type. Otherwise, it wouldn't compile with at least /bin/cc on
21502         ymp-cray-unicos9.0.2.X.
21503         Combine two mostly-identical uses of alloca into one.
21504         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
21505
21506 2003-08-04  Dave Love  <d.love@dl.ac.uk>
21507
21508         [From Emacs.]
21509
21510         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
21511         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
21512         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
21513         obsolete NLIST_NAME_UNION.
21514         [__GNU__]: Undef BSD and FSCALE.
21515         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
21516
21517 2003-08-03  Paul Eggert  <eggert@twinsun.com>
21518
21519         * lib/stdbool_.h (_Bool): Make it signed char, instead of
21520         an enum type, so that it's guaranteed to promote to int.  See:
21521         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
21522
21523 2003-08-03  Karl Berry  <karl@gnu.org>
21524
21525         * config/depcomp: update from automake.
21526
21527 2003-07-31  Paul Eggert  <eggert@twinsun.com>
21528
21529         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
21530         (strerror): Don't assume that a printable int fits in 14 bytes.
21531
21532 2003-07-31  Bruno Haible  <bruno@clisp.org>
21533
21534         * modules/getpass-gnu: New file.
21535         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
21536
21537 2003-07-31  Bruno Haible  <bruno@clisp.org>
21538
21539         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
21540
21541 2003-07-24  Karl Berry  <karl@gnu.org>
21542
21543         * config/missing: update from automake.
21544
21545 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
21546             Bruno Haible  <bruno@clisp.org>
21547
21548         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
21549         * lib/getline.c (getline, getdelim): Likewise.
21550         Remove _GNU_SOURCE define; now it's defined in config.h through
21551         m4/getline.m4.
21552
21553 2003-07-23  Karl Berry  <karl@gnu.org>
21554
21555         * config/config.sub: update from prep.
21556
21557 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21558
21559         * modules/xalloc (Depends-on): Add exitfail.
21560         * modules/xmemcoll: Likewise.
21561
21562 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21563
21564         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
21565         over-parenthesization in macros.
21566
21567         Sync with coreutils.
21568
21569         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
21570         required by C99.
21571
21572         Use `exit_failure' for xalloc and xmemcoll instead of their own
21573         private exit-failure variables.
21574         * lib/xalloc.h (xalloc_exit_failure): Remove.
21575         * lib/xmalloc.c: Likewise.  Include exitfail.h.
21576         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
21577         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
21578         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
21579         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
21580
21581 2003-07-20  Jim Meyering  <jim@meyering.net>
21582
21583         * modules/closeout (Depends-on): Add exitfail.
21584         Suggestion from Bruno Haible.
21585
21586 2003-07-19  Karl Berry  <karl@gnu.org>
21587
21588         * config/config.sub: update from prep.
21589
21590 2003-07-18  Paul Eggert  <eggert@twinsun.com>
21591
21592         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
21593         Remove.
21594         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
21595         to test that it can stand by itself.  Include "exitfail.h".
21596         Clients should set exit_failure instead.
21597         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
21598
21599 2003-07-18  Bruno Haible  <bruno@clisp.org>
21600
21601         * modules/getndelim2: New file.
21602         * modules/getline: Share files with module getndelim2.
21603         * modules/getnline: Depend on getndelim2 instead of sharing files with
21604         it. Add getnline.c to lib_SOURCES.
21605         * MODULES.html.sh (func_all_modules): Add getndelim2.
21606
21607 2003-07-18  Bruno Haible  <bruno@clisp.org>
21608
21609         * m4/getndelim2.m4: New file.
21610         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
21611         invoke gl_PREREQ_GETNDELIM2.
21612         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
21613         gl_PREREQ_GETNDELIM2.
21614         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
21615         gl_GETNDELIM2.
21616
21617 2003-07-18  Bruno Haible  <bruno@clisp.org>
21618
21619         * lib/getndelim2.h: New file.
21620         * lib/getndelim2.c: Make into a module of its own. Include config.h,
21621         getndelim2.h.
21622         (getndelim2): Make non-static. Change return type to ssize_t.
21623         * lib/getline.h: Change argument names.
21624         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
21625         * lib/getnline.c: Include getndelim2.h.
21626
21627 2003-07-18  Andreas Schwab  <schwab@suse.de>
21628
21629         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
21630
21631 2003-07-17  Karl Berry  <karl@gnu.org>
21632
21633         * config/config.sub: update from prep.
21634
21635 2003-07-17  Bruno Haible  <bruno@clisp.org>
21636
21637         * modules/getnline: New file.
21638         * modules/getline: Add lib/getndelim2.c to source file list.
21639         * MODULES.html.sh (func_all_modules): Add getnline.
21640
21641 2003-07-17  Bruno Haible  <bruno@clisp.org>
21642
21643         * m4/getnline.m4: New file.
21644
21645 2003-07-17  Bruno Haible  <bruno@clisp.org>
21646
21647         * m4/Makefile.am.in: Remove file.
21648         * m4/Makefile.am: Remove file.
21649         * m4/Makefile.in: Remove file.
21650
21651 2003-07-17  Bruno Haible  <bruno@clisp.org>
21652
21653         * lib/getnline.h: New file.
21654         * lib/getnline.c: New file.
21655         * lib/getndelim2.c: New file, extracted from getline.c.
21656         (getndelim2): Renamed from getdelim2, with added nmax argument.
21657         * lib/getline.c: Include getndelim2.c.
21658         (getdelim2): Moved out to getndelim2.c.
21659         (getline, getdelim): Update.
21660
21661 2003-07-17  Bruno Haible  <bruno@clisp.org>
21662
21663         * lib/Makefile.am: Remove file.
21664         * lib/Makefile.in: Remove file.
21665
21666 2003-07-17  Bruno Haible  <bruno@clisp.org>
21667
21668         * configure.in: Remove file.
21669         * Makefile.in: Remove file.
21670
21671 2003-07-17  Bruno Haible  <bruno@clisp.org>
21672
21673         * MODULES.html.sh: Put the </BODY> right before </HTML>.
21674
21675 2003-07-16  Karl Berry  <karl@gnu.org>
21676
21677         * config/srclist-update: was running fixlicense twice, which caused
21678                 texinfo.tex to be nullified for some reason.  Simplify,
21679                 $gplsrc is no longer needed as far as I can see?
21680
21681 2003-07-16  Jim Meyering  <jim@meyering.net>
21682
21683         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
21684
21685 2003-07-15  Paul Eggert  <eggert@twinsun.com>
21686
21687         * config/srclist.txt: Get the following files from gettext-runtime/intl
21688         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
21689         ref-del.sin.  From Bruno Haible.
21690         * config/srclist-update (fixfile): Change grep pattern again, since the
21691         previous fix didn't work (there was another trailing $).  Use
21692         '[$]' to escape the $s.
21693
21694 2003-07-15  Karl Berry  <karl@gnu.org>
21695
21696         * lib/vasnprintf.c: update from gettext.
21697
21698 2003-07-15  Karl Berry  <karl@gnu.org>
21699
21700         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
21701         gets expanded when surrounded by '$'.
21702
21703 2003-07-15  Jim Meyering  <jim@meyering.net>
21704
21705         * modules/save-cwd: Don't depend on error.  From Derek Price.
21706
21707 2003-07-15  Jim Meyering  <jim@meyering.net>
21708
21709         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
21710
21711 2003-07-14  Simon Josefsson  <jas@extundo.com>
21712
21713         * modules/mempcpy: New file.
21714         * MODULES.html.sh (func_all_modules): Add mempcpy.
21715
21716 2003-07-14  Simon Josefsson  <jas@extundo.com>
21717
21718         * m4/mempcpy.m4: New file.
21719
21720 2003-07-14  Simon Josefsson  <jas@extundo.com>
21721
21722         * lib/mempcpy.h: New file.
21723         * lib/mempcpy.c: New file.
21724
21725 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21726
21727         * modules/getdate, modules/posixtm: Depend on mktime.
21728
21729 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21730
21731         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
21732         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
21733         unicodeio.c, unicodeio.h, unlocked-io.h:
21734         Switch from LGPL to GPL.
21735
21736 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21737
21738         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
21739         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
21740         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
21741         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
21742         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
21743         updated automatically by ../config/srclist-update.  This changes
21744         their license from LPGL to GPL.
21745
21746 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21747
21748         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
21749         assumed to refer to the root of the most recent stable gettext version.
21750         * config/srclistvars.sh: Add defaults for eggert.
21751         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
21752         Match "This program" as well as "The program".  This is needed
21753         for gettext.
21754
21755 2003-07-14  Jim Meyering  <jim@meyering.net>
21756
21757         Don't emit diagnostics.  Let callers do that.
21758         * lib/save-cwd.c: Don't include "error.h".
21759         (save_cwd): Don't call error.  Ensure that errno is valid
21760         when returning nonzero.
21761
21762         * lib/save-cwd.h (restore_cwd): Update prototype.
21763         * lib/save-cwd.c (restore_cwd): Remove two parameters.
21764         Simplify.  Don't call error upon failure.  Let callers do that.
21765         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
21766         when auditing is enabled.  But don't bother updating the #if.
21767
21768 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
21769
21770         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
21771         it breaks C++ compilation.
21772         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
21773
21774 2003-07-10  Simon Josefsson  <jas@extundo.com>
21775
21776         * modules/strchrnul (Makefile.am): Add strchrnul.h.
21777
21778 2003-07-10  Jim Meyering  <jim@meyering.net>
21779
21780         * m4/clock_time.m4: Remove trailing blank.
21781         * m4/intmax_t.m4: Likewise.
21782
21783 2003-07-10  Jim Meyering  <jim@meyering.net>
21784
21785         * lib/vasnprintf.c: Remove trailing blanks.
21786         Make cpp indentation consistent.
21787
21788 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21789
21790         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
21791         posixver.c, strftime.c, strnlen.c, strverscmp.c:
21792         Switch from LGPL to GPL.
21793
21794 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21795
21796         * config/srclist.txt: Sort sublists.  Add
21797         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
21798         that differ from gnulib for one reason or another; we'd like this list
21799         to be smaller but for now let's document what we have.
21800
21801 2003-07-08  Paul Eggert  <eggert@twinsun.com>
21802
21803         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
21804         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
21805         and sweeter "eval x=$x".
21806         * config/srclist.txt: Get lib/argp* from glibc.
21807
21808 2003-07-07  Paul Eggert  <eggert@twinsun.com>
21809
21810         * lib/mktime.c: Fix some boundary cases and remove need for floating
21811         point.
21812
21813         Issue a compile-time diagnostic if time_t is floating point, or if
21814         two's complement arithmetic is not in effect, or if arithmetic
21815         right shift does not propagate the sign.  These assumptions were
21816         all in the original code but they weren't checked.
21817
21818         (TIME_T_MIDPOINT, verify): New macros.
21819         (__isleap): Remove; it has integer overflow problems.
21820         (leapyear): New function, without those problems.
21821         (ydhms_tm_diff): Remove; splitting into two parts.
21822         (ydhms_diff): New function, containing the arithmetic part of
21823         the old ydhms_tm_diff function.  Issue a compile-time
21824         diagnostic if we are not using C99 integer division.
21825         Avoid casts when possible.
21826         (guess_time_tm): New function, containing the checking part of
21827         the old ydhms_tm_diff function.  Return the new value, rather than
21828         the difference between it and the old.  Accept a new argument T
21829         so that *T specifies the old value.  Check for overflow in the result.
21830
21831         (__mktime_internal): Use a time_t offset, not a long int offset.
21832         This undoes the 2003-06-04 change, which is no longer needed now
21833         that we have better overflow checking.
21834         (localtime_offset): Likewise.
21835
21836         (__mktime_internal): Avoid harmful overflow on hosts where time_t
21837         and long are 64-bit but int is only 32-bit.
21838         (ydhms_diff): Use long int to store year1 and yday1.
21839         Issue a compile-time diagnostic if long int is not wide enough.
21840
21841         (__mktime_internal): Use long int to store adjusted year and yday.
21842         Use plain C rather than preprocessor commands, if that doesn't
21843         affect efficiency.
21844         Check for overflow (and try to repair) after each probe
21845         rather than checking only at the very end.  This avoids some bugs
21846         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
21847         does not equal GMT offset at maximum time).
21848         Use integer to check for overflow rather than floating point; this
21849         is more portable to non-IEEE hosts, and is a tad faster.
21850         When we detect that we are oscillating between two values,
21851         don't check whether tm_isdst has the requested value, since
21852         we already know the answer.  When tm_isdst has the wrong value,
21853         use a different heuristic to find the right one, based on the
21854         extreme values actually observed in practice in tz2003a,
21855         rather than the (overly optimistic) "previous 3 calendar quarters".
21856
21857         (not_equal_tm, print_tm, check_result): Use "const T" rather than
21858         "T const" to accommodate glibc style.
21859         (check_result): Use less-confusing report format.  "long" -> "long int.
21860         (main): Likewise.
21861         Don't loop if the iteration overflows time_t.
21862         Allow a negative step in the iteration.
21863
21864 2003-07-06  Karl Berry  <karl@gnu.org>
21865
21866         * config/depcomp: update from automake.
21867         * config/config.sub: update from prep.
21868
21869 2003-07-03  Karl Berry  <karl@gnu.org>
21870
21871         * config/config.guess: update from prep.
21872
21873 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21874
21875         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
21876         xreadlink.c now includes it unconditionally.
21877
21878 2003-07-01  Paul Eggert  <eggert@twinsun.com>
21879
21880         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
21881         having it depend on HAVE_SYS_TYPES_H.
21882
21883 2003-07-01  Bruno Haible  <bruno@clisp.org>
21884
21885         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
21886         <sys/types.h> should be sufficient.
21887         Reported by Paul Eggert.
21888
21889 2003-06-26  Karl Berry  <karl@gnu.org>
21890
21891         * config/depcomp: update from automake.
21892
21893 2003-06-26  Bruno Haible  <bruno@clisp.org>
21894
21895         * modules/human: Depend on module stdbool.
21896
21897 2003-06-25  Bruno Haible  <bruno@clisp.org>
21898
21899         * modules/readlink: New file.
21900         * modules/xreadlink: Depend on it.
21901         * MODULES.html.sh (func_all_modules): Add readlink.
21902
21903 2003-06-25  Bruno Haible  <bruno@clisp.org>
21904
21905         * m4/readlink.m4: New file.
21906
21907 2003-06-25  Bruno Haible  <bruno@clisp.org>
21908
21909         * lib/readlink.c: New file.
21910
21911 2003-06-22  Karl Berry  <karl@gnu.org>
21912
21913         * config/srclist.txt: update mkinstalldirs from automake.
21914         * config/mkinstalldirs: update.
21915
21916 2003-06-22  Bruno Haible  <bruno@clisp.org>
21917
21918         Portability to mingw32.
21919         * m4/ssize_t.m4: New file, from GNU gettext.
21920         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
21921         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
21922
21923 2003-06-22  Bruno Haible  <bruno@clisp.org>
21924
21925         * modules/safe-read: Add m4/ssize_t.m4.
21926         * modules/xreadlink: Add m4/ssize_t.m4.
21927
21928 2003-06-20  Bruno Haible  <bruno@clisp.org>
21929
21930         Assume C89, so PARAMS isn't needed.
21931         * lib/unicodeio.h (PARAMS): Remove.
21932         * lib/unicodeio.c: Don't use PARAMS.
21933
21934 2003-06-18  Karl Berry  <karl@gnu.org>
21935
21936         * config/config.{guess,sub}: update from prep.
21937
21938 2003-06-18  Jim Meyering  <jim@meyering.net>
21939
21940         Merge changes from coreutils.
21941         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
21942         Remove explicit declarations of xmalloc and realloc.
21943         Include xalloc.h.
21944         (read_utmp): Remove anachronistic cast of xmalloc.
21945
21946 2003-06-17  Paul Eggert  <eggert@twinsun.com>
21947
21948         Assume C89, so PARAMS isn't needed.
21949         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
21950         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
21951         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
21952         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
21953         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
21954         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
21955         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
21956         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
21957         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
21958         lib/xstrtod.h, lib/xstrtol.h: Likewise.
21959         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
21960         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
21961         no longer needed. Anyway, config.h should always be included before any
21962         other file.
21963
21964 2003-06-11  Simon Josefsson  <jas@extundo.com>
21965
21966         * modules/sysexits: New file.
21967         * MODULES.html.sh (func_all_modules): Add sysexits.
21968
21969 2003-06-11  Simon Josefsson  <jas@extundo.com>
21970
21971         * lib/sysexit_.h: New file.
21972
21973 2003-06-11  Derek Price  <derek@ximbiot.com>
21974
21975         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
21976         necessary.
21977
21978 2003-06-11  Bruno Haible  <bruno@clisp.org>
21979
21980         * m4/sysexits.m4: New file.
21981
21982 2003-06-10  Simon Josefsson  <jas@extundo.com>
21983
21984         * lib/argp.h: New file, from glibc.
21985         * lib/argp-ba.c: New file, from glibc.
21986         * lib/argp-eexst.c: New file, from glibc.
21987         * lib/argp-fmtstream.c: New file, from glibc.
21988         * lib/argp-fmtstream.h: New file, from glibc.
21989         * lib/argp-fs-xinl.c: New file, from glibc.
21990         * lib/argp-help.c: New file, from glibc.
21991         * lib/argp-namefrob.h: New file, from glibc.
21992         * lib/argp-parse.c: New file, from glibc.
21993         * lib/argp-pv.c: New file, from glibc.
21994         * lib/argp-pvh.c: New file, from glibc.
21995         * lib/argp-xinl.c: New file, from glibc.
21996
21997 2003-06-10  Simon Josefsson  <jas@extundo.com>
21998
21999         * modules/strchrnul: New file.
22000
22001 2003-06-10  Simon Josefsson  <jas@extundo.com>
22002
22003         * modules/argp: New file.
22004
22005 2003-06-10  Simon Josefsson  <jas@extundo.com>
22006
22007         * m4/strchrnul.m4: New file.
22008
22009 2003-06-10  Simon Josefsson  <jas@extundo.com>
22010
22011         * lib/strchrnul.h: New file.
22012         * lib/strchrnul.c: New file.
22013
22014 2003-06-10  Bruno Haible  <bruno@clisp.org>
22015
22016         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
22017
22018 2003-06-07  Karl Berry  <karl@gnu.org>
22019
22020         * config/config.{guess,sub}: update from prep.
22021
22022 2003-06-07  Jim Meyering  <jim@meyering.net>
22023
22024         * modules/strtod: Use $(...) notation, not @...@ for
22025         AC_REPLACE'd variables.
22026         * modules/localcharset: Likewise.
22027
22028 2003-06-07  Jim Meyering  <jim@meyering.net>
22029
22030         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
22031         in place of my name in the copyright comment.
22032         Remove definition and uses of __P.
22033
22034         From coreutils.
22035         * lib/stat.c: Don't declare xmalloc explicitly.
22036         Instead, include "xalloc.h".
22037         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
22038         xrealloc, and xcalloc return values.
22039         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
22040         Improve comment.
22041         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
22042
22043 2003-06-07  Bruno Haible  <bruno@clisp.org>
22044
22045         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
22046         avoid AC_CONFIG_LINKS.
22047         * modules/fnmatch (Makefile.am): Use explicit creation rule for
22048         fnmatch.h, to avoid AC_CONFIG_LINKS.
22049         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
22050
22051 2003-06-07  Bruno Haible  <bruno@clisp.org>
22052
22053         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
22054         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
22055         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22056         directory.
22057         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
22058         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22059         directory.
22060
22061 2003-06-06  Jim Meyering  <jim@meyering.net>
22062
22063         Merge from coreutils.
22064         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
22065         Consolidate declarations and initializations of *_base* locals.
22066
22067         Merge from coreutils.
22068         This avoids a core dump on systems without GNU putenv,
22069         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
22070         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
22071         (unsetenv): New static function, from GNU libc.
22072         (rpl_putenv): Use it.
22073
22074         * lib/modechange.c: Remove trailing blanks.
22075
22076         Merge from coreutils.
22077         * lib/fsusage.c: Remove declaration of statfs.
22078         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
22079
22080         * lib/posixtm.c: Include <stdbool.h> unconditionally.
22081
22082 2003-06-06  Jim Meyering  <jim@meyering.net>
22083
22084         * lib/stdbool_.h: Renamed from stdbool.h.in.
22085
22086 2003-06-06  Jim Meyering  <jim@meyering.net>
22087             Bruno Haible  <bruno@clisp.org>
22088
22089         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
22090         Adjust Makefile.am snippet not to redirect directly to target.
22091         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
22092
22093 2003-06-05  Paul Eggert  <eggert@twinsun.com>
22094
22095         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
22096         mismatch, look in future quarters as well as past.  This fixes a
22097         bug when processing fall-backwards gaps immediately after a long
22098         period of daylight-saving time.
22099
22100         * lib/mktime.c: Assume freestanding C89 or better.
22101         (HAVE_LIMITS_H): Remove.  Assume it's 1.
22102         (__P): Remove; not used.
22103         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
22104         (mktime, not_equal_tm, print_tm, check_result,
22105         main): Use prototypes.  Use const * where appropriate.
22106         (main): Fix typo in testing code that uncovered by above changes.
22107         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
22108
22109 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22110
22111         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
22112         locale.h, localeconv.  This merges changes from coreutils.
22113
22114         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
22115         It can be removed after the next Autoconf is released.
22116         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
22117         needed.
22118
22119 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22120
22121         * lib/mktime.c: Fix Debian bug 177940
22122         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
22123         (localtime_offset): Now long int, not time_t, because we want it
22124         to be guaranteed to be signed.  All uses changed.
22125         (__mktime_internal): If overflow would occur when adding offset,
22126         don't add it.
22127
22128         Merge 'human' changes from coreutils.  Rewrite to support
22129         locale-specific notations like thousands separators.
22130         * lib/human.c: Simplify authorship notice.
22131         Include human.h immediately after config.h.
22132         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
22133         <limits.h>: Do not include, since human.h does.
22134         (SIZE_MAX, UINTMAX_MAX): New macros.
22135         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
22136         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
22137         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
22138         (power_letter): Renamed from suffixes.
22139         (generate_suffix_backwards): Remove.
22140         (adjust_value): Now takes int style (because of human.h changes)
22141         and long double value (for greater precision on some platforms).
22142         (group_number): New function.
22143         (human_readable): Use it.  Use integer options, not enum.
22144         Put the options before the sizes in the arg list.
22145         Support all the new options.
22146         The old human_readable function has been removed;
22147         use inttostr.h instead.
22148         (human_readable, default_block_size, humblock):
22149         Use uintmax_t, not int, for block sizes.
22150         (human_readable_inexact, block_size_types): Remove.
22151         (block_size_opts): New constant.
22152         (human_options): Renamed from human_block_size, with new signature
22153         that allows block sizes up to UINTMAX_MAX.  All callers changed.
22154         * lib/human.h: Add copyright and authorship notice.
22155         Include <limits.h> and <stdbool.h> unconditionally.
22156         (PARAMS): Remove.  All uses removed.
22157         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
22158         (enum human_inexact_style): Remove tag; now a nameless enum.
22159         (human_floor, human_ceiling, human_round_to_even): Now have
22160         values 2, 0, 1 rather than -1, 1, 0.
22161         (human_group_digits, human_suppress_point_zero, human_autoscale,
22162         human_base_1024, human_SI, human_B): New constants.
22163         (human_readable_inexact, human_block_size): Remove.
22164         (human_readable): Size args are now uintmax_t, not int.
22165         (human_options): New decl.
22166
22167         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
22168         unnecessary now that we assume C89 or better.  This change
22169         imported from coreutils.
22170
22171         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22172         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
22173         in the 2003-05-30 sync from glibc.
22174
22175         .h files should stand alone, but we shouldn't include <sys/types.h>
22176         if we can get away with just <stddef.h>.
22177
22178         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
22179         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
22180         rather than <sys/types.h>, as we merely need size_t.
22181         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
22182         to get size_t.
22183         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
22184         Include <stdio.h>, to get FILE.
22185         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
22186         memcasecmp.h has included <stddef.h> and all we need is size_t.
22187         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
22188         our interface, instead of including <sys/types.h>
22189
22190 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22191
22192         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
22193         now, as glibc mktime is buggy on non-glibc systems.
22194
22195 2003-06-03  Karl Berry  <karl@gnu.org>
22196
22197         * config/config.sub: update from prep.
22198
22199 2003-06-02  Paul Eggert  <eggert@twinsun.com>
22200
22201         [from coreutils]
22202         Fix some minor time-related bugs with POSIX time arguments.
22203         Some valid time stamps were being rejected (notably -1, and
22204         time stamps before 1900 on 64-bit hosts).  And some invalid
22205         time stamps were being accepted, e.g. September 31.
22206
22207         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
22208         that we can return (time_t) -1 successfully.
22209         * lib/posixtm.c: Likewise.
22210         [HAVE_STDBOOL_H]: Include <stdbool.h>.
22211         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
22212         (t): Remove static var.
22213         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
22214         of static var.  All uses changed.
22215         (year): Do not reject years before 1900; they can occur with
22216         64-bit time_t.
22217         (posix_time_parse): Do not check for out-of-range components;
22218         that is now the caller's responsibility, since our checks were
22219         only approximations.
22220         (posixtime): Use mktime to check for out-of-range components,
22221         since it knows them exactly.
22222         If mktime returns (time_t) -1, check whether an error actually occurred
22223         by invoking localtime on -1.
22224         (main) [TEST_POSIXTIME]: Check for input data errors, and report
22225         posixtime failures better.
22226         Improve the test data (in comments only).
22227
22228 2003-06-02  Karl Berry  <karl@gnu.org>
22229
22230         * config/mkinstalldirs (version): new variable.
22231         (--version): new option.
22232         (usage): improve message.
22233
22234 2003-05-30  Karl Berry  <karl@gnu.org>
22235
22236         * lib/mktime.c: update from libc.
22237
22238 2003-05-30  Bruno Haible  <bruno@clisp.org>
22239
22240         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
22241         * config/config.rpath: Upgrade to gettext-0.12.1.
22242
22243 2003-05-30  Bruno Haible  <bruno@clisp.org>
22244
22245         * m4/gettext.m4: Upgrade to gettext-0.12.1.
22246         * m4/nls.m4: New file, from gettext-0.12.1.
22247         * m4/po.m4: New file, from gettext-0.12.1.
22248         * m4/progtest.m4: Upgrade to gettext-0.12.1.
22249
22250 2003-05-30  Bruno Haible  <bruno@clisp.org>
22251
22252         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
22253         * lib/localcharset.h: Likewise.
22254         * lib/localcharset.c: Likewise.
22255
22256 2003-05-29  Karl Berry  <karl@gnu.org>
22257
22258         * config/config.rpath: update from gettext.
22259
22260 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22261
22262         Assume the headers required for C89 freestanding compilers.
22263         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
22264         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
22265         * m4/human.m4 (gl_HUMAN): Likewise.
22266         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
22267         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
22268         * m4/userspec.m4 (gl_USERSPEC): Likewise.
22269         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
22270         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
22271         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
22272
22273 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22274
22275         Assume the headers required for C89 freestanding compilers.
22276         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
22277         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
22278         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
22279         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
22280         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
22281         define, since <limits.h> is guaranteed to do that.
22282         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
22283         * lib/exclude.c: Include <stdbool.h> unconditionally.
22284         * lib/tempname.c: Include <stddef.h> unconditionally.
22285         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
22286         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
22287         <stddef.h> does that.
22288         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
22289         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
22290         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
22291         needed.
22292         * lib/xstrtol.c: Likewise.
22293         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
22294         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
22295
22296         * lib/addext.c (addext): Use assignment rather than cast, to avoid
22297         warnings on some platforms.
22298
22299         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22300         arbitrarily.
22301
22302 2003-05-26  Jim Meyering  <jim@meyering.net>
22303
22304         Merge in a change from coreutils:
22305         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
22306         that is guaranteed to be `no'.  Use `no_such_member' to indicate
22307         that condition, rather than `-1' which is slightly misleading.
22308         Change the name of the cache variable to have the gl_ prefix.
22309         Prompted by a patch from Richard Dawe for DJGPP.
22310
22311 2003-05-24  Karl Berry  <karl@gnu.org>
22312
22313         * config/config.guess: update from prep.
22314
22315 2003-05-22  Karl Berry  <karl@gnu.org>
22316
22317         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
22318
22319 2003-05-20  Karl Berry  <karl@gnu.org>
22320
22321         * config/config.guess: update from prep.
22322
22323 2003-05-18  Karl Berry  <karl@gnu.org>
22324
22325         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
22326         might actually be set by the user.
22327
22328         * config/depcomp, install-sh, mdate-sh: update from automake.
22329
22330 2003-05-17  Bruno Haible  <bruno@clisp.org>
22331
22332         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
22333         invalid expansion for AC_EGREP_CPP.
22334         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
22335         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
22336         Suggested by Akim Demaille <akim@epita.fr> in
22337         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
22338
22339 2003-05-12  Jim Meyering  <jim@meyering.net>
22340
22341         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
22342         the space-padded-by-default conversion specifiers, %e, %k, %l.
22343
22344 2003-05-12  Bruno Haible  <bruno@clisp.org>
22345
22346         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
22347         the string is longer than 4 KB.
22348
22349 2003-05-11  Karl Berry  <karl@gnu.org>
22350
22351         * config/config.{guess,sub}: update from prep.
22352
22353 2003-05-09  Bruno Haible  <bruno@clisp.org>
22354
22355         * modules/error: Add m4/strerror_r.m4 to file list.
22356
22357 2003-05-03  Bruno Haible  <bruno@clisp.org>
22358
22359         Upgrade to Unicode-4.0.
22360         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
22361         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
22362         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
22363         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
22364         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
22365         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
22366         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
22367         Change width of U+E0100..U+E01EF from 1 to 0.
22368
22369 2003-04-25  Jim Meyering  <jim@meyering.net>
22370
22371         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
22372         of type size_t, not int.
22373
22374 2003-04-25  Bruno Haible  <bruno@clisp.org>
22375
22376         * lib/copy-file.c: Include <stddef.h>, for size_t.
22377
22378 2003-04-21  Paul Eggert  <eggert@twinsun.com>
22379
22380         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
22381         code which expansion is under static control.  Patch imported from
22382         Akim Demaille's patch to Bison; see
22383         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
22384
22385 2003-04-14  Bruno Haible  <bruno@clisp.org>
22386
22387         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
22388
22389 2003-04-11  Jim Meyering  <jim@meyering.net>
22390
22391         Merge changes from Coreutils.
22392
22393         2003-03-22  Jim Meyering  <jim@meyering.net>
22394
22395         * lib/strftime.c (widen): Cast alloca return value to proper type.
22396
22397         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
22398
22399         From GNU libc.
22400         * lib/strftime.c (my_strftime): Handle very large width
22401         specifications for numeric values correctly.  Improve checks for
22402         overflow.
22403
22404         2003-01-19  Jim Meyering  <jim@meyering.net>
22405
22406         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
22407         definitions.
22408         (nl_get_alt_digit) [! defined my_strftime]: Define.
22409         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
22410         _nl_get_alt_digit and _nl_get_walt_digit.
22411
22412         * lib/strftime.c (my_strftime): Merge in locale-related changes from
22413         libc. These changes have no effect outside of _LIBC.
22414
22415 2003-04-10  Bruno Haible  <bruno@clisp.org>
22416
22417         * modules/findprog: New file.
22418         * MODULES.html.sh (func_all_modules): Add it.
22419
22420 2003-04-10  Bruno Haible  <bruno@clisp.org>
22421
22422         * m4/findprog.m4: New file.
22423         * m4/eaccess.m4: New file.
22424
22425 2003-04-10  Bruno Haible  <bruno@clisp.org>
22426
22427         * lib/findprog.h: New file, from GNU gettext.
22428         * lib/findprog.c: New file, from GNU gettext.
22429
22430 2003-04-05  Jim Meyering  <jim@meyering.net>
22431
22432         Merge changes from Coreutils.
22433
22434         * lib/exclude.h (PARAMS): Remove definition and uses.
22435         * lib/exclude.c: Remove uses of `PARAMS'.
22436
22437         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
22438         Add test-cases for DOS filenames. Declare program_name.
22439         (main): Set up program_name.  Patch by Rich Dawe.
22440
22441         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22442         error from mntctl.
22443         Use mntctl's return value to drive the entry-processing loop, since
22444         we can't rely on the value of the vmt_length member in the last
22445         entry.  On some systems doing so could result in exhausting
22446         virtual memory.  Based in part on a patch from Mike Jetzer.
22447
22448 2003-04-04  Bruno Haible  <bruno@clisp.org>
22449
22450         * modules/linebreak: New file.
22451         * MODULES.html.sh (func_all_modules): Add it.
22452
22453 2003-04-04  Bruno Haible  <bruno@clisp.org>
22454
22455         * m4/linebreak.m4: New file.
22456
22457 2003-04-04  Bruno Haible  <bruno@clisp.org>
22458
22459         * lib/linebreak.h: New file, from GNU gettext.
22460         * lib/linebreak.c: New file, from GNU gettext with slight
22461         modifications.
22462         * lib/lbrkprop.h: New file, from GNU gettext.
22463
22464 2003-04-03  Bruno Haible  <bruno@clisp.org>
22465
22466         * modules/utf8-ucs4: New file.
22467         * modules/utf16-ucs4: New file.
22468         * modules/ucs4-utf8: New file.
22469         * modules/ucs4-utf16: New file.
22470         * MODULES.html.sh (func_all_modules): Add them.
22471
22472 2003-04-03  Bruno Haible  <bruno@clisp.org>
22473
22474         * m4/utf-ucs4.m4: New file.
22475         * m4/ucs4-utf.m4: New file.
22476
22477 2003-04-03  Bruno Haible  <bruno@clisp.org>
22478
22479         * lib/utf8-ucs4.h: New file, from GNU gettext.
22480         * lib/utf16-ucs4.h: New file, from GNU gettext.
22481         * lib/ucs4-utf8.h: New file, from GNU gettext.
22482         * lib/ucs4-utf16.h: New file, from GNU gettext.
22483
22484 2003-04-02  Bruno Haible  <bruno@clisp.org>
22485
22486         * modules/binary-io: New file.
22487         * MODULES.html.sh (func_all_modules): Add it.
22488
22489 2003-04-02  Bruno Haible  <bruno@clisp.org>
22490
22491         * lib/binary-io.h: New file, from GNU gettext.
22492
22493 2003-04-01  Bruno Haible  <bruno@clisp.org>
22494
22495         * modules/pathname: New file.
22496         * MODULES.html.sh (func_all_modules): Add it.
22497
22498 2003-04-01  Bruno Haible  <bruno@clisp.org>
22499
22500         * lib/pathname.h: New file, from GNU gettext.
22501         * lib/concatpath.c: New file, from GNU gettext.
22502
22503 2003-03-30  Bruno Haible  <bruno@clisp.org>
22504
22505         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
22506
22507 2003-03-30  Bruno Haible  <bruno@clisp.org>
22508
22509         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
22510         function chown() doesn't exist.
22511
22512 2003-03-28  Bruno Haible  <bruno@clisp.org>
22513
22514         * modules/copy-file: New file.
22515         * MODULES.html.sh (func_all_modules): Add it.
22516
22517 2003-03-28  Bruno Haible  <bruno@clisp.org>
22518
22519         * m4/copy-file.m4: New file.
22520
22521 2003-03-28  Bruno Haible  <bruno@clisp.org>
22522
22523         * lib/copy-file.h: New file, from GNU gettext.
22524         * lib/copy-file.c: New file, from GNU gettext.
22525
22526 2003-03-18  Jim Meyering  <jim@meyering.net>
22527
22528         * lib/quote.c (quote_n): Fix typo in comment.
22529
22530 2003-03-18  Bruno Haible  <bruno@clisp.org>
22531
22532         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
22533         checking.
22534         * m4/onceonly_2_57.m4: Likewise.
22535
22536 2003-03-17  Bruno Haible  <bruno@clisp.org>
22537
22538         * m4/onceonly.m4: Require autoconf 2.54 or newer.
22539         (m4_quote): Remove macro.
22540         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
22541
22542 2003-03-14  Jim Meyering  <jim@meyering.net>
22543
22544         Merge changes from Coreutils.
22545         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
22546         to be const, in order to avoid warnings.
22547         (obstack_room): Likewise.
22548         (obstack_empty_p): Likewise.
22549
22550 2003-03-14  Bruno Haible  <bruno@clisp.org>
22551
22552         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
22553         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
22554
22555 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22556
22557         Merge changes from Bison.
22558         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
22559         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
22560         when compiling Bison 1.875's `bitset bset = obstack_alloc
22561         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
22562         * lib/hash.c: Include <stdbool.h> unconditionally.
22563
22564 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22565
22566         * m4/onceonly.m4 (m4_quote): New macro.
22567         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
22568         Quote AC_FOREACH variable-expansions properly.
22569
22570 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22571
22572         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
22573
22574 2003-03-09  Paul Eggert  <eggert@twinsun.com>
22575
22576         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
22577         Reported by Bruce Becker; see:
22578         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
22579
22580 2003-03-03  Paul Eggert  <eggert@twinsun.com>
22581             Bruno Haible  <bruno@clisp.org>
22582
22583         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
22584         Reported by John Hughes, see
22585         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
22586
22587 2003-02-20  Bruno Haible  <bruno@clisp.org>
22588
22589         * MODULES.html.sh (func_all_modules): Add poll.
22590
22591 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22592
22593         * modules/poll: New file.
22594
22595 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22596
22597         * lib/poll_.h: New file.
22598         * lib/poll.c: New file.
22599
22600 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22601
22602         * m4/poll.m4: New file.
22603
22604 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22605
22606         * modules/mathl: New file.
22607
22608 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22609
22610         * lib/mathl.h: New file.
22611         * lib/acosl.c: New file.
22612         * lib/asinl.c: New file.
22613         * lib/atanl.c: New file.
22614         * lib/ceill.c: New file.
22615         * lib/cosl.c: New file.
22616         * lib/expl.c: New file.
22617         * lib/floorl.c: New file.
22618         * lib/frexpl.c: New file.
22619         * lib/ldexpl.c: New file.
22620         * lib/logl.c: New file.
22621         * lib/sincosl.c: New file.
22622         * lib/sinl.c: New file.
22623         * lib/sqrtl.c: New file.
22624         * lib/tanl.c: New file.
22625         * lib/trigl.c: New file.
22626         * lib/trigl.h: New file.
22627
22628 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22629
22630         * m4/mathl.m4: New file.
22631
22632 2003-02-18  Bruno Haible  <bruno@clisp.org>
22633
22634         * MODULES.html.sh (func_all_modules): Add mathl.
22635
22636 2003-02-17  Bruno Haible  <bruno@clisp.org>
22637
22638         * modules/mkdtemp: New module.
22639         * MODULES.html.sh (func_all_modules): Add it.
22640
22641 2003-02-17  Bruno Haible  <bruno@clisp.org>
22642
22643         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
22644
22645 2003-02-17  Bruno Haible  <bruno@clisp.org>
22646
22647         * lib/mkdtemp.h: New file, from GNU gettext.
22648         * lib/mkdtemp.c: New file, from GNU gettext.
22649
22650 2003-02-02  Jim Meyering  <jim@meyering.net>
22651
22652         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
22653         e.g. glibc-2.2.93.
22654
22655 2003-01-31  Bruno Haible  <bruno@clisp.org>
22656
22657         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
22658         'rpl_rename'.
22659         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
22660         'rpl_strnlen'.
22661         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
22662         'rpl_strtod'.
22663         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
22664         'rpl_utime'.
22665
22666 2003-01-31  Bruno Haible  <bruno@clisp.org>
22667
22668         * lib/rename.c: #undef rename before defining rpl_rename.
22669         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
22670
22671 2003-01-30  Bruno Haible  <bruno@clisp.org>
22672
22673         * modules/vasnprintf, modules/vasprintf: New modules.
22674         * MODULES.html.sh (func_all_modules): Add them.
22675
22676 2003-01-30  Bruno Haible  <bruno@clisp.org>
22677
22678         * m4/signed.m4: New file, from GNU gettext.
22679         * m4/longdouble.m4: New file, from GNU gettext.
22680         * m4/wchar_t.m4: New file, from GNU gettext.
22681         * m4/wint_t.m4: New file, from GNU gettext.
22682         * m4/vasnprintf.m4: New file.
22683         * m4/vasprintf.m4: New file.
22684
22685 2003-01-30  Bruno Haible  <bruno@clisp.org>
22686
22687         * lib/printf-args.h: New file, from GNU gettext.
22688         * lib/printf-args.c: New file, from GNU gettext.
22689         * lib/printf-parse.h: New file, from GNU gettext.
22690         * lib/printf-parse.c: New file, from GNU gettext.
22691         * lib/vasnprintf.h: New file, from GNU gettext.
22692         * lib/vasnprintf.c: New file, from GNU gettext.
22693         * lib/asnprintf.c: New file, from GNU gettext.
22694         * lib/vasprintf.h: New file, from GNU gettext with modifications.
22695         * lib/vasprintf.c: New file, from GNU gettext.
22696         * lib/asprintf.c: New file, from GNU gettext.
22697
22698 2003-01-29  Bruno Haible  <bruno@clisp.org>
22699
22700         * modules/stpncpy: New module.
22701         * MODULES.html.sh (func_all_modules): Add it.
22702
22703 2003-01-29  Bruno Haible  <bruno@clisp.org>
22704
22705         * m4/stpncpy.m4: New file.
22706
22707 2003-01-29  Bruno Haible  <bruno@clisp.org>
22708
22709         * lib/stpncpy.h: New file, from GNU gettext with modifications.
22710         * lib/stpncpy.c: New file, from GNU gettext with modifications.
22711
22712 2003-01-28  Bruno Haible  <bruno@clisp.org>
22713
22714         * modules/c-ctype: New module.
22715         * MODULES.html.sh (func_all_modules): Add it.
22716
22717 2003-01-28  Bruno Haible  <bruno@clisp.org>
22718
22719         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
22720         Paul Eggert.
22721         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
22722         Paul Eggert.
22723
22724 2003-01-27  Bruno Haible  <bruno@clisp.org>
22725
22726         * modules/xsetenv: New module.
22727         * MODULES.html.sh (func_all_modules): Add it.
22728
22729 2003-01-27  Bruno Haible  <bruno@clisp.org>
22730
22731         * lib/xsetenv.h: New file, from GNU gettext.
22732         * lib/xsetenv.c: New file, from GNU gettext.
22733
22734 2003-01-23  Jim Meyering  <jim@meyering.net>
22735
22736         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
22737         from working on systems without dirfd (at least Irix and OSF1/Tru64).
22738
22739 2003-01-23  Bruno Haible  <bruno@clisp.org>
22740
22741         * modules/minmax: New module.
22742         * MODULES.html.sh (func_all_modules): Add it.
22743
22744 2003-01-23  Bruno Haible  <bruno@clisp.org>
22745
22746         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
22747         Eggert.
22748
22749 2003-01-22  Bruno Haible  <bruno@clisp.org>
22750
22751         * modules/exit: New module.
22752         * MODULES.html.sh (func_all_modules): Add it.
22753
22754 2003-01-22  Bruno Haible  <bruno@clisp.org>
22755
22756         * lib/exit.h: New file, from GNU gettext.
22757
22758 2003-01-19  Bruno Haible  <bruno@clisp.org>
22759
22760         * gnulib-tool: Recognize option --extract-maintainer.
22761         (func_get_maintainer): New function.
22762         * modules/*: Add Maintainer entry.
22763
22764 2003-01-16  Jim Meyering  <jim@meyering.net>
22765
22766         * m4/regex.m4: The `regex' struct is both input and output.
22767         Initialize it before each use.  Patch by Tim Waugh.
22768
22769 2003-01-16  Bruno Haible  <bruno@clisp.org>
22770
22771         * MODULES.html.sh: Add a table of contents. Add the module name as
22772         leftmost column. Add hyperlinks.
22773
22774 2003-01-15  Bruno Haible  <bruno@clisp.org>
22775
22776         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
22777
22778 2003-01-15  Bruno Haible  <bruno@clisp.org>
22779
22780         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
22781         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
22782         suffix.
22783
22784 2003-01-15  Bruno Haible  <bruno@clisp.org>
22785
22786         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
22787
22788 2003-01-15  Bruno Haible  <bruno@clisp.org>
22789
22790         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
22791         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
22792
22793 2003-01-14  Jim Meyering  <jim@meyering.net>
22794
22795         * lib/same.c (same_name): Tweak a comment.
22796
22797 2003-01-14  Bruno Haible  <bruno@clisp.org>
22798
22799         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
22800         when a string comparison is sufficient.
22801
22802 2003-01-14  Bruno Haible  <bruno@clisp.org>
22803
22804         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
22805         'unsigned int'.
22806
22807 2003-01-14  Bruno Haible  <bruno@clisp.org>
22808
22809         * lib/hash-pjw.c: Add comment about low quality of this function.
22810
22811 2003-01-13  Bruno Haible  <bruno@clisp.org>
22812
22813         * modules/stpcpy: Distribute lib/stpcpy.h.
22814         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
22815
22816 2003-01-13  Bruno Haible  <bruno@clisp.org>
22817
22818         * modules/*: Add a description.
22819         * modules/strpbrk: Fix Makefile.am snippet.
22820         * modules/strtoimax: Fix dependencies.
22821         * modules/strtoumax: Likewise.
22822
22823 2003-01-13  Bruno Haible  <bruno@clisp.org>
22824
22825         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
22826         * modules/alloca (Makefile.am): All object files depend on alloca.h.
22827         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
22828
22829 2003-01-13  Bruno Haible  <bruno@clisp.org>
22830
22831         * gnulib-tool (func_create_testdir): Store config/* files in the main
22832         directory.
22833         * config.rpath: Move to ...
22834         * config/config.rpath: ... here.
22835         * modules/gettext: Contains config/config.rpath, not config.rpath.
22836         * modules/iconv: Likewise.
22837
22838 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22839
22840         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22841         to avoid collisions with libcurses and libreadline.
22842
22843         * m4/getstr.m4: Remove.
22844         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
22845
22846 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22847
22848         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22849         to avoid collisions with libcurses and libreadline.
22850
22851         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
22852         * lib/getstr.h, getstr.c: Remove.
22853         * lib/getline.c: Include "getline.h", to check interface.
22854         Move body of old getstr.c here: this defines MIN_CHUNK and
22855         declares getdelim2, which is renamed from getstr.
22856         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
22857
22858         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
22859         All uses changed.
22860         * lib/linebuffer.h: Likewise.
22861         (readline): Remove backward-compatibility macro.
22862
22863 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22864
22865         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
22866         to avoid collisions with libcurses and libreadline.
22867         * getstr: Remove.
22868         * MODULES.html.sh: Remove getstr.
22869         * modules/getline: Depend on unlocked-io, not getstr.
22870
22871 2003-01-12  Jim Meyering  <jim@meyering.net>
22872
22873         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
22874
22875 2003-01-10  Bruno Haible  <bruno@clisp.org>
22876
22877         * modules/alloca: Change Makefile.am requirements. Simplify Include
22878         requirements. Add lib/alloca_.h to file list.
22879
22880 2003-01-10  Bruno Haible  <bruno@clisp.org>
22881
22882         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
22883
22884 2003-01-10  Bruno Haible  <bruno@clisp.org>
22885
22886         * lib/alloca_.h: New file.
22887         * lib/getdate.y: Unconditionally include alloca.h.
22888         * lib/makepath.c: Likewise.
22889         * lib/setenv.c: Likewise.
22890         * lib/userspec.c: Likewise.
22891
22892 2003-01-09  Karl Berry  <karl@gnu.org>
22893
22894         * MODULES.html.sh: include `dirname $0` in PATH, to find
22895         gnulib-tool.
22896
22897 2003-01-09  Bruno Haible  <bruno@clisp.org>
22898
22899         * modules/stdbool: Change configure.ac, Makefile.am requirements.
22900         Simplify Include requirements. Add lib/stdbool.h.in to file list.
22901
22902 2003-01-09  Bruno Haible  <bruno@clisp.org>
22903
22904         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
22905
22906 2003-01-09  Bruno Haible  <bruno@clisp.org>
22907
22908         * lib/stdbool.h.in: New file.
22909
22910 2003-01-09  Bruno Haible  <bruno@clisp.org>
22911
22912         * gnulib-tool (func_all_modules): Ignore files ending in ~.
22913         * MODULES.html.sh: Likewise.
22914
22915 2003-01-08  Jim Meyering  <jim@meyering.net>
22916
22917         * lib/full-write.c: Undefine and define-away `const' after inclusion
22918         of errno.h, not before.  Suggestion from Bruno Haible.
22919
22920 2003-01-08  Bruno Haible  <bruno@clisp.org>
22921
22922         * modules/full-read: Depend on full-write.
22923
22924 2003-01-08  Bruno Haible  <bruno@clisp.org>
22925
22926         * lib/safe-read.c: Include specification header first, to ensure its
22927         selfcontainedness.
22928         * lib/full-write.c: Likewise.
22929
22930 2003-01-07  Jim Meyering  <jim@meyering.net>
22931
22932         * lib/full-write.c: Rework so that it may serve to define full_read,
22933         too.
22934         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
22935
22936 2003-01-07  Bruno Haible  <bruno@clisp.org>
22937
22938         * lib/strtoimax.c: Include <stdint.h> as an alternative to
22939         <inttypes.h>.
22940         * lib/xstrtol.h: Likewise.
22941         * lib/xstrtoimax.c: Likewise.
22942         * lib/xstrtoumax.c: Likewise.
22943         * lib/human.h: Likewise.
22944
22945         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
22946         on systems that have <inttypes.h> but not <stdint.h>.
22947
22948 2003-01-07  Bruno Haible  <bruno@clisp.org>
22949
22950         * MODULES.html.sh: Add copyright notice.
22951         (missed_files): Omit CVS directory entries.
22952         (func_module): Make it work with sed-3.02.
22953         * MODULES.txt: Remove file.
22954
22955 2003-01-06  Jim Meyering  <jim@meyering.net>
22956
22957         * lib/version-etc.c: Update year in translatable copyright string.
22958
22959 2003-01-03  Karl Berry  <karl@gnu.org>
22960
22961         * config/config.{guess,sub}: update from prep.
22962
22963 2003-01-02  Karl Berry  <karl@gnu.org>
22964
22965         * doc/COPYING.DOC: belatedly updated to 1.2.
22966
22967 2003-01-01  Karl Berry  <karl@gnu.org>
22968
22969         * gnulib-tool (func_verify_module): report module name $module in
22970         error message, not $1.
22971         * gnulib-tool (create-testdir): don't complain if destdir couldn't
22972         be created, only if it doesn't exist.
22973         * gnulib-tool (last_checkin_date): don't expand the $Date here.
22974
22975 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22976
22977         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
22978
22979 2002-12-31  Paul Eggert  <eggert@twinsun.com>
22980
22981         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
22982         memcmp if strcoll doesn't work.
22983
22984 2002-12-31  Bruno Haible  <bruno@clisp.org>
22985
22986         * lib/utime.c (utime_null): No need to call ftruncate if the file was
22987         nonempty.
22988
22989 2002-12-31  Bruno Haible  <bruno@clisp.org>
22990
22991         * lib/memcoll.c (STRCOLL): New macro.
22992         (memcoll): Use it.
22993
22994 2002-12-31  Bruno Haible  <bruno@clisp.org>
22995
22996         * lib/localcharset.h: New file.
22997         * lib/localcharset.c: Include it.
22998         * lib/unicodeio.c: Likewise.
22999
23000 2002-12-31  Bruno Haible  <bruno@clisp.org>
23001
23002         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
23003         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
23004
23005 2002-12-31  Bruno Haible  <bruno@clisp.org>
23006
23007         * lib/getline.h: Include <stddef.h>, for size_t.
23008
23009         * lib/unicodeio.h: Include <stddef.h>, for size_t.
23010         * lib/unicodeio.c: Don't include <stddef.h>.
23011
23012 2002-12-31  Bruno Haible  <bruno@clisp.org>
23013
23014         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
23015         HAVE_TM_ZONE.
23016
23017 2002-12-24  Karl Berry  <karl@gnu.org>
23018
23019         * config/config.guess: update from prep.
23020
23021 2002-12-24  Bruno Haible  <bruno@clisp.org>
23022
23023         General infrasructure.
23024         * m4/README: Rewritten.
23025         * m4/onceonly.m4: New file.
23026         * m4/onceonly_2_57.m4: New file.
23027
23028         Module atexit.
23029         * m4/atexit.m4: New file.
23030
23031         Module strtod.
23032         * m4/strtod.m4: New file.
23033
23034         Module strtol.
23035         * m4/strtol.m4: New file.
23036
23037         Module strtoul.
23038         * m4/strtoul.m4: New file.
23039
23040         Module memchr.
23041         * m4/memchr.m4: New file.
23042
23043         Module memcmp.
23044         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
23045         (jm_FUNC_MEMCMP): Invoke it.
23046
23047         Module memcpy.
23048         * m4/memcpy.m4: New file.
23049
23050         Module memmove.
23051         * m4/memmove.m4: New file.
23052
23053         Module memset.
23054         * m4/memset.m4: New file.
23055
23056         Module strcspn.
23057         * m4/strcspn.m4: New file.
23058
23059         Module strpbrk.
23060         * m4/strpbrk.m4: New file.
23061
23062         Module strstr.
23063         * m4/strstr.m4: New file.
23064
23065         Module strerror.
23066         * m4/strerror.m4: New file.
23067
23068         Module mktime.
23069         * m4/mktime.m4: Renamed from jm-mktime.m4.
23070         (gl_PREREQ_MKTIME): New macro.
23071         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
23072
23073         Module malloc.
23074         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
23075         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
23076         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
23077
23078         Module realloc.
23079         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
23080         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
23081         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
23082
23083         Module strftime.
23084         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
23085         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
23086         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
23087         gl_TM_GMTOFF.
23088         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
23089
23090         Module xalloc.
23091         * m4/xalloc.m4: New file.
23092
23093         Module alloca.
23094         * m4/alloca.m4: New file.
23095
23096         Module putenv.
23097         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
23098         (jm_FUNC_PUTENV): Invoke it.
23099
23100         Module setenv.
23101         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
23102         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
23103         when invoked twice.
23104         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
23105         gt_FUNC_SETENV.
23106
23107         Module memrchr.
23108         * m4/memrchr.m4: New file.
23109
23110         Module stpcpy.
23111         * m4/stpcpy.m4: New file.
23112
23113         Module strcase.
23114         * m4/strcase.m4: New file.
23115
23116         Module strdup.
23117         * m4/strdup.m4: New file.
23118
23119         Module strnlen.
23120         * m4/strnlen.m4: New file.
23121
23122         Module strndup.
23123         * m4/strndup.m4: New file.
23124
23125         Module xstrtod.
23126         * m4/xstrtod.m4: New file.
23127
23128         Module xstrtol.
23129         * m4/xstrtol.m4: New file.
23130
23131         Module getdate.
23132         * m4/getdate.m4: New file.
23133
23134         Module unlocked-io.
23135         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
23136         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
23137         * m4/jm-glibc-io.m4n: Remove file.
23138
23139         Module long-options.
23140         * m4/long-options.m4: New file.
23141
23142         Module md5.
23143         * m4/md5.m4: New file.
23144
23145         Module sha.
23146         * m4/sha.m4: New file.
23147
23148         Module getstr.
23149         * m4/getstr.m4: New file.
23150
23151         Module getline.
23152         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
23153         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
23154         <sys/types.h>, for size_t. Use the function name gnu_getline, not
23155         simply getline. Infoke gl_PREREQ_GETLINE.
23156
23157         Module obstack.
23158         * m4/obstack.m4: New file.
23159
23160         Module hash.
23161         * m4/hash.m4: New file.
23162
23163         Module readtokens.
23164         * m4/readtokens.m4: New file.
23165
23166         Module strverscmp.
23167         * m4/strverscmp.m4: New file.
23168
23169         Module stdbool.
23170         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
23171         OSF/1.
23172
23173         Module strtoll.
23174         * m4/strtoll.m4: New file.
23175
23176         Module strtoull.
23177         * m4/strtoull.m4: New file.
23178
23179         Module strtoimax.
23180         * m4/strtoimax.m4: New file.
23181
23182         Module strtoumax.
23183         * m4/strtoumax.m4: New file.
23184
23185         Module xstrtoimax.
23186         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
23187         jm_AC_PREREQ_XSTRTOIMAX.
23188         Moved the strtol prerequisites to strtol.m4.
23189         Moved the strtoll prerequisites to strtoll.m4.
23190         Moved the strtoimax prerequisites to strtoimax.m4.
23191
23192         Module xstrtoumax.
23193         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
23194         jm_AC_PREREQ_XSTRTOUMAX.
23195         Moved the strtoul prerequisites to strtoul.m4.
23196         Moved the strtoull prerequisites to strtoull.m4.
23197         Moved the strtoumax prerequisites to strtoumax.m4.
23198
23199         Module chown.
23200         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
23201         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
23202
23203         Module dup2.
23204         * m4/dup2.m4: New file.
23205
23206         Module ftruncate.
23207         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
23208         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
23209
23210         Module getgroups.
23211         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
23212         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
23213
23214         Module gettimeofday.
23215         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
23216         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
23217         gl_PREREQ_GETTIMEOFDAY.
23218
23219         Module mkdir.
23220         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
23221         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
23222
23223         Module mkstemp.
23224         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
23225         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
23226         jm_AC_TYPE_UINTMAX_T.
23227         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
23228
23229         Module stat.
23230         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
23231         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
23232
23233         Module lstat.
23234         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
23235         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
23236
23237         Module timespec.
23238         * m4/timespec.m4 (gl_TIMESPEC): New macro.
23239         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
23240         * m4/st_mtim.m4: Indentation.
23241
23242         Module nanosleep.
23243         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
23244         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
23245         gl_PREREQ_NANOSLEEP.
23246
23247         Module regex.
23248         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
23249         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
23250         (gl_REGEX): New macro.
23251
23252         Module rename.
23253         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
23254         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
23255
23256         Module rmdir.
23257         * m4/rmdir.m4: New file.
23258
23259         Module utime.
23260         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
23261         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
23262         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
23263
23264         Module dirname.
23265         * m4/dirname.m4: New file.
23266
23267         Module getopt.
23268         * m4/getopt.m4: New file.
23269
23270         Module unistd-safer.
23271         * m4/unistd-safer.m4: New file.
23272
23273         Module fnmatch.
23274         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
23275         declaration.
23276         (gl_PREREQ_FNMATCH_EXTRA): New macro.
23277         (gl_FUNC_FNMATCH_POSIX): New macro.
23278         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
23279         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
23280         simply fnmatch.
23281
23282         Module exclude.
23283         * m4/exclude.m4: New file.
23284
23285         Module human.
23286         * m4/human.m4: New file.
23287
23288         Module acl.
23289         * m4/acl.m4: Nop.
23290
23291         Module backupfile.
23292         * m4/backupfile.m4: New file.
23293         * m4/d-ino.m4: Indentation.
23294
23295         Module fsusage.
23296         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
23297         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
23298         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
23299
23300         Module dirfd.
23301         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
23302         requirements.
23303
23304         Module euidaccess.
23305         * m4/euidaccess.m4: New file.
23306
23307         Module file-type.
23308         * m4/file-type.m4: New file.
23309
23310         Module fileblocks.
23311         * m4/fileblocks.m4: New file.
23312
23313         Module filemode.
23314         * m4/filemode.m4: New file.
23315
23316         Module isdir.
23317         * m4/isdir.m4: New file.
23318
23319         Module lchown.
23320         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
23321         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
23322
23323         Module makepath.
23324         * m4/makepath.m4: New file.
23325
23326         Module modechange.
23327         * m4/modechange.m4: New file.
23328
23329         Module mountlist.
23330         * m4/mountlist.m4: New file.
23331         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
23332         Indentation.
23333
23334         Module path-concat.
23335         * m4/path-concat.m4: New file.
23336
23337         Module pathmax.
23338         * m4/pathmax.m4: New file.
23339
23340         Module same.
23341         * m4/same.m4: New file.
23342
23343         Module save-cwd.
23344         * m4/save-cwd.m4: New file.
23345
23346         Module savedir.
23347         * m4/savedir.m4: New file.
23348
23349         Module xgetcwd.
23350         * m4/xgetcwd.m4: New file.
23351         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
23352
23353         Module xreadlink.
23354         * m4/xreadlink.m4: New file.
23355
23356         Module safe-read.
23357         * m4/safe-read.m4: New file.
23358
23359         Module safe-write.
23360         * m4/safe-write.m4: New file.
23361
23362         Module closeout.
23363         * m4/closeout.m4: New file.
23364
23365         Module stdio-safer.
23366         * m4/stdio-safer.m4: New file.
23367
23368         Module getpass.
23369         * m4/getpass.m4: New file.
23370
23371         Module getugroups.
23372         * m4/getugroups.m4: New file.
23373
23374         Module group-member.
23375         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
23376         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
23377
23378         Module idcache.
23379         * m4/idcache.m4: New file.
23380
23381         Module userspec.
23382         * m4/userspec.m4: New file.
23383
23384         Module gettime.
23385         * m4/clock_time.m4: New file.
23386         * m4/gettime.m4: New file.
23387
23388         Module settime.
23389         * m4/settime.m4: New file.
23390
23391         Module posixtm.
23392         * m4/posixtm.m4: New file.
23393
23394         Module gethostname.
23395         * m4/gethostname.m4: New file.
23396
23397         Module canon-host.
23398         * m4/canon-host.m4: New file.
23399
23400         Module gettext.
23401         * m4/codeset.m4: New file, from gettext-0.11.5.
23402         * m4/gettext.m4: New file, from gettext-0.11.5.
23403         * m4/glibc21.m4: New file, from gettext-0.11.5.
23404         * m4/iconv.m4: New file, from gettext-0.11.5.
23405         * m4/intdiv0.m4: New file, from gettext-0.11.5.
23406         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
23407         * m4/inttypes.m4: New file, from gettext-0.11.5.
23408         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
23409         * m4/isc-posix.m4: New file, from gettext-0.11.5.
23410         * m4/lcmessage.m4: New file, from gettext-0.11.5.
23411         * m4/lib-ld.m4: New file, from gettext-0.11.5.
23412         * m4/lib-link.m4: New file, from gettext-0.11.5.
23413         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
23414         * m4/progtest.m4: New file, from gettext-0.11.5.
23415         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
23416         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
23417         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
23418
23419         Module localcharset.
23420         * m4/localcharset.m4: New file.
23421
23422         Module hard-locale.
23423         * m4/hard-locale.m4: New file.
23424
23425         Module mbswidth.
23426         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
23427         onceonly macros.
23428         * m4/mbrtowc.m4: Add comment.
23429
23430         Module memcasecmp.
23431         * m4/memcasecmp.m4: New file.
23432
23433         Module memcoll.
23434         * m4/memcoll.m4: New file.
23435
23436         Module unicodeio.
23437         * m4/unicodeio.m4: New file.
23438
23439         Module rpmatch.
23440         * m4/rpmatch.m4: New file.
23441
23442         Module yesno.
23443         * m4/yesno.m4: New file.
23444
23445         Module exitfail.
23446         * m4/exitfail.m4: New file.
23447
23448         Module c-stack.
23449         * m4/c-stack.m4 (gl_C_STACK): New macro.
23450         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
23451
23452         Module error.
23453         * m4/error.m4 (gl_ERROR): New macro.
23454         (jm_PREREQ_ERROR): Use onceonly macros.
23455
23456         Module fatal.
23457         * m4/fatal.m4: New file.
23458
23459         Module getloadavg.
23460         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
23461         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
23462
23463         Module getpagesize.
23464         * m4/getpagesize.m4: New file.
23465
23466         Module getusershell.
23467         * m4/getusershell.m4: New file.
23468
23469         Module physmem.
23470         * m4/physmem.m4: New file.
23471
23472         Module posixver.
23473         * m4/posixver.m4: New file.
23474
23475         Module quotearg.
23476         * m4/quotearg.m4: New file.
23477
23478         Module quote.
23479         * m4/quote.m4: New file.
23480
23481         Module readutmp.
23482         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
23483
23484         Module sig2str.
23485         * m4/sig2str.m4: New file.
23486
23487         Other.
23488         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
23489         ulonglong.m4.
23490         * m4/intmax_t.m4: New file.
23491         * m4/d-type.m4: Indentation.
23492         * m4/jm-macros.m4: Update.
23493         * m4/prereq.m4 (jm_PREREQ): Update.
23494         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
23495         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
23496         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
23497         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
23498         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
23499         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
23500         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
23501         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
23502         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
23503         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
23504         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
23505         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
23506         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
23507         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
23508         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
23509         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
23510         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
23511         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
23512         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
23513
23514 2002-12-24  Bruno Haible  <bruno@clisp.org>
23515
23516         * MODULES.txt: Update according to m4/ changes.
23517
23518         Module gettext.
23519         * config.rpath: New file, from gettext-0.11.5.
23520
23521         * modules/*: New module descriptions.
23522         * gnulib-tool: New file.
23523         * MODULES.html.sh: New file.
23524
23525 2002-12-21  Karl Berry  <karl@gnu.org>
23526
23527         * doc/fdl.texi: update to version 1.2.
23528
23529 2002-12-19  Karl Berry  <karl@gnu.org>
23530
23531         * config/config.guess: update from prep.
23532
23533 2002-12-18  Bruno Haible  <bruno@clisp.org>
23534
23535         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
23536         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
23537
23538 2002-12-17  Bruno Haible  <bruno@clisp.org>
23539
23540         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
23541         stdlib.h, string.h.
23542
23543 2002-12-17  Bruno Haible  <bruno@clisp.org>
23544
23545         * lib/canon-host.c (strdup): Remove unused declaration.
23546
23547         * lib/fsusage.c: Include full_read.h.
23548         (get_fs_usage): Use full_read instead of safe_read.
23549
23550         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
23551
23552 2002-12-12  Karl Berry  <karl@gnu.org>
23553
23554         * config/config.guess: update from prep.
23555
23556 2002-12-11  Bruno Haible  <bruno@clisp.org>
23557
23558         * m4/setenv.m4: New file, from gettext-0.11.5.
23559
23560 2002-12-11  Bruno Haible  <bruno@clisp.org>
23561
23562         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
23563         not unsetenv().
23564         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
23565         modifications:
23566
23567         2002-12-11  Bruno Haible  <bruno@clisp.org>
23568
23569                 * setenv.c (alloca): Fall back to malloc.
23570                 (freea): New macro.
23571                 (setenv): Use freea() to free memory allocated with alloca().
23572
23573         2002-11-13  Bruno Haible  <bruno@clisp.org>
23574
23575                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
23576                 function declarations.
23577                 * unsetenv.c (unsetenv): Likewise.
23578
23579         2002-03-04  Bruno Haible  <bruno@clisp.org>
23580
23581                 Portability to AIX 4.3.3.
23582                 * unsetenv.c: New file, extracted from setenv.c.
23583                 * setenv.c: Move the unsetenv() function to unsetenv.c.
23584
23585         2001-12-20  Bruno Haible  <bruno@clisp.org>
23586
23587                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
23588                 use malloc instead. For SunOS 4.
23589
23590         2001-12-11  Bruno Haible  <bruno@clisp.org>
23591
23592                 * setenv.c: Declare alloca.
23593                 (compar_fn_t): New typedef.
23594                 (KNOWN_VALUE, STORE_VALUE): Use it.
23595
23596         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
23597         setenv.h.
23598
23599 2002-12-10  Paul Eggert  <eggert@twinsun.com>
23600
23601         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
23602         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
23603         Choose values that are less likely to collide with system fnmatch
23604         options.
23605         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
23606         defined (e.g., a pure POSIX system).
23607         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
23608         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
23609
23610 2002-12-06  Paul Eggert  <eggert@twinsun.com>
23611
23612         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
23613         a pain in practice to deal with generated m4 files.  This change
23614         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
23615
23616         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
23617         and jm-glibc-io.m4, as they are no longer a special case.
23618         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
23619         kludge and the auto-generation stuff.  Check only whether the
23620         functions are declared, not whether they exist, since older hosts
23621         that don't declare the functions can't use the optimization anyway.
23622
23623 2002-12-06  Jim Meyering  <jim@meyering.net>
23624
23625         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
23626
23627         Merge in changes from libc's misc/error.c, in preparation
23628         for the merge of gnulib's changes back into libc.
23629
23630         * lib/error.c (_): Define only if not already defined.
23631         Move definition to follow all #include directives.
23632         Include unlocked-io.h only if !_LIBC.
23633         [_LIBC]: Include <libio/libioP.h>.
23634         [USE_IN_LIBIO]: Include <libio/iolibio.h>
23635         (fflush): Tweak definition to use INTUSE.
23636         (putc): Define.
23637
23638 2002-12-05  Paul Eggert  <eggert@twinsun.com>
23639
23640         * lib/alloca.c [defined emacs]: Include "lisp.h".
23641         (xalloc_die) [defined emacs]: New macro.
23642         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
23643         [! defined emacs]: Include <xalloc.h>.
23644         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
23645         (pointer): Typedef to POINTER_TYPE *.
23646         (malloc): Remove decl; we now always use xmalloc.
23647         (alloca): Use old-style definition, since Emacs needs this.
23648         Check for arithmetic overflow when computing combined size.
23649
23650 2002-12-04  Paul Eggert  <eggert@twinsun.com>
23651
23652         Do not generate unlocked-io.h automatically, since it's easier to
23653         maintain it by hand.
23654
23655         * lib/unlocked-io.h: New file, from GNU diffutils,
23656         but with proper copyright notice and attribution.
23657         * lib/gen-uio: Remove.
23658         * lib/Makefile.am: Add copyright notice.
23659         (libfetish_a_SOURCES): Add unlocked-io.h.
23660         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
23661         (DISTCLEANFILES, io_functions): Remove macros.
23662         (EXTRA_DIST): Remove gen_uio.
23663         (unlocked-io.h): Remove rule.
23664
23665 2002-12-04  Jim Meyering  <jim@meyering.net>
23666
23667         Reflect the fact that stat.c and lstat.c are no longer generated.
23668         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
23669         (DISTCLEANFILES): Likewise.
23670         (EXTRA_DIST): Likewise.
23671         (all_local): Don't depend on stat.c or lstat.c.
23672         (stat.c, lstat.c): Remove rules.
23673         (EXTRA_DIST): Remove xstat.in.
23674
23675         * lib/xstat.in: Remove file.  Contents moved into stat.c.
23676         * lib/stat.c: New file.  Contents mostly from xstat.in.
23677         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
23678         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
23679
23680         * lib/safe-read.c: Rework so that it may serve to define safe_write,
23681         too.
23682         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
23683
23684 2002-12-03  Jim Meyering  <jim@meyering.net>
23685
23686         * lib/safe-read.c, safe-write.c: Change variable names and comments,
23687         but not semantics, to minimize the differences between these two files.
23688         (safe_read): Change comment to mention SAFE_READ_ERROR.
23689
23690         * lib/safe-read.c (IS_EINTR): Define.
23691         (safe_read): Use IS_EINTR in place of in-function cpp directives.
23692
23693 2002-12-02  Jim Meyering  <jim@meyering.net>
23694
23695         * lib/safe-read.c (EINTR): Define.
23696         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23697         (INT_MAX): Provide fallback.
23698         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
23699
23700         * lib/safe-read.h (SAFE_READ_ERROR): Define.
23701
23702 2002-12-02  Bruno Haible  <bruno@clisp.org>
23703
23704         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
23705         Define, taken from safe-read.c.
23706         (INT_MAX): Provide fallback.
23707         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
23708         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
23709
23710         * lib/safe-read.c (EINTR): Remove definition.
23711         (safe_read): Don't use EINTR if it is absent.
23712
23713 2002-12-01  Jim Meyering  <jim@meyering.net>
23714
23715         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
23716         zero.
23717         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
23718
23719 2002-11-27  Paul Eggert  <eggert@twinsun.com>
23720
23721         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
23722         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
23723         with `if (! (value < limit)) abort ();', for readability.
23724
23725 2002-11-26  Karl Berry  <karl@gnu.org>
23726
23727         * lib/strdup.c: copy from libc again, with jim's ok.
23728         * lib/.cppi-disable: re-add strdup.c
23729
23730 2002-11-25  Karl Berry  <karl@gnu.org>
23731
23732         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
23733         instead of "strtol.c".
23734
23735 2002-11-25  Karl Berry  <karl@gnu.org>
23736
23737         * config/install-sh: update from automake for variable quoting, $0 in
23738         error msgs, etc.
23739
23740         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
23741         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
23742         entry.
23743
23744 2002-11-25  Jim Meyering  <jim@meyering.net>
23745
23746         * lib/mktime.c: Sync from libc, now that it has the latest fix.
23747
23748 2002-11-24  Karl Berry  <karl@gnu.org>
23749
23750         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
23751         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
23752
23753 2002-11-24  Jim Meyering  <jim@meyering.net>
23754
23755         Update from coreutils:
23756
23757         * lib/mktime.c: Merge in changes from libc.
23758
23759         Avoid a link-time failure on some Linux systems.
23760         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
23761         (otherwise).
23762         (__mon_yday): Declare with the STATIC attribute.
23763         (__mktime_internal): Likewise.
23764         Based on a report from Greg Schafer.
23765
23766 2002-11-23  Jim Meyering  <jim@meyering.net>
23767
23768         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
23769         Use `unsigned', not `int', as type of index.
23770
23771         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
23772
23773         * lib/fsusage.c: Remove unneeded parentheses around operands of
23774         `defined'.
23775
23776 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23777
23778         * lib/quotearg.h: Allow multiple inclusion by surrounding with
23779         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
23780         so that we can be included first.
23781         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
23782         * lib/quotearg.c: Include quotearg.h immediately after config.h.
23783         No need to include stddef.h or sys/types.h any more.
23784         Surround local include files with "", not "<>".
23785         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
23786         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
23787         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
23788         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23789         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23790         (ISPRINT): Remove; no longer needed now that we assume C89.
23791
23792         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
23793         Preserve errno.
23794
23795         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
23796         quotearg_char): Use SIZE_MAX rather than
23797         (size_t) -1 when we are talking about "infinity".
23798
23799         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
23800
23801 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23802
23803         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
23804         hint that one should use `if (! x) abort ();' rather than `assert
23805         (x);', and anyway it's one less thing to worry about configuring.
23806         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
23807         hash_rehash, hash_insert): Use abort rather than assert.
23808
23809 2002-11-22  Bruno Haible  <bruno@clisp.org>
23810
23811         * lib/safe-read.h: Assume C89. Add comments.
23812         (safe_read): Change return type to size_t.
23813         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
23814         byte counts > SSIZE_MAX correctly.
23815         * lib/safe-write.h: New file.
23816         * lib/safe-write.c: New file.
23817         * lib/full-read.h: New file.
23818         * lib/full-read.c: New file.
23819         * lib/full-write.h: Assume C89. Add comments.
23820         * lib/full-write.c: Include safe-write.h.
23821         (full_write): Rewritten to use safe_write.
23822         Suggested by Jim Meyering and Paul Eggert.
23823
23824 2002-11-21  Jim Meyering  <jim@meyering.net>
23825
23826         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
23827
23828         Merge in changes from the coreutils.
23829
23830         2002-09-25  Paul Eggert  <eggert@twinsun.com>
23831         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
23832         <stdint.h>.
23833         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
23834         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
23835         int.  Work more efficiently if X is the same width as uintmax_t.
23836         Do not compare X to -1, to avoid bogus compiler warning.
23837         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
23838         Don't assume that f_frsize and f_bsize are the same type.
23839
23840         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
23841         warning on FreeBSD.
23842
23843         * lib/makepath.c (make_path): Restore umask *before* creating the final
23844         component.
23845         (make_path): Minor reformatting.
23846
23847         * lib/xmalloc.c: Adjust to work with new autoconf macros,
23848         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
23849         HAVE_MALLOC/HAVE_REALLOC.
23850
23851         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
23852         dummy ones.  At least on GNU/Linux systems, `auto' means something
23853         else.
23854         From Michael Stone.
23855
23856 2002-11-21  Bruno Haible  <bruno@clisp.org>
23857
23858         Remove case insensitive option matching.
23859         * lib/argmatch.h (argcasematch): Remove declaration.
23860         (ARGCASEMATCH): Remove macro.
23861         (__xargmatch_internal): Remove case_sensitive argument.
23862         (XARGMATCH): Update.
23863         (XARGCASEMATCH): Remove macro.
23864         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
23865         case_sensitive argument.
23866         (argcasematch): Remove function.
23867         (__xargmatch_internal): Remove case_sensitive argument.
23868         (main): Use XARGMATCH instead of XARGCASEMATCH.
23869
23870         * lib/xmalloc.c: Change compile-time error message. Add comment about
23871         required autoconf version.
23872
23873 2002-11-20  Paul Eggert  <eggert@twinsun.com>
23874
23875         Merge argmatch cleanups from Bison.  Assume C89.
23876
23877         * lib/argmatch.c: Include config.h here, not in argmatch.h.
23878         Include stdlib.h, for EXIT_FAILURE.
23879         Always include <string.h>, since we assume C89.
23880         (EXIT_FAILURE): Remove pre-C89 bug workaround.
23881         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
23882         Include <stddef.h> instead, since it's all we need for size_t.
23883         (PARAMS): Remove.  All uses removed.
23884         (ARRAY_CARDINALITY): Do not bother to #undef.
23885         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
23886         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23887         Remove unnecessary parentheses.
23888         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
23889         Insert necessary parentheses.
23890         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
23891         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
23892
23893 2002-11-19  Bruno Haible  <bruno@clisp.org>
23894
23895         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
23896         * lib/mbswidth.h: Include <stddef.h>, for size_t.
23897
23898         * lib/mbswidth.h (PARAMS): Remove macro.
23899         (mbswidth, mbsnwidth): Use ANSI C function declarations.
23900         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
23901
23902         * lib/gcd.h (PARAMS): Remove macro.
23903         (gcd): Use ANSI C function declarations.
23904         * lib/gcd.c (gcd): Likewise.
23905
23906 2002-11-15  Bruno Haible  <bruno@clisp.org>
23907
23908         * lib/strcspn.c: Include <stddef.h>.
23909         (strcspn): Use ANSI C function declaration. Change return type to
23910         size_t. Use NULL.
23911         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
23912         (strpbrk): Use NULL.
23913         * lib/strpbrk.h (PARAMS): Remove macro.
23914         (strpbrk): Use ANSI C function declaration.
23915         * lib/strstr.c: Don't include <sys/types.h>.
23916         * lib/strstr.h (PARAMS): Remove macro.
23917         (strstr): Use ANSI C function declarations.
23918
23919 2002-11-14  Karl Berry  <karl@gnu.org>
23920
23921         * config/mkinstalldirs: `do' on separate line, instead of
23922         `for var; do'.
23923
23924 2002-11-06  Bruno Haible  <bruno@clisp.org>
23925
23926         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
23927         * lib/gcd.c (gcd): Likewise.
23928
23929 2002-11-05  Bruno Haible  <bruno@clisp.org>
23930
23931         * lib/gcd.h: New file, from gettext-0.11.5.
23932         * lib/gcd.c: New file, from gettext-0.11.5.
23933
23934 2002-11-05  Bruno Haible  <bruno@clisp.org>
23935
23936         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23937         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23938         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23939         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
23940
23941         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
23942         <libintl.h>.
23943         * lib/makepath.c: Include gettext.h instead of <locale.h> and
23944         <libintl.h>.
23945
23946         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
23947         * lib/human.c: Include gettext.h instead of <libintl.h>.
23948         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
23949         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
23950         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
23951         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
23952         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
23953         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
23954         (textdomain): Remove definition.
23955         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
23956
23957         * lib/long-options.c: Remove include of <libintl.h> and definition of
23958         _.
23959         * lib/same.c: Remove include of <libintl.h> and definition of _.
23960
23961 2002-11-04  Owen Taylor  <otaylor@redhat.com>
23962
23963         * lib/config.charset: A few additions for Solaris.
23964
23965 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23966
23967         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
23968         * lib/localcharset.c (locale_charset): Declare as extern "C".
23969
23970 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
23971
23972         * lib/config.charset: msdos in uk_UA uses CP1125.
23973
23974 2002-11-04  Bruno Haible  <bruno@clisp.org>
23975
23976         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
23977         * lib/strcase.h: New file, from GNU gettext-0.11.5.
23978         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
23979         * lib/strstr.h: New file, from GNU gettext-0.11.5.
23980         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
23981
23982 2002-11-04  Bruno Haible  <bruno@clisp.org>
23983
23984         * lib/localcharset.c (locale_charset): Don't return an empty string.
23985
23986 2002-11-04  Bruno Haible  <bruno@clisp.org>
23987
23988         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
23989         aliases.
23990
23991 2002-11-04  Bruno Haible  <bruno@clisp.org>
23992
23993         * lib/config.charset: Update for newest glibc. Add canonical names
23994         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
23995
23996 2002-11-04  Bruno Haible  <bruno@clisp.org>
23997
23998         * lib/config.charset: Add support for NetBSD.
23999
24000 2002-11-04  Bruno Haible  <bruno@clisp.org>
24001
24002         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
24003
24004 2002-11-01  Bruno Haible  <bruno@clisp.org>
24005
24006         * configure.in: Add AC_CONFIG_AUX_DIR call.
24007         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
24008         test/Makefile.
24009         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
24010
24011 2002-09-28  Karl Berry  <karl@gnu.org>
24012
24013         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
24014         installed automake until the next release, since changes have been
24015         made.
24016
24017 2002-09-25  Karl Berry  <karl@gnu.org>
24018
24019         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
24020         * lib/getopt*: copy from libc/posix.
24021         * lib/gettext.h: copy from gettext.
24022         * lib/.cppi-disable: add strdup.c, gettext.h.
24023
24024 2002-09-25  Karl Berry  <karl@gnu.org>
24025
24026         * config/srclist.txt: enable gettext.h check.
24027         * config/config.{guess,sub}: update from prep.
24028         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
24029                 from automake 1.6.3.
24030         See srclist*.
24031
24032 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
24033
24034         * regex.c (PATFETCH): Remove the translating fetch.
24035         (PATFETCH_RAW): Rename to PATFETCH.
24036         (set_image_of_range): New fun.
24037         (SET_RANGE_TABLE_WORK_AREA): Use it.
24038         (regex_compile): Don't translate the pattern chars so eagerly.
24039         Only do it when inserting an `exactn' bytecode or when handling
24040         a char-range.
24041         (mutually_exclusive_p): Avoid empty statement.
24042
24043 2002-07-06  Jim Meyering  <meyering@lucent.com>
24044
24045         * m4/README: Don't mention Makefile.am.in.
24046         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
24047
24048 2002-07-01  Jim Meyering  <meyering@lucent.com>
24049
24050         * lib/c-stack.c: Include sys/time.h.
24051         From Volker Borchert.
24052
24053 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24054
24055         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
24056
24057 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24058
24059         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
24060         New macro.  Use it uniformly instead of
24061         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
24062         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
24063         reported by Vin Shelton.
24064
24065 2002-06-22  Paul Eggert  <eggert@twinsun.com>
24066
24067         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
24068         Do not assume SA_SIGINFO behavior.
24069         Bug reported by Jim Meyering on NetBSD 1.5.2.
24070
24071 2002-06-22  Jim Meyering  <meyering@lucent.com>
24072
24073         * m4/c-stack.m4: New file, from diffutils-2.8.2.
24074         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
24075
24076         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
24077         now that configure.ac uses AC_GNU_SOURCE.
24078         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
24079         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
24080
24081         Update to latest tools.  Suggestions from Paul Eggert.
24082         * m4/stdbool.m4: New file, from diffutils-2.8.2.
24083         * m4/gnu-source.m4: Update from diffutils-2.8.2.
24084         * m4/fnmatch.m4: Likewise.
24085         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
24086         to AC_HEADER_STDBOOL
24087
24088 2002-06-22  Jim Meyering  <meyering@lucent.com>
24089
24090         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
24091         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
24092
24093 2002-06-22  Jim Meyering  <meyering@lucent.com>
24094
24095         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
24096
24097         * lib/exitfail.c, exitfail.h: Likewise.
24098         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
24099
24100         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
24101         of fnmatch.h.
24102         (EXTRA_DIST): Add fnmatch_loop.c.
24103         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
24104
24105         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
24106         * lib/fnmatch.c: Update from diffutils-2.8.2.
24107         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
24108         * lib/fnmatch.h: Remove file.
24109
24110 2002-06-21  Jim Meyering  <meyering@lucent.com>
24111
24112         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
24113         * m4/mbrtowc.m4: Likewise.
24114
24115         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
24116         * m4/mbswidth.m4: Reflect name change:
24117         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
24118         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24119
24120         * m4/lib-link.m4: Update from gettext-0.11.2.
24121         * m4/gettext.m4: Likewise.
24122
24123         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
24124         From Alfred M. Szmidt.
24125
24126 2002-06-18  Paul Eggert  <eggert@twinsun.com>
24127
24128         * lib/file-type.h: Report an error if neither S_ISREG nor
24129         S_IFREG is defined, instead of using a test specific to glibc
24130         2.2.  This should be safe, since POSIX requires S_ISREG and
24131         Unix Version 7 had S_IFREG.  We don't need to check for
24132         <sys/types.h> since we don't use any symbols that it defines.
24133
24134 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
24135
24136         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
24137         $@-t, so that each temporary file name is unique and valid in the first
24138         8 characters, for operation under DOS.
24139
24140 2002-06-15  Paul Eggert  <eggert@twinsun.com>
24141
24142         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
24143
24144 2002-06-15  Jim Meyering  <meyering@lucent.com>
24145
24146         Work even with DJGPP 2.03, which lacks support for symlinks.
24147         From Richard Dawe.
24148         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
24149         is defined.
24150         * lib/lchown.c (S_ISLNK): Likewise.
24151
24152 2002-06-15  Jim Meyering  <meyering@lucent.com>
24153
24154         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
24155         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
24156         have been included before this file.
24157
24158 2002-06-14  Jim Meyering  <meyering@lucent.com>
24159
24160         * lib/file-type.h: Use the version from diffutils-2.8.2.
24161         * lib/file-type.c: Likewise.
24162
24163 2002-06-07  Jim Meyering  <meyering@lucent.com>
24164
24165         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
24166         They're needed at least for NetBSD 1.5.2.
24167         ($statxfs_includes): Include those same headers.
24168         ($statxfs_includes): Include sys/vfs.h if available.
24169         ($statxfs_includes): Likewise for sys/statvfs.h.
24170         Check for the following members in both structs statfs and statvfs:
24171         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
24172
24173 2002-06-01  Jim Meyering  <meyering@lucent.com>
24174
24175         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
24176         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
24177
24178 2002-05-28  Jim Meyering  <meyering@lucent.com>
24179
24180         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
24181         Reported by Volker Borchert.
24182
24183 2002-05-27  Jim Meyering  <meyering@lucent.com>
24184
24185         Fix a problem seen only on nonconforming systems whereby ls.c's
24186         use of localtime, and then of gettimeofday would cause trouble:
24187         the localtime call used to initialize rpl_gettimeofday's save
24188         mechanism would clobber ls's current local time information so
24189         that in any long listing the first file would always be listed
24190         with date 1970-01-01.  Analysis by Volker Borchert.
24191
24192         * lib/gettimeofday.c (localtime): Undefine.
24193         (rpl_localtime): New function.
24194
24195 2002-05-27  Jim Meyering  <meyering@lucent.com>
24196
24197         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
24198         localtime.
24199
24200         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
24201         use the replacement function; it wouldn't resolve at link time.
24202         Reported by Volker Borchert.
24203
24204 2002-05-22  Jim Meyering  <meyering@lucent.com>
24205
24206         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
24207         file-type.h.
24208         * lib/file-type.h: New file.
24209         * lib/file-type.c (file_type): New file/function.  Extracted from
24210         diffutils.
24211
24212 2002-04-30  Jim Meyering  <meyering@lucent.com>
24213
24214         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
24215
24216 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24217
24218         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
24219
24220 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24221
24222         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
24223         Do not check for alloca.h (no longer used) or stdbool.h (was never
24224         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
24225
24226 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24227
24228         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
24229
24230 2002-04-29  Jim Meyering  <meyering@lucent.com>
24231
24232         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
24233         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
24234         Use AC_FUNC_STRNLEN here instead.
24235
24236         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
24237         With autoconf-2.53a, it's part of AC_PROG_CC.
24238
24239 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24240
24241         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
24242         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
24243
24244 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24245
24246         * lib/sig2str.h, lib/sig2str.c: New files.
24247         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
24248
24249 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24250
24251         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
24252         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
24253         of 127, since 64 is the largest conceivable number for ancient
24254         nonstandard hosts.
24255         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
24256
24257 2002-04-28  Jim Meyering  <meyering@lucent.com>
24258
24259         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
24260
24261 2002-04-24  Jim Meyering  <meyering@lucent.com>
24262
24263         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
24264         (jm_PREREQ): Use it.
24265
24266         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
24267         mach/mach.h fcntl.h.
24268         Check for this function: setlocale.
24269
24270 2002-04-24  Jim Meyering  <meyering@lucent.com>
24271
24272         * lib/gettext.h: New file, from Gettext.
24273         * lib/Makefile.am (INCLUDES): Remove -I../intl.
24274         (libfetish_a_SOURCES): Add gettext.h.
24275
24276 2002-04-16  Jim Meyering  <meyering@lucent.com>
24277
24278         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
24279         ut_pid, ut_id, ut_exit.
24280
24281 2002-04-16  Jim Meyering  <meyering@lucent.com>
24282
24283         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
24284         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
24285         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
24286
24287 2002-04-12  Jim Meyering  <meyering@lucent.com>
24288
24289         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
24290         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
24291         existence of the getmntinfo function.  Needed for Darwin 5.3.
24292
24293         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
24294         This is necessary at least on Darwin 5.3.
24295
24296         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
24297         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
24298         strnlen.o in the library, and that makes some versions of ranlib
24299         object.
24300
24301 2002-04-12  Jim Meyering  <meyering@lucent.com>
24302
24303         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
24304
24305 2002-04-09  Jim Meyering  <meyering@lucent.com>
24306
24307         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
24308         to be more precise.  Rather than saying we're checking whether the
24309         function `works', say what we're testing.
24310         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
24311         Reported by Bruno Haible.
24312
24313 2002-03-10  Jim Meyering  <meyering@lucent.com>
24314
24315         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
24316         Suggestion from Santiago Vila.
24317
24318 2002-03-08  Jim Meyering  <meyering@lucent.com>
24319
24320         * lib/rename.c: Mention that this wrapper is needed also on
24321         mips-dec-ultrix4.4 systems.
24322
24323 2002-03-02  Jim Meyering  <meyering@lucent.com>
24324
24325         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
24326         not HAVE_CLOCK_SETTIME.
24327
24328 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24329
24330         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
24331         Check for clock_settime.
24332
24333 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24334
24335         * lib/nanosleep.h: Rename to....
24336         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
24337
24338         * lib/gettime.c: New file.
24339         * lib/settime.c: New file.
24340         * lib/stime.c: Remove.
24341
24342         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
24343         timespec.h.  Remove nanosleep.h.
24344
24345 2002-02-25  Paul Eggert  <eggert@twinsun.com>
24346
24347         * m4/acl.m4: New file.
24348         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
24349         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
24350
24351 2002-02-25  Paul Eggert  <eggert@twinsun.com>
24352
24353         * lib/acl.c, lib/acl.h: New files.
24354         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
24355
24356 2002-02-24  Jim Meyering  <meyering@lucent.com>
24357
24358         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
24359         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
24360         cause trouble.  Reported by Nelson Beebe.
24361
24362 2002-02-23  Paul Eggert  <eggert@twinsun.com>
24363
24364         * lib/path-concat.c (xpath_concat): Reorder code to pacify
24365         compilers that don't know that xalloc_die never returns.
24366
24367 2002-02-20  Jim Meyering  <meyering@lucent.com>
24368
24369         * lib/getdate.c: Regenerate using bison-1.33.
24370
24371 2002-02-17  Jim Meyering  <meyering@lucent.com>
24372
24373         * config/config.guess (main): Don't use `head -1'; it's no longer
24374         portable. Use `sed 1q' instead.
24375
24376 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
24377
24378         * m4/codeset.m4: Upgrade to gettext-0.11.
24379         * m4/gettext.m4: Upgrade to gettext-0.11.
24380         * m4/glibc21.m4: Upgrade to gettext-0.11.
24381         * m4/iconv.m4: Upgrade to gettext-0.11.
24382         * m4/isc-posix.m4: Upgrade to gettext-0.11.
24383         * m4/lcmessage.m4: Upgrade to gettext-0.11.
24384         * m4/lib-ld.m4: New file, from gettext-0.11.
24385         * m4/lib-link.m4: New file, from gettext-0.11.
24386         * m4/lib-prefix.m4: New file, from gettext-0.11.
24387         * m4/progtest.m4: Upgrade to gettext-0.11.
24388
24389 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24390
24391         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
24392         (jm_PREREQ): Use it.
24393
24394 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24395
24396         * lib/posixver.c, lib/posixver.h: New files.
24397         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24398
24399 2002-02-02  Paul Eggert  <eggert@twinsun.com>
24400             Bruno Haible  <bruno@clisp.org>
24401
24402         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
24403         (fwrite_success_callback): New declaration.
24404         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
24405         print_unicode_char. Call failure callback instead of error.
24406         (fwrite_success_callback): New function.
24407         (exit_failure_callback): New function.
24408         (fallback_failure_callback): New function.
24409         (print_unicode_char): Call unicode_to_mb.
24410
24411 2002-01-26  Jim Meyering  <meyering@lucent.com>
24412
24413         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
24414         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
24415
24416 2002-01-26  Jim Meyering  <meyering@lucent.com>
24417
24418         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
24419
24420 2002-01-22  Paul Eggert  <eggert@twinsun.com>
24421
24422         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
24423
24424 2002-01-22  Jim Meyering  <meyering@lucent.com>
24425
24426         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
24427         Otherwise, some versions of automake would omit the rule that makes
24428         Makefile from Makefile.in.
24429
24430 2002-01-21  Paul Eggert  <eggert@twinsun.com>
24431
24432         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
24433         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24434         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
24435         (memcoll): Set errno to zero if there is no error.
24436
24437         * lib/quotearg.c (quotearg_buffer_restyled):
24438         Fix bug with quoting buffers containing NUL when backslashing escapes.
24439         This bug was exposed by the other changes in this patch.
24440         (quotearg_n_options): New arg ARGSIZE.
24441         All callers changed.
24442         (quoting_options_from_style): New function.
24443         (quotearg_n_style): Use it.
24444         (quotearg_n_style_mem): New function.
24445
24446         * lib/quotearg.h (quotearg_n_style_mem): New function.
24447
24448 2002-01-19  Jim Meyering  <meyering@lucent.com>
24449
24450         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
24451         Remove useless quotes: DF_PROG="df".
24452         * m4/strnlen.m4: New file.
24453
24454 2002-01-16  Paul Eggert  <eggert@twinsun.com>
24455
24456         * lib/backupfile.c (ISDIGIT): Comment fix.
24457         * lib/getdate.y (ISDIGIT): Likewise.
24458         * lib/posixtm.c (ISDIGIT, year): Likewise.
24459         * lib/strverscmp.c (ISDIGIT): Likewise.
24460         * lib/userspec.c (ISDIGIT): Likewise.
24461
24462 2002-01-16  Jim Meyering  <meyering@lucent.com>
24463
24464         * lib/getdate.y: Add three semicolons, each just before a closing
24465         brace. Bison (as of version 1.31) no longer papers over that mistake.
24466
24467 2002-01-05  Jim Meyering  <meyering@lucent.com>
24468
24469         * lib/version-etc.c (version_etc_copyright): Update copyright year.
24470
24471 2001-12-19  Paul Eggert  <eggert@twinsun.com>
24472
24473         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
24474         not silently exit merely because the output buffer happens to
24475         have nothing pending.
24476
24477 2001-12-18  Paul Eggert  <eggert@twinsun.com>
24478
24479         See the big note in ../ChangeLog.
24480         * lib/human.c (suffixes): Prefer K to k for 1024.
24481         (generate_suffix_backwards): New function.
24482         (human_readable_inexact): Use it.
24483         * lib/xstrtol.c (__xstrtol): If there is no number but there
24484         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
24485         Accept 'K' as well as 'k'.
24486
24487 2001-12-15  Jim Meyering  <meyering@lucent.com>
24488
24489         * lib/regex.h (__restrict_arr): Update from libc.
24490
24491         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
24492         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
24493         (STREQ): Define.
24494
24495 2001-12-14  Jim Meyering  <meyering@lucent.com>
24496
24497         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
24498         Suggestion from Bruno Haible.
24499
24500 2001-12-10  Jim Meyering  <meyering@lucent.com>
24501
24502         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
24503         xrealloc, Instead, include "xalloc.h".
24504         (initbuffer): Don't cast xmalloc return value to char*.
24505         (readline): Reword comment.
24506         Don't cast xrealloc return value to char*
24507         Return NULL, not 0.
24508
24509 2001-12-09  Jim Meyering  <meyering@lucent.com>
24510
24511         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
24512         about `signed and unsigned type in conditional expression'.
24513         * lib/posixtm.c (posix_time_parse): Likewise.
24514
24515         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
24516
24517         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
24518         to avoid a pedantic warning.
24519
24520         * lib/getstr.c: Don't include assert.h.
24521         (getstr): Remove warning-evoking assertions.
24522         Return -1 if offset parameter is out of bounds.
24523         Change the type of a local from int to size_t.
24524
24525         * lib/strftime.c (my_strftime_localtime_r): Include this function
24526         definition in the `#if ! HAVE_TM_GMTOFF' block.
24527
24528         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
24529         Include xalloc.h instead.
24530
24531 2001-12-02  Jim Meyering  <meyering@lucent.com>
24532
24533         * lib/tempname.c: Don't declare getenv, thus reverting the change of
24534         2001-11-18.  It's no longer necessary, now that stdlib.h is always
24535         included.
24536
24537         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
24538         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
24539
24540 2001-11-30  Akim Demaille  <akim@epita.fr>
24541
24542         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
24543         before being defined.
24544
24545 2001-11-27  Paul Eggert  <eggert@twinsun.com>
24546
24547         * lib/quotearg.h (quotearg_n, quotearg_n_style):
24548         First arg is int, not unsigned.
24549         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
24550         (SIZE_MAX, UINT_MAX): New macros.
24551         (quotearg_n_options): Abort if N is negative.
24552         Avoid overflow check on hosts where size_t is 64 bits and int
24553         is 32 bits, as overflow is impossible there.
24554         Fix off-by-one typo that caused unnecessary reallocation.
24555
24556 2001-11-27  Jim Meyering  <meyering@lucent.com>
24557
24558         * lib/tempname.c: Merge with version from libc.
24559         * lib/regex.c: Likewise.
24560
24561         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
24562         systems for which STDC_HEADERS is 0, it was not included, resulting in
24563         a warning about an integer-to-pointer conversion problem with getenv.
24564         Reported by Volker Borchert.
24565
24566 2001-11-26  Jim Meyering  <meyering@lucent.com>
24567
24568         * lib/gtod.h: Remove file.
24569         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
24570         * lib/gettimeofday.c: Don't include gtod.h.
24571         (GTOD_init): Remove function.
24572         (rpl_gettimeofday): Do its job here instead, rather than aborting.
24573         Suggestion from Volker Borchert.
24574
24575 2001-11-23  Jim Meyering  <meyering@lucent.com>
24576
24577         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
24578         it.
24579         * lib/hash.c (struct hash_table): Define it here instead.
24580
24581 2001-11-22  Jim Meyering  <meyering@lucent.com>
24582
24583         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
24584
24585 2001-11-20  Jim Meyering  <meyering@lucent.com>
24586
24587         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
24588         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
24589
24590 2001-11-19  Jim Meyering  <meyering@lucent.com>
24591
24592         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
24593         directory.  Use "conftestXXXXXX" as the template.
24594         Suggestion from Paul Eggert.
24595
24596         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
24597         immediately, so the test doesn't mistakenly hit the max-open-files
24598         limit.
24599
24600 2001-11-18  Paul Eggert  <eggert@twinsun.com>
24601
24602         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
24603         (TEMPORARIES): New macro.
24604         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
24605         removes an artificial limitation (e.g. HP-UX 10.20, where
24606         TMP_MAX is 17576).
24607
24608 2001-11-18  Jim Meyering  <meyering@lucent.com>
24609
24610         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
24611
24612 2001-11-18  Jim Meyering  <meyering@lucent.com>
24613
24614         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
24615         on SunOS 4.
24616
24617         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
24618         files will be created before anything else.
24619
24620 2001-11-17  Paul Eggert  <eggert@twinsun.com>
24621
24622         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
24623         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
24624
24625 2001-11-17  Jim Meyering  <meyering@lucent.com>
24626
24627         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
24628         Prompted by a report from Bob Proulx.
24629
24630         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
24631         Instead, require UTILS_FUNC_MKSTEMP.
24632
24633 2001-11-17  Jim Meyering  <meyering@lucent.com>
24634
24635         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
24636         Now, that's done as part of AC_FUNC_STRTOD.
24637
24638 2001-11-17  Jim Meyering  <meyering@lucent.com>
24639
24640         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
24641         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
24642         rather than group writable.  Patch by Juan F. Codagnone.
24643
24644         * lib/readtokens.c: Remove explicit declarations of xmalloc and
24645         xrealloc, Instead, include "xalloc.h".
24646
24647         * lib/mountlist.c: Include unlocked-io.h after all system headers.
24648         Remove explicit declarations of xmalloc, xrealloc,
24649         and xstrdup.  Instead, include "xalloc.h".
24650
24651         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
24652         unlocked-io.h.
24653         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
24654         Likewise.
24655         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
24656
24657         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
24658         Reported by Padraig Brady.
24659
24660         * lib/mkstemp.c: #undef mkstemp.
24661         Include config.h.
24662         (rpl_mkstemp): Rename from mkstemp.
24663         Protoize.
24664
24665 2001-11-16  Jim Meyering  <meyering@lucent.com>
24666
24667         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
24668         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
24669         determine the amount of total physical memory, use pstat_getstatic.
24670         HPUX-11 doesn't define _SC_PHYS_PAGES.
24671         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
24672         If sysconf couldn't be used to determine the amount of available
24673         physical memory, use both pstat_getstatic and pstat_getdynamic.
24674         Based on a patch from Bob Proulx.
24675
24676 2001-11-10  Jim Meyering  <meyering@lucent.com>
24677
24678         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
24679         (jm_PREREQ): Use it.
24680
24681 2001-11-09  Jim Meyering  <meyering@lucent.com>
24682
24683         * m4/jm-macros.m4: Require autoconf-2.52f.
24684         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
24685         Use these AC_-prefixed names, not the AM_-prefixed ones.
24686
24687         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
24688
24689 2001-11-05  Jim Meyering  <meyering@lucent.com>
24690
24691         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
24692
24693 2001-11-04  Jim Meyering  <meyering@lucent.com>
24694
24695         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
24696         $DEFS.
24697
24698 2001-11-03  Jim Meyering  <meyering@lucent.com>
24699
24700         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
24701         of AC_DEFUN.
24702
24703         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
24704         know the name of the variable in the macro definition.
24705
24706 2001-11-03  Jim Meyering  <meyering@lucent.com>
24707
24708         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
24709         in argmatch_to_argument call.
24710
24711         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
24712         argument.
24713
24714         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
24715         e.g., a fault due to an attempt to free a NULL pointer.
24716
24717 2001-11-01  Jim Meyering  <meyering@lucent.com>
24718
24719         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
24720         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
24721
24722 2001-11-01  Jim Meyering  <meyering@lucent.com>
24723
24724         * lib/dirfd.c, lib/dirfd.h: New files.
24725         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
24726
24727         * lib/hash.c (hash_print) [TESTING]: Clean up.
24728
24729 2001-10-22  Paul Eggert  <eggert@twinsun.com>
24730
24731         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
24732         to avoid a warning if -Wall.
24733
24734 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
24735
24736         * README: New file
24737         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
24738         (per RMS's instructions, this is now the canonical source)
24739         * lgpl/, gpl/: New directories.
24740
24741 2001-10-21  Paul Eggert  <eggert@twinsun.com>
24742
24743         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
24744
24745 2001-10-21  Jim Meyering  <meyering@lucent.com>
24746
24747         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
24748         this code would end up calling gettext even in packages built
24749         with --disable-nls.
24750         * lib/getopt.c (_): Likewise.
24751         * lib/regex.c (_): Likewise.
24752
24753 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24754
24755         * m4/error.m4 (jm_PREREQ_ERROR):
24756         Do not invoke AC_CHECK_FUNCS with strerror_r, as
24757         AC_FUNC_STRERROR_R does that.
24758         Check for strerror declaration.
24759
24760         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
24761         are supposed to have them these days.
24762         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
24763         Merge changes from latest Autoconf CVS.
24764         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
24765         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
24766         POSIX decided to standardize on the int flavor of strerror_r.
24767
24768 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24769
24770         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
24771         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
24772         Use strerror_r that is only a macro, even if it is not a function.
24773         (strerror): Check for HAVE_DECL_STRERROR before declaring.
24774         (private_strerror): Use prototypes, not old-style function definition.
24775         (print_errno_message): New function.
24776         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
24777         char*-flavored one.
24778         (error_tail, error, error_at_line): Use it.
24779
24780 2001-10-11  Jim Meyering  <meyering@lucent.com>
24781
24782         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
24783         and quote_n (1, ... to avoid clobbering a buffer.
24784
24785 2001-10-05  Jim Meyering  <meyering@lucent.com>
24786
24787         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
24788         hash-pjw.h.
24789         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
24790         * lib/hash-pjw.h: New file.
24791
24792 2001-09-30  Jim Meyering  <meyering@lucent.com>
24793
24794         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
24795         `struct fsstat' has the `f_fstypename' member.
24796         Use that to define FS_TYPE, which is now used to make
24797         the getfsstat link test tighter.
24798
24799 2001-09-30  Jim Meyering  <meyering@lucent.com>
24800
24801         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
24802         Include <sys/ucred.h>, for Apple Darwin.
24803         Include sys/mount.h and sys/fs_types.h only if available.
24804         (FS_TYPE): Define.
24805         (read_filesystem_list): Use FS_TYPE.
24806
24807 2001-09-29  Paul Eggert  <eggert@twinsun.com>
24808
24809         * lib/exclude.c (excluded_filename): 0 -> false, since it's
24810         a boolean context.
24811
24812 2001-09-29  Jim Meyering  <meyering@lucent.com>
24813
24814         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24815         [one-argument getmntent function]): Include stdio.h before mntent.h.
24816         SunOS 4.1.x needs it for the declaration of `FILE'.
24817         Patch by Volker Borchert.
24818
24819         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24820         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
24821         sys/fs_types.h, and make the link-test for getfsstat guard #include
24822         directives with appropriate #if HAVE_*_H tests so that we can
24823         detect getfsstat on Apple Darwin1.3.7 systems.
24824         Reported by Nelson Beebe.
24825         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
24826
24827 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24828
24829         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24830         #defines strtoimax.  Also treat the other strto* functions
24831         like strtoimax.
24832
24833         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24834         Check for strtoul and strtoumax,
24835         as those declarations are made even in the signed case.
24836         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
24837         Likewise, for strtol and strtoimax.
24838
24839 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24840
24841         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24842         #defines strtoimax.  Also treat the other strto* functions
24843         like strtoimax.
24844
24845         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
24846         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
24847         (strtoimax, strtoumax): Do not declare if already defined as a macro.
24848
24849 2001-09-26  Jim Meyering  <meyering@lucent.com>
24850
24851         Most macros in unlocked-io.h had the wrong number of arguments.
24852         * lib/gen-uio: New script.
24853         (USE_UNLOCKED_IO): Define to 1 if not already defined.
24854         * lib/unlocked-io.hin: Remove file.
24855         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
24856         rather than trying to embed it here.
24857         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
24858         Reported by Padraig Brady.
24859
24860 2001-09-25  Volker Borchert  <bt@teknon.de>
24861
24862         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
24863         `result'.
24864
24865 2001-09-24  Jim Meyering  <meyering@lucent.com>
24866
24867         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
24868
24869 2001-09-23  Jim Meyering  <meyering@lucent.com>
24870
24871         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
24872         instead of the mere test for existence of mntent.h.  The latter
24873         would get a false-positive on AIX 3.4 systems.
24874         In the outer getmntent if-block, don't die if neither of the getmntent
24875         tests succeeds.  Instead, just fall through and continue with the
24876         remaining tests.
24877
24878 2001-09-23  Jim Meyering  <meyering@lucent.com>
24879
24880         * lib/mountlist.c: Remove useless parentheses in #if directives.
24881         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
24882         the deprecated MOUNTED symbol is no longer defined in mntent.h.
24883
24884 2001-09-22  Jim Meyering  <meyering@lucent.com>
24885
24886         * m4/gettext.m4: New file.  From gettext.
24887         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
24888         * m4/progtest.m4: Likewise
24889         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
24890         * m4/glibc21.m4: Likewise.
24891
24892         * m4/libintl.m4: Remove.  No longer used.
24893
24894 2001-09-22  Jim Meyering  <meyering@lucent.com>
24895
24896         * lib/localcharset.c: Update from latest gettext.
24897         * lib/config.charset: Likewise.
24898
24899 2001-09-20  Jim Meyering  <meyering@lucent.com>
24900
24901         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
24902         strtoimax.
24903         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
24904         strtoumax.
24905
24906 2001-09-20  Jim Meyering  <meyering@lucent.com>
24907
24908         * lib/xstrtol.c (strtoimax): Guard declaration with
24909         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
24910         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
24911         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
24912         (strtoumax): Likewise, for completeness (it wasn't necessary).
24913
24914 2001-09-17  Paul Eggert  <eggert@twinsun.com>
24915
24916         * lib/strtoimax.c (HAVE_LONG_LONG):
24917         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
24918         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
24919         to work around bug in IBM C compiler.
24920
24921 2001-09-17  Jim Meyering  <meyering@lucent.com>
24922
24923         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
24924         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
24925         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
24926         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
24927         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
24928         whenever the right hand side need not be expanded by the shell.
24929
24930 2001-09-16  Paul Eggert  <eggert@twinsun.com>
24931
24932         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
24933         library.  It's not correct, as some older glibcs are buggy.
24934         fnmatch wasn't fixed until glibc 2.2.
24935
24936         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
24937         special shell magic here.
24938
24939 2001-09-16  Jim Meyering  <meyering@lucent.com>
24940
24941         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
24942         * m4/jm-macros.m4: Require it.
24943
24944 2001-09-16  Jim Meyering  <meyering@lucent.com>
24945
24946         * lib/mkdir.c: New file.
24947
24948 2001-09-15  Jim Meyering  <meyering@lucent.com>
24949
24950         * m4/jm-macros.m4: Check for help2man.
24951
24952 2001-09-11  Jim Meyering  <meyering@lucent.com>
24953
24954         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
24955         The body, by Paul Eggert, was moved here from configure.in.
24956         * m4/jm-macros.m4: Require UTILS_HOST_OS.
24957
24958 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24959
24960         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
24961         (jm_PREREQ): Use it.
24962
24963 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24964
24965         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
24966         Use ssize_t, not int, to store result of readlink.
24967         Check for ssize_t overflow as well as size_t overflow,
24968         as POSIX says the result of readlink is implementation-defined
24969         when ssize_t overflows.
24970         Remove unnecessary cast to char*.
24971         Use free+malloc instead of realloc, as the storage doesn't need
24972         to be preserved and it's clearer and can be more efficient that way.
24973         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
24974         * lib/xreadlink.h (xreadlink): Update prototype.
24975
24976 2001-09-04  Paul Eggert  <eggert@twinsun.com>
24977
24978         * lib/xgetcwd.c: Revert some of the previous change; intead,
24979         fix the HAVE_GETCWD_NULL code to behave more like the
24980         !HAVE_GETCWD_NULL code used to.
24981
24982         Include "xalloc.h".
24983         (xgetcwd): Do not return NULL when memory is exhausted; instead,
24984         invoke xalloc_die.
24985
24986 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24987
24988         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
24989         sys/param.h, as pathmax.h includes them.
24990
24991 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24992
24993         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
24994         (jm_PREREQ_XGETCWD): New macro.
24995
24996         * m4/getcwd.m4: New file.
24997
24998 2001-09-03  Paul Eggert  <eggert@twinsun.com>
24999
25000         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
25001         like the HAVE_GETCWD_NULL code.
25002         Include pathmax.h if not HAVE_GETCWD.
25003         Do not include xalloc.h.
25004         (INITIAL_BUFFER_SIZE): New symbol.
25005         Do not use xmalloc / xrealloc, since the caller is responsible for
25006         handling errors.  Preserve errno around `free' during failure.
25007         Do not overrun buffer when using getwd.
25008
25009 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25010
25011         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
25012         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
25013         getcwd (NULL, 0).
25014
25015 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25016
25017         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
25018         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
25019         spotted by Jim Meyering.
25020
25021 2001-09-03  Jim Meyering  <meyering@lucent.com>
25022
25023         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
25024         failure.
25025
25026 2001-09-02  Jim Meyering  <meyering@lucent.com>
25027
25028         * lib/error.c: Update from GNU libc.
25029
25030 2001-09-01  Jim Meyering  <meyering@lucent.com>
25031
25032         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
25033         Used by df.
25034
25035 2001-09-01  Jim Meyering  <meyering@lucent.com>
25036
25037         * lib/xreadlink.c: New file.
25038         * lib/xreadlink.h: New file.
25039         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
25040         xreadlink.h.
25041
25042         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
25043         doesn't conflict with sparc Solaris 7's definition in
25044         /usr/include/sys/int_types.h.
25045
25046         * lib/exclude.c: Use `""', not `<>' to #include non-system header
25047         files.
25048         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
25049         and strncasecmp as r-values.  Unixware didn't have declarations.
25050
25051 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25052
25053         * lib/xstrtol.h: Add copyright notice.
25054         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
25055         LONGINT_INVALID_SUFFIX_CHAR.
25056
25057 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25058
25059         * lib/xstrtol.c (strtoimax): New decl.
25060
25061 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25062
25063         * lib/xgetcwd.c: Don't include pathmax.h.
25064         Include stdlib.h and unistd.h if available.
25065         Include xalloc.h.
25066         (xmalloc, xstrdup, free): Remove decls.
25067         (xgetcwd): Don't assume sizes fit in unsigned.
25068         Check for overflow when computing sizes.
25069         Simplify reallocation code.
25070
25071 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25072
25073         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
25074         a directory's st_size can have an arbitrary value, so the old
25075         usage could waste an arbitrary amount of memory.  All uses
25076         changed.
25077         * lib/savedir.h: Update prototype.
25078
25079 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25080
25081         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
25082
25083         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
25084         old strtoimax.c.
25085
25086         Also, make the following further changes to make this file's
25087         configuration more similar to that of strtol.c:
25088         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
25089         (strtoumax, uintmax_t, strtoull, strtol): Remove.
25090         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
25091         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
25092         changed to signed values.
25093
25094         And make the following changes as well:
25095         Fix copyright notice, as 1999 was missing.
25096         (verify): New macro.
25097         (strtoimax): Check sizes at compile-time, not run-time.
25098         Prefer strtol to strtoll if both work.
25099         (main): Remove; it was not that useful and was a pain to maintain.
25100
25101         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
25102
25103 2001-08-31  Jim Meyering  <meyering@lucent.com>
25104
25105         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
25106         Use an initial, malloc'd, buffer of length 128 rather than
25107         a statically allocated one of length 1024.
25108
25109 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25110
25111         Simplify code, partly by assuming autoconf 2.52 semantics.
25112
25113         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
25114
25115         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
25116         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
25117         All uses removed.
25118         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
25119         Move AC_REQUIRE to next-to-top level, to avoid confusion.
25120         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
25121         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
25122         jm_AC_HEADER_INTTYPES_H.
25123         * m4/jm-macros.m4 (jm_MACROS): Likewise.
25124
25125         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
25126
25127         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25128         Quote first arg of AC_DEFUN.
25129         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
25130         since they are needed to parse the include file even if we need
25131         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
25132         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
25133         but with opposite signedness.
25134
25135 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25136
25137         Merge 'exclude' changes from tar 1.13.22.
25138         This fixes one or two unlikely storage allocation overflow bugs,
25139         but doesn't change user-visible behavior otherwise.
25140
25141 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25142
25143         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
25144         (jm_PREREQ_EXCLUDE): New macro.
25145
25146 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25147
25148         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
25149         tm to be declared.
25150
25151 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25152
25153         * lib/hash.c: Remove '2001' from copyright notice.
25154
25155 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25156
25157         * lib/full-write.h: New file.
25158         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
25159         * lib/full-write.c: Correct credits, as cccp.c no longer
25160         exists and anyway it was so heavily changed from the old cccp
25161         code as to be unrecognizable.  Include full-write.h.
25162         (full_write) Return size_t, with short writes meaning failure.
25163         All callers changed.  This fixes a bug with large buffers
25164         on 64-bit hosts.
25165         * lib/utime.c: Include full-write.h.
25166
25167 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25168
25169         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
25170         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
25171         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
25172         Include if available.
25173         (<xalloc.h>): Include
25174         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
25175         (verify): New macro.  Use it to verify that EXCLUDE macros do not
25176         collide with FNM macros.
25177         (struct patopts): New struct.
25178         (struct exclude): Use it, as exclude patterns now come with options.
25179         (new_exclude): Support above changes.
25180         (new_exclude, add_exclude_file):
25181         Initial size must now be a power of two to simplify overflow checking.
25182         (free_exclude, fnmatch_no_wildcards): New function.
25183         (excluded_filename): No longer requires options arg, as the options
25184         are determined by add_exclude.  Now returns bool, not int.
25185         (excluded_filename, add_exclude):
25186         Add support for the fancy new exclusion options.
25187         (add_exclude, add_exclude_file): Now takes int options arg.
25188         Check for arithmetic overflow when computing sizes.
25189         (add_exclude_file): xrealloc might modify errno, so don't
25190         realloc until after errno might be used.
25191
25192         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
25193         New macros.
25194         (free_exclude): New decl.
25195         (add_exclude, add_exclude_file): Now takes int options arg.
25196         (excluded_filename): No longer requires options arg, as the options
25197         are determined by add_exclude.  Now returns bool, not int.
25198
25199 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25200
25201         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
25202
25203 2001-08-27  Jim Meyering  <meyering@lucent.com>
25204
25205         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
25206
25207         * lib/version-etc.c (N_): Remove definition.
25208         Revert most of last change.
25209         Instead, simply don't mark the `Copyright...' string for translation.
25210         Based on advice from Paul Eggert.
25211
25212         * lib/strtoxmax.c: Tweak comment.
25213
25214 2001-08-26  Jim Meyering  <meyering@lucent.com>
25215
25216         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
25217
25218         * m4/xstrtoimax.m4: New file.
25219         * m4/xstrtoumax.m4: Add comments explaining why we
25220         AC_REPLACE_FUNCS(strtol).
25221
25222 2001-08-26  Jim Meyering  <meyering@lucent.com>
25223
25224         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
25225         of copyright with `%s' so translators don't get an untranslated
25226         message in 2002.
25227         (COPYRIGHT_YEAR): Define.
25228         (version_etc): Use fprintf rather than fputs.
25229         Suggestion from Ulrich Drepper.
25230
25231         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
25232
25233         * lib/strtoll.c: New file, from GNU libc.
25234         * lib/xstrtoimax.c: New file.
25235
25236         * lib/xstrtol.h: Add xstrtoimax.
25237         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
25238         * lib/strtoimax.c: New file.  Likewise, but first define
25239         STRTOUXMAX_SIGNED.
25240
25241         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
25242         ...
25243         * lib/strtoxmax.c: ... then renamed to this.
25244
25245 2001-08-18  Paul Eggert  <eggert@twinsun.com>
25246
25247         * m4/inttypes.m4: Add AC_PREREQ(2.13).
25248         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
25249         (jm_AC_TYPE_INTMAX_T): New macro.
25250         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
25251
25252         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
25253
25254         * m4/longlong.m4: Renamed from ulonglong.m4.
25255         * m4/inttypes.m4: Renamed from inttypes_h.m4.
25256         * m4/uintmax_t.m4: Removed.
25257
25258 2001-08-13  Paul Eggert  <eggert@twinsun.com>
25259
25260         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
25261         Port to Solaris 8, where 'sed' requires a space after the 'r'
25262         command, and where sh dislikes "$/".  Clean up the spacing a bit.
25263         Redirect output to $tmp just once.
25264
25265 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
25266
25267         * lib/addext.c (<errno.h>): Include.
25268         (errno): Declare if not defined.
25269         (addext): Work correctly when pathconf returns -1 and leaves
25270         errno alone because there is no limit.  Also, work even if
25271         pathconf returns a value greater than SIZE_MAX.
25272
25273 2001-08-12  Jim Meyering  <meyering@lucent.com>
25274
25275         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
25276         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
25277         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
25278         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
25279         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
25280         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
25281         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
25282         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
25283         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
25284         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
25285         utime.m4, utimes.m4, xstrtoumax.m4:
25286         Quote the first argument in each use of AC_DEFUN.
25287
25288 2001-08-12  Jim Meyering  <meyering@lucent.com>
25289
25290         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
25291         Simply `return getcwd (NULL, 0);'.
25292         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
25293         Use 1300 as initial value for length, not PATH_MAX.
25294
25295         * lib/pathmax.h: Clean up cpp syntax.
25296
25297 2001-08-12  Jim Meyering  <meyering@lucent.com>
25298
25299         * lib/gettimeofday.c: New file.
25300         * lib/gtod.h: New file.
25301         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
25302
25303 2001-08-05  Jim Meyering  <meyering@lucent.com>
25304
25305         * m4/jm-macros.m4: Require autoconf-2.52.
25306
25307 2001-08-04  Jim Meyering  <meyering@lucent.com>
25308
25309         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
25310         stmt, to get in sync with glibc.
25311
25312 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25313
25314         The following changes are from gettext 0.10.39 as maintained by
25315         Bruno Haible.
25316
25317         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
25318         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
25319         with inverted sense.  All uses changed.
25320
25321         * lib/mbswidth.c: Don't include <limits.h>.
25322         Include <stdlib.h> and <string.h> unconditionally.
25323         (iswcntrl, mbsinit, ISCNTRL): New macros.
25324         (mbsnwidth): Use K&R style function declarations.
25325         Don't bother checking for MB_LEN_MAX == 1, since the compiler
25326         can optimize it when MB_CUR_MAX == 1.
25327         The width of control characters is zero, not 1.
25328
25329 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25330
25331         The following changes are from gettext 0.10.39 as maintained by
25332         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
25333
25334         * m4/codeset.m4: Upgrade to serial AM1.
25335         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
25336         all uses changed.  Quote first arg of AC_DEFUN.
25337         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
25338
25339         * m4/iconv.m4: Upgrade to serial AM2.
25340         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
25341         Add --with-libconv-prefix.
25342         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
25343         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
25344         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
25345         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
25346         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
25347
25348         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
25349         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
25350         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
25351         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
25352         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
25353         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
25354         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
25355         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
25356         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
25357
25358         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
25359         string.h any more.
25360
25361         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
25362         not the default value.
25363
25364         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
25365         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
25366         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
25367         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
25368         Also check for iswcntrl, used for wcwidth fallback.
25369         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
25370         to Autoconf 2.13.
25371
25372 2001-08-03  Jim Meyering  <meyering@lucent.com>
25373
25374         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
25375         as it was in the original.  Reported by Paul Eggert.
25376
25377 2001-07-16  Jim Meyering  <meyering@lucent.com>
25378
25379         * m4/gettimeofday.m4: New file.
25380         Prompted by a report from Bernhard Baehr.
25381
25382 2001-07-15  Jim Meyering  <meyering@lucent.com>
25383
25384         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
25385         stuff. Now it's in ../Makefile.cfg.
25386
25387 2001-07-15  Jim Meyering  <meyering@lucent.com>
25388
25389         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
25390         (BUILT_SOURCES): Add unlocked-io.h.
25391         (io_functions): Define.
25392         (unlocked-io.h): New rule.
25393         (DISTCLEANFILES): Add unlocked-io.h.
25394         (all-local): Depend on unlocked-io.h, to ensure it is created.
25395
25396         * lib/unlocked-io.hin: New file
25397
25398         * lib/regex.c: Update from glibc.
25399
25400 2001-07-05  Jim Meyering  <meyering@lucent.com>
25401
25402         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
25403         recommendation.
25404         (libfetish_a_SOURCES): Put all .h files here instead.
25405         Remove a thus-exposed (better checks in automake) duplicate and
25406         two unnecessary .h files.
25407
25408 2001-07-04  Jim Meyering  <meyering@lucent.com>
25409
25410         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
25411         that generates jm-glibc-io.m4 so that it doesn't trigger any make
25412         distcheck failure.
25413
25414 2001-07-02  Jim Meyering  <meyering@lucent.com>
25415
25416         The following changes were prompted by suggestions from Bruno Haible.
25417
25418         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
25419         is now generated.
25420         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
25421         definition of EXTRA_DIST.
25422         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
25423         ensure that the generated file is created/updated whenever the list
25424         of $(unlocked_functions) is changed.
25425         (jm-glibc-io.m4): New rule.
25426         (unlocked-io.h): New rule -- currently unused.
25427
25428 2001-06-24  Jim Meyering  <meyering@lucent.com>
25429
25430         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
25431         unmatched right bracket, rather than kludging it with an extra,
25432         falsely-matching quote in a comment.  Patch by Akim Demaille.
25433
25434 2001-06-11  Jim Meyering  <meyering@lucent.com>
25435
25436         * lib/regex.c: Update from GNU libc.
25437
25438 2001-05-27  Jim Meyering  <meyering@lucent.com>
25439
25440         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
25441         Check for ut_type in struct utmp.
25442
25443 2001-05-27  Jim Meyering  <meyering@lucent.com>
25444
25445         * lib/readutmp.h (UT_TYPE): Define.
25446
25447 2001-05-24  Jim Meyering  <meyering@lucent.com>
25448
25449         * lib/argmatch.c: Include "quote.h".
25450         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
25451         quote function.  Reported by Göran Uddeborg.
25452
25453 2001-05-22  Jim Meyering  <meyering@lucent.com>
25454
25455         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
25456         now that we use the package-supplied version unconditionally.
25457         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
25458
25459 2001-05-21  Jim Meyering  <meyering@lucent.com>
25460
25461         * m4/regex.m4: Change a couple backticks to single quotes to avoid
25462         shell syntax errors.
25463
25464 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25465
25466         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
25467
25468 2001-05-20  Paul Eggert  <eggert@twinsun.com>
25469
25470         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
25471         Don't bother to check library strftime, since
25472         we'll be using our own my_strftime function anyway.
25473         Define my_strftime instead of strftime.
25474
25475 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
25476
25477         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
25478         which is not yet declared.
25479
25480 2001-05-15  Jim Meyering  <meyering@lucent.com>
25481
25482         * m4/regex.m4: Use proper quoting so brackets appear in the test
25483         program.
25484         Reported by, and with help from, Bruno Haible.
25485
25486 2001-05-13  Jim Meyering  <meyering@lucent.com>
25487
25488         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
25489         undefined.
25490
25491 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25492
25493         dirname code cleanup.  base_name now behaves more compatibly
25494         with POSIX basename when given file names that have trailing
25495         slashes, and similarly for dir_name.  Add new primitives
25496         base_len and dir_len.  Put the directory-name-related decls
25497         into dirname.h.
25498
25499         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
25500         * lib/backupfile.c (base_name): Likewise.
25501         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
25502         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
25503         * lib/makepath.c (strip_trailing_slashes): Likewise.
25504         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
25505         ISSLASH): Likewise.
25506         * lib/rename.c (strip_trailing_slashes): Likewise.
25507         * lib/same.c (base_name): Likewise.
25508         * lib/stripslash.c (ISSLASH): Likewise.
25509
25510         * lib/addext.c: Include <dirname.h> after size_t is defined.
25511         * lib/backupfile.c: Likewise.
25512
25513         * lib/addext.c (addext): Use base_len to trim redundant
25514         trailing slashes instead of doing it ourselves.
25515         But do not trim the last slash if it is not redundant.
25516
25517         * lib/backupfile.c (find_backup_file_name,
25518         max_backup_version): Use base_len instead of rolling it ourselves.
25519         Handle the case of "" and (on DOS) "C:" correctly.
25520
25521         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
25522         needed. Include <string.h>, <dirname.h>.
25523         (base_name): Allow file names ending in slashes, other than names
25524         that are all slashes.  In this case, return the basename followed
25525         by the slashes.  This is more general, and can be used in places
25526         where the original base_name purposely had an assertion failure.
25527         (base_len): New function.
25528
25529         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
25530         Do not include <assert.h>; no longer needed.
25531         Include xalloc.h.
25532         (memrchr): Remove decl.
25533         (dir_name_r): Remove.
25534         (dir_len): Renamed from dirlen.  All callers changed.
25535         Rewrite in terms of base_name, for simplicity and consistency.
25536         (dir_name): Never return NULL.  All callers changed.
25537         Do not include <stdlib.h> in test program; no longer needed.
25538         return 0; is fine for test program.
25539
25540         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
25541         New macros.
25542         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
25543
25544         * lib/path-concat.c (path_concat): Use base_len to compute
25545         base length, not strlen; this means we cannot rely on memcpy
25546         to null-terminate.
25547
25548         * lib/same.c (STREQ): Remove.
25549         (same_name): Handle the case where the basename ends in trailing '/'.
25550
25551         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
25552         a slash was stripped.  Do not strip the last slash after a
25553         file system prefix.
25554
25555 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25556
25557         * lib/Makefile.am (libfetish_a_SOURCES):
25558         Add strftime.c, since we now compile it on all hosts.
25559
25560         * lib/strftime.c (my_strftime):
25561         Define to nstrftime if emacs, but only if my_strftime is not defined.
25562         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
25563         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
25564         Add one more extra argument: a nanoseconds value.
25565         All uses changed.
25566         (ns): New macro.
25567         (my_strftime function): Add %N format.
25568         (emacs_strftimeu): Renamed from emacs_strftime,
25569         with extra ut argument.
25570
25571 2001-05-09  Paul Eggert  <eggert@twinsun.com>
25572
25573         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
25574
25575 2001-04-21  Jim Meyering  <meyering@lucent.com>
25576
25577         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
25578         doesn't interfere.
25579
25580 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25581
25582         * m4/ftruncate.m4: Check for chsize.
25583         Link with ftruncate.o unconditionally if ftruncate is missing.
25584         This was required when cross-compiling to i586-mingw32msvc.
25585
25586 2001-04-08  Jim Meyering  <meyering@lucent.com>
25587
25588         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
25589         recomputed; that's necessary when the offset spans a DST transition.
25590         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
25591
25592 2001-04-02  Jim Meyering  <meyering@lucent.com>
25593
25594         * lib/regex.h, regex.c: Update from GNU libc.
25595
25596 2001-03-24  Jim Meyering  <meyering@lucent.com>
25597
25598         * m4/jm-macros.m4: Require autoconf-2.49d.
25599
25600 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
25601
25602         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
25603
25604 2001-03-19  Paul Eggert  <eggert@twinsun.com>
25605
25606         * lib/version-etc.c (version_etc_copyright): Update to 2001.
25607
25608 2001-03-17  Jim Meyering  <meyering@lucent.com>
25609
25610         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
25611         now that the version in autoconf is equivalent.
25612         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
25613
25614         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
25615         Suggestion from Akim Demaille.
25616
25617         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
25618         (jm_PREREQ_TEMPNAME): New function.
25619
25620 2001-03-16  Paul Eggert  <eggert@twinsun.com>
25621
25622         * lib/tempname.c (uint64_t): Define to uintmax_t if
25623         not defined, and if UINT64_MAX is not defined.
25624         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
25625         Reported by John David Anglin.
25626
25627 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
25628
25629         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
25630         resolve alias if codeset is empty.
25631         * lib/config.charset (BeOS): Use wildcard syntax.
25632
25633 2001-03-13  Jim Meyering  <meyering@lucent.com>
25634
25635         * lib/path-concat.c (path_concat)
25636         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
25637         concatenating e.g., `C:' and `foo'.
25638         From Bruno Haible.
25639
25640 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25641
25642         * lib/localcharset.c (locale_charset): Don't use
25643         setlocale(LC_CTYPE,NULL). Don't return NULL.
25644         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
25645
25646 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25647
25648         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
25649         support for DOS/DJGPP.
25650
25651 2001-03-01  Paul Eggert  <eggert@twinsun.com>
25652
25653         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
25654         lacks mkstemp.  Compile our own tempname.c if we compile our own
25655         mkstemp.c, as mkstemp relies on tempname.
25656
25657 2001-03-01  Jim Meyering  <meyering@lucent.com>
25658
25659         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
25660         AH_VERBATIM really does output its argument verbatim.
25661
25662 2001-02-28  Paul Eggert  <eggert@twinsun.com>
25663
25664         * lib/Makefile.am (libfetish_a_SOURCES):
25665         Add dup-safer.c, fopen-safer.c.
25666         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
25667
25668         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
25669         * lib/unistd-safer.h: New files.
25670
25671 2001-02-25  Paul Eggert  <eggert@twinsun.com>
25672
25673         The mkstemp replacement is taken from glibc 2.2.2, with some
25674         portability fixes for use outside glibc, as follows:
25675
25676         * lib/tempname.c (struct_stat64): New macro.
25677         (direxists, __gen_tempname): Use it.
25678         This avoids a portability problem with Solaris 8.
25679
25680         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
25681         (<stddef.h>, <stdint.h>, <string.h>):
25682         Include only if STDC_HEADERS || _LIBC.
25683         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
25684         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
25685         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
25686         (__set_errno): Define this macro if <errno.h> doesn't.
25687         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
25688         Define these macros if <stdio.h> doesn't.
25689         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
25690         Define these macros if <sys/stat.h>
25691         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
25692         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
25693         __xstat64): Define if not _LIBC.
25694         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
25695         (__gen_tempname): Invoke gettimeofday only if
25696         HAVE_GETTIMEOFDAY || _LIBC;
25697         otherwise, fall back on plain "time".
25698         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
25699
25700         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
25701
25702         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
25703
25704 2001-02-18  Paul Eggert  <eggert@twinsun.com>
25705
25706         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
25707
25708 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25709
25710         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
25711         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
25712         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
25713         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25714
25715 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25716
25717         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
25718         Remove workaround macros for hosts that have mbrtowc but not
25719         mbstate_t, as we now insist on proper declarations for both
25720         before using mbrtowc.
25721
25722 2001-02-17  Jim Meyering  <meyering@lucent.com>
25723
25724         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
25725         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
25726         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
25727         UnixWare 7.1.1.
25728
25729         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
25730         rather than AC_CACHE_VAL.
25731
25732 2001-02-17  Jim Meyering  <meyering@lucent.com>
25733
25734         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
25735         around included file name.
25736
25737         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
25738
25739         * lib/strftime.c: Update from GNU libc (the only changes were to
25740         comments).
25741
25742 2001-02-17  Jim Meyering  <meyering@lucent.com>
25743
25744         * lib/regex.c: Update from libc.
25745
25746 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
25747
25748         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
25749         clash.
25750
25751 2001-02-16  Paul Eggert  <eggert@twinsun.com>
25752
25753         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
25754         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
25755         Reported by Mark Hounschell via Paul Eggert.
25756
25757 2001-02-07  Jim Meyering  <meyering@lucent.com>
25758
25759         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
25760
25761 2001-02-05  Jim Meyering  <meyering@lucent.com>
25762
25763         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
25764         it includes the patch required for `large file' support with at least
25765         HP-UX's 10.20 /bin/cc.
25766
25767 2001-02-03  Jim Meyering  <meyering@lucent.com>
25768
25769         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
25770         AS_IF, now that it works once again (mysteriously).
25771         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25772
25773 2001-01-30  Jim Meyering  <meyering@lucent.com>
25774
25775         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
25776         * m4/chown.m4: Rename conftestchown to conftest.chown.
25777         * m4/rename.m4: s/conftestdir/conftest.d1/ and
25778         s/conftestdir2/conftest.d2/.
25779         * m4/utimes.m4: s/conftestdata/conftest.data/
25780         Inspired by Pavel Roskin's change in autoconf.
25781
25782 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
25783
25784         * lib/config.charset: Update for FreeBSD 4.2.
25785
25786 2001-01-27  Jim Meyering  <meyering@lucent.com>
25787
25788         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
25789         a use of AS_IF.
25790         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25791
25792 2001-01-26  Jim Meyering  <meyering@lucent.com>
25793
25794         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
25795         quotearg.c includes it.
25796
25797 2001-01-26  Jim Meyering  <meyering@lucent.com>
25798
25799         * lib/quotearg.c: Include stddef.h.
25800         * lib/quote.c: Include stddef.h.
25801         Reported by Axel Kittenberger.
25802
25803         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
25804         line in double quotes so that it evokes a better diagnostic.
25805         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
25806         Reported by Axel Kittenberger.
25807
25808 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
25809
25810         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
25811         as if it was a `charset'.
25812
25813 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25814
25815         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
25816         has const.
25817
25818 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25819
25820         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
25821         to avoid a warning.  Add back 'const' to inptr.
25822
25823 2001-01-20  Jim Meyering  <meyering@lucent.com>
25824
25825         Be sure that headers are checked before used in code compiled
25826         for the type checks.
25827         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
25828         In place of that, invoke jm_CHECK_ALL_TYPES.
25829         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
25830         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
25831         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
25832         The check for ssize_t was mistakenly run before the test for unistd.h.
25833
25834         The configure-time check for stdbool.h was missing.
25835         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
25836         (jm_PREREQ_HASH): New function.
25837
25838 2001-01-17  Jim Meyering  <meyering@lucent.com>
25839
25840         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
25841         for autoconf-2.49c.
25842         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
25843
25844 2001-01-16  Jim Meyering  <meyering@lucent.com>
25845
25846         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
25847         From Bruno Haible.
25848
25849 2001-01-14  Jim Meyering  <meyering@lucent.com>
25850
25851         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
25852         foo and bar.  Create conftestdir/ in the script, not in the C code.
25853         Remove directories in the script, not in the C code.
25854         Remove conftestdir{,2} before trying to create the directory.
25855         Make the entire configure script fail if the mkdir fails.
25856
25857 2001-01-14  Jim Meyering  <meyering@lucent.com>
25858
25859         * lib/rename.c: New file.  From Volker Borchert.
25860         Include stdlib.h, string.h or strings.h, and xalloc.h.
25861         Use strip_trailing_slashes rather than open-coding it.
25862
25863 2001-01-03  Paul Eggert  <eggert@twinsun.com>
25864
25865         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
25866
25867 2001-01-03  Jim Meyering  <meyering@lucent.com>
25868
25869         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
25870         of local `inptr' to avoid warning with some system declarations of
25871         iconv.
25872
25873 2001-01-02  Volker Borchert  <bt@teknon.de>
25874
25875         * m4/rename.m4: New file.
25876         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
25877
25878 2001-01-01  Jim Meyering  <meyering@lucent.com>
25879
25880         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
25881         even on systems with utmpx.h.  It's necessary for the declaration of
25882         utmp's ut_user member.  Reported by Andreas Jaeger.
25883
25884         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
25885         available. They are required for the declarations of getgrgid and
25886         getpwuid resp.
25887         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
25888         Reported by Andreas Jaeger.
25889
25890 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
25891
25892         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
25893         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
25894         so `make install' also works in VPATH builds.
25895
25896 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
25897
25898         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
25899         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
25900         can be used in subdirectories.
25901
25902 2000-12-29  Paul Eggert  <eggert@twinsun.com>
25903
25904         * lib/modechange.c: Do not assume that mode_t uses the
25905         traditional octal encoding.  E.g. "chmod 1 FOO" should set
25906         the other-execute bit of FOO even if S_IXOTH != 1.
25907
25908         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
25909         WOTH, XOTH, ALLM): New macros.
25910         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
25911          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
25912         Use them.
25913         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
25914         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
25915         (mode_compile):
25916         No need to use uintmax_t; unsigned long is long enough.
25917         Don't bother to get suffix since we don't use it.
25918
25919 2000-12-26  Jim Meyering  <meyering@lucent.com>
25920
25921         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
25922         better with autoheader.
25923
25924 2000-12-24  Jim Meyering  <meyering@lucent.com>
25925
25926         * lib/hash.c (is_prime): Return explicit boolean values.
25927         (hash_get_first): Return NULL to appease Irix5.6's 89.
25928         Reported by Nelson Beebe.
25929
25930 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
25931
25932         * lib/localcharset.c (locale_charset): Add support for Win32.
25933
25934 2000-12-18  Paul Eggert  <eggert@twinsun.com>
25935
25936         * lib/physmem.h, lib/physmem.c: New files.
25937
25938         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
25939         (noinst_HEADERS): Add physmem.h.
25940
25941         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
25942         't' for compatibility with Solaris 8 sort.
25943
25944 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
25945
25946         * lib/config.charset: Add support for BeOS.
25947
25948 2000-12-17  Jim Meyering  <meyering@lucent.com>
25949
25950         * m4/dos.m4 (jm_AC_DOS): New file and macro.
25951         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
25952
25953 2000-12-16  Jim Meyering  <meyering@lucent.com>
25954
25955         This bug had a serious impact on chown: `chown N:M FILE' (for integer
25956         N and M) would have treated it like `chown N:N FILE'.
25957
25958         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
25959
25960 2000-12-16  Jim Meyering  <meyering@lucent.com>
25961
25962         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
25963         SHELLS_FILE to a file name that's useful on djgpp systems.
25964         Include stdlib.h.
25965         (ADDITIONAL_DEFAULT_SHELLS): Define.
25966         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
25967         Based mostly on a patch from Prashant TR.
25968
25969 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
25970
25971         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
25972         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
25973         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
25974
25975 2000-12-08  Andreas Schwab  <schwab@suse.de>
25976
25977         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
25978         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
25979
25980 2000-12-07  Jim Meyering  <meyering@lucent.com>
25981
25982         * lib/stripslash.c (ISSLASH): Define.
25983         (strip_trailing_slashes): Use ISSLASH rather than comparing against
25984         `/'.
25985         From Prashant TR.
25986
25987         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
25988         (dir_name_r): Declare this function as static.
25989         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
25990         manifest itself on a name containing a mix of slashes and
25991         backslashes.
25992         Make this function work with names starting with a DOS-style
25993         drive letter and colon prefix.
25994         (dir_name): Append `.' if necessary.
25995         Based mostly on patches from Prashant TR and Eli Zaretskii.
25996
25997         * lib/dirname.h (dir_name_r): Remove prototype.
25998
25999 2000-12-06  Paul Eggert  <eggert@twinsun.com>
26000
26001         * m4/off_t-format.m4: Remove this file.
26002         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
26003
26004 2000-12-06  Jim Meyering  <meyering@lucent.com>
26005
26006         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
26007         replacement strtoull, we may well need the replacement strtoul, too.
26008         Check for declarations of strtoul and strtoull.
26009         Check for strtol.  Mainly as a cue to cause automake to include
26010         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
26011         Check for limits.h -- strtol.c needs it.
26012
26013 2000-12-05  Jim Meyering  <meyering@lucent.com>
26014
26015         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
26016
26017 2000-12-04  Jim Meyering  <meyering@lucent.com>
26018
26019         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
26020         Also include memory.h, stdlib.h, unistd.h if appropriate.
26021         Reported by Andreas Jaeger (conflicting declaration of malloc).
26022
26023 2000-12-02  Jim Meyering  <meyering@lucent.com>
26024
26025         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
26026         * m4/jm-macros.m4 (jm_MACROS): require it.
26027
26028 2000-12-02  Jim Meyering  <meyering@lucent.com>
26029
26030         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
26031
26032 2000-12-01  Paul Eggert  <eggert@twinsun.com>
26033
26034         * lib/memrchr.c: Include <config.h> before any system include file.
26035
26036 2000-11-30  Jim Meyering  <meyering@lucent.com>
26037
26038         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
26039
26040 2000-11-30  Jim Meyering  <meyering@lucent.com>
26041
26042         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
26043
26044 2000-11-29  Paul Eggert  <eggert@twinsun.com>
26045
26046         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
26047
26048 2000-11-26  Jim Meyering  <meyering@lucent.com>
26049
26050         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
26051
26052 2000-11-22  Paul Eggert  <eggert@twinsun.com>
26053
26054         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
26055         size of (size_t) -1; it's not portable.
26056
26057 2000-11-17  Jim Meyering  <meyering@lucent.com>
26058
26059         * lib/strstr.c: Update from GNU libc.
26060
26061 2000-11-17  Akim Demaille  <akim@epita.fr>
26062
26063         * lib/obstack.h: Formatting changes.
26064         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
26065         prevent type checking.
26066         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
26067         cast the value to (void *): assigning a `foo *' to a `void *'
26068         variable is valid.
26069         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
26070
26071 2000-11-16  Jim Meyering  <meyering@lucent.com>
26072
26073         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
26074
26075 2000-11-11  Jim Meyering  <meyering@lucent.com>
26076
26077         * lib/error.c: Add a couple #includes, merging from GNU libc version.
26078
26079 2000-11-10  Jim Meyering  <meyering@lucent.com>
26080
26081         * lib/obstack.h: Update from GNU libc.
26082         * lib/obstack.c: Likewise.
26083
26084 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
26085
26086         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
26087
26088 2000-11-06  Paul Eggert  <eggert@twinsun.com>
26089
26090         * lib/getusershell.c (setusershell): Use rewind rather than
26091         fseek/fseeko, to avoid configuration hassles with fseeko.
26092         Don't bother opening SHELLS_FILE if shellstream is NULL;
26093         it's not necessary.
26094
26095 2000-11-05  Jim Meyering  <meyering@lucent.com>
26096
26097         * lib/makepath.h (make_dir): Declare.
26098         * lib/makepath.c (make_dir): Remove `static' attribute.
26099         Tweak a comment.
26100
26101 2000-11-04  Jim Meyering  <meyering@lucent.com>
26102
26103         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
26104
26105 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
26106
26107         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
26108         last one in a bucket, advance to the next bucket.
26109
26110 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
26111
26112         * lib/fnmatch.c: Do not comment out all the code if we are using
26113         the GNU C library, because in some cases we are replacing buggy
26114         code in the GNU C library itself.
26115
26116 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
26117
26118         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
26119         (regex_compile): Catch bogus \(\1\).
26120
26121 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26122
26123         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
26124         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
26125         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
26126
26127 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26128
26129         * lib/error.h, getline.h, modechange.h:
26130         Remove "2000" from Copyright line, as the file hasn't been
26131         changed this year other than in the copyright notice.
26132
26133         * lib/xalloc.h: Add "2000" to Copyright line, as this file
26134         was changed this year.
26135
26136 2000-10-29  Jim Meyering  <meyering@lucent.com>
26137
26138         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
26139         renaming.
26140         * m4/ls-mntd-fs.m4: Likewise
26141
26142 2000-10-29  Jim Meyering  <meyering@lucent.com>
26143
26144         * lib/xstat.in: Fix grammar in comment.
26145
26146 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
26147
26148         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
26149         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
26150         doesn't define __restrict_arr.
26151
26152 2000-10-28  Jim Meyering  <meyering@lucent.com>
26153
26154         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
26155         (jm_PREREQ_MEMCHR): New function.
26156
26157 2000-10-28  Jim Meyering  <meyering@lucent.com>
26158
26159         * lib/memchr.c: Update from libc.
26160         Adjust for portability:
26161         [HAVE_STDLIB_H]: Include stdlib.h.
26162         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
26163         Undef __memchr, too.
26164         [!weak_alias]: Define __memchr to memchr.
26165
26166         * lib/regex.c: Update from libc.
26167         * lib/regex.h: Likewise.
26168         * lib/getopt1.c: Likewise.
26169         * lib/memcmp.c: Likewise.
26170
26171         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
26172         Avoid using fseek, when possible -- it's broken by design.
26173         Patch by Ulrich Drepper.
26174
26175 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
26176
26177         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
26178         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
26179         Giving in to popular pressure to shut up the compiler with casts.
26180
26181 2000-10-26  Jim Meyering  <meyering@lucent.com>
26182
26183         * lib/strftime.c: Update from libc.
26184
26185 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
26186
26187         * regex.c: More `unsigned char' -> `re_char' changes.
26188         Also change several `int' into `re_wchar_t'.
26189         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
26190         (PUSH_FAILURE_POINTER): Don't cast any more.
26191         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
26192         We want GCC to complain, since this piece of code makes
26193         re_match non-reentrant, which *should* be fixed.
26194         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
26195         (EXTEND_BUFFER): Use RETALLOC.
26196         (SET_LIST_BIT): Don't cast.
26197         (re_wchar_t): New type.
26198         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
26199         that those two functions will always properly return.
26200         (IMMEDIATE_QUIT_CHECK): Cast to void.
26201         (analyse_first): Use recursion rather than an explicit stack.
26202         (re_compile_fastmap): Can't fail anymore.
26203         (re_search_2): Don't check re_compile_fastmap for failure.
26204         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
26205         Now also sets the new value (passed in a new argument).
26206         (re_match_2_internal): Use it.
26207         Also, use a new var `reg' of type size_t when looping through regs
26208         rather than reuse the inappropriate `mcnt'.
26209
26210 2000-10-25  Jim Meyering  <meyering@lucent.com>
26211
26212         * lib/obstack.c: Update from libc.
26213
26214 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
26215
26216         * regex.c (regex_compile): Change the way of handling a range from
26217         a char less than 256 to a char not less than 256.
26218
26219 2000-10-24  Andrew Innes  <andrewi@gnu.org>
26220
26221         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
26222         NT-Emacs only.
26223         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
26224         so that re_search functions only quit when callers expect them to.
26225
26226 2000-10-23  Jim Meyering  <meyering@lucent.com>
26227
26228         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
26229         wrong.  That set_locale call must not have any side effects.
26230         From Paul Eggert.
26231
26232 2000-10-22  Jim Meyering  <meyering@lucent.com>
26233
26234         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
26235         [CYCLIC]: Remove now-unused definition.
26236
26237         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
26238         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
26239         Suggestion from Ulrich Drepper.
26240
26241 2000-10-21  Jim Meyering  <meyering@lucent.com>
26242
26243         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
26244         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
26245         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
26246
26247 2000-10-21  Jim Meyering  <meyering@lucent.com>
26248
26249         * lib/dirname.c (memrchr): Declare if necessary.
26250         (dir_name): Remove the restriction that there be no
26251         trailing slashes.  Now, this code skips past them, effectively
26252         ignoring them.
26253         [TEST_DIRNAME] (main): New unit tests.
26254
26255         * lib/memrchr.c: New file from GNU libc.
26256         Undef __memrchr, too.
26257         [!weak_alias]: Define __memrchr to memrchr.
26258         Guard weak_alias use with `#ifdef weak_alias'.
26259
26260 2000-10-21  Jim Meyering  <meyering@lucent.com>
26261
26262         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
26263         (dir_name): Use dir_name_r.
26264         * lib/dirname.h (dir_name_r): Declare it.
26265
26266 2000-10-17  Jim Meyering  <meyering@lucent.com>
26267
26268         * lib/quote.h (PARAMS): Define and use.
26269         Reported by Akim Demaille.
26270
26271         * lib/getopt.c: Update from libc.
26272
26273 2000-10-16  Jim Meyering  <meyering@lucent.com>
26274
26275         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
26276         setlocale.
26277         From Jan Fedak.
26278
26279 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
26280
26281         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
26282
26283 2000-09-25  Jim Meyering  <meyering@lucent.com>
26284
26285         * lib/md5.h (rol): Define (from GnuPG).
26286
26287         * lib/sha.c: Give credit (GnuPG) where due.
26288         (M): Use rol rather than open-coding it.
26289         Add a FIXME comment.
26290
26291 2000-09-21  Jim Meyering  <meyering@lucent.com>
26292
26293         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
26294         Reported by Michael Stone.
26295
26296 2000-09-20  Jim Meyering  <meyering@lucent.com>
26297
26298         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
26299         (noinst_HEADERS): Add sha.h.
26300         Based on code from Scott G. Miller and from GnuPG.
26301
26302 2000-09-18  Jim Meyering  <meyering@lucent.com>
26303
26304         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
26305         LIBS. Otherwise, everyone ends up linking with -lelf for some
26306         configurations.
26307         Reported by Mike Stone.
26308
26309 2000-09-15  Jim Meyering  <meyering@lucent.com>
26310
26311         * lib/regex.c: Update from libc.
26312
26313 2000-09-10  Jim Meyering  <meyering@lucent.com>
26314
26315         * lib/getopt.c (_getopt_internal): Update from glibc.
26316
26317 2000-09-09  Jim Meyering  <meyering@lucent.com>
26318
26319         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
26320         think it should be used as a general replacement for isascii.
26321         * lib/fnmatch.c: Likewise.
26322         * lib/mbswidth.c: Likewise
26323         * lib/regex.c: Likewise.
26324
26325         Don't use atoi.
26326         * lib/userspec.c: Include sys/param.h and limits.h.
26327         Include xstrtol.h.
26328         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
26329         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
26330         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
26331         UID, GID.  Check range.
26332
26333 2000-09-06  Jim Meyering  <meyering@lucent.com>
26334
26335         * lib/getopt.c (_getopt_internal): Update from glibc.
26336
26337 2000-08-30  Jim Meyering  <meyering@lucent.com>
26338
26339         * lib/strftime.c: Merge in changes from GNU libc.
26340
26341 2000-08-26  Jim Meyering  <meyering@lucent.com>
26342
26343         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
26344         * m4/fpending.m4: New file.
26345
26346 2000-08-26  Jim Meyering  <meyering@lucent.com>
26347
26348         * lib/closeout.c: Include "__fpending.h".
26349         (close_stdout_status): Return right away if there's nothing to flush.
26350
26351         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
26352         * lib/__fpending.c: New file.
26353         * lib/__fpending.h: New file.
26354
26355 2000-08-20  Jim Meyering  <meyering@lucent.com>
26356
26357         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
26358         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
26359         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
26360
26361 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
26362
26363         Improve fileutils installation on systems where running
26364         programs (like install) can't be unlinked.
26365         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
26366         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
26367
26368 2000-08-07  Paul Eggert  <eggert@twinsun.com>
26369
26370         Standardize on "memory exhausted" instead of "Memory exhausted"
26371         or "virtual memory exhausted".
26372         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
26373         "virtual memory exhausted".
26374         * lib/same.c (same_name): Invoke xalloc_die instead of printing
26375         our own message.
26376         * lib/userspec.c (parse_user_spec): Likewise.
26377         * lib/bumpalloc.h: comment fix
26378         * lib/same.c, userspec.c: Include xalloc.h.
26379
26380         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
26381         not char *const and pointing to a constant array.
26382         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
26383         (xrealloc): Comment fix.
26384
26385         * lib/userspec.c (parse_user_spec):
26386         Don't translate a message until just before returning,
26387         to avoid unnecessary translation.
26388
26389 2000-08-07  Jim Meyering  <meyering@lucent.com>
26390
26391         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
26392         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
26393         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
26394         getgroups.c, gethostname.c, getopt.h, group-member.c,
26395         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
26396         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
26397         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
26398         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
26399         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
26400         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
26401         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
26402         yesno.c: Back out Copyright date changes for each file with no change
26403         this year.  This eases coordination with other programs using the same
26404         source code modules.  From Paul Eggert.
26405
26406 2000-08-06  Paul Eggert  <eggert@twinsun.com>
26407
26408         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
26409         not char, for compatibility with glibc 2.1.3 strftime.c.
26410
26411 2000-08-03  Greg McGary  <greg@mcgary.org>
26412
26413         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
26414         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
26415         (EXTEND_BUFFER): Use them.
26416
26417 2000-08-01  Jim Meyering  <meyering@lucent.com>
26418
26419         * lib/dirname.c (ISSLASH): Define.
26420         (BACKSLASH_IS_PATH_SEPARATOR): Define.
26421         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
26422         both `\' and `/' may be use as path separators.
26423         Based on a patch from Prashant TR.
26424
26425 2000-07-31  Paul Eggert  <eggert@twinsun.com>
26426
26427         * lib/quotearg.c (quotearg_n_options): Don't make the initial
26428         slot vector a constant, since it might get modified.
26429
26430 2000-07-31  Jim Meyering  <meyering@lucent.com>
26431
26432         * lib/xmalloc.c: Use `virtual memory exhausted', not
26433         `Memory exhausted'.
26434         * lib/obstack.c (print_and_abort): Likewise.
26435
26436 2000-07-30  Paul Eggert  <eggert@twinsun.com>
26437
26438         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
26439         buffer, so that the caller can always quote one small
26440         component of a "memory exhausted" message in slot 0.
26441         From a suggestion by Jim Meyering.
26442
26443 2000-07-30  Jim Meyering  <meyering@lucent.com>
26444
26445         * lib/makepath.c (make_path): Quote the other instance, too.
26446
26447         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
26448         (STATIC_BUF_SIZE): Define.
26449         (quotearg_n_options): Use only statically allocated storage when
26450         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
26451         than STATIC_BUF_SIZE.
26452
26453 2000-07-29  Jim Meyering  <meyering@lucent.com>
26454
26455         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
26456         * lib/dirname.c (dir_name): Likewise.
26457
26458         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
26459         `/'.
26460
26461         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
26462         (dir_name): Assert that there are no trailing slashes.
26463
26464 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
26465
26466         * lib/mbswidth.h (mbswidth): Add a flags argument.
26467         (mbswidth): New declaration.
26468         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
26469         * lib/mbswidth.c (mbswidth): Add a flags argument.
26470         (mbsnwidth): New function.
26471
26472 2000-07-24  Jim Meyering  <meyering@lucent.com>
26473
26474         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
26475
26476 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26477
26478         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
26479
26480 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26481
26482         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
26483         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
26484         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
26485         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
26486         invoke multibyte primitives.
26487
26488 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26489
26490         * lib/quotearg.c:
26491         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
26492         so that mbstate_t is always defined.
26493
26494         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
26495         be 1 in at least one GCC installation, and this configuration
26496         error is likely to be common.  Ignoring MB_LEN_MAX hurts
26497         performance on hosts that have mbrtowc but have only unibyte
26498         locales, but I assume these hosts are rare.
26499
26500 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26501
26502         * lib/mbswidth.c (_XOPEN_SOURCE):
26503         Don't define; this causes problems on Solaris 7.
26504         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
26505
26506 2000-07-23  Jim Meyering  <meyering@lucent.com>
26507
26508         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
26509         too: getgrgid, getpwuid, getuid.
26510
26511 2000-07-23  Jim Meyering  <meyering@lucent.com>
26512
26513         * lib/basename.c (base_name): Add an assertion.
26514
26515 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
26516
26517         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
26518         shadow its mbsinit function.
26519
26520 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26521
26522         * lib/mbswidth.h: New file.
26523         * lib/mbswidth.c: New file.
26524         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
26525         (noinst_HEADERS): Add mbswidth.h.
26526
26527 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26528
26529         * lib/config.charset: Add support for FreeBSD. Improve support for
26530         HP-UX and IRIX 6.
26531
26532 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
26533
26534         * m4/mbswidth.m4: New file.
26535         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
26536
26537 2000-07-15  Jim Meyering  <meyering@lucent.com>
26538
26539         * lib/makepath.c: Include quote.h.
26540         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
26541         corresponding argument in a `quote (...)' call.
26542         Give better diagnostics.
26543
26544         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
26545         (noinst_HEADERS): Add quote.h.
26546
26547         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
26548         from tar's src/misc.c.
26549         * lib/quote.h: New file.  Prototypes for same.
26550
26551 2000-07-14  Paul Eggert  <eggert@twinsun.com>
26552
26553         From a suggestion by Bruno Haible.
26554         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
26555         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
26556         to decide whether to define the BeOS workaround macro;
26557         this adjusts to the change to AC_MBSTATE_T.
26558
26559 2000-07-14  Jim Meyering  <meyering@lucent.com>
26560
26561         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
26562         jm_AC_TYPE_UINTMAX_T.
26563
26564 2000-07-13  Paul Eggert  <eggert@twinsun.com>
26565
26566         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
26567
26568         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
26569         quotearg_buffer_restyled): Add support for
26570         clocale_quoting_style.  Undo previous change to
26571         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
26572         and "{RIGHT QUOTATION MARK}" msgids.
26573
26574 2000-07-10  Paul Eggert  <eggert@twinsun.com>
26575
26576         From a suggestion by Bruno Haible.
26577         * m4/mbstate_t.m4 (AC_MBSTATE_T):
26578         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
26579         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
26580         and mbstate_t, to a single-part test that simply defines mbstate_t.
26581         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
26582         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
26583
26584 2000-07-10  Jim Meyering  <meyering@lucent.com>
26585
26586         * m4/strerror_r.m4: Mirror the correction made in autoconf.
26587
26588         * m4/gnu-source.m4: Output to confdefs.h directly.
26589         Suggestion from Akim Demaille.
26590
26591 2000-07-09  Paul Eggert  <eggert@twinsun.com>
26592
26593         The old behavior of quoting `like this' doesn't look good with
26594         newer, ISO-style fonts.  See:
26595         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
26596
26597         Instead, quote "like this" by default.  Let the translator
26598         tailor the locale-specific quoting behavior by providing
26599         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
26600
26601         * lib/quotearg.c (N_): New macro.
26602         (gettext_default): New function.
26603         (quotearg_buffer_restyled): Use
26604         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
26605         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
26606
26607 2000-07-09  Jim Meyering  <meyering@lucent.com>
26608
26609         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
26610         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
26611
26612         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
26613         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
26614
26615 2000-07-09  Jim Meyering  <meyering@lucent.com>
26616
26617         * lib/Most files: Update copyright dates to include 2000.
26618
26619 2000-07-08  Jim Meyering  <meyering@lucent.com>
26620
26621         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
26622         if not defined.
26623         (xgethostname): Remove now-unnecessary #ifdef.
26624         Move declaration of `err' into loop where it's used.
26625
26626 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26627         and Bruno Haible  <haible@clisp.cons.org>
26628
26629         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
26630         only if the test for an object-type mbstate_t fails.  This
26631         prevents us from mistakenly reporting that mbstate_t is a
26632         system object type after we "#define mbstate_t int" to work
26633         around its lack.
26634
26635 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26636         and Bruno Haible  <haible@clisp.cons.org>
26637
26638         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
26639
26640 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26641
26642         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
26643         to strerror_r.
26644         Include <ctype.h> for use of isalpha.
26645
26646 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26647
26648         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
26649         by allocating a larger buffer. Test the gethostname return value for
26650         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
26651         returns an error and ENAMETOOLONG isn't defined.
26652
26653 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26654
26655         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
26656         dimension.
26657
26658 2000-07-04  Jim Meyering  <meyering@lucent.com>
26659
26660         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
26661         of the deprecated AC_CHECKING.
26662
26663 2000-07-04  Jim Meyering  <meyering@lucent.com>
26664
26665         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
26666         Reported by Bruno Haible.
26667
26668 2000-07-04  Jim Meyering  <meyering@lucent.com>
26669
26670         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
26671         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
26672         lacks mbrtowc.
26673
26674 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26675
26676         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
26677         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
26678
26679 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26680         and Bruno Haible  <haible@clisp.cons.org>
26681
26682         * lib/quotearg.c (mbrtowc):
26683         Assign to *pwc, and return 1 only if result is nonzero.
26684         (iswprint): Use ISPRINT when substituting our own mbrtowc.
26685
26686 2000-07-03  Jim Meyering  <meyering@lucent.com>
26687
26688         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
26689
26690 2000-07-03  Jim Meyering  <meyering@lucent.com>
26691
26692         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
26693         This is necessary to get a definition of e.g., UTMP_FILE on
26694         HP-UX 10.20.
26695         From Bob Proulx.
26696
26697 2000-07-02  Jim Meyering  <meyering@lucent.com>
26698
26699         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
26700
26701         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
26702         AC_LIBOBJ(function_name).
26703         * m4/chown.m4: Likewise.
26704         * m4/fnmatch.m4: Likewise.
26705         * m4/ftruncate.m4: Likewise.
26706         * m4/getgroups.m4: Likewise.
26707         * m4/getline.m4: Likewise.
26708         * m4/group-member.m4: Likewise.
26709         * m4/jm-macros.m4: Likewise.
26710         * m4/lstat.m4: Likewise.
26711         * m4/malloc.m4: Likewise.
26712         * m4/memcmp.m4: Likewise.
26713         * m4/nanosleep.m4: Likewise.
26714         * m4/putenv.m4: Likewise.
26715         * m4/realloc.m4: Likewise.
26716         * m4/regex.m4: Likewise.
26717         * m4/stat.m4: Likewise.
26718         * m4/strftime.m4: Likewise.
26719
26720 2000-07-02  Jim Meyering  <meyering@lucent.com>
26721
26722         * lib/quotearg.c (mbstate_t): Don't define here.
26723
26724 2000-07-02  Jim Meyering  <meyering@lucent.com>
26725
26726         * lib/nanosleep.c (SIGCONT): Define if not already defined.
26727
26728 2000-07-01  Jim Meyering  <meyering@lucent.com>
26729
26730         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
26731
26732 2000-07-01  Jim Meyering  <meyering@lucent.com>
26733
26734         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
26735         problem.
26736
26737 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26738
26739         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
26740         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
26741
26742 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26743
26744         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
26745         per change in ../m4/ls-mntd-fs.m4.
26746         (read_filesystem_list): Ignore symbolic links.
26747
26748 2000-06-29  Jim Meyering  <meyering@lucent.com>
26749
26750         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
26751         for declaration of strcmp.
26752
26753         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
26754
26755         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
26756         Avoid warning by casting result to `char *' to remove `const'.
26757
26758 2000-06-28  Jim Meyering  <meyering@lucent.com>
26759
26760         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
26761         included by quotearg.c, for which we perform this test.  From
26762         Bruno Haible.
26763
26764 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26765
26766         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
26767         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
26768         <utmpx.h> exists, put readutmp.o into LIBOBJS.
26769
26770 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26771
26772         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
26773
26774 2000-06-26  Paul Eggert  <eggert@twinsun.com>
26775
26776         savedir now sets errno on failure and invokes xmalloc to get memory.
26777         Fix a couple of other minor bugs while we're at it.
26778
26779         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
26780         (NAMLEN): Remove macro.
26781         (malloc, realloc): Remove decls.
26782         (stpcpy): Likewise.
26783         ("xalloc.h"): Include.
26784         (NAME_SIZE_DEFAULT): New macro.
26785         (savedir): Use xmalloc / xrealloc to allocate memory.
26786         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
26787         Skip "" directory entries.
26788         Use strlen to calculate directory entry length, since the old method
26789         is rarely used these days and isn't worth supporting.
26790         Don't use a pointer after freeing it.
26791         Check for integer overflow when calculating allocation size.
26792         Use memcpy to copy entries, instead of stpcpy.
26793         Set errno properly when returning NULL.
26794         Check for readdir error.
26795
26796 2000-06-26  Jim Meyering  <meyering@lucent.com>
26797
26798         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
26799
26800 2000-06-25  Jim Meyering  <meyering@lucent.com>
26801
26802         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
26803         Linux header bug when _XOPEN_SOURCE is defined to 500.
26804
26805 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26806
26807         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
26808         deficiency.
26809
26810 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26811
26812         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
26813         Include xalloc.h.
26814         Don't include <stdlib.h>.  Don't declare malloc, realloc.
26815
26816 2000-06-24  Jim Meyering  <meyering@lucent.com>
26817
26818         * m4/strerror_r.m4: Revive this file -- to try out an experimental
26819         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
26820         for which strerror does return char*, but which lacks a conveniently
26821         accessible declaration of the function.  If the compile-test says
26822         strerror_r doesn't work, then resort to a `run'-test that works on
26823         BeOS and segfaults on DEC Unix.
26824
26825 2000-06-24  Jim Meyering  <meyering@lucent.com>
26826
26827         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
26828
26829 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26830
26831         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
26832         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
26833
26834 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26835
26836         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
26837         (mbrtowc, mbstate_t): Define substitutes if
26838         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
26839         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
26840         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
26841
26842 2000-06-23  Jim Meyering  <meyering@lucent.com>
26843
26844         * m4/afs.m4: Add missing AC_MSG_RESULT.
26845         Reported by Bruno Haible.
26846
26847         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
26848         Suggestion from Bruno Haible.
26849
26850 2000-06-23  Jim Meyering  <meyering@lucent.com>
26851
26852         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
26853
26854 2000-06-21  Jim Meyering  <meyering@lucent.com>
26855
26856         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
26857
26858 2000-06-21  Jim Meyering  <meyering@lucent.com>
26859
26860         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
26861         (noinst_HEADERS): Add getstr.h.
26862
26863         * lib/getline.c (getstr): Move into a separate file.
26864         * lib/getstr.c (getstr): New file, extracted from getline.c, with
26865         the following changes: new parameter, delim2; both delim[12]
26866         parameters have type `int', not `char'.  The latter would lose
26867         with 8-bit delimiters.
26868         * lib/getstr.h: New file.
26869
26870 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26871
26872         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
26873         than 1024, return a memory chunk of least possible size, instead
26874         of size PATH_MAX + 2. In the loop, increment the size proportionally.
26875         Use free/xmalloc instead of xrealloc to avoid copying for very long
26876         paths.
26877
26878 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26879
26880         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
26881         the empty string.
26882
26883 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
26884
26885         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
26886         address, not strdup.  Include <stdlib.h> and don't declare free().
26887
26888 2000-06-19  Jim Meyering  <meyering@lucent.com>
26889
26890         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
26891
26892 2000-06-18  Jim Meyering  <meyering@lucent.com>
26893
26894         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
26895
26896         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
26897         `checking whether...' message to be consistent with that of the
26898         lstat test.
26899
26900 2000-06-18  Jim Meyering  <meyering@lucent.com>
26901
26902         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
26903         Besides, these days every porting target provides a mkdir function.
26904
26905         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
26906         needed. (this snippet comes from src/system.h).
26907
26908 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
26909
26910         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
26911
26912 2000-06-15  Paul Eggert  <eggert@twinsun.com>
26913
26914         * lib/human.c (adjust_value): New function.
26915         (human_readable_inexact): Apply rounding style even when
26916         printing approximate values.
26917
26918 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26919
26920         * lib/human.c (human_readable_inexact): Allow an input block
26921         size that is not a multiple of the output block size, and vice versa.
26922         Reported by Piergiorgio Sartor.
26923
26924 2000-06-14  Paul Eggert  <eggert@twinsun.com>
26925
26926         * lib/getdate.y (get_date): Apply relative times after time
26927         zone indicator, not before.  Reported by Todd A. Jacobs.
26928
26929 2000-06-13  Jim Meyering  <meyering@lucent.com>
26930
26931         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
26932
26933         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
26934
26935 2000-06-12  Paul Eggert  <eggert@twinsun.com>
26936
26937         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
26938
26939 2000-06-12  Jim Meyering  <meyering@lucent.com>
26940
26941         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
26942         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
26943         optional argument.
26944         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
26945         the optional argument, `lib'.
26946
26947 2000-06-08  Jim Meyering  <meyering@lucent.com>
26948
26949         * m4/largefile.m4: Remove file (now that it's part of autoconf).
26950
26951 2000-06-04  Paul Eggert  <eggert@twinsun.com>
26952
26953         Rewrite largefile configuration so that we don't need to run
26954         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
26955         AC_CANONICAL_HOST in configure.in -- jmm]
26956
26957         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
26958         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
26959         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
26960         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
26961         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
26962         All uses changed.
26963         Instead of inspecting the output of getconf, try to compile the
26964         test program without and with the macro definition.
26965         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
26966         for getconf.  Instead, check for the needed flags by compiling
26967         test programs.
26968
26969 2000-06-04  Paul Eggert  <eggert@twinsun.com>
26970
26971         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
26972
26973 2000-06-04  Jim Meyering  <meyering@lucent.com>
26974
26975         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
26976         SunOS 4.1.4 for which gid_t is an unsigned type.
26977
26978 2000-06-03  Jim Meyering  <meyering@lucent.com>
26979
26980         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
26981         now that autoconf requires that.
26982
26983         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
26984         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
26985         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
26986
26987 2000-06-03  Jim Meyering  <meyering@lucent.com>
26988
26989         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
26990
26991 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
26992
26993         * m4/glibc21.m4: New file.
26994         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
26995
26996 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
26997
26998         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
26999         newer, don't install charset.alias.
27000         * lib/config.charset: Change the Linux/glibc rules so they become empty
27001         on glibc-2.1 or newer.
27002
27003 2000-06-02  Jim Meyering  <meyering@lucent.com>
27004
27005         * lib/mountlist.c: Back out last change.  Instead, do this...
27006         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
27007         me_dummy member using the same `ignore'-testing code.
27008         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
27009         fs_type strings.
27010         From Mark D. Roth.
27011
27012 2000-05-29  Jim Meyering  <meyering@lucent.com>
27013
27014         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
27015         mounts with the `ignore' attribute.  Based on a patch from
27016         Mark D. Roth.
27017
27018 2000-05-28  Jim Meyering  <meyering@lucent.com>
27019
27020         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
27021         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27022         * m4/stat.m4: Likewise.
27023         * m4/lstat.m4: Likewise.
27024         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
27025
27026         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
27027         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
27028
27029 2000-05-26  Jim Meyering  <meyering@lucent.com>
27030
27031         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
27032
27033 2000-05-24  Jim Meyering  <meyering@lucent.com>
27034
27035         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
27036         autoconf requires that.
27037         * m4/lib-check.m4: Likewise.
27038         * m4/jm-macros.m4: Likewise.
27039         * m4/strftime.m4: Likewise.
27040
27041         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
27042         AC_CHECK_DECLS, now that autoconf requires that.
27043
27044 2000-05-22  Jim Meyering  <meyering@lucent.com>
27045
27046         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27047         * m4/lstat.m4: Likewise.
27048
27049 2000-05-22  Jim Meyering  <meyering@lucent.com>
27050
27051         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
27052
27053 2000-05-20  Jim Meyering  <meyering@lucent.com>
27054
27055         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
27056         (jm_PREREQ): Use it.
27057
27058 2000-05-18  Jim Meyering  <meyering@lucent.com>
27059
27060         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
27061         back, too, since it may have been modified by allocate_entry.
27062         (hash_delete): Rewrite to use neither the assignment operator
27063         nor the comma operator in an if-expression.
27064
27065 2000-05-15  Paul Eggert  <eggert@twinsun.com>
27066
27067         * lib/closeout.c:
27068         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
27069         Remove; no longer needed.
27070         "quotearg.h": Add include.
27071         (file_name): Do not bother to explicitly initialize to NULL; it's less
27072         efficient on some hosts.
27073         (close_stdout_status): Remove test as to whether stdout was already
27074         closed; it breaks for the case "echo x | sort >&-".
27075         Quote file name colons.
27076         Do not assume that _("write error") lacks format strings.
27077
27078 2000-05-15  Jim Meyering  <meyering@lucent.com>
27079
27080         * lib/version-etc.c (version_etc_copyright): Update the copyright
27081         string used in all --version output.
27082
27083 2000-05-14  Jim Meyering  <meyering@lucent.com>
27084
27085         * lib/closeout.c (close_stdout_set_file_name): New function.
27086         (close_stdout_status): Use new file-scoped global.
27087         Return right away if fstat says the stdout file descriptor is invalid.
27088         * lib/closeout.h (close_stdout_set_file_name): Declare.
27089
27090 2000-05-10  Jim Meyering  <meyering@lucent.com>
27091
27092         * lib/closeout.c [default_exit_status]: New file-scoped variable.
27093         (close_stdout_set_status): New function.
27094         * lib/closeout.h (close_stdout_set_status): Declare.
27095
27096 2000-05-09  Jim Meyering  <meyering@lucent.com>
27097
27098         * m4/gettext.m4: Rename this...
27099         * m4/libintl.m4: ...to this.
27100
27101 2000-05-08  Jim Meyering  <meyering@lucent.com>
27102
27103         * lib/long-options.c: Don't include closeout.h.
27104         (parse_long_options): Don't call close_stdout for --version.
27105
27106 2000-05-06  Paul Eggert  <eggert@twinsun.com>
27107
27108         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
27109         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
27110         2.1.3 bug.  This avoids a clash when files like regex.c define
27111         _GNU_SOURCE.
27112
27113 2000-05-06  Jim Meyering  <meyering@lucent.com>
27114
27115         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
27116         (AC_REPLACE_FUNCS): Add strnlen.
27117
27118         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
27119         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
27120
27121         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
27122         AC_SEARCH_LIBS call for nanosleep.
27123         (LIB_NANOSLEEP): Set and AC_SUBST.
27124
27125 2000-05-06  Jim Meyering  <meyering@lucent.com>
27126
27127         * lib/strnlen.c: Undefine __strnlen and strnlen.
27128         [!weak_alias]: Define __strnlen to strnlen.
27129
27130         * lib/atexit.c: New file, from libiberty.
27131
27132 2000-05-06  Jim Meyering  <meyering@lucent.com>
27133
27134         * lib/closeout.c (close_stdout_status): Also check for errors on the
27135         stderr stream.
27136
27137 2000-05-05  Jim Meyering  <meyering@lucent.com>
27138
27139         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
27140         AC_SEARCH_LIBS call for clock_gettime.
27141         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
27142
27143         * m4/search-libs.m4: Update from autoconf.
27144
27145         su doesn't work on Solaris 2.6.
27146         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
27147         <shadow.h>.  Reported by Dragos Harabor.
27148
27149 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
27150
27151         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
27152         memcpy instead of xmalloc, xrealloc, path_concat.
27153         (locale_charset): Treat empty environment variables as absent.
27154         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
27155
27156 2000-05-04  Jim Meyering  <meyering@lucent.com>
27157
27158         * lib/getopt.c: Update from glibc.
27159         * lib/obstack.c: Likewise.
27160         * lib/obstack.h: Likewise.
27161         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
27162         file
27163
27164         * lib/regex.h: Likewise.
27165         * lib/strndup.c: Likewise.
27166         * lib/strnlen.c: New file, from glibc.
27167
27168 2000-05-03  Jim Meyering  <meyering@lucent.com>
27169
27170         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
27171
27172 2000-05-02  Paul Eggert  <eggert@twinsun.com>
27173
27174         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
27175         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
27176         compile-time test, rather than inspecting host and OS, to
27177         decide whether to define _LARGEFILE_SOURCE.
27178
27179 2000-05-01  Jim Meyering  <meyering@lucent.com>
27180
27181         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
27182
27183         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
27184         Based on a patch from Bruno Haible.
27185
27186 2000-05-01  Jim Meyering  <meyering@lucent.com>
27187
27188         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
27189
27190 2000-04-29  Jim Meyering  <meyering@lucent.com>
27191
27192         * lib/path-concat.c: Declare strdup only if it's not defined.
27193         * lib/canon-host.c: Likewise.
27194
27195 2000-04-28  Jim Meyering  <meyering@lucent.com>
27196
27197         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
27198         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
27199         is included first, then limits.h is included by locale.h by libintl.h.
27200         From John David Anglin.
27201
27202 2000-04-25  Jim Meyering  <meyering@lucent.com>
27203
27204         * lib/makepath.c (S_IRWXUGO): Define.
27205         (make_path): Always perform explicit chmod if MODE specifies any
27206         of the `special' permission bits.  Prompted by a bug report against
27207         install from Mate Wierdl and Joost van Baal.
27208
27209 2000-04-18  Jim Meyering  <meyering@lucent.com>
27210
27211         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
27212         (jm_PREREQ): Use it.
27213
27214 2000-04-18  Jim Meyering  <meyering@lucent.com>
27215
27216         * lib/README: New file.
27217
27218         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
27219         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
27220
27221 2000-04-17  Jim Meyering  <meyering@lucent.com>
27222
27223         Get it right :-)
27224         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
27225         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
27226         Suggestion from Akim Demaille.
27227
27228 2000-04-17  Jim Meyering  <meyering@lucent.com>
27229
27230         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
27231         the definition of it to rpl_strftime also defined-away the system's
27232         declaration.
27233
27234 2000-04-15  Jim Meyering  <meyering@lucent.com>
27235
27236         Use `C' to denote so-called `contiguous' files, the same way
27237         that tar does.
27238         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
27239         (ftypelet): Use S_ISCTG.
27240         From Michael Deutschmann.
27241
27242 2000-04-14  Jim Meyering  <meyering@lucent.com>
27243
27244         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
27245         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
27246         clobbered.
27247
27248 2000-04-14  Jim Meyering  <meyering@lucent.com>
27249
27250         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
27251
27252 2000-04-13  Jim Meyering  <meyering@lucent.com>
27253
27254         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
27255         AH_VERBATIM to insert required #ifndef into config.h.in.
27256         Suggestion from Akim Demaille.
27257
27258 2000-04-12  Jim Meyering  <meyering@lucent.com>
27259
27260         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
27261         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
27262         Christian Krackowizer.
27263
27264         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
27265         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
27266         (AC_SYS_LARGEFILE): Require.
27267         (AM_C_PROTOTYPES): Require.
27268
27269 2000-04-08  Jim Meyering  <meyering@lucent.com>
27270
27271         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
27272         names don't conflict.  Reported by Eli Zaretskii.
27273
27274 2000-04-07  Jim Meyering  <meyering@lucent.com>
27275
27276         * lib/putenv.c: Move inclusion of errno.h so it follows that of
27277         sys/types.h, to work around system header problems on AIX 3.2.5.
27278         From Bruno Haible.
27279
27280 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
27281
27282         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
27283         bug.  Deal with the different error behavior of Irix iconv.
27284
27285 2000-04-05  Paul Eggert  <eggert@twinsun.com>
27286
27287         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
27288         IRIX if the installer said otherwise.
27289
27290 2000-04-05  Jim Meyering  <meyering@lucent.com>
27291
27292         Portability tweaks required for ultrix4.3.
27293         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
27294         (jm_CHECK_DECLS): Add getutent to the list of functions.
27295         (_jm_DECL_HEADERS): Add utmpx.h.
27296         From John David Anglin.
27297
27298         * m4/strftime.m4: Back out the 2000-04-02 change.
27299         Instead of that change, simply undefine putenv in the test program.
27300
27301 2000-04-05  Jim Meyering  <meyering@lucent.com>
27302
27303         Portability tweaks required for ultrix4.3.
27304         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
27305         getutent.
27306         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
27307         * lib/canon-host.c: Declare strdup.
27308         * lib/path-concat.c: Likewise.
27309         From John David Anglin.
27310
27311 2000-04-04  Jim Meyering  <meyering@lucent.com>
27312
27313         Be more DOS 8.3-friendly.
27314         * lib/ref-add.sin: Renamed from ref-add.sed.in.
27315         * lib/ref-del.sin: Renamed from ref-del.sed.in.
27316         * lib/Makefile.am: Reflect renaming.
27317         Reported by Eli Zaretskii.
27318
27319         Use a temporary file name that won't clash with `charset.alias'
27320         in the DOS 8.3 name space.
27321         * lib/Makefile.am (charset_tmp): Define.
27322         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
27323         (uninstall-local): Likewise.
27324         Reported by Eli Zaretskii.
27325
27326 2000-04-03  Jim Meyering  <meyering@lucent.com>
27327
27328         * m4/gettext.m4: Fix typo in comment.
27329
27330         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
27331         textutils/configure.in).  Suggestion from Paul Eggert.
27332         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
27333
27334 2000-04-02  Paul Eggert  <eggert@twinsun.com>
27335
27336         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
27337         variable in the shell rather than using putenv, which isn't
27338         portable.  This avoids the configure-time inter-test dependency
27339         on the potentially-renamed putenv function.
27340
27341 2000-03-30  Paul Eggert  <eggert@twinsun.com>
27342
27343         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
27344         before checking struct stat.st_blksize, so that
27345         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
27346
27347 2000-03-29  Paul Eggert  <eggert@twinsun.com>
27348
27349         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
27350         since strftime.c uses HAVE_STRFTIME to decide whether to use
27351         the underlying strftime.
27352
27353 2000-03-29  Paul Eggert  <eggert@twinsun.com>
27354
27355         * lib/time/strftime.c (my_strftime): Make sure we call the system
27356         strftime, not ourselves, when invoking the underlying strftime.
27357
27358 2000-03-24  Jim Meyering  <meyering@lucent.com>
27359
27360         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
27361         (charset_alias): Define.
27362         (install-exec-local): Factor out common code.
27363         (uninstall-local): Split lines longer than 80.
27364         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
27365         (SUFFIXES): Define.
27366         (.sed.in.sed): New rule.  Don't redirect directly to $@.
27367         (CLEANFILES): Add ref-add.sed and ref-del.sed.
27368
27369 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
27370
27371         * lib/config.charset: Output a line containing "Packages using this
27372         file".
27373         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
27374         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
27375         ref-del.sed): New rules.
27376
27377 2000-03-17  Jim Meyering  <meyering@lucent.com>
27378
27379         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
27380         Otherwise, include <strings.h>
27381
27382 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
27383
27384         * lib/unicodeio.c (utf8_wctomb): New function.
27385         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
27386         format instead of in UCS-4 with platform dependent endianness.
27387
27388 2000-03-10  Jim Meyering  <meyering@lucent.com>
27389
27390         * m4/lib-check.m4: Look for getspnam in -lgen, too.
27391         From Marco Franzen.
27392
27393 2000-03-07  Paul Eggert  <eggert@twinsun.com>
27394
27395         * lib/savedir.c (savedir): Work even if directory size is
27396         negative; this can happen with some screwy NFS configurations.
27397
27398 2000-03-06  Jim Meyering  <meyering@lucent.com>
27399
27400         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
27401         if it's NULL (because we ran out of memory).  From Bruno Haible.
27402
27403 2000-03-05  Jim Meyering  <meyering@lucent.com>
27404
27405         * lib/localcharset.c ("path-concat.h"): Include.
27406         (get_charset_aliases): Use path_concat instead of ANSI string
27407         concatenation.
27408
27409         * lib/unicodeio.h (PARAMS): Define.
27410         Use it to guard prototype.
27411
27412 2000-03-04  Jim Meyering  <meyering@lucent.com>
27413
27414         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
27415         for lib/localcharset.c.
27416
27417 2000-03-04  Jim Meyering  <meyering@lucent.com>
27418
27419         * lib/Makefile.am (install-exec-local): Create $(libdir) before
27420         installing into it.
27421         (uninstall-local): Uncomment this rule so `make distcheck' works
27422         once again.
27423
27424         * lib/unicodeio.c (<errno.h>): Include it.
27425         (errno): Declare if not defined.
27426
27427         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
27428
27429         * lib/config.charset: New version, incorporating remarks from a linux
27430         i18n mailing list.  From Bruno Haible.
27431
27432 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
27433
27434         * m4/codeset.m4: New file.
27435         * m4/iconv.m4: New file.
27436         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
27437
27438 2000-03-03  Jim Meyering  <meyering@lucent.com>
27439
27440         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
27441
27442 2000-03-02  Jim Meyering  <meyering@lucent.com>
27443
27444         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
27445         the messages come out on separate lines.
27446
27447         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
27448         rather than jm_CHECK_DECLARATIONS.
27449         * m4/decl.m4: Remove now-unused file.
27450
27451         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
27452         geteuid.
27453
27454 2000-03-02  Jim Meyering  <meyering@lucent.com>
27455
27456         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
27457
27458 2000-03-01  Jim Meyering  <meyering@lucent.com>
27459
27460         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
27461         * lib/unicodeio.c: Likewise.
27462
27463 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
27464
27465         * lib/config.charset: New file.
27466         * lib/localcharset.c: New file.
27467         * lib/unicodeio.h, lib/unicodeio.c: New files.
27468         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
27469         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
27470         (noinst_HEADERS): Add unicodeio.h.
27471         (all-local, install-exec-local, charset.alias): New targets.
27472
27473 2000-02-28  Paul Eggert  <eggert@twinsun.com>
27474
27475         * lib/quotearg.c (ALERT_CHAR): New macro.
27476         (quotearg_buffer_restyled): Use it.
27477
27478 2000-02-27  Jim Meyering  <meyering@lucent.com>
27479
27480         * m4/check-decl.m4: Add getenv to the list.
27481
27482 2000-02-27  Jim Meyering  <meyering@lucent.com>
27483
27484         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
27485         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
27486
27487         * lib/backupfile.c: Guard inclusion of stdlib.h with
27488         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
27489         Declare malloc if needed.
27490
27491         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
27492         `#ifndef HAVE_DECL..'
27493         now that autoconf always defines the HAVE_DECL_ symbols.
27494         * lib/human.c: Likewise.
27495         * lib/same.c: Likewise.
27496         * lib/strtoumax.c: Likewise.
27497
27498         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
27499         declaration check was not run.
27500         * lib/hash.c: Likewise.
27501         * lib/human.c: Likewise.
27502         * lib/same.c: Likewise.
27503         * lib/strtoumax.c: Likewise.
27504
27505         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
27506         `.', then first look up the entire `.'-containing string as a login
27507         name.
27508
27509 2000-02-23  Jim Meyering  <meyering@lucent.com>
27510
27511         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
27512         in place of my hack.
27513
27514 2000-02-18  Paul Eggert  <eggert@twinsun.com>
27515
27516         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
27517         (textint): New typedef.
27518         (parser_control): Member year changed from int to textint.
27519         All uses changed.
27520         (YYSTYPE): Removed; replaced by %union with int and textint members.
27521         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
27522         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
27523         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
27524         (tSNUMBER, tUNUMBER): Now of type <textintval>.
27525         (date, number, to_year): Use width of number in digits, not its value,
27526         to determine whether it's a 2-digit year, or a 2-digit time.
27527         (yylex): Store number of digits of numeric tokens.
27528         Reported by John Kendall.
27529
27530         (parser_control): Changed from struct parser_control to typedef (for
27531         consistency).  All uses changed.
27532
27533         (tID): Removed; not used.
27534         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
27535
27536 2000-02-14  Paul Eggert  <eggert@twinsun.com>
27537
27538         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
27539         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
27540
27541 2000-02-12  Jim Meyering  <meyering@lucent.com>
27542
27543         * lib/userspec.c (ISDIGIT): Define it.
27544         (isdigit): Remove definition.
27545         (is_number): Use ISDIGIT, not isdigit.
27546         <libintl.h>: Include.
27547         (_ and N_): Define.
27548         (parse_user_spec): Mark translatable strings.
27549
27550 2000-02-10  Jim Meyering  <meyering@lucent.com>
27551
27552         With these changes, nanosleep.[ch] are finally enough like the other
27553         lib/* replacement files to compile on a few more losing systems.
27554
27555         * lib/nanosleep.h: Don't include config.h.
27556         Remove prototype from declaration of nanosleep.
27557         (PARAMS): Remove now-unneeded definition.
27558         * lib/nanosleep.c: #undef nanosleep.
27559         (rpl_nanosleep): Rename from nanosleep.
27560
27561 2000-02-10  Jim Meyering  <meyering@lucent.com>
27562
27563         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
27564         gnu_nanosleep to rpl_nanosleep.
27565
27566 2000-02-09  Jim Meyering  <meyering@lucent.com>
27567
27568         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
27569         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
27570
27571 2000-02-08  Akim Demaille  <akim@epita.fr>
27572
27573         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
27574         `[' and `]' and remove uses of `changequote'.
27575         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
27576         (AC_SYS_LARGEFILE): Likewise.
27577         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
27578         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
27579         of changequote.
27580         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
27581         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
27582         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
27583         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
27584
27585 2000-02-05  Jim Meyering  <meyering@lucent.com>
27586
27587         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
27588         Remove explicit use of AC_HEADER_TIME.  It is required by
27589         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
27590         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
27591         in autoconf whereby the expansion of the latter ended up preceding
27592         the expansion of its prerequisite, AC_HEADER_TIME.
27593         Reported by Volker Borchert.
27594
27595 2000-02-03  Jim Meyering  <meyering@lucent.com>
27596
27597         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
27598
27599 2000-02-03  Jim Meyering  <meyering@lucent.com>
27600
27601         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
27602         rather than with `#if HAVE_UTMPNAME'.
27603
27604 2000-02-02  Jim Meyering  <meyering@lucent.com>
27605
27606         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
27607         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
27608         Reported by Eli Zaretskii.
27609
27610 2000-02-01  Jim Meyering  <meyering@lucent.com>
27611
27612         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
27613
27614 2000-01-31  Jim Meyering  <meyering@lucent.com>
27615
27616         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
27617         functions.  Add the time.h and sys/time.h headers along with the
27618         AC_REQUIRE'ment of AC_HEADER_TIME.
27619
27620 2000-01-31  Jim Meyering  <meyering@lucent.com>
27621
27622         * lib/nanosleep.h (nanosleep): Guard declaration with
27623         `#if ! HAVE_DECL_NANOSLEEP'.
27624         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
27625         the declaration in that vendor's sys/timers.h.
27626         Reported by Christian Krackowizer.
27627
27628         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
27629         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
27630         (ISPRINT): Likewise.
27631         Reported by Tom Tromey.
27632
27633 2000-01-30  Jim Meyering  <meyering@lucent.com>
27634
27635         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
27636
27637         * m4/prereq.m4 (utmp_includes): Define.
27638         Check for ut_user and ut_name members in both struct utmpx
27639         and struct utmp.
27640
27641 2000-01-30  Jim Meyering  <meyering@lucent.com>
27642
27643         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
27644         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
27645         header files where only utmpx.ut_user is declared.
27646
27647         * lib/readutmp.h (UT_USER): Define.
27648
27649 2000-01-29  Jim Meyering  <meyering@lucent.com>
27650
27651         * m4/lib-check.m4: New file containing library-related checks from
27652         fileutils and sh-utils (textutils had none).
27653
27654 2000-01-28  Jim Meyering  <meyering@lucent.com>
27655
27656         * m4/perl.m4: Change format of warning message to look more like that
27657         from the missing script.  Suggestion from François Pinard.
27658
27659 2000-01-25  Jim Meyering  <meyering@lucent.com>
27660
27661         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
27662         well as time.h in the compile check.
27663         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
27664         Fix typo in cross-compiling case: s/yes/no/.
27665
27666 2000-01-23  Jim Meyering  <meyering@lucent.com>
27667
27668         * m4/jm-macros.m4: Move df-related tests here from
27669         fileutils/configure.in
27670
27671         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
27672         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
27673
27674         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
27675         s/space/ac_fsusage_space/.
27676         (jm_FILE_SYSTEM_USAGE): Take two parameters.
27677
27678         * m4/ftruncate.m4: New file (derived from part of
27679         fileutils/configure.in).
27680         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
27681         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
27682
27683         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
27684         AC_SUBST these here, rather than just in sh-util/configure.in, so
27685         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
27686         all the same.
27687         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
27688         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
27689         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
27690         (AC_SUBST(POW_LIBM)): Likewise.
27691         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
27692
27693 2000-01-23  Jim Meyering  <meyering@lucent.com>
27694
27695         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
27696         obstack.c.
27697
27698 2000-01-22  Jim Meyering  <meyering@lucent.com>
27699
27700         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
27701
27702         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
27703
27704         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
27705         configure.in
27706         (AC_CHECK_HEADERS): Likewise for sh-utils.
27707         (AC_CHECK_HEADERS): Likewise for textutils.
27708         Merge the three lists of headers.
27709
27710         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
27711         from fileutils' configure.in.
27712
27713         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
27714         code. Moved tests into their own function (_jm_DECL_HEADERS) in
27715         check-decl.m4.
27716
27717         * m4/check-decl.m4: Use #if rather than #ifdef.
27718         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
27719         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
27720         (_jm_DECL_HEADERS): Define new function.
27721         (jm_CHECK_DECLARATIONS): Require it.
27722
27723 2000-01-22  Jim Meyering  <meyering@lucent.com>
27724
27725         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
27726         [! HAVE_DECL_STRTOULL]: Declare strtoull.
27727         Required for some AIX systems.  Reported by Christian Krackowizer.
27728         [TESTING] (main): New function.
27729
27730         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
27731         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
27732         letters.
27733
27734         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
27735         iswprint.
27736
27737         * lib/strverscmp.c (ISDIGIT): Define.
27738         (strverscmp): Use ISDIGIT, not isdigit.
27739
27740 2000-01-19  Jim Meyering  <meyering@lucent.com>
27741
27742         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
27743         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
27744         defines `struct timespec' in <sys/time.h>
27745
27746         * m4/c-bs-a.m4: Remove uses of changequote altogether.
27747         Thanks to Akim for explaining.
27748
27749 2000-01-17  Paul Eggert  <eggert@twinsun.com>
27750
27751         * lib/nanosleep.c (nanosleep):
27752         Don't use SA_INTERRUPT to decide whether to call sigaction, as
27753         POSIX.1 doesn't require SA_INTERRUPT and some systems
27754         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
27755         it's been part of POSIX.1 since day 1 (in 1988).
27756
27757 2000-01-17  Jim Meyering  <meyering@lucent.com>
27758
27759         * lib/interlock: Remove unused file.  Reported by François Pinard.
27760
27761 2000-01-16  Paul Eggert  <eggert@twinsun.com>
27762
27763         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
27764         alert, backslash, formfeed, and vertical tab unnecessarily in
27765         shell quoting style.
27766
27767 2000-01-16  Jim Meyering  <meyering@lucent.com>
27768
27769         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
27770         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
27771         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
27772         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
27773
27774 2000-01-16  Jim Meyering  <meyering@lucent.com>
27775
27776         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
27777         because the latter didn't work.
27778
27779 2000-01-15  Jim Meyering  <meyering@lucent.com>
27780
27781         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
27782         (AC_REPLACE_FUNCS): Add memcpy and memset.
27783         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
27784         Add strpbrk.
27785         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
27786
27787 2000-01-12  Jim Meyering  <meyering@lucent.com>
27788
27789         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
27790         (jm_PREREQ): Use it.
27791         (jm_PREREQ_READUTMP): New macro.
27792         (jm_PREREQ): Use it.
27793
27794 2000-01-11  Paul Eggert  <eggert@twinsun.com>
27795
27796         Quote multibyte characters correctly.
27797         * m4/c-bs-a.m4: New file.
27798         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
27799         (jm_PREREQ): Use it.
27800
27801 2000-01-11  Paul Eggert  <eggert@twinsun.com>
27802
27803         * m4/uintmax_t.m4: Port to autoconf 2.13.
27804
27805 2000-01-08  Jim Meyering  <meyering@ascend.com>
27806
27807         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
27808         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
27809
27810 2000-01-04  Jim Meyering  <meyering@ascend.com>
27811
27812         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
27813         jm_STRUCT_DIRENT_D_TYPE.
27814         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
27815         jm_STRUCT_DIRENT_D_INO.
27816         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
27817         jm_STRUCT_UTIMBUF.
27818         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
27819         renamings.
27820         * m4/utime.m4: Likewise.
27821
27822         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
27823         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
27824
27825 2000-01-03  Paul Eggert  <eggert@twinsun.com>
27826
27827         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
27828         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
27829
27830 2000-01-02  Jim Meyering  <meyering@ascend.com>
27831
27832         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
27833         remember if this is necessary.
27834
27835 1999-12-26  Jim Meyering  <meyering@ascend.com>
27836
27837         * m4/jm-macros.m4: Use it here.
27838         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
27839
27840 1999-12-23  Jim Meyering  <meyering@ascend.com>
27841
27842         * m4/jm-macros.m4: Check for clock_gettime (moved from
27843         fileutils/configure.in)
27844         Check for gettimeofday.
27845
27846 1999-12-20  Jim Meyering  <meyering@ascend.com>
27847
27848         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
27849         autoconf-2.14a-1999-12-20.
27850
27851 1999-12-19  Jim Meyering  <meyering@ascend.com>
27852
27853         * m4/lstat-slash.m4: New file.
27854         * m4/jm-macros.m4: Use the new macro:
27855         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27856
27857 1999-12-07  Jim Meyering  <meyering@ascend.com>
27858
27859         * m4/perl.m4: Require that File::Compare be available, too.
27860         Too many systems seem to lack it.
27861
27862         * m4/strftime.m4: Add checks for most of the cpp macros tested in
27863         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
27864
27865 1999-11-18  Paul Eggert  <eggert@twinsun.com>
27866
27867         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
27868         problem with the QNX 4.25 shell, which doesn't propagate exit
27869         status of failed commands inside shell assignments.
27870
27871 1999-11-17  Jim Meyering  <meyering@ascend.com>
27872
27873         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
27874
27875 1999-11-07  Jim Meyering  <meyering@ascend.com>
27876
27877         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
27878
27879 1999-11-06  Jim Meyering  <meyering@ascend.com>
27880
27881         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
27882         * m4/jm-macros.m4 (jm_MACROS): Use it here.
27883
27884 1999-11-05  Jim Meyering  <meyering@ascend.com>
27885
27886         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
27887         configure.in of textutils, fileutils, and sh-utils into this one
27888         (shared between those packages) file.
27889         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
27890         AC_STRUCT_ST_BLKSIZE.
27891
27892 1999-11-03  Jim Meyering  <meyering@ascend.com>
27893
27894         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
27895         of AC_CHECK_TYPE checks includes unistd.h.
27896         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
27897         Suggestion from Akim Demaille.
27898
27899 1999-10-30  Jim Meyering  <meyering@ascend.com>
27900
27901         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
27902         m4-quoted string.
27903         * m4/ls-mntd-fs.m4: Likewise.
27904         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
27905         * m4/jm-winsz1.m4: Likewise.
27906
27907         * m4/const.m4: Remove file, since the fix made it into the experimental
27908         version of autoconf.
27909         * m4/mktime.m4: Likewise.
27910
27911         * m4/check-type.m4: Remove file, now that the latest version of
27912         AC_CHECK_TYPE takes a third arg to specify additional #includes.
27913
27914         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
27915         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
27916         AC_CHECK_TYPE.
27917
27918 1999-10-04  Jim Meyering  <meyering@ascend.com>
27919
27920         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
27921
27922 1999-09-22  Paul Eggert  <eggert@twinsun.com>
27923
27924         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
27925         2.95.1 bug with HP-UX 10.20.
27926
27927 1999-09-17  Jim Meyering  <meyering@ascend.com>
27928
27929         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
27930         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
27931         due to missing strdup (against sh-utils-2.0).
27932
27933 1999-08-29  Jim Meyering  <meyering@ascend.com>
27934
27935         * m4/jm-macros.m4: Require jm_BISON.
27936         * m4/bison.m4: New file.
27937
27938 1999-08-17  Paul Eggert  <eggert@twinsun.com>
27939
27940         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
27941         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
27942
27943 1999-08-05  Jim Meyering  <meyering@ascend.com>
27944
27945         * m4/getline.m4: Rename test file from conftestdata to conftest.data
27946         to avoid conflicts with `conftest' on 8+3 filesystems.
27947         Suggestion from Eli Zaretskii.
27948
27949 1999-08-04  Jim Meyering  <meyering@ascend.com>
27950
27951         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
27952         fileutils and sh-utils (textutils's getline test was inadequate).
27953         (AM_FUNC_GETLINE): Run this test.
27954         (AC_CHECK_FUNCS): Check for getdelim.
27955         Reported by Bob Proulx.
27956
27957 1999-08-02  Jim Meyering  <meyering@ascend.com>
27958
27959         * m4/jm-macros.m4: Add a comment.
27960
27961 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27962
27963         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
27964         <inttypes.h> defines strtoumax as a macro (and not as a
27965         function).
27966
27967 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27968
27969         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
27970         that we can shift, multiply and divide unsigned long long
27971         values; Ultrix cc can't do it.
27972
27973 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27974
27975         * m4/mktime.m4: New file, which is a preview of what should appear
27976         in the next public autoconf release.
27977
27978 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27979
27980         * m4/lfs.m4: Remove this file.
27981         * m4/largefile.m4: New file.  It contains the old contents of
27982         lfs.m4, except that all names with prefix AC_LFS have been
27983         changed to use the prefix AC_SYS_LARGEFILE instead, to be
27984         compatible with future autoconf versions.  Also, some minor m4
27985         quoting problems have been fixed.
27986
27987 1999-08-01  Paul Eggert  <eggert@twinsun.com>
27988
27989         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
27990         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
27991         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
27992         and simplify the shell code.
27993
27994 1999-08-01  Jim Meyering  <meyering@ascend.com>
27995
27996         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
27997         m4.
27998
27999 1999-07-20  Jim Meyering  <meyering@ascend.com>
28000
28001         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
28002
28003 1999-07-15  Jim Meyering  <meyering@ascend.com>
28004
28005         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
28006
28007 1999-05-22  Jim Meyering  <meyering@ascend.com>
28008
28009         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
28010
28011 1999-05-20  Jim Meyering  <meyering@ascend.com>
28012
28013         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
28014         Add a colon after each `then' in case $4 is empty.
28015
28016 1999-05-16  Jim Meyering  <meyering@ascend.com>
28017
28018         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
28019
28020 1999-05-10  Jim Meyering  <meyering@ascend.com>
28021
28022         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
28023
28024         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
28025         AC_FUNC_MKTIME.
28026
28027 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
28028
28029         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
28030
28031 1999-05-04  Paul Eggert  <eggert@twinsun.com>
28032
28033         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
28034         not CPPFLAGS, so that linking works correctly in IRIX.
28035
28036 1999-04-30  Paul Eggert  <eggert@twinsun.com>
28037
28038         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
28039
28040 1999-04-20  Paul Eggert  <eggert@twinsun.com>
28041
28042         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
28043         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
28044         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
28045         jm_AC_TYPE_UNSIGNED_LONG_LONG.
28046         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
28047
28048         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
28049
28050 1999-04-20  Jim Meyering  <meyering@ascend.com>
28051
28052         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
28053         AC_REPLACE xstroull if necessary.  From Paul Eggert.
28054         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
28055
28056 1999-04-18  Jim Meyering  <meyering@ascend.com>
28057
28058         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
28059         * m4/jm-macros.m4: Use it.
28060
28061 1999-04-06  Jim Meyering  <meyering@ascend.com>
28062
28063         * m4/strftime.m4: Remove test for %f.
28064
28065 1999-03-29  Jim Meyering  <meyering@ascend.com>
28066
28067         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
28068         superset of the AC_TYPE_* checks in the textutils, fileutils,
28069         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
28070         AC_TYPE_PID_T.
28071
28072 1999-03-28  Jim Meyering  <meyering@ascend.com>
28073
28074         * m4/jm-macros.m4: Define GNU_PACKAGE here.
28075         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
28076         replaced e.g., in the *.sh files of the sh-utils.
28077
28078 1999-03-20  Jim Meyering  <meyering@ascend.com>
28079
28080         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
28081         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
28082         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
28083
28084 1999-03-19  Jim Meyering  <meyering@ascend.com>
28085
28086         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
28087
28088 1999-03-12  Jim Meyering  <meyering@ascend.com>
28089
28090         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
28091
28092 1999-03-07  Jim Meyering  <meyering@ascend.com>
28093
28094         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
28095         declared.
28096
28097 1999-02-17  Jim Meyering  <meyering@ascend.com>
28098
28099         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
28100         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
28101
28102 1999-02-07  Jim Meyering  <meyering@ascend.com>
28103
28104         * m4/group-member.m4: New file -- extracted from sh-utils'
28105         configure.in.
28106
28107         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
28108         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
28109
28110 1999-02-06  Jim Meyering  <meyering@ascend.com>
28111
28112         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
28113         * m4/fnmatch.m4: Likewise.
28114         * m4/getgroups.m4: Likewise.
28115         * m4/lstat.m4: Likewise.
28116         * m4/malloc.m4: Likewise.
28117         * m4/putenv.m4: Likewise.
28118         * m4/realloc.m4: Likewise.
28119         * m4/regex.m4: Likewise.
28120         * m4/stat.m4: Likewise.
28121         * m4/strftime.m4: Likewise.
28122         Suggestion from Alain Magloire.
28123
28124         * m4/chown.m4: Use `.$ac_objext', not `.o'.
28125         * m4/fnmatch.m4: Likewise.
28126         * m4/getgroups.m4: Likewise.
28127         * m4/getline.m4: Likewise.
28128         * m4/lstat.m4: Likewise.
28129         * m4/malloc.m4: Likewise.
28130         * m4/memcmp.m4: Likewise.
28131         * m4/putenv.m4: Likewise.
28132         * m4/realloc.m4: Likewise.
28133         * m4/regex.m4: Likewise.
28134         * m4/stat.m4: Likewise.
28135         * m4/strftime.m4: Likewise.
28136         Suggestion from Alain Magloire.
28137
28138         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
28139         an argument.
28140
28141         * m4/regex.m4: Add a run-time Test for proper operation of
28142         re_compile_pattern.
28143
28144 1999-01-31  Jim Meyering  <meyering@ascend.com>
28145
28146         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
28147
28148 1999-01-30  Jim Meyering  <meyering@ascend.com>
28149
28150         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
28151
28152         * m4/jm-mktime.m4: Make this a wrapper around the official
28153         AM_FUNC_MKTIME rather than my private copy, now that the official one
28154         is up to date.
28155         * m4/mktime.m4: Remove file.
28156
28157         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
28158         * m4/uptime.m4: Likewise.
28159         * m4/uintmax_t.m4: Likewise.
28160
28161 1999-01-28  Jim Meyering  <meyering@ascend.com>
28162
28163         * m4/jm-macros.m4: Use jm_AFS.
28164         * m4/afs.m4: New file (from fileutils' configure.in).
28165
28166         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
28167         * m4/chown.m4: Likewise.
28168         * m4/d-ino.m4: Likewise.
28169         * m4/d-type.m4: Likewise.
28170         * m4/fnmatch.m4: Likewise.
28171         * m4/getgroups.m4: Likewise.
28172         * m4/gettext.m4: Likewise.
28173         * m4/jm-mktime.m4: Likewise.
28174         * m4/jm-winsz2.m4: Likewise.
28175         * m4/lcmessage.m4: Likewise.
28176         * m4/ls-mntd-fs.m4: Likewise.
28177         * m4/malloc.m4: Likewise.
28178         * m4/memcmp.m4: Likewise.
28179         * m4/putenv.m4: Likewise.
28180         * m4/realloc.m4: Likewise.
28181         * m4/st_mtim.m4: Likewise.
28182         * m4/strftime.m4: Likewise.
28183
28184 1999-01-16  Jim Meyering  <meyering@ascend.com>
28185
28186         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
28187         (ARGMATCH_DIE_DECL): Define.
28188
28189 1999-01-12  Jim Meyering  <meyering@ascend.com>
28190
28191         * m4/Makefile.am.in: Rewrite to avoid using fmt.
28192         Reported by Lars Hecking.
28193
28194 1999-01-10  Jim Meyering  <meyering@ascend.com>
28195
28196         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
28197         gross kludge.
28198         * m4/inttypes_h.m4: Likewise.
28199         * m4/lstat.m4: Likewise.
28200         * m4/malloc.m4: Likewise.
28201         * m4/readdir.m4: Likewise.
28202         * m4/realloc.m4: Likewise.
28203         * m4/st_dm_mode.m4: Likewise.
28204         * m4/stat.m4: Likewise.
28205         * m4/utimbuf.m4: Likewise.
28206         * m4/utimes.m4: Likewise.
28207
28208         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
28209         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
28210         comments in config.h.in are meaningful.
28211
28212         * m4/jm-macros.m4: Require autoconf-2.13 here.
28213
28214         * m4/regex.m4: By default, don't use the included regex.c on systems
28215         with glibc 2.  Suggestion from Uli Drepper.
28216
28217 1999-01-02  Jim Meyering  <meyering@ascend.com>
28218
28219         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
28220
28221 1998-12-18  Jim Meyering  <meyering@ascend.com>
28222
28223         * m4/Makefile.am.in (Makefile.am): Simplify rule.
28224         Based on a suggestion from Lars Hecking.
28225
28226 1998-11-16  Paul Eggert  <eggert@twinsun.com>
28227
28228         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
28229
28230 1998-11-16  Jim Meyering  <meyering@ascend.com>
28231
28232         * m4/lfs.m4: Double-quote the `uname...` expression.
28233
28234 1998-11-14  Jim Meyering  <meyering@ascend.com>
28235
28236         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
28237         * m4/stat.m4: Likewise.
28238
28239 1998-11-03  Jim Meyering  <meyering@ascend.com>
28240
28241         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
28242         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
28243
28244 1998-10-18  Jim Meyering  <meyering@ascend.com>
28245
28246         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
28247
28248 1998-10-17  Jim Meyering  <meyering@ascend.com>
28249
28250         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
28251         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
28252         calls for those previously hard-coded headers.  Instead, take a new
28253         parameter.
28254         (jm_CHECK_DECLARATIONS): Reflect interface change.
28255         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
28256         (jm_CHECK_DECL_LOCALTIME_R): New macro.
28257
28258         * m4/mktime.m4: Test for spring-forward gap before long-running test.
28259
28260 1998-10-14  Jim Meyering  <meyering@ascend.com>
28261
28262         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
28263         instead of "TZ=America/Vancouver".  From Paul Eggert.
28264
28265 1998-10-11  Jim Meyering  <meyering@ascend.com>
28266
28267         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
28268         This adds a test for a recently added compatibility fix for mktime.c.
28269         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
28270
28271 1998-09-27  Jim Meyering  <meyering@ascend.com>
28272
28273         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
28274
28275         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
28276         ../configure.in, including a change from Gordon Matzigkeit to allow
28277         cross-compiling for the Hurd.
28278
28279         * m4/glibc.m4: New file/macro to test for the GNU C Library
28280         versions 1 and 2.  From Gordon Matzigkeit.
28281         Indent.
28282
28283 1998-09-21  Jim Meyering  <meyering@ascend.com>
28284
28285         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
28286
28287 1998-08-18  Paul Eggert  <eggert@twinsun.com>
28288
28289         Port nanosecond-resolution times to UnixWare 2.1.2 and
28290         pedantic Solaris 2.6.
28291
28292         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
28293         AC_STRUCT_ST_MTIM.
28294         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
28295         Generate name of ns member, instead of just 1 or undef.
28296         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
28297
28298 1998-08-15  Jim Meyering  <meyering@ascend.com>
28299
28300         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
28301         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
28302         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
28303         instead of jm_TYPE_SSIZE_T.
28304
28305 1998-08-12  Jim Meyering  <meyering@ascend.com>
28306
28307         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
28308
28309 1998-08-02  Jim Meyering  <meyering@ascend.com>
28310
28311         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
28312         in acconfig.h manually.
28313
28314 1998-07-31  Paul Eggert  <eggert@twinsun.com>
28315
28316         * m4/st_mtim.m4: New file.
28317
28318 1998-07-28  Jim Meyering  <meyering@ascend.com>
28319
28320         * m4/utimes.m4: Undef stat.
28321
28322 1998-07-25  Jim Meyering  <meyering@ascend.com>
28323
28324         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
28325         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
28326
28327 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
28328
28329         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
28330         uid and gid actually remain unchanged.
28331
28332 1998-07-07  Jim Meyering  <meyering@ascend.com>
28333
28334         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
28335
28336 1998-07-04  Jim Meyering  <meyering@ascend.com>
28337
28338         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
28339         to prove that this macro can be used in packages without regex.c.
28340
28341 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
28342
28343         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
28344         is to be used.
28345
28346 1998-07-03  Jim Meyering  <meyering@ascend.com>
28347
28348         * m4/gettext.m4: Add -lintl if it's found to be necessary.
28349
28350         * m4/gettext.m4: New file -- from gettext-0.10.35.
28351         * m4/lcmessage.m4: Likewise.
28352         * m4/progtest.m4: Likewise.
28353
28354         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
28355         * m4/jm-macros.m4: Require the new macro.
28356
28357 1998-06-29  Jim Meyering  <meyering@ascend.com>
28358
28359         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
28360         for the definition of NGROUPS (used in a system header included
28361         by sys/mount.h).
28362
28363 1998-06-28  Jim Meyering  <meyering@ascend.com>
28364
28365         * m4/ls-mntd-fs.m4: New file.
28366         * m4/fstypename.m4: New file.
28367
28368         * m4/jm-macros.m4: Require the new macro.
28369         * m4/jm-glibc-io.m4: New file.
28370
28371 1998-05-19  Jim Meyering  <meyering@ascend.com>
28372
28373         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
28374         * m4/lchown.m4: New file.
28375
28376         * m4/Makefile.am.in: New file.
28377         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
28378
28379 1998-05-14  Jim Meyering  <meyering@ascend.com>
28380
28381         * m4/Makefile.am (EXTRA_DIST): Add them.
28382         * m4/jm-macros.m4: New file.
28383         * m4/utimbuf.m4: New file.
28384
28385 1998-05-12  Jim Meyering  <meyering@ascend.com>
28386
28387         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
28388
28389 1998-05-11  Jim Meyering  <meyering@ascend.com>
28390
28391         * m4/isc-posix.m4: New file.
28392
28393 1998-05-10  Jim Meyering  <meyering@ascend.com>
28394
28395         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
28396
28397 1998-05-09  Jim Meyering  <meyering@ascend.com>
28398
28399         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
28400         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
28401         with automake.
28402
28403         * m4/ssize_t.m4: New file.
28404         * m4/mktime.m4: Remove file -- the new automake has this now.
28405
28406 1998-04-26  Jim Meyering  <meyering@ascend.com>
28407
28408         * m4/assert.m4: New file.
28409         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
28410
28411 1998-04-05  Jim Meyering  <meyering@ascend.com>
28412
28413         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
28414         (jm_PREREQ): Use it here.
28415
28416 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
28417
28418         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
28419         in acconfig.h.
28420
28421 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
28422
28423         * m4/prereq.m4: New file.
28424         * m4/error.m4: New file.
28425         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
28426
28427 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
28428
28429         * m4/getline.m4: Don't set am_cv_func_working_getline before the
28430         cache-check for the same variable -- that defeated the purpose of
28431         the test; the test program was never run.  This was a problem only
28432         on systems with losing getline functions -- HP-UX 10.20 is one.
28433         Reported by Bjorn Helgaas.
28434
28435 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
28436
28437         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
28438
28439 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
28440
28441         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
28442
28443         * m4/const.m4: New file.  Use an initializer in this declaration
28444         typedef int charset[2]; const charset x;
28445         Reported by Bob Glickstein.
28446
28447 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
28448
28449         * m4/chown.m4: Fix reversed types on -1 args to chown.
28450         From Kaveh Ghazi.
28451
28452 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
28453
28454         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
28455         Add lseek and memchr.
28456
28457         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
28458         T.E.Dickey <dickey@clark.net> said that some older preprocessors
28459         have a 20-character limit on names.
28460
28461 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
28462
28463         * m4/inttypes_h.m4: New file.
28464         * m4/uintmax_t.m4: New file.
28465         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
28466
28467 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
28468   Free Software Foundation, Inc.
28469 Copying and distribution of this file, with or without modification,
28470 are permitted provided the copyright notice and this notice are preserved.