b608a7cf1e524ae762ee837d37be14f85124ead0
[gnulib.git] / ChangeLog
1 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
2
3         * MODULES.html.sh (File system functions): New module write-any-file.
4         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
5         * m4/write-any-file.m4: New files.
6
7 2007-03-23  Eric Blake  <ebb9@byu.net>
8
9         * gnulib-tool: Rearrange space-tab sequences, since some editors
10         like to eat them.
11
12 2007-03-23  Eric Blake  <ebb9@byu.net>
13
14         * lib/version-etc.c (version_etc_va): Update license wording to
15         be more concise.  Recommended by Richard Stallman.
16
17 2007-03-22  Bruno Haible  <bruno@clisp.org>
18
19         * lib/poll.c (MSG_PEEK): New fallback definition.
20
21 2007-03-22  Bruno Haible  <bruno@clisp.org>
22
23         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
24         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
25         (main): Update.
26         Fixes a compilation error on BeOS.
27
28 2007-03-22  Bruno Haible  <bruno@clisp.org>
29
30         * modules/frexpl-tests: New file.
31         * tests/test-frexpl.c: New file.
32
33         * modules/frexpl: New file.
34         * m4/frexpl.m4: New file.
35         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
36         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
37         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
38         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
39         (Depends-on): Add frexpl. Remove isnanl-nolibm.
40         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
41
42 2007-03-22  Bruno Haible  <bruno@clisp.org>
43
44         * lib/frexpl.c: Share code with lib/frexp.c.
45         * modules/mathl (Files): Add lib/frexp.c.
46         (Depends-on): Add isnanl-nolibm.
47
48 2007-03-22  Bruno Haible  <bruno@clisp.org>
49
50         * modules/printf-frexp (Files): Add m4/frexp.m4.
51         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
52         only if the found frexp function actually works.
53
54 2007-03-22  Bruno Haible  <bruno@clisp.org>
55
56         * lib/frexp.c: Remove older implementation that uses divisions.
57
58 2007-03-21  Bruno Haible  <bruno@clisp.org>
59
60         * modules/frexp-tests: New file.
61         * tests/test-frexp.c: New file.
62
63         * modules/frexp: New file.
64         * lib/frexp.c: New file.
65         * m4/frexp.m4: New file.
66         * lib/math_.h (frexp): New declaration.
67         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
68         REPLACE_FREXP.
69         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
70
71 2007-03-21  Bruno Haible  <bruno@clisp.org>
72
73         * modules/isnanl-tests: New file.
74         * tests/test-isnanl.c: New file.
75
76         * modules/isnanl: New file.
77         * lib/isnanl.h: New file.
78         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
79         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
80         gl_FUNC_ISNANL_WORKS.
81         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
82         New macros.
83
84 2007-03-21  Bruno Haible  <bruno@clisp.org>
85
86         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
87         lib/isnanl.h.
88         (Include): Update.
89         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
90         * lib/vasnprintf.c: Update.
91         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
92         tests/test-isnanl.h, remove tests/test-isnanl.c.
93         (Makefile.am): Update.
94         * tests/test-isnanl-nolibm.c: New file.
95         * tests/test-isnanl.h: New file.
96         * tests/test-isnanl.c: Remove file.
97
98 2007-03-21  Jim Meyering  <jim@meyering.net>
99
100         When trying to open ".", treat ESTALE like EACCES.
101         * lib/savewd.c (savewd_save): Resort to forking not just upon
102         failure with EACCES, but also when errno is ESTALE.
103
104 2007-03-20  Bruno Haible  <bruno@clisp.org>
105
106         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
107         Needed on AIX 5.1. Reported by Matthew Woehlke.
108
109 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
110
111         Suggestions by Bruno Haible:
112         * lib/acl-internal.h: Include "gettext.h" rather than rolling
113         our own.
114         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
115         * modules/acl (Depends-on): Add gettext.
116
117 2007-03-19  Bruno Haible  <bruno@clisp.org>
118
119         * modules/iconvme: Remove file.
120         * lib/iconvme.h: Remove file.
121         * lib/iconvme.c: Remove file.
122         * m4/iconvme.m4: Remove file.
123
124 2007-03-19  Bruno Haible  <bruno@clisp.org>
125
126         * doc/relocatable-maint.texi: Break long shell script line.
127         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
128
129 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
130
131         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
132         handle file_has_acl.
133         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
134         * lib/acl.c: Move header inclusions and related macro defns into
135         lib/acl-internal.h.
136         (S_ISLNK): Remove defn, since that's now done for us.
137         (file_has_acl): Move to lib/file-has-acl.c.
138         Call acl_trivial if available.  This is the crucial part of the fix.
139         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
140         shared within the library.  Rewrite a bit, partly to make it compatible
141         with the GNU coding style.
142         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
143         Remove unnecessary double-quotes.
144         Don't test for acl_to_text; the build will catch that.
145         Replace acl_entries if it doesn't exist and it is needed.
146         Check for -lsec and acl_trivial (as used on Solaris 10).
147         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
148         lib/file-has-acl.c.
149         (Depends-on): Add sys_stat, for S_ISLNK.
150
151 2007-03-19  Ben Pfaff  <blp@gnu.org>
152
153         * doc/gnulib.texi: Fix typos.
154         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
155
156 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
157
158         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
159         If size is zero here, buf must be zero.
160
161 2007-03-19  Simon Josefsson  <simon@josefsson.org>
162
163         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
164         <bruno@clisp.org>.
165
166 2007-03-18  Bruno Haible  <bruno@clisp.org>
167
168         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
169         Suggested by Eric Blake.
170
171 2007-03-18  Ben Pfaff  <blp@gnu.org>
172
173         * doc/relocatable.texi: Recommend using as prefix a directory
174         that does not exist and will never be created.  Based on
175         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
176         and others.
177
178 2007-03-17  Bruno Haible  <bruno@clisp.org>
179
180         * lib/fchownat.c: Include lchown.h.
181
182 2007-03-17  Bruno Haible  <bruno@clisp.org>
183
184         Fix endless loop when the given allocated size was > INT_MAX.
185         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
186         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
187         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
188         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
189         * lib/sprintf.c (sprintf): Likewise.
190
191 2007-03-17  Bruno Haible  <bruno@clisp.org>
192
193         * tests/test-argp-2.sh (func_compare): Output a context diff.
194
195 2007-03-17  Bruno Haible  <bruno@clisp.org>
196
197         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
198         locale's decimal-point character.
199
200 2007-03-17  Bruno Haible  <bruno@clisp.org>
201
202         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
203         before comparing it. Needed because on some platforms (e.g. x86) a
204         'long double' occupies less bytes than sizeof (long double).
205
206 2007-03-17  Bruno Haible  <bruno@clisp.org>
207
208         * tests/test-crc.c (main): Make printf statements 64-bit clean.
209         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
210         * tests/test-getaddrinfo.c (simple): Likewise.
211         * tests/test-read-file.c (main): Likewise.
212
213 2007-03-17  Bruno Haible  <bruno@clisp.org>
214
215         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
216
217 2007-03-17  Bruno Haible  <bruno@clisp.org>
218
219         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
220         unused variable.
221
222 2007-03-17  Bruno Haible  <bruno@clisp.org>
223
224         * tests/test-c-strcasecmp.c: Include c-strcase.h.
225         * tests/test-c-strncasecmp.c: Likewise.
226
227 2007-03-17  Bruno Haible  <bruno@clisp.org>
228
229         * modules/stdlib (Depends-on): Add unistd.
230         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
231         Needed for MacOS X 10.3.
232
233 2007-03-17  Bruno Haible  <bruno@clisp.org>
234
235         * lib/unistr/u-strdup.h: Include <stdlib.h>.
236
237 2007-03-17  Bruno Haible  <bruno@clisp.org>
238
239         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
240
241 2007-03-17  Bruno Haible  <bruno@clisp.org>
242
243         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
244         to reflect files copied from gnulib (with or without modifications).
245         Suggested by Jim Meyering.
246
247 2007-03-17  Eric Blake  <ebb9@byu.net>
248
249         * NEWS: Document stdlib change from 2007-02-18.
250
251 2007-03-17  Jim Meyering  <jim@meyering.net>
252
253         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
254         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
255         someone uses a name containing shell meta-characters.
256         Reported by Alfred M. Szmidt.
257
258         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
259
260 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
261
262         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
263         and copy gettext configuration files only if configure.ac contains
264         a use of AM_GNU_GETTEXT_VERSION.
265
266 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
267
268         * build-aux/bootstrap (gnulib_name): New variable.
269         (gnulib_tool_options): Use it.
270
271 2007-03-13  Simon Josefsson  <simon@josefsson.org>
272
273         * tests/test-des.c: Use new namespace.
274
275 2007-03-15  Bruno Haible  <bruno@clisp.org>
276
277         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
278         Reported by James Youngman <jay@gnu.org>.
279
280 2007-03-15  Bruno Haible  <bruno@clisp.org>
281
282         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
283         declared prototype. Needed with cc on OSF/1 5.1.
284
285 2007-03-15  Bruno Haible  <bruno@clisp.org>
286
287         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
288         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
289         (struct gl_list_implementation): Add dispose_fn argument to the
290         'create_empty', 'create' methods.
291         (struct gl_list_impl_base): Add field 'dispose_fn'.
292         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
293         argument.
294         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
295         dispose_fn argument.
296         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
297         dispose_fn on the dropped values.
298         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
299         dispose_fn argument.
300         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
301         dropped values.
302         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
303         (gl_tree_remove_node): Call dispose_fn on the dropped value.
304         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
305         (gl_tree_remove_node): Call dispose_fn on the dropped value.
306         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
307         argument.
308         (gl_tree_list_free): Call dispose_fn on the dropped values.
309         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
310         the dropped values.
311         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
312         Add dispose_fn argument.
313         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
314         Call dispose_fn on the dropped values.
315         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
316         Add dispose_fn argument.
317         (gl_sublist_create): Initialize the 'dispose_fn' field.
318         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
319         * tests/test-array_list.c (main): Update.
320         * tests/test-carray_list.c (main): Update.
321         * tests/test-avltree_list.c (main): Update.
322         * tests/test-rbtree_list.c (main): Update.
323         * tests/test-avltreehash_list.c (main): Update.
324         * tests/test-rbtreehash_list.c (main): Update.
325         * tests/test-linked_list.c (main): Update.
326         * tests/test-linkedhash_list.c (main): Update.
327         * tests/test-array_oset.c (main): Update.
328
329 2007-03-15  Bruno Haible  <bruno@clisp.org>
330
331         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
332         (gl_oset_create_empty): Add dispose_fn argument.
333         (struct gl_oset_implementation): Add dispose_fn argument to
334         'create_empty' method.
335         (struct gl_oset_impl_base): Add dispose_fn field.
336         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
337         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
338         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
339         values.
340         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
341         (gl_tree_oset_free): Call dispose_fn on the dropped values.
342         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
343         dropped value.
344         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
345         dropped value.
346         * tests/test-array_oset.c (main): Update.
347         * tests/test-avltree_oset.c (main): Update.
348         * tests/test-rbtree_oset.c (main): Update.
349         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
350
351 2007-03-13  Bruno Haible  <bruno@clisp.org>
352
353         * tests/test-stdbool.c (i): Update after last patch.
354
355 2007-03-12  Bruno Haible  <bruno@clisp.org>
356
357         * lib/quotearg.c: Include <wctype.h> early, before the definition of
358         the iswprint macro. Needed on Solaris 2.5.1.
359
360 2007-03-12  Bruno Haible  <bruno@clisp.org>
361
362         * tests/test-printf-frexp.c (main): Declare x as volatile.
363
364 2007-03-12  Simon Josefsson  <simon@josefsson.org>
365
366         * doc/gnulib.texi (Build robot for gnulib): New section.
367
368 2007-03-12  Jim Meyering  <jim@meyering.net>
369
370         * build-aux/bootstrap: New file.
371         * build-aux/bootstrap.conf: New file, from coreutils.
372
373 2007-03-11  Bruno Haible  <bruno@clisp.org>
374
375         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
376
377 2007-03-12  Simon Josefsson  <simon@josefsson.org>
378
379         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
380         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
381         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
382
383 2007-03-11  Bruno Haible  <bruno@clisp.org>
384
385         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
386         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
387
388 2007-03-11  Bruno Haible  <bruno@clisp.org>
389
390         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
391         formula. Needed for SunPRO C 5.0.
392
393 2007-03-11  Bruno Haible  <bruno@clisp.org>
394
395         * modules/long-options (Depends-on): Add getopt.
396
397 2007-03-11  Bruno Haible  <bruno@clisp.org>
398
399         * modules/modechange (Depends-on): Add stdbool.
400
401 2007-03-11  Bruno Haible  <bruno@clisp.org>
402
403         * modules/i-ring (Depends-on): Add stdbool.
404
405 2007-03-11  Bruno Haible  <bruno@clisp.org>
406
407         * modules/gc-des (Depends-on): Add stdbool.
408
409 2007-03-11  Bruno Haible  <bruno@clisp.org>
410
411         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
412
413 2007-03-11  Bruno Haible  <bruno@clisp.org>
414
415         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
416
417 2007-03-11  Bruno Haible  <bruno@clisp.org>
418
419         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
420
421 2007-03-11  Bruno Haible  <bruno@clisp.org>
422
423         * lib/vasnprintf.c (sprintf): Undefine.
424
425 2007-03-11  Bruno Haible  <bruno@clisp.org>
426
427         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
428         initializers in SunPRO C and Compaq C compilers.
429
430 2007-03-11  Bruno Haible  <bruno@clisp.org>
431
432         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
433         decrementing code ANSI C compliant.
434
435 2007-03-11  Bruno Haible  <bruno@clisp.org>
436
437         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
438         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
439
440 2007-03-11  Bruno Haible  <bruno@clisp.org>
441
442         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
443         <stdbool.h> substitute doesn't pass.
444
445 2007-03-11  Bruno Haible  <bruno@clisp.org>
446
447         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
448
449 2007-03-11  Bruno Haible  <bruno@clisp.org>
450
451         * gnulib-tool (func_create_megatestdir): Create also an autobuild
452         script, for submission to autobuild.josefsson.org.
453
454 2007-03-10  Bruno Haible  <bruno@clisp.org>
455
456         * modules/canonicalize-lgpl-tests: New file.
457         * tests/test-canonicalize-lgpl.sh: New file.
458         * tests/test-canonicalize-lgpl.c: New file.
459
460         * modules/c-strcase-tests: New file.
461         * tests/test-c-strcase.sh: New file.
462         * tests/test-c-strcasecmp.c: New file.
463         * tests/test-c-strncasecmp.c: New file.
464
465         * modules/atexit-tests: New file.
466         * tests/test-atexit.sh: New file.
467         * tests/test-atexit.c: New file.
468
469 2007-03-10  Bruno Haible  <bruno@clisp.org>
470
471         * tests/test-binary-io.sh: Use temporary filenames that are not so
472         likely to clash with those of other tests (in a parallel make).
473         * tests/test-binary-io.c: Likewise.
474
475 2007-03-10  Bruno Haible  <bruno@clisp.org>
476
477         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
478         fallback; use #error instead.
479         Suggested by Simon Josefsson.
480
481 2007-03-10  Bruno Haible  <bruno@clisp.org>
482
483         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
484         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
485         first and the last.
486
487 2007-03-10  Bruno Haible  <bruno@clisp.org>
488
489         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
490
491 2007-03-10  Bruno Haible  <bruno@clisp.org>
492
493         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
494         "make distcheck".
495         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
496         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
497         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
498
499 2007-03-10  Bruno Haible  <bruno@clisp.org>
500
501         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
502         variable.
503         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
504         variable.
505
506 2007-03-09  Eric Blake  <ebb9@byu.net>
507         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
508
509         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
510         types are not being provided by gnulib.
511         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
512         types are supported.
513
514 2007-03-10  Bruno Haible  <bruno@clisp.org>
515
516         * lib/stdio_.h (__attribute__): New macro.
517         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
518         vsprintf): Specify __attribute__ __format__ for GCC.
519         Suggested by Eric Blake.
520
521 2007-03-09  Bruno Haible  <bruno@clisp.org>
522
523         * modules/printf-posix-tests: New file.
524         * tests/test-printf-posix.sh: New file.
525         * tests/test-printf-posix.c: New file.
526
527         * modules/printf-posix: New file.
528         * lib/printf.c: New file.
529         * m4/printf-posix-rpl.m4: New file.
530         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
531         REPLACE_PRINTF.
532         * lib/stdio_.h (printf): New declaration.
533         (format, __format__, ____printf____, ____scanf____, ____strftime____,
534         ____strfmon____): New macros.
535         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
536         REPLACE_PRINTF.
537
538 2007-03-09  Bruno Haible  <bruno@clisp.org>
539
540         * tests/test-vasnprintf-posix2.sh: New file.
541         * tests/test-vasnprintf-posix2.c: New file.
542         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
543         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
544         (Makefile.am): Activate test-vasnprintf-posix2.sh.
545
546         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
547         a locale dependent decimal point, rather than always '.'.
548
549 2007-03-09  Eric Blake  <ebb9@byu.net>
550
551         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
552         spite of platforms like Tandem/NSK that define it to -1.
553
554 2007-03-08  Bruno Haible  <bruno@clisp.org>
555
556         * modules/vprintf-posix-tests: New file.
557         * tests/test-vprintf-posix.sh: New file.
558         * tests/test-vprintf-posix.c: New file.
559         * tests/test-printf-posix.h: New file.
560
561         * modules/vprintf-posix: New file.
562         * lib/vprintf.c: New file.
563         * m4/vprintf-posix.m4: New file.
564         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
565         REPLACE_VPRINTF.
566         * lib/stdio_.h (vprintf): New declaration.
567         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
568         REPLACE_VPRINTF.
569
570 2007-03-08  Bruno Haible  <bruno@clisp.org>
571
572         * modules/fprintf-posix-tests: New file.
573         * tests/test-fprintf-posix.sh: New file.
574         * tests/test-fprintf-posix.c: New file.
575
576         * modules/fprintf-posix: New file.
577         * lib/fprintf.c: New file.
578         * m4/fprintf-posix.m4: New file.
579         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
580         REPLACE_FPRINTF.
581         * lib/stdio_.h (fprintf): New declaration.
582         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
583         REPLACE_FPRINTF.
584
585 2007-03-08  Bruno Haible  <bruno@clisp.org>
586
587         * modules/vfprintf-posix-tests: New file.
588         * tests/test-vfprintf-posix.sh: New file.
589         * tests/test-vfprintf-posix.c: New file.
590         * tests/test-fprintf-posix.h: New file.
591         * tests/test-fprintf-posix.out: New file.
592
593         * modules/vfprintf-posix: New file.
594         * lib/vfprintf.c: New file.
595         * m4/vfprintf-posix.m4: New file.
596         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
597         REPLACE_VFPRINTF.
598         * lib/stdio_.h (vfprintf): New declaration.
599         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
600         REPLACE_VFPRINTF.
601
602 2007-03-08  Bruno Haible  <bruno@clisp.org>
603
604         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
605
606 2007-03-08  Bruno Haible  <bruno@clisp.org>
607
608         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
609         instead of 'expr' invocations.
610         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
611         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
612         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
613         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
614         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
615         Suggested by Paul Eggert.
616
617 2007-03-08  Bruno Haible  <bruno@clisp.org>
618
619         * modules/fseterr-tests: New file.
620         * tests/test-fseterr.c: New file.
621
622         * modules/fseterr: New file.
623         * lib/fseterr.h: New file.
624         * lib/fseterr.c: New file.
625
626 2007-03-08  Bruno Haible  <bruno@clisp.org>
627
628         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
629         * lib/getopt_.h: Likewise.
630         * lib/mbswidth.h: Likewise.
631         * lib/setenv.h: Likewise.
632         * lib/vasnprintf.h: Likewise.
633         * lib/vasprintf.h: Likewise.
634         * lib/verror.h: Likewise.
635         * lib/xsetenv.h: Likewise.
636         * lib/xvasprintf.h: Likewise.
637
638 2007-03-08  Jim Meyering  <jim@meyering.net>
639
640         * users.txt: Add parted.
641
642         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
643
644 2007-03-07  Bruno Haible  <bruno@clisp.org>
645
646         * m4/printf.m4: Make the shell script snippets copy&pastable.
647
648 2007-03-02  Bruno Haible  <bruno@clisp.org>
649
650         * lib/netinet_in_.h: New file.
651         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
652         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
653         * modules/netinet_in (Files): Add lib/netinet_in_.h.
654         (Depends-on): Add absolute-header.
655         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
656         into netinet/in.h.
657
658 2007-03-03  Bruno Haible  <bruno@clisp.org>
659
660         * lib/sys_select_.h: New file.
661         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
662         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
663         * modules/sys_select (Files): Add lib/sys_select_.h.
664         (Depends-on): Add absolute-header.
665         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
666         into sys/select.h.
667
668 2007-03-02  Bruno Haible  <bruno@clisp.org>
669
670         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
671         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
672         values.
673         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
674         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
675         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
676         * modules/sys_socket (Depends-on): Add absolute-header.
677         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
678         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
679         (Include): Remove requirement of inclusion of <sys/types.h>.
680
681 2007-03-02  Bruno Haible  <bruno@clisp.org>
682
683         * lib/byteswap_.h (bswap_32): Fix formula.
684
685 2007-03-06  Bruno Haible  <bruno@clisp.org>
686
687         * modules/sprintf-posix-tests: New file.
688         * tests/test-sprintf-posix.c: New file.
689
690         * modules/sprintf-posix: New file.
691         * lib/sprintf.c: New file.
692         * m4/sprintf-posix.m4: New file.
693         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
694         REPLACE_SPRINTF.
695         * lib/stdio_.h (sprintf): New declaration.
696         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
697         REPLACE_SPRINTF.
698
699 2007-03-06  Bruno Haible  <bruno@clisp.org>
700
701         * modules/vsprintf-posix-tests: New file.
702         * tests/test-vsprintf-posix.c: New file.
703         * tests/test-sprintf-posix.h: New file.
704
705         * modules/vsprintf-posix: New file.
706         * lib/vsprintf.c: New file.
707         * m4/vsprintf-posix.m4: New file.
708         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
709         REPLACE_VSPRINTF.
710         * lib/stdio_.h (vsprintf): New declaration.
711         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
712         REPLACE_VSPRINTF.
713
714 2007-03-06  Bruno Haible  <bruno@clisp.org>
715
716         * modules/vsnprintf (Depend-on): Remove minmax.
717
718 2007-03-06  Bruno Haible  <bruno@clisp.org>
719
720         * modules/snprintf-posix-tests: New file.
721         * tests/test-snprintf-posix.c: New file.
722
723         * modules/snprintf-posix: New file.
724         * m4/snprintf-posix.m4: New file.
725         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
726         gl_FUNC_SNPRINTF.
727         (gl_FUNC_SNPRINTF): Invoke it.
728         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
729         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
730         is set.
731         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
732
733 2007-03-06  Bruno Haible  <bruno@clisp.org>
734
735         * modules/vsnprintf-posix-tests: New file.
736         * tests/test-vsnprintf-posix.c: New file.
737         * tests/test-snprintf-posix.h: New file.
738
739         * modules/vsnprintf-posix: New file.
740         * m4/vsnprintf-posix.m4: New file.
741         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
742         gl_FUNC_VSNPRINTF.
743         (gl_FUNC_VSNPRINTF): Invoke it.
744         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
745         * lib/stdio_.h (vsnprintf): Define as a replacement if
746         REPLACE_VSNPRINTF is set.
747         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
748
749 2007-03-06  Bruno Haible  <bruno@clisp.org>
750
751         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
752         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
753
754 2007-03-06  Bruno Haible  <bruno@clisp.org>
755
756         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
757         (asinl): Declare also if HAVE_DECL_ASINL is set.
758         (atanl): Declare also if HAVE_DECL_ATANL is set.
759         (ceill): Declare also if HAVE_DECL_CEILL is set.
760         (cosl): Declare also if HAVE_DECL_COSL is set.
761         (expl): Declare also if HAVE_DECL_EXPL is set.
762         (floorl): Declare also if HAVE_DECL_FLOORL is set.
763         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
764         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
765         (logl): Declare also if HAVE_DECL_LOGL is set.
766         (sinl): Declare also if HAVE_DECL_SINL is set.
767         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
768         (tanl): Declare also if HAVE_DECL_TANL is set.
769         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
770         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
771         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
772         declaration of frexpl, ldexpl.
773         * modules/printf-frexpl (Depends-on): Add math.
774         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
775
776 2007-03-05  Bruno Haible  <bruno@clisp.org>
777
778         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
779         frexpl and ldexpl are declared.
780         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
781
782 2007-03-05  Bruno Haible  <bruno@clisp.org>
783
784         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
785         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
786
787 2007-03-05  Bruno Haible  <bruno@clisp.org>
788
789         * lib/stdio_.h: Include <stddef.h>.
790
791 2007-03-05  Bruno Haible  <bruno@clisp.org>
792
793         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
794
795 2007-03-05  Bruno Haible  <bruno@clisp.org>
796
797         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
798         NetBSD 4, from Ralf Wildenhues.
799
800 2007-03-04  Bruno Haible  <bruno@clisp.org>
801
802         * lib/vasprintf.h: Update #if logic for the case when the functions
803         exist but are overridden.
804
805 2007-03-04  Bruno Haible  <bruno@clisp.org>
806
807         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
808         implementations: glibc-2.4 and MacOS X 10.3.
809         * tests/test-vasnprintf-posix.c (test_function): Test also the case
810         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
811         * tests/test-vasprintf-posix.c (test_function): Likewise.
812
813 2007-03-04  Bruno Haible  <bruno@clisp.org>
814
815         * modules/vasprintf-posix-tests: New file.
816         * tests/test-vasprintf-posix.c: New file.
817
818         * modules/vasprintf-posix: New file.
819         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
820         defined.
821         * m4/vasprintf-posix.m4: New file.
822         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
823         gl_FUNC_VASPRINTF.
824         (gl_FUNC_VASPRINTF): Invoke it.
825         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
826         here.
827         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
828
829 2007-03-04  Bruno Haible  <bruno@clisp.org>
830
831         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
832         REPLACE_GETTIMEOFDAY.
833         * modules/sys_time (Makefile.am): Likewise.
834         * m4/sys_time_h.m4: Likewise.
835         * m4/gettimeofday.m4: Likewise.
836
837 2007-03-04  Bruno Haible  <bruno@clisp.org>
838
839         * modules/vasnprintf-posix-tests: New file.
840         * tests/test-vasnprintf-posix.c: New file.
841
842         * modules/vasnprintf-posix: New file.
843         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
844         printf-frexpl.h.
845         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
846         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
847         REPLACE_VASNPRINTF is defined.
848         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
849         gl_FUNC_VASNPRINTF.
850         (gl_FUNC_VASNPRINTF): Invoke it.
851         * m4/vasnprintf-posix.m4: New file.
852         * m4/printf.m4: New file.
853
854 2007-03-04  Bruno Haible  <bruno@clisp.org>
855
856         Compile progreloc.c only if --enable-relocatable is specified.
857         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
858         if --enable-relocatable was specified.
859         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
860         lib_SOURCES.
861
862 2007-03-04  Jim Meyering  <jim@meyering.net>
863
864         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
865         Use it consistently, rather than enumerating errno constants.
866
867 2007-03-04  Bruno Haible  <bruno@clisp.org>
868
869         * modules/xvasprintf-tests: New file.
870         * tests/test-xvasprintf.c: New file.
871
872         * modules/vasprintf-tests: New file.
873         * tests/test-vasprintf.c: New file.
874
875         * modules/vasnprintf-tests: New file.
876         * tests/test-vasnprintf.c: New file.
877
878         * modules/vsnprintf-tests: New file.
879         * tests/test-vsnprintf.c: New file.
880
881         * modules/snprintf-tests: New file.
882         * tests/test-snprintf.c: New file.
883
884 2007-03-04  Bruno Haible  <bruno@clisp.org>
885
886         Compile relocatable.c only if --enable-relocatable is specified.
887         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
888         gl_RELOCATABLE_LIBRARY.
889         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
890         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
891         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
892         gl_RELOCATABLE_LIBRARY.
893         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
894         (Makefile.am): Remove lib_SOURCES.
895         * modules/relocatable-lib-lgpl (configure.ac): Invoke
896         gl_RELOCATABLE_LIBRARY.
897         (Makefile.am): Remove lib_SOURCES.
898         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
899         always.
900         * modules/relocatable-prog-wrapper (configure.ac): Invoke
901         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
902
903 2007-03-04  Bruno Haible  <bruno@clisp.org>
904
905         * modules/argmatch-tests: New file.
906         * tests/test-argmatch.c: New file.
907
908         * tests/test-allocsa.c (main): Halve the number of loop runs.
909
910         * modules/alloca-opt-tests: New file.
911         * tests/test-alloca-opt.c: New file.
912
913 2007-03-04  Jim Meyering  <jim@meyering.net>
914
915         Work around difference between Linux ACLs and Solaris 10 ZFS.
916         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
917         for EINVAL.
918
919 2007-03-03  Bruno Haible  <bruno@clisp.org>
920
921         * modules/relocatable-prog (Depends-on): Add back progreloc's
922         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
923
924 2007-03-03  Bruno Haible  <bruno@clisp.org>
925
926         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
927         * modules/relocatable-lib: New file.
928
929 2007-03-03  Bruno Haible  <bruno@clisp.org>
930
931         * modules/relocatable-prog: Renamed from modules/relocatable.
932         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
933
934 2007-03-03  Bruno Haible  <bruno@clisp.org>
935
936         * modules/relocatable-script (Files): Add doc/relocatable.texi,
937         m4/relocatable-lib.m4.
938         (Depends-on): Remove 'relocatable'.
939         (configure.ac): Add gl_RELOCATABLE_NOP.
940
941 2007-03-03  Bruno Haible  <bruno@clisp.org>
942
943         * modules/relocatable-prog-wrapper: New file.
944         * modules/relocatable (Depends-on): Add it. Remove all other
945         dependencies except progname.
946         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
947
948         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
949         (gl_FUNC_STRERROR): Nop.
950         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
951
952         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
953         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
954
955         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
956         (gl_FUNC_READLINK): Update.
957
958         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
959
960 2007-03-03  Bruno Haible  <bruno@clisp.org>
961
962         * lib/xreadlink.c: Include <unistd.h> unconditionally.
963         * modules/xreadlink (Depends-on): Add unistd.
964         * modules/xreadlink-with-size (Depends-on): Likewise.
965
966 2007-03-03  Bruno Haible  <bruno@clisp.org>
967
968         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
969         extracted from gt_FUNC_SETENV.
970         (gt_FUNC_SETENV): Remove macro.
971         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
972         remove gt_FUNC_SETENV.
973
974 2007-03-03  Bruno Haible  <bruno@clisp.org>
975
976         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
977         ENABLE_RELOCATABLE here.
978         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
979
980 2007-03-03  Bruno Haible  <bruno@clisp.org>
981
982         * modules/rbtreehash-list-tests (Depends-on): Add progname.
983         * tests/test-rbtreehash_list.c: Include progname.h.
984         (main): Call set_program_name.
985
986         * modules/rbtree-oset-tests (Depends-on): Add progname.
987         * tests/test-rbtree_oset.c: Include progname.h.
988         (main): Call set_program_name.
989
990         * modules/rbtree-list-tests (Depends-on): Add progname.
991         * tests/test-rbtree_list.c: Include progname.h.
992         (main): Call set_program_name.
993
994         * modules/linked-list-tests (Depends-on): Add progname.
995         * tests/test-linked_list.c: Include progname.h.
996         (main): Call set_program_name.
997
998 2007-03-03  Bruno Haible  <bruno@clisp.org>
999
1000         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
1001         All uses of __restrict changed to _Restrict_.
1002         * lib/glob_.h (__restrict): Remove macro.
1003
1004 2007-03-02  Bruno Haible  <bruno@clisp.org>
1005
1006         * modules/gettext (configure.ac): Require gettext infrastructure
1007         from version 0.16.1.
1008
1009 2007-03-02  Bruno Haible  <bruno@clisp.org>
1010
1011         * modules/linkedhash-list-tests (Depends-on): Add progname.
1012         * tests/test-linkedhash_list.c: Include progname.h.
1013         (main): Call set_program_name.
1014
1015         * modules/carray-list-tests (Depends-on): Add progname.
1016         * tests/test-carray_list.c: Include progname.h.
1017         (main): Call set_program_name.
1018
1019         * modules/avltreehash-list-tests (Depends-on): Add progname.
1020         * tests/test-avltreehash_list.c: Include progname.h.
1021         (main): Call set_program_name.
1022
1023         * modules/avltree-oset-tests (Depends-on): Add progname.
1024         * tests/test-avltree_oset.c: Include progname.h.
1025         (main): Call set_program_name.
1026
1027         * modules/avltree-list-tests (Depends-on): Add progname.
1028         * tests/test-avltree_list.c: Include progname.h.
1029         (main): Call set_program_name.
1030
1031         * modules/array-oset-tests (Depends-on): Add progname.
1032         * tests/test-array_oset.c: Include progname.h.
1033         (main): Call set_program_name.
1034
1035         * modules/array-list-tests (Depends-on): Add progname.
1036         * tests/test-array_list.c: Include progname.h.
1037         (main): Call set_program_name.
1038
1039         * modules/argp-tests (Depends-on): Add progname.
1040         * tests/test-argp.c: Include argp.h first. Include progname.h.
1041         (main): Call set_program_name.
1042
1043 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
1044
1045         * doc/gnulib-tool.texi (Initial import): Reword description of
1046         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
1047         limited effect even if defined after the first system include.
1048
1049 2007-03-01  Bruno Haible  <bruno@clisp.org>
1050
1051         * build-aux/config.libpath: Update to libtool-1.5.22.
1052         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
1053
1054 2007-03-01  Bruno Haible  <bruno@clisp.org>
1055
1056         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
1057         foo_CFLAGS.
1058         Reported by Ralf Wildenhues.
1059
1060 2007-03-01  Bruno Haible  <bruno@clisp.org>
1061
1062         * build-aux/install-reloc: Remove object files left over by some
1063         compilers.
1064         Reported by Ralf Wildenhues.
1065
1066 2007-03-01  Bruno Haible  <bruno@clisp.org>
1067
1068         * build-aux/install-reloc: Break long lines.
1069
1070 2007-03-01  Bruno Haible  <bruno@clisp.org>
1071
1072         * doc/relocatable.texi: Document that it may not work on OpenBSD.
1073         Reported by Ralf Wildenhues.
1074
1075 2007-03-01  Bruno Haible  <bruno@clisp.org>
1076
1077         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
1078         include ordering constraints.
1079
1080 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
1081
1082         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
1083         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
1084         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
1085         as another example.
1086         * lib/time_.h: Fix misspelling.
1087         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1088         Require gl_HEADER_TIME_H_DEFAULTS.
1089         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
1090         * m4/time_r.m4 (gl_TIME_R): Likewise.
1091         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
1092
1093 2007-03-01  Bruno Haible  <bruno@clisp.org>
1094
1095         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
1096         * m4/utimens.m4 (gl_UTIMENS): Likewise.
1097
1098 2007-03-01  Jim Meyering  <jim@meyering.net>
1099
1100         * modules/xreadlink (Maintainer): Add my name.
1101         * modules/xreadlink-with-size (Depends-on): Alphabetize.
1102
1103 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
1104             Bruno Haible  <bruno@clisp.org>
1105
1106         * build-aux/install-reloc: Compile also c-ctype.c.
1107         * build-aux/relocatable.sh.in: New file.
1108         * doc/relocatable.texi: New file.
1109         * doc/relocatable-maint.texi: New file.
1110         * doc/gnulib.texi: Include relocatable-maint.texi.
1111         * lib/progreloc.c: Include unistd.h unconditionally.
1112         * lib/relocwrapper.c: Include unistd.h unconditionally.
1113         Include c-ctype.h.
1114         (add_dotbin): Use c_tolower.
1115         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
1116         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
1117         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
1118         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
1119         to m4/relocatable-lib.m4.
1120         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
1121         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
1122         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
1123         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
1124         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
1125         * modules/relocatable: New file.
1126         * modules/relocatable-lib: New file.
1127         * modules/relocatable-script: New file.
1128
1129 2007-02-28  Bruno Haible  <bruno@clisp.org>
1130
1131         Import --enable-relocatable infrastructure.
1132         * build-aux/config.libpath: New file, from GNU gettext.
1133         * build-aux/install-reloc: New file, from GNU gettext.
1134         * build-aux/reloc-ldflags: New file, from GNU gettext.
1135         * lib/relocatable.h: New file, from GNU gettext.
1136         * lib/relocatable.c: New file, from GNU gettext.
1137         * lib/relocwrapper.c: New file, from GNU gettext.
1138         * m4/relocatable.m4: New file, from GNU gettext.
1139
1140 2007-02-28  Bruno Haible  <bruno@clisp.org>
1141
1142         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
1143
1144         * modules/xreadlink: New file, from GNU gettext with modifications.
1145         * lib/xreadlink.c: New file, from GNU gettext.
1146         * lib/xreadlink.h: Add comments.
1147         (xreadlink): New declaration.
1148
1149         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
1150         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
1151         lib/xreadlink-with-size.c.
1152         (configure.ac): Remove gl_XREADLINK invocation.
1153         (Makefile.am): Augment lib_SOURCES.
1154         * m4/xreadlink.m4: Remove file.
1155         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
1156         (xreadlink_with_size): Renamed from xreadink.
1157         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
1158         * modules/canonicalize (Depends-on): Replace xreadlink with
1159         xreadlink-with-size.
1160         * lib/canonicalize.c (canonicalize_filename_mode): Update.
1161
1162 2007-02-25  Jim Meyering  <jim@meyering.net>
1163
1164         * build-aux/announce-gen: When complaining about excess arguments,
1165         list them.
1166
1167 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
1168
1169         * README: Document signed integer overflow situation more
1170         accurately.
1171
1172 2007-02-25  Bruno Haible  <bruno@clisp.org>
1173
1174         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
1175         'a' or 'A' conversion.
1176
1177 2007-02-25  Bruno Haible  <bruno@clisp.org>
1178
1179         * modules/filename: Renamed from modules/pathname.
1180         (Files): Replace lib/pathname.h with lib/filename.h. Replace
1181         lib/concatpath.c with lib/concat-filename.c.
1182         (Makefile.am): Update.
1183         (Include): Replace pathname.h with filename.h.
1184         * lib/filename.h: Renamed from lib/pathname.h.
1185         (concatenated_filename): Renamed from concatenated_pathname.
1186         * lib/concat-filename.c: Renamed from lib/concatpath.c.
1187         (concatenated_filename): Renamed from concatenated_pathname.
1188         * lib/findprog.c: Include filename.h instead of pathname.h.
1189         (find_in_path): Update.
1190         * lib/javacomp.c: Include filename.h instead of pathname.h.
1191         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
1192         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
1193         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
1194         is_oldgcj_14_13_usable, is_javac_usable): Update.
1195         * lib/javaexec.c: Include filename.h instead of pathname.h.
1196         (execute_java_class): Update.
1197         * modules/findprog: Update.
1198         * modules/javacomp: Update.
1199         * modules/javaexec: Update.
1200         * MODULES.html.sh (File system functions): Add 'filename', remove
1201         'pathname'.
1202
1203 2007-02-25  Bruno Haible  <bruno@clisp.org>
1204
1205         * modules/printf-frexpl-tests: New file.
1206         * tests/test-printf-frexpl.c: New file.
1207
1208         * modules/printf-frexpl: New file.
1209         * lib/printf-frexpl.h: New file.
1210         * lib/printf-frexpl.c: New file.
1211         * m4/printf-frexpl.m4: New file.
1212
1213 2007-02-25  Bruno Haible  <bruno@clisp.org>
1214
1215         * modules/printf-frexp-tests: New file.
1216         * tests/test-printf-frexp.c: New file.
1217
1218         * modules/printf-frexp: New file.
1219         * lib/printf-frexp.h: New file.
1220         * lib/printf-frexp.c: New file.
1221         * m4/printf-frexp.m4: New file.
1222
1223 2007-02-25  Bruno Haible  <bruno@clisp.org>
1224
1225         Assume automake >= 1.10 for the tests.
1226         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
1227         * modules/arctwo-tests: Likewise.
1228         * modules/argp-tests: Likewise.
1229         * modules/avltree-list-tests: Likewise.
1230         * modules/avltree-oset-tests: Likewise.
1231         * modules/avltreehash-list-tests: Likewise.
1232         * modules/carray-list-tests: Likewise.
1233         * modules/crc-tests: Likewise.
1234         * modules/des-tests: Likewise.
1235         * modules/gc-arcfour-tests: Likewise.
1236         * modules/gc-arctwo-tests: Likewise.
1237         * modules/gc-des-tests: Likewise.
1238         * modules/gc-hmac-md5-tests: Likewise.
1239         * modules/gc-hmac-sha1-tests: Likewise.
1240         * modules/gc-md2-tests: Likewise.
1241         * modules/gc-md4-tests: Likewise.
1242         * modules/gc-md5-tests: Likewise.
1243         * modules/gc-pbkdf2-sha1-tests: Likewise.
1244         * modules/gc-rijndael-tests: Likewise.
1245         * modules/gc-sha1-tests: Likewise.
1246         * modules/gc-tests: Likewise.
1247         * modules/getaddrinfo-tests: Likewise.
1248         * modules/hmac-md5-tests: Likewise.
1249         * modules/hmac-sha1-tests: Likewise.
1250         * modules/linked-list-tests: Likewise.
1251         * modules/linkedhash-list-tests: Likewise.
1252         * modules/lock-tests: Likewise.
1253         * modules/md2-tests: Likewise.
1254         * modules/md4-tests: Likewise.
1255         * modules/md5-tests: Likewise.
1256         * modules/rbtree-list-tests: Likewise.
1257         * modules/rbtree-oset-tests: Likewise.
1258         * modules/rbtreehash-list-tests: Likewise.
1259         * modules/read-file-tests: Likewise.
1260         * modules/rijndael-tests: Likewise.
1261         * modules/stdint-tests: Likewise.
1262         * modules/tls-tests: Likewise.
1263
1264 2007-02-24  Bruno Haible  <bruno@clisp.org>
1265
1266         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
1267         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
1268         function; instead check whether isnan with a double argument links.
1269         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
1270         function; instead check whether isnan with a 'long double' argument
1271         links.
1272         Reported by Eric Blake <ebb9@byu.net>.
1273
1274 2007-02-24  Bruno Haible  <bruno@clisp.org>
1275
1276         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
1277         defined.
1278         * lib/isnanl.c: Remove all code. Just include isnan.c.
1279         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
1280
1281 2007-02-25  Jim Meyering  <jim@meyering.net>
1282
1283         Avoid conflicting types for 'unsetenv' on FreeBSD.
1284         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
1285         conflicting with FreeBSD's (5.0 and 6.1) function declaration
1286         in stdlib.h.
1287
1288 2007-02-24  Bruno Haible  <bruno@clisp.org>
1289
1290         * modules/isnanl-nolibm-tests: New file.
1291         * tests/test-isnanl.c: New file.
1292
1293         * modules/isnanl-nolibm: New file.
1294         * lib/isnanl.h: New file.
1295         * lib/isnanl.c: New file.
1296         * m4/isnanl.m4: New file.
1297
1298 2007-02-24  Bruno Haible  <bruno@clisp.org>
1299
1300         * modules/isnan-nolibm-tests: New file.
1301         * tests/test-isnan.c: New file.
1302
1303         * modules/isnan-nolibm: New file.
1304         * lib/isnan.h: New file.
1305         * lib/isnan.c: New file.
1306         * m4/isnan.m4: New file.
1307
1308 2007-02-24  Bruno Haible  <bruno@clisp.org>
1309
1310         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
1311         assume that an exponent fits in 20 bits.
1312
1313 2007-02-24  Jim Meyering  <jim@meyering.net>
1314
1315         * m4/regex.m4: Update the description of the configure-time option,
1316         --without-included-regex, to state accurately what the defaults are,
1317         and perhaps to give people an idea why using this option is risky.
1318
1319 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
1320
1321         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
1322         loops on small arguments.  This attempts to avoid the problem
1323         Bruno Haible reported for AIX 4.3.2 in
1324         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
1325
1326 2007-02-23  Bruno Haible  <bruno@clisp.org>
1327
1328         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
1329         Needed for help2man.
1330
1331 2007-02-23  Karl Berry  <karl@gnu.org>
1332
1333         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
1334         exists, foo.h should be cvs-ignored, not committed.
1335
1336 2007-02-23  Eric Blake  <ebb9@byu.net>
1337
1338         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
1339         * lib/stat-time.h (includes): Likewise.
1340         * lib/utimecmp.c (includes): Likewise.
1341         * lib/utimens.h (includes): Likewise.
1342         * lib/getdate.y (includes): Also include "timespec.h" for use
1343         internal to the module.
1344         * modules/utimens (Depends-on): Revert yesterday's patch.
1345         * modules/nanosleep (Depends-on): Add missing dependency.
1346
1347 2007-02-22  Bruno Haible  <bruno@clisp.org>
1348
1349         * lib/glob.c: Don't include getlogin_r.h.
1350
1351 2007-02-22  Jim Meyering  <jim@meyering.net>
1352
1353         * modules/utimens (Depends-on): Add timespec, required for
1354         utimens.h's inclusion of timespec.h.
1355
1356 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
1357
1358         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
1359         long unreadable paths in GNU/Linux.  Problem reported by Andreas
1360         Schwab in
1361         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
1362         I'll try to think of a better way to fix the Solaris problem.
1363
1364         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
1365         like glibc; on Solaris 10, it fails with errno == EINVAL.
1366         POSIX says the behavior is unspecified if the first argument is NULL,
1367         so play it safe and never pass NULL to the system getcwd.
1368
1369 2007-02-21  Jim Meyering  <jim@meyering.net>
1370
1371         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
1372         of gettimeofday.  It would conflict with the one now always
1373         provided via sys_time_.h.  Reported by Matthew Woehlke, as
1374         an IRIX 6.5 build failure.
1375
1376 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
1377
1378         Minor fixups to port to Solaris 10 with Sun C 5.8.
1379         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
1380         * modules/getcwd (Depends-on): Add dirfd.
1381         * lib/putenv.c (putenv): #undef it.
1382         (rpl_putenv): New decl.
1383         (malloc, free): Include <stdlib.h> rather than prototyping separately.
1384
1385 2007-02-20  Bruno Haible  <bruno@clisp.org>
1386
1387         * modules/stdio-tests: New file.
1388         * tests/test-stdio.c: New file.
1389
1390         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
1391         (Depends-on): Add stdio.
1392         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1393         (Include): Use <stdio.h> instead of vsnprintf.h.
1394         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1395         HAVE_DECL_VSNPRINTF.
1396         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
1397
1398         * modules/snprintf (Files): Remove lib/snprintf.h.
1399         (Depends-on): Add stdio.
1400         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
1401         (Include): Use <stdio.h> instead of snprintf.h.
1402         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
1403         HAVE_DECL_SNPRINTF.
1404         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
1405         * lib/getaddrinfo.c: Likewise.
1406
1407         * modules/stdio: New file.
1408         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
1409         * lib/snprintf.h: Remove file.
1410         * lib/vsnprintf.h: Remove file.
1411         * lib/.cppi-disable: Remove snprintf.h.
1412         * m4/stdio_h.m4: New file.
1413         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
1414
1415 2007-02-20  Jim Meyering  <jim@meyering.net>
1416
1417         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
1418         used by e.g., mingw.  From Bruno Haible.
1419
1420 2007-02-19  Bruno Haible  <bruno@clisp.org>
1421
1422         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
1423         warnings.
1424         Reported by Ben Pfaff <blp@cs.stanford.edu>.
1425
1426 2007-02-19  Bruno Haible  <bruno@clisp.org>
1427
1428         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
1429         from mingw users.
1430
1431 2007-02-19  Bruno Haible  <bruno@clisp.org>
1432
1433         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
1434         warnings.
1435         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
1436
1437 2007-02-19  Jim Meyering  <jim@meyering.net>
1438
1439         Don't use FD after a successful "fdopendir (fd)".
1440         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
1441         Reset it by calling dirfd on the just-obtained DIR*.
1442
1443         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
1444         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
1445
1446 2007-02-18  Bruno Haible  <bruno@clisp.org>
1447
1448         * lib/readlink.c: Include <unistd.h>.
1449         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
1450         HAVE_READLINK.
1451         * modules/readlink (Depends-on): Add unistd.
1452         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1453         (Include): Add <unistd.h>.
1454
1455         * lib/getlogin_r.h: Remove file.
1456         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
1457         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
1458         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
1459         HAVE_DECL_GETLOGIN_R.
1460         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
1461         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1462         (Include): Use <unistd.h> instead of getlogin_r.h.
1463
1464         * lib/getcwd.h: Remove file.
1465         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
1466         * lib/xgetcwd.c: Likewise.
1467         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
1468         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
1469         * modules/getcwd (Files): Remove lib/getcwd.h.
1470         (Depends-on): Add unistd.
1471         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1472         (Include): Use <unistd.h> instad of getcwd.h.
1473
1474         * lib/ftruncate.c: Include <unistd.h> first.
1475         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
1476         Set HAVE_FTRUNCATE.
1477         * modules/ftruncate (Depends-on): Add unistd.
1478         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1479
1480         * lib/fchdir.c: Include <unistd.h> first.
1481         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
1482         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
1483         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
1484         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1485         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
1486
1487         * lib/dup2.c: Include <unistd.h> first.
1488         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
1489         HAVE_DUP2.
1490         * modules/dup2 (Depends-on): Add unistd.
1491         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1492
1493         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
1494         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
1495         REPLACE_CHOWN. Don't define chown as a macro here.
1496         * modules/chown (Depends-on): Add unistd.
1497         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
1498
1499         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
1500         Add definition for GL_LINK_WARNING.
1501         (chown, dup2): New declarations.
1502         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
1503         link warning.
1504         (ftruncate): New declaration.
1505         (getcwd): New declaration, taken from old getcwd.h.
1506         (getlogin_r): New declaration, taken from old getlogin_r.h.
1507         (readlink): New declaration.
1508         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
1509         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
1510         (gl_PREREQ_UNISTD): Remove macro.
1511         (gl_UNISTD_MODULE_INDICATOR): New macro.
1512         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
1513         many new variables. Don't set UNISTD_H.
1514         * modules/unistd (Description): Change.
1515         (Depends-on): Add link-warning.
1516         (configure.ac): Update.
1517         (Makefile.am): Create unistd.h always. Substitute many new variables
1518         into it.
1519
1520 2007-02-18  Bruno Haible  <bruno@clisp.org>
1521
1522         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
1523         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
1524         HAVE_GETSUBOPT.
1525         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
1526         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
1527         * lib/getsubopt.h: Remove file.
1528         * modules/getsubopt (Files): Remove lib/getsubopt.h.
1529         (Depends-on): Add stdlib.
1530         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1531         (Includes): Use <stdlib.h> instead of getsubopt.h.
1532         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
1533         Set HAVE_GETSUBOPT.
1534         * lib/getsubopt.c: Don't include getsubopt.h.
1535
1536 2007-02-18  Bruno Haible  <bruno@clisp.org>
1537
1538         * modules/fchdir (Depends-on): Add dup2.
1539
1540 2007-02-18  Bruno Haible  <bruno@clisp.org>
1541
1542         * lib/stdlib_.h: Handle glibc's special invocation convention
1543         specially.
1544
1545 2007-02-18  Bruno Haible  <bruno@clisp.org>
1546
1547         * modules/stdlib-tests: New file.
1548         * tests/test-stdlib.c: New file.
1549
1550         * modules/mkstemp (Files): Remove lib/mkstemp.h.
1551         (Depends-on): Add stdlib.
1552         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1553         (Includes): Use <stdlib.h> instead of mkstemp.h.
1554         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1555         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
1556         * lib/mkstemp.c: Don't include mkstemp.h.
1557         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
1558         * lib/stdlib--.h: Don't include mkstemp.h.
1559
1560         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
1561         (Depends-on): Add stdlib.
1562         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
1563         (Includes): Use <stdlib.h> instead of mkdtemp.h.
1564         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
1565         HAVE_MKDTEMP.
1566         * lib/mkdtemp.c: Don't include mkdtemp.h.
1567         * lib/clean-temp.c: Don't include mkdtemp.h.
1568
1569         * modules/exit (Files): Remove lib/exit.h.
1570         (Depends-on): Add stdlib.
1571         (Makefile.am): Remove lib_SOURCES.
1572         (Include): Use <stdlib.h> instead of exit.h.
1573         * lib/argmatch.c: Don't include exit.h.
1574         * lib/execute.c: Likewise.
1575         * lib/pagealign_alloc.c: Likewise.
1576         * lib/pipe.c: Likewise.
1577         * lib/wait-process.c: Likewise.
1578         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
1579         * lib/exitfail.c: Likewise.
1580         * lib/savewd.c: Likewise.
1581         * lib/xsetenv.c: Likewise.
1582
1583         * modules/stdlib: New file.
1584         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
1585         and extra comments about mkstemp().
1586         * lib/exit.h: Remove file.
1587         * lib/mkdtemp.h: Remove file.
1588         * lib/mkstemp.h: Remove file.
1589         * m4/stdlib_h.m4: New file.
1590         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
1591
1592 2007-02-18  Bruno Haible  <bruno@clisp.org>
1593
1594         * modules/math-tests: New file.
1595         * tests/test-math.c: New file.
1596
1597         * modules/math: New file.
1598         * modules/mathl (Files): Remove lib/mathl.h.
1599         (Depends-on): Add math.
1600         (Makefile.am): Don't mention mathl.h.
1601         (Include): Use <math.h> instead of mathl.h.
1602         * lib/math_.h: New file.
1603         * lib/mathl.h: Remove file.
1604         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
1605         mathl.h.
1606         * lib/asinl.c: Likewise.
1607         * lib/atanl.c: Likewise.
1608         * lib/ceill.c: Likewise.
1609         * lib/cosl.c: Likewise.
1610         * lib/expl.c: Likewise.
1611         * lib/floorl.c: Likewise.
1612         * lib/frexpl.c: Likewise.
1613         * lib/ldexpl.c: Likewise.
1614         * lib/logl.c: Likewise.
1615         * lib/sincosl.c: Likewise.
1616         * lib/sinl.c: Likewise.
1617         * lib/sqrtl.c: Likewise.
1618         * lib/tanl.c: Likewise.
1619         * lib/trigl.c: Likewise.
1620         * m4/math_h.m4: New file.
1621         * MODULES.html.sh (Mathematics): Add math.
1622
1623 2007-02-17  Bruno Haible  <bruno@clisp.org>
1624
1625         * modules/wctype-tests: New file.
1626         * tests/test-wctype.c: New file.
1627
1628         * modules/wchar-tests: New file.
1629         * tests/test-wchar.c: New file.
1630
1631         * modules/unistd-tests: New file.
1632         * tests/test-unistd.c: New file.
1633
1634         * modules/time-tests: New file.
1635         * tests/test-time.c: New file.
1636
1637         * modules/sysexits-tests: New file.
1638         * tests/test-sysexits.c: New file.
1639
1640         * modules/sys_time-tests: New file.
1641         * tests/test-sys_time.c: New file.
1642
1643         * modules/sys_stat-tests: New file.
1644         * tests/test-sys_stat.c: New file.
1645
1646         * modules/sys_socket-tests: New file.
1647         * tests/test-sys_socket.c: New file.
1648
1649         * modules/sys_select-tests: New file.
1650         * tests/test-sys_select.c: New file.
1651
1652         * modules/string-tests: New file.
1653         * tests/test-string.c: New file.
1654
1655         * modules/stdbool-tests: New file.
1656         * tests/test-stdbool.c: New file.
1657
1658         * modules/netinet_in-tests: New file.
1659         * tests/test-netinet_in.c: New file.
1660
1661         * modules/inttypes-tests: New file.
1662         * tests/test-inttypes.c: New file.
1663
1664         * modules/fcntl-tests: New file.
1665         * tests/test-fcntl.c: New file.
1666
1667         * modules/byteswap-tests: New file.
1668         * tests/test-byteswap.c: New file.
1669
1670         * modules/arpa_inet-tests: New file.
1671         * tests/test-arpa_inet.c: New file.
1672
1673 2007-02-17  Bruno Haible  <bruno@clisp.org>
1674
1675         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
1676         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
1677         if the corresponding module is not enabled. Emit link warnings if
1678         the function is used nevertheless.
1679         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
1680         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
1681         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
1682         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
1683         * modules/inttypes (Depends-on): Add link-warning.
1684         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1685         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
1686         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
1687         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
1688         * modules/imaxdiv (configure.ac): Likewise.
1689         * modules/strtoimax (configure.ac): Likewise.
1690         * modules/strtoumax (configure.ac): Likewise.
1691
1692 2007-02-17  Bruno Haible  <bruno@clisp.org>
1693
1694         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
1695         gl_STRING_MODULE_INDICATOR_DEFAULTS.
1696         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
1697         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
1698
1699 2007-02-17  Bruno Haible  <bruno@clisp.org>
1700
1701         * modules/link-warning: New file.
1702         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
1703         * lib/string_.h (GL_LINK_WARNING): Remove definition.
1704         * modules/string (Depends-on): Add link-warning.
1705         (Makefile.am): Copy the contents of build-aux/link-warning.h into
1706         string.h.
1707         * MODULES.html.sh (Support for building libraries and executables): Add
1708         link-warning.
1709
1710 2007-02-17  Bruno Haible  <bruno@clisp.org>
1711
1712         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
1713         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
1714         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
1715         long lines.
1716
1717 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
1718             Bruno Haible  <bruno@clisp.org>
1719
1720         * modules/tmpfile: New file.
1721         * lib/tmpfile.c: New file.
1722         * m4/tmpfile.m4: New file.
1723         * MODULES.html.sh (func_all_modules): New section "Input/output".
1724
1725 2007-02-15  Bruno Haible  <bruno@clisp.org>
1726
1727         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
1728         (supports_delete_on_close): New function.
1729         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
1730
1731 2007-02-14  Bruno Haible  <bruno@clisp.org>
1732
1733         * modules/mbspcasecmp-tests: New file.
1734         * tests/test-mbspcasecmp.sh: New file.
1735         * tests/test-mbspcasecmp.c: New file.
1736
1737         New module mbspcasecmp.
1738         * modules/mbspcasecmp: New file.
1739         * lib/mbspcasecmp.c: New file.
1740         * lib/string_.h (strncasecmp): Change warning message.
1741         (mbspcasecmp): New declaration.
1742         * m4/mbspcasecmp.m4: New file.
1743         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1744         GNULIB_MBSPCASECMP.
1745         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
1746         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
1747
1748 2007-02-14  Bruno Haible  <bruno@clisp.org>
1749
1750         * modules/mbsncasecmp-tests: New file.
1751         * tests/test-mbsncasecmp.sh: New file.
1752         * tests/test-mbsncasecmp.c: New file.
1753
1754         New module mbsncasecmp.
1755         * modules/mbsncasecmp: New file.
1756         * lib/mbsncasecmp.c: New file.
1757         * lib/string_.h (mbsncasecmp): New declaration.
1758         * m4/mbsncasecmp.m4: New file.
1759         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
1760         GNULIB_MBSNCASECMP.
1761         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
1762         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
1763
1764 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
1765
1766         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
1767         Verify that it doesn't overlap with our flags.
1768         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
1769         do not have the desired effect in multibyte locales; instead, use
1770         mbscasecmp.
1771         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
1772         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
1773         we don't require GNU fnmatch ourselves (if our users require it, they
1774         should do so explicitly).
1775
1776         Fix regex code so it doesn't rely on strcasecmp.
1777         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
1778         Otherwise, include gnulib's langinfo.h.
1779         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
1780         undesirable behavior in non-C locales.  Instead, rely on localecharset.
1781         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
1782         * modules/regex (FILES): Remove m4/codeset.m4.
1783         (Depends-on): Add localcharset.  Remove strcase.
1784
1785 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1786
1787         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
1788         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
1789
1790 2007-02-13  Bruno Haible  <bruno@clisp.org>
1791
1792         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
1793         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1794
1795 2007-02-12  Bruno Haible  <bruno@clisp.org>
1796
1797         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
1798         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
1799         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
1800         time warning rather than a link error.
1801
1802 2007-02-12  Bruno Haible  <bruno@clisp.org>
1803
1804         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
1805         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
1806         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1807
1808 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1809
1810         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
1811         args, not 2.
1812
1813 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
1814
1815         New module 'time', so that apps can include <time.h> as per
1816         POSIX and GNU instead of separate include files like time_r.h
1817         and timegm.h.  This implementation tries out a simpler approach
1818         for replacing decls in standard include files (as compared to
1819         the string module), somewhat as an experiment.
1820
1821         * config/srclist.txt: Comment out mktime.c for now.
1822         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
1823         since it doesn't apply any more.  Use generic wording instead.
1824         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
1825         'time'.
1826         * lib/time_.h, m4/time_h.m4, modules/time: New files.
1827         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
1828         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
1829         Don't include <sys/types.h>; no longer needed since we assume C89.
1830         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
1831         * lib/strftime.c: Likewise.
1832         * lib/time_r.c: Likewise.
1833         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
1834         * lib/nanosleep.c: Include <time.h> first, to check interface.
1835         * lib/strptime.c: Likewise.
1836         * lib/time_r.c: Likewise.
1837         * lib/timegm.c: Likewise.
1838         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
1839         needed.
1840         * lib/timegm.c: Don't include timegm.h; no longer needed.
1841         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
1842         time.h now handles any problems in that area.
1843         (struct timespec, nanosleep): Remove; time.h now arranges for these.
1844         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
1845         that time.h defines struct timespec.
1846         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
1847         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
1848         handles that.
1849         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
1850         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
1851         needed.  Set REPLACE_LOCALTIME.
1852         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
1853         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
1854         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
1855         nanosleep; time_h.m4 now does that.  Don't require
1856         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
1857         module handles this now.
1858         * modules/getdate (Depends-on): Remove timespec.  Add time.
1859         * modules/nanosleep (Depends-on): Likewise.
1860         * modules/stat-time (Depends-on): Likewise.
1861         * modules/nanosleep (Include): Include time.h, not timespec.h.
1862         * modules/strptime (Files): Remove lib/strptime.h.
1863         (Depends-on): Add extensions, time.
1864         (Include): Include time.h, not strptime.h.
1865         * modules/time_r (Files): Remove lib/time_r.h.
1866         (Depends-on): Add time.
1867         (Include): Include time.h, not time_r.h.
1868         * modules/timegm: Likewise.
1869         * modules/timespec (Description): Now does timespec-related decls
1870         of our own, instead of struct timespec itself.
1871         (Depends-on): Add time; remove extensions.
1872         (Maintainer): Add self.
1873         * modules/utimecmp (Depends-on): Add time; remove timespec.
1874         * modules/utimens (Depends-on): Likewise.
1875         * modules/xnanosleep (Depends-on): Likewise.
1876
1877 2007-02-11  Bruno Haible  <bruno@clisp.org>
1878
1879         * lib/c-strstr.c: Include allocsa.h.
1880         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1881         * lib/c-strcasestr.c: Include allocsa.h.
1882         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1883         * lib/strcasestr.c: Include allocsa.h.
1884         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
1885         * lib/mbsstr.c: Include allocsa.h.
1886         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1887         allocsa/freesa instead of malloc/free.
1888         * lib/mbscasestr.c: Include allocsa.h.
1889         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
1890         allocsa/freesa instead of malloc/free.
1891         * modules/c-strstr (Depends-on): Add allocsa.
1892         * modules/c-strcasestr (Depends-on): Likewise.
1893         * modules/strcasestr (Depends-on): Likewise.
1894         * modules/mbsstr (Depends-on): Likewise.
1895         * modules/mbscasestr (Depends-on): Likewise.
1896
1897 2007-02-11  Bruno Haible  <bruno@clisp.org>
1898
1899         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
1900
1901         * modules/mbsspn-tests: New file.
1902         * tests/test-mbsspn.sh: New file.
1903         * tests/test-mbsspn.c: New file.
1904
1905 2007-02-11  Bruno Haible  <bruno@clisp.org>
1906
1907         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
1908
1909         * modules/mbspbrk-tests: New file.
1910         * tests/test-mbspbrk.sh: New file.
1911         * tests/test-mbspbrk.c: New file.
1912
1913 2007-02-11  Bruno Haible  <bruno@clisp.org>
1914
1915         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
1916         unneeded cast.
1917
1918         * modules/mbscspn-tests: New file.
1919         * tests/test-mbscspn.sh: New file.
1920         * tests/test-mbscspn.c: New file.
1921
1922 2007-02-11  Bruno Haible  <bruno@clisp.org>
1923
1924         * modules/mbscasecmp-tests: New file.
1925         * tests/test-mbscasecmp.sh: New file.
1926         * tests/test-mbscasecmp.c: New file.
1927
1928 2007-02-11  Bruno Haible  <bruno@clisp.org>
1929
1930         Ensure O(n) worst-case complexity of mbscasestr.
1931         * lib/mbscasestr.c: Include stdbool.h.
1932         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1933         functions.
1934         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
1935         the bookkeeping indicates that it's worth it.
1936         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
1937
1938         * modules/mbscasestr-tests: New file.
1939         * tests/test-mbscasestr1.c: New file.
1940         * tests/test-mbscasestr2.sh: New file.
1941         * tests/test-mbscasestr2.c: New file.
1942         * tests/test-mbscasestr3.sh: New file.
1943         * tests/test-mbscasestr3.c: New file.
1944         * tests/test-mbscasestr4.sh: New file.
1945         * tests/test-mbscasestr4.c: New file.
1946         * m4/locale-tr.m4: New file.
1947
1948 2007-02-11  Bruno Haible  <bruno@clisp.org>
1949
1950         Ensure O(n) worst-case complexity of mbsstr.
1951         * lib/mbsstr.c: Include stdbool.h.
1952         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
1953         functions.
1954         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
1955         bookkeeping indicates that it's worth it.
1956         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
1957
1958         * modules/mbsstr-tests: New file.
1959         * tests/test-mbsstr1.c: New file.
1960         * tests/test-mbsstr2.sh: New file.
1961         * tests/test-mbsstr2.c: New file.
1962         * tests/test-mbsstr3.sh: New file.
1963         * tests/test-mbsstr3.c: New file.
1964         * m4/locale-fr.m4: New file.
1965
1966 2007-02-11  Bruno Haible  <bruno@clisp.org>
1967
1968         * lib/mbsrchr.c (mbsrchr): Fix bug.
1969
1970         * modules/mbsrchr-tests: New file.
1971         * tests/test-mbsrchr.sh: New file.
1972         * tests/test-mbsrchr.c: New file.
1973
1974 2007-02-11  Bruno Haible  <bruno@clisp.org>
1975
1976         * lib/mbschr.c (mbschr): Fix bug.
1977
1978         * modules/mbschr-tests: New file.
1979         * tests/test-mbschr.sh: New file.
1980         * tests/test-mbschr.c: New file.
1981         * m4/locale-zh.m4: New file.
1982
1983 2007-02-11  Bruno Haible  <bruno@clisp.org>
1984
1985         Support for copying multibyte string iterators.
1986         * lib/mbiter.h: Include <string.h>.
1987         (mbiter_multi_copy): New function.
1988         (mbi_copy): New macro.
1989         * lib/mbuiter.h: Include <string.h>.
1990         (mbuiter_multi_copy): New function.
1991         (mbui_copy): New macro.
1992
1993 2007-02-11  Bruno Haible  <bruno@clisp.org>
1994
1995         New module mbslen.
1996         * modules/mbslen: New file.
1997         * lib/mbslen.c: New file.
1998         * lib/string_.h (mbslen): New declaration.
1999         * m4/mbslen.m4: New file.
2000         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2001         GNULIB_MBSLEN.
2002         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
2003         * MODULES.html.sh (Internationalization functions): Add mbslen.
2004
2005 2007-02-11  Bruno Haible  <bruno@clisp.org>
2006
2007         Ensure O(n) worst-case complexity of strcasestr substitute.
2008         * lib/strcasestr.c: Include stdbool.h.
2009         (knuth_morris_pratt): New function.
2010         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2011         bookkeeping indicates that it's worth it.
2012         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
2013
2014         * modules/strcasestr-tests: New file.
2015         * tests/test-strcasestr.c: New file.
2016
2017 2007-02-11  Bruno Haible  <bruno@clisp.org>
2018
2019         Ensure O(n) worst-case complexity of c_strcasestr.
2020         * lib/c-strcasestr.c: Include stdbool.h, string.h.
2021         (knuth_morris_pratt): New function.
2022         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
2023         the bookkeeping indicates that it's worth it.
2024         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
2025
2026         * modules/c-strcasestr-tests: New file.
2027         * tests/test-c-strcasestr.c: New file.
2028
2029 2007-02-11  Bruno Haible  <bruno@clisp.org>
2030
2031         Ensure O(n) worst-case complexity of c_strstr.
2032         * lib/c-strstr.c: Include stdbool.h, string.h.
2033         (knuth_morris_pratt): New function.
2034         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
2035         bookkeeping indicates that it's worth it.
2036         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
2037
2038         * lib/c-strstr.c: Complete rewrite for maintainability.
2039
2040         * modules/c-strstr-tests: New file.
2041         * tests/test-c-strstr.c: New file.
2042
2043 2007-02-11  Bruno Haible  <bruno@clisp.org>
2044
2045         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
2046         5.2.1 and earlier, whereby \055 was treated just like the range
2047         delimiter '-'.
2048         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
2049
2050 2007-02-08  Bruno Haible  <bruno@clisp.org>
2051
2052         * modules/regex (Depends-on): Add stdbool.
2053         Reported by Dalibor Topic <robilad@kaffe.org>.
2054
2055 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
2056
2057         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
2058         Prefer returning from main to exiting from it.
2059         Remove unnecessary parens after sizeof.
2060
2061 2007-02-05  Bruno Haible  <bruno@clisp.org>
2062
2063         New module mbssep.
2064         * modules/mbssep: New file.
2065         * lib/mbssep.c: New file.
2066         * lib/string_.h (strsep): Add a conditional link warning.
2067         (mbssep): New declaration.
2068         * m4/mbssep.m4: New file.
2069         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2070         GNULIB_MBSSEP.
2071         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
2072         * MODULES.html.sh (Internationalization functions): Add mbssep.
2073
2074 2007-02-05  Bruno Haible  <bruno@clisp.org>
2075
2076         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
2077         Optimize search in case of 1 delimiter.
2078
2079 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2080
2081         * lib/acl.h: Include sys/types.h before sys/acl.h.
2082
2083 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
2084
2085         Merge upstream fix for glibc bugzilla #3957:
2086
2087         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
2088
2089         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
2090         bit for RE_HAT_LISTS_NOT_NEWLINE.
2091         (build_charclass_op): Remove bogus comment.
2092
2093 2007-02-05  Simon Josefsson  <simon@josefsson.org>
2094
2095         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
2096
2097 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2098
2099         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
2100         * lib/memmem.c [!defined _LIBC]: Include config.h.
2101
2102 2007-02-04  Bruno Haible  <bruno@clisp.org>
2103
2104         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
2105         warning message.
2106
2107 2007-02-04  Bruno Haible  <bruno@clisp.org>
2108
2109         New module mbstok_r.
2110         * modules/mbstok_r: New file.
2111         * lib/mbstok_r.c: New file.
2112         * lib/string_.h (strtok_r): Change argument names to match the
2113         comments. Add a conditional link warning.
2114         (mbstok_r): New declaration.
2115         * m4/mbstok_r.m4: New file.
2116         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2117         GNULIB_MBSTOK_R.
2118         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
2119         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
2120
2121 2007-02-04  Bruno Haible  <bruno@clisp.org>
2122
2123         New module mbsspn.
2124         * modules/mbsspn: New file.
2125         * lib/mbsspn.c: New file.
2126         * lib/string_.h (strspn): Add a conditional link warning.
2127         (mbsspn): New declaration.
2128         * m4/mbsspn.m4: New file.
2129         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2130         GNULIB_MBSSPN.
2131         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
2132         * MODULES.html.sh (Internationalization functions): Add mbsspn.
2133
2134 2007-02-04  Bruno Haible  <bruno@clisp.org>
2135
2136         New module mbspbrk.
2137         * modules/mbspbrk: New file.
2138         * lib/mbspbrk.c: New file.
2139         * lib/string_.h (strpbrk): Add a conditional link warning.
2140         (mbspbrk): New declaration.
2141         * m4/mbspbrk.m4: New file.
2142         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2143         GNULIB_MBSPBRK.
2144         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
2145         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
2146
2147 2007-02-04  Bruno Haible  <bruno@clisp.org>
2148
2149         New module mbscspn.
2150         * modules/mbscspn: New file.
2151         * lib/mbscspn.c: New file.
2152         * lib/string_.h (strcspn): Add a conditional link warning.
2153         (mbscspn): New declaration.
2154         * m4/mbscspn.m4: New file.
2155         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2156         GNULIB_MBSCSPN.
2157         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
2158         * MODULES.html.sh (Internationalization functions): Add mbscspn.
2159
2160 2007-02-04  Bruno Haible  <bruno@clisp.org>
2161
2162         New module mbscasestr, reduced goal of strcasestr.
2163         * modules/mbscasestr: New file.
2164         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
2165         (mbscasestr): Renamed from strcasestr.
2166         * lib/strcasestr.c: Don't include mbuiter.h.
2167         (strcasestr): Remove support for multibyte locales.
2168         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
2169         Change the conditional link warning.
2170         (mbscasestr): New declaration.
2171         * m4/mbscasestr.m4: New file.
2172         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
2173         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
2174         REPLACE_STRCASESTR.
2175         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
2176         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2177         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2178         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
2179         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
2180         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
2181         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
2182         (Depends-on): Remove mbuiter.
2183         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
2184
2185 2007-02-04  Bruno Haible  <bruno@clisp.org>
2186
2187         Simplify handling of strncasecmp.
2188         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
2189         the conditional link warning.
2190         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
2191         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
2192         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
2193         * modules/strcase (configure.ac): Don't invoke
2194         gl_STRING_MODULE_INDICATOR.
2195         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
2196
2197 2007-02-04  Bruno Haible  <bruno@clisp.org>
2198
2199         New module mbscasecmp, reduced goal of strcasecmp.
2200         * modules/mbscasecmp: New file.
2201         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
2202         (mbscasecmp): Renamed from strcasecmp.
2203         * lib/strcasecmp.c: Don't include mbuiter.h.
2204         (strcasecmp): Remove support for multibyte locales.
2205         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
2206         Change the conditional link warning.
2207         (mbscasecmp): New declaration.
2208         * m4/mbscasecmp.m4: New file.
2209         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
2210         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
2211         REPLACE_STRCASECMP.
2212         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
2213         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2214         GNULIB_MBSCASECMP.
2215         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
2216         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
2217         * modules/strcase (Files): Remove m4/mbrtowc.m4.
2218         (Depends-on): Remove mbuiter.
2219         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
2220
2221 2007-02-04  Bruno Haible  <bruno@clisp.org>
2222
2223         New module mbsstr. Remove module strstr.
2224         * modules/mbsstr: New file.
2225         * modules/strstr: Remove file.
2226         * lib/mbsstr.c: Renamed from lib/strstr.c.
2227         (mbsstr): Renamed from strstr.
2228         * lib/string_.h (strstr): Remove declaration. Change the conditional
2229         link warning.
2230         (mbsstr): New declaration.
2231         * m4/mbsstr.m4: New file.
2232         * m4/strstr.m4: Remove file.
2233         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
2234         REPLACE_STRSTR.
2235         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
2236         Don't initialize GNULIB_STRSTR.
2237         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
2238         substitute GNULIB_STRSTR and REPLACE_STRSTR.
2239         * MODULES.html.sh (Internationalization functions): Add mbsstr.
2240         (Support for systems lacking ANSI C 89): Remove strstr.
2241
2242 2007-02-04  Bruno Haible  <bruno@clisp.org>
2243
2244         New module mbsrchr.
2245         * modules/mbsrchr: New file.
2246         * lib/mbsrchr.c: New file.
2247         * lib/string_.h (strrchr): Add a conditional link warning.
2248         (mbsrchr): New declaration.
2249         * m4/mbsrchr.m4: New file.
2250         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2251         GNULIB_MBSRCHR.
2252         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
2253         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
2254
2255 2007-02-04  Bruno Haible  <bruno@clisp.org>
2256
2257         New module mbschr.
2258         * modules/mbschr: New file.
2259         * lib/mbschr.c: New file.
2260         * lib/string_.h (strchr): Add a conditional link warning.
2261         (mbschr): New declaration.
2262         * m4/mbschr.m4: New file.
2263         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
2264         GNULIB_MBSCHR.
2265         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
2266         * MODULES.html.sh (Internationalization functions): Add mbschr.
2267
2268 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
2269
2270         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
2271
2272         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
2273
2274 2007-02-04  Bruno Haible  <bruno@clisp.org>
2275
2276         New module description section 'configure.ac-early'.
2277         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
2278         (func_get_autoconf_early_snippet): New function.
2279         (func_import, func_create_testdir): Use it. Remove special cases for
2280         modules 'extensions' and 'lock'.
2281         * modules/extensions (configure.ac-early): Require
2282         gl_USE_SYSTEM_EXTENSIONS.
2283         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
2284
2285 2007-02-04  Bruno Haible  <bruno@clisp.org>
2286
2287         Make use of gcj-4.3's -fsource and -ftarget option.
2288         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
2289         and if so try the options -fsource and -ftarget.
2290         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
2291         source_version, ftarget_option, target_version arguments.
2292         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
2293         (is_envjavac_oldgcj_14_14_usable): Renamed from
2294         is_envjavac_gcj_14_14_usable.
2295         (is_envjavac_oldgcj_14_13_usable): Renamed from
2296         is_envjavac_gcj_14_13_usable.
2297         (is_gcj_present): Update.
2298         (is_gcj_43, is_gcj43_usable): New functions.
2299         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
2300         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
2301         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
2302         try the options -fsource and -ftarget.
2303
2304 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
2305
2306         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
2307         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
2308         larger value.
2309
2310 2007-02-03  Jim Meyering  <jim@meyering.net>
2311
2312         Give tools a better chance to allocate space for very large buffers.
2313         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
2314
2315         Make pwd and readlink work also when run with an unreadable parent dir
2316         on systems with openat support.
2317         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
2318         provided getcwd function, even when we have openat support.
2319         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
2320
2321 2007-02-02  Bruno Haible  <bruno@clisp.org>
2322
2323         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
2324         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
2325         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
2326         portability problems if one of these functions is only used on specific
2327         platforms.
2328         Reported by Paul Eggert.
2329
2330 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
2331
2332         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
2333         is causing more trouble than it's curing.
2334         * lib/regex_internal.h (__mempcpy): Remove.
2335         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
2336         (and make the code a tad smaller to boot).
2337         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
2338
2339 2007-02-02  Jim Meyering  <jim@meyering.net>
2340
2341         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
2342         section, not in the Makefile.am: one.
2343
2344 2007-02-02  Eric Blake  <ebb9@byu.net>
2345
2346         * lib/strchrnul.c: Always include config.h first.
2347
2348         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
2349         gnulib strstr is not necessary here.
2350
2351 2007-02-02  Simon Josefsson  <simon@josefsson.org>
2352
2353         * m4/socklen.m4: Fix typo.
2354
2355 2007-02-02  Eric Blake  <ebb9@byu.net>
2356
2357         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
2358         * modules/netinet_in (Makefile.am): Likewise.
2359
2360 2007-02-01  Bruno Haible  <bruno@clisp.org>
2361
2362         * lib/string_.h (GL_LINK_WARNING): New macro.
2363         (strcasecmp, strstr, strcasestr): If provided by the system,
2364         conditionally define as a macro that leads to a warning instead of to
2365         an error.
2366         (strncasecmp): Conditionally define as a macro that leads to a warning.
2367
2368 2007-02-01  Karl Berry  <karl@gnu.org>
2369
2370         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
2371
2372 2007-02-01  Bruno Haible  <bruno@clisp.org>
2373
2374         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
2375         renamings.
2376
2377 2007-02-01  Eric Blake  <ebb9@byu.net>
2378
2379         * modules/regex (Depends-on): Revert dependence on mempcpy.
2380         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
2381         module's definition of mempcpy.
2382         Reported by Paul Eggert.
2383
2384 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
2385
2386         * lib/string_.h: If the gnulib module XYZ is not present, undefine
2387         the symbol XYZ before redefining it.  This fixes a problem with
2388         programs that don't use XYZ, when compiled on systems that define
2389         XYZ to something else.
2390
2391 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
2392
2393         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
2394         occurs when "mkdir -m foo" creates a setgid directory that is (1)
2395         writeable to group or other and (2) is intended to have a special
2396         mode bit that is set or cleared.  In such a case, the directory
2397         should be neither group- nor other-writeable until the special
2398         mode bits are right.
2399
2400 2007-01-31  Eric Blake  <ebb9@byu.net>
2401
2402         * modules/mountlist (Depends-on): Add strstr.
2403
2404         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
2405         bug.
2406         * modules/string (Makefile.am): Remove redundant replacement.
2407         * modules/regex (Depends-on): Add mempcpy.
2408
2409 2007-01-31  Bruno Haible  <bruno@clisp.org>
2410
2411         New module description field 'Link'.
2412         * gnulib-tool (func_usage): Document --extract-link-directive.
2413         (sed_extract_prog): Recognize 'Link' directive.
2414         (func_get_link_directive): New function.
2415         (func_import): Show summary of link directives.
2416         Handle --extract-link-directive option.
2417         * modules/acl (Link): New section.
2418         * modules/clock-time (Link): New section.
2419         * modules/euidaccess (Link): New section.
2420         * modules/gettext (Link): New section.
2421         * modules/iconv (Link): New section.
2422         * modules/lock (Link): New section.
2423         * modules/nanosleep (Link): New section.
2424         * modules/readline (Link): New section.
2425
2426 2007-01-27  Bruno Haible  <bruno@clisp.org>
2427
2428         Enforce the use of gnulib modules for unportable <string.h> functions.
2429         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
2430         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
2431         (gl_HEADER_STRING_H_BODY): Require it.
2432         * lib/string_.h: If the gnulib module XYZ is not present, redefine
2433         the symbol XYZ to one that gives a link error.
2434         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
2435         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
2436         * modules/mempcpy (configure.ac): Likewise.
2437         * modules/memrchr (configure.ac): Likewise.
2438         * modules/stpcpy (configure.ac): Likewise.
2439         * modules/stpncpy (configure.ac): Likewise.
2440         * modules/strcase (configure.ac): Likewise.
2441         * modules/strcasestr (configure.ac): Likewise.
2442         * modules/strchrnul (configure.ac): Likewise.
2443         * modules/strdup (configure.ac): Likewise.
2444         * modules/strndup (configure.ac): Likewise.
2445         * modules/strnlen (configure.ac): Likewise.
2446         * modules/strpbrk (configure.ac): Likewise.
2447         * modules/strsep (configure.ac): Likewise.
2448         * modules/strstr (configure.ac): Likewise.
2449         * modules/strtok_r (configure.ac): Likewise.
2450
2451 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
2452
2453         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
2454
2455 2007-01-30  Jim Meyering  <jim@meyering.net>
2456
2457         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
2458
2459 2007-01-29  Bruno Haible  <bruno@clisp.org>
2460
2461         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
2462         * lib/execute.c: Likewise.
2463         * lib/pipe.c: Likewise.
2464         * lib/printf-args.h: Likewise.
2465         * lib/printf-args.c: Likewise.
2466         * lib/printf-parse.c: Likewise.
2467         * lib/vasnprintf.c: Likewise.
2468
2469 2007-01-29  Eric Blake  <ebb9@byu.net>
2470
2471         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
2472         declaration.
2473
2474 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
2475
2476         * lib/strptime.h (strptime): Use 'restrict' for args where
2477         POSIX requires this.
2478         * lib/strptime.c (strptime): Likewise.
2479         Change license notice from LGPL to GPL, since gnulib-tool will
2480         change this as needed.
2481         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
2482         defined.
2483         Include "strptime.h" first, to check interface.
2484         Do not #undef _LIBC and _NL_CURRENT.
2485         Do not include <stdlib.h>; no longer needed.
2486         Include "time_r.h" and declare ptime_locale_status
2487         only if _LIBC is not defined.
2488         (__P): Remove unused macro.
2489         (match_string): Bring back glibc version, but use it only if _LIBC
2490         is defined.
2491         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
2492         Remove unnecessary assertion and abort() call.
2493         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
2494         * m4/strptime.m4: Fix serial number comment.
2495         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
2496         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
2497         (Depends-on): Add time_r.
2498
2499 2007-01-29  Bruno Haible  <bruno@clisp.org>
2500
2501         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
2502         strptime.
2503         * modules/strptime (Depends-on): Add stdbool.
2504         * lib/strptime.h: Include <time.h> always. Add comments.
2505
2506 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
2507
2508         * modules/strptime: New file.
2509         * lib/strptime.h: New file.
2510         * lib/strptime.c: New file.
2511         * m4/strptime.m4: New file.
2512
2513 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
2514
2515         * MODULES.html.sh: New module mpsort.
2516         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
2517
2518         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
2519         a circularity problem with HP-UX ia64 reported by Bob Proulx in
2520         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
2521         All uses changed.
2522         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
2523         All uses changed.
2524         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
2525         to _Restrict_.
2526         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
2527         the parameter matches the prototype.
2528
2529 2007-01-28  Jim Meyering  <jim@meyering.net>
2530
2531         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
2532         sys/time.h here, reverting that part of the previous patch:
2533         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
2534
2535 2007-01-28  Bruno Haible  <bruno@clisp.org>
2536
2537         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
2538         value of $(SYS_TIME_H).
2539         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
2540         remove it conditionally, too. [added by Jim Meyering]
2541         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
2542         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
2543         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
2544         GETTIMEOFDAY_REPLACEMENT to 1.
2545
2546 2007-01-28  Bruno Haible  <bruno@clisp.org>
2547
2548         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
2549         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
2550         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
2551         Set UNISTD_H instead of UNISTD_H2.
2552         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
2553
2554 2007-01-28  Bruno Haible  <bruno@clisp.org>
2555
2556         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
2557         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
2558
2559 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2560
2561         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
2562         (func_create_testdir): Ensure C locale for `grep' and `tr'
2563         character ranges.
2564         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
2565         ACLOCAL_AMFLAGS parsing state machine.
2566
2567 2007-01-27  Bruno Haible  <bruno@clisp.org>
2568
2569         * modules/unistr/base: Update.
2570
2571 2007-01-27  Bruno Haible  <bruno@clisp.org>
2572
2573         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
2574         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
2575         * modules/unistr/u32-mbtouc-unsafe: Renamed from
2576         modules/unistr/u32-mbtouc.
2577         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
2578         * lib/unistr.h: Update.
2579         * lib/linebreak.c: Update.
2580         * modules/unistr/u32-mbtouc: Renamed from
2581         modules/unistr/u32-mbtouc-safe.
2582         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
2583         * lib/unistr.h: Update.
2584         * lib/unistr/u32-to-u8.c: Update.
2585         * lib/unistr/u32-to-u16.c: Update.
2586
2587 2007-01-27  Bruno Haible  <bruno@clisp.org>
2588
2589         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
2590         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
2591         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
2592         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
2593         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
2594         * modules/unistr/u16-mbtouc-unsafe: Renamed from
2595         modules/unistr/u16-mbtouc.
2596         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
2597         * lib/unistr.h: Update.
2598         * lib/linebreak.c: Update.
2599         * modules/linebreak: Update.
2600         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
2601         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
2602         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
2603         * modules/unistr/u16-mbtouc: Renamed from
2604         modules/unistr/u16-mbtouc-safe.
2605         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
2606         * lib/unistr.h: Update.
2607         * lib/unistr/u16-to-u8.c: Update.
2608         * modules/unistr/u16-to-u8: Update.
2609         * lib/unistr/u16-to-u32.c: Update.
2610         * modules/unistr/u16-to-u32: Update.
2611
2612 2007-01-27  Bruno Haible  <bruno@clisp.org>
2613
2614         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
2615         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
2616         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
2617         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
2618         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
2619         * modules/unistr/u8-mbtouc-unsafe: Renamed from
2620         modules/unistr/u8-mbtouc.
2621         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
2622         * lib/unistr.h: Update.
2623         * lib/striconveh.c: Update.
2624         * modules/striconveh: Update.
2625         * lib/linebreak.c: Update.
2626         * modules/linebreak: Update.
2627         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
2628         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
2629         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
2630         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
2631         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
2632         * lib/unistr.h: Update.
2633         * lib/striconveh.c: Update.
2634         * modules/striconveh: Update.
2635         * lib/unistr/u8-to-u16.c: Update.
2636         * modules/unistr/u8-to-u16: Update.
2637         * lib/unistr/u8-to-u32.c: Update.
2638         * modules/unistr/u8-to-u32: Update.
2639
2640 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2641
2642         Sync from Libtool.
2643         * lib/argz.c: Do not include strings.h nor memory.h, include
2644         string.h unconditionally.  Patch by Simon Josefsson.
2645
2646 2007-01-27  Bruno Haible  <bruno@clisp.org>
2647
2648         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
2649         from gl_HEADER_STRING_H_BODY.
2650         (gl_HEADER_STRING_H_BODY): Require it.
2651         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
2652         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
2653         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
2654         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
2655         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2656         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
2657         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
2658         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
2659         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
2660         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
2661         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
2662         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
2663         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
2664         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
2665         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2666
2667 2007-01-27  Bruno Haible  <bruno@clisp.org>
2668
2669         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
2670         check_PROGRAMS into noinst_PROGRAMS.
2671         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
2672         check_PROGRAMS in this case.
2673         (func_import): Set for_test to false.
2674         (func_create_testdir): Set for_test to true.
2675
2676 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2677             Bruno Haible  <bruno@clisp.org>
2678
2679         * modules/strcasestr (Files): Remove lib/strcasestr.h.
2680         (Depends-on): Add string.
2681         (Includes): Use <string.h> instead of strcasestr.h.
2682         * modules/string (Makefile.am): Also substitute the value of
2683         REPLACE_STRCASESTR.
2684         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
2685         assume strcasestr is declared in <string.h> not <strings.h>. Also
2686         set REPLACE_STRCASESTR.
2687         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
2688         REPLACE_STRCASESTR.
2689         * lib/strcasestr.h: Remove file.
2690         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
2691         * lib/string_.h (strcasestr): New declaration.
2692
2693 2007-01-27  Bruno Haible  <bruno@clisp.org>
2694
2695         * lib/string_.h: Use 'extern'.
2696
2697 2007-01-27  Jim Meyering  <jim@meyering.net>
2698
2699         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
2700         of set-but-not-used local, "q".
2701
2702         * lib/mempcpy.c: Include <config.h> before <string.h>.
2703         This fixes a compilation error on HP-UX, due to the system's
2704         "restrict"-using mempcpy prototype.
2705
2706 2007-01-26  Bruno Haible  <bruno@clisp.org>
2707
2708         Small optimization.
2709         * lib/javacomp.c: Include c-strstr.h.
2710          (is_envjavac_gcj): Use c_strstr instead of strstr.
2711         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
2712
2713 2007-01-26  Bruno Haible  <bruno@clisp.org>
2714
2715         * MODULES.html.sh (Unicode string functions): Add the new modules.
2716
2717         * modules/uniconv/u32-strconv-to-locale: New file.
2718         * lib/uniconv/u32-strconv-to-locale.c: New file.
2719
2720         * modules/uniconv/u16-strconv-to-locale: New file.
2721         * lib/uniconv/u16-strconv-to-locale.c: New file.
2722
2723         * modules/uniconv/u8-strconv-to-locale: New file.
2724         * lib/uniconv/u8-strconv-to-locale.c: New file.
2725
2726         * modules/uniconv/u32-strconv-from-locale: New file.
2727         * lib/uniconv/u32-strconv-from-locale.c: New file.
2728
2729         * modules/uniconv/u16-strconv-from-locale: New file.
2730         * lib/uniconv/u16-strconv-from-locale.c: New file.
2731
2732         * modules/uniconv/u8-strconv-from-locale: New file.
2733         * lib/uniconv/u8-strconv-from-locale.c: New file.
2734
2735         * modules/uniconv/u32-strconv-to-enc: New file.
2736         * lib/uniconv/u32-strconv-to-enc.c: New file.
2737         * modules/uniconv/u32-strconv-to-enc-tests: New file.
2738         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
2739
2740         * modules/uniconv/u16-strconv-to-enc: New file.
2741         * lib/uniconv/u16-strconv-to-enc.c: New file.
2742         * lib/uniconv/u-strconv-to-enc.h: New file.
2743         * modules/uniconv/u16-strconv-to-enc-tests: New file.
2744         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
2745
2746         * modules/uniconv/u8-strconv-to-enc: New file.
2747         * lib/uniconv/u8-strconv-to-enc.c: New file.
2748         * modules/uniconv/u8-strconv-to-enc-tests: New file.
2749         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
2750
2751         * modules/uniconv/u32-strconv-from-enc: New file.
2752         * lib/uniconv/u32-strconv-from-enc.c: New file.
2753         * modules/uniconv/u32-strconv-from-enc-tests: New file.
2754         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
2755
2756         * modules/uniconv/u16-strconv-from-enc: New file.
2757         * lib/uniconv/u16-strconv-from-enc.c: New file.
2758         * modules/uniconv/u16-strconv-from-enc-tests: New file.
2759         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
2760
2761         * modules/uniconv/u8-strconv-from-enc: New file.
2762         * lib/uniconv/u8-strconv-from-enc.c: New file.
2763         * lib/uniconv/u-strconv-from-enc.h: New file.
2764         * modules/uniconv/u8-strconv-from-enc-tests: New file.
2765         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
2766
2767         * modules/uniconv/u32-conv-from-enc: New file.
2768         * lib/uniconv/u32-conv-from-enc.c: New file.
2769         * modules/uniconv/u32-conv-from-enc-tests: New file.
2770         * tests/uniconv/test-u32-conv-from-enc.c: New file.
2771
2772         * modules/uniconv/u16-conv-from-enc: New file.
2773         * lib/uniconv/u16-conv-from-enc.c: New file.
2774         * lib/uniconv/u-conv-from-enc.h: New file.
2775         * modules/uniconv/u16-conv-from-enc-tests: New file.
2776         * tests/uniconv/test-u16-conv-from-enc.c: New file.
2777
2778         * modules/uniconv/u8-conv-from-enc: New file.
2779         * lib/uniconv/u8-conv-from-enc.c: New file.
2780         * modules/uniconv/u8-conv-from-enc-tests: New file.
2781         * tests/uniconv/test-u8-conv-from-enc.c: New file.
2782
2783         * modules/uniconv/base: New file.
2784         * lib/uniconv.h: New file.
2785
2786 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
2787
2788         * doc/gnulib-tool.texi (Initial import): Update to match current
2789         behavior with strdup module.
2790         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
2791         * lib/memmem.h: Remove; all uses removed.  This is now done
2792         by <string.h>.
2793         * lib/mempcpy.h: Likewise.
2794         * lib/memrchr.h: Likewise.
2795         * lib/stpcpy.h: Likewise.
2796         * lib/stpncpy.h: Likewise.
2797         * lib/strcase.h: Likewise.
2798         * lib/strchrnul.h: Likewise.
2799         * lib/strdup.h: Likewise.
2800         * lib/strndup.h: Likewise.
2801         * lib/strnlen.h: Likewise.
2802         * lib/strpbrk.h: Likewise.
2803         * lib/strsep.h: Likewise.
2804         * lib/strstr.h: Likewise.
2805         * lib/strtok_r.h: Likewise.
2806         * lib/string_.h: New file.
2807         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
2808         Rely on <string.h> instead.
2809         * lib/canon-host.c: Likewise.
2810         * lib/chdir-long.c: Likewise.
2811         * lib/concatpath.c: Likewise.
2812         * lib/exclude.c: Likewise.
2813         * lib/fchdir.c: Likewise.
2814         * lib/getaddrinfo.c: Likewise.
2815         * lib/getcwd.c: Likewise.
2816         * lib/getsubopt.c: Likewise.
2817         * lib/glob.c: Likewise.
2818         * lib/hard-locale.c: Likewise.
2819         * lib/iconvme.c: Likewise.
2820         * lib/javacomp.c: Likewise.
2821         * lib/mempcpy.c: Likewise.
2822         * lib/memrchr.c: Likewise.
2823         * lib/regex_internal.h: Likewise.
2824         * lib/stpncpy.c: Likewise.
2825         * lib/strcasecmp.c: Likewise.
2826         * lib/strchrnul.c: Likewise.
2827         * lib/strdup.c: Likewise.
2828         * lib/striconv.c: Likewise.
2829         * lib/striconveh.c: Likewise.
2830         * lib/striconveha.c: Likewise.
2831         * lib/strncasecmp.c: Likewise.
2832         * lib/strndup.c: Likewise.
2833         * lib/strnlen.c: Likewise.
2834         * lib/strsep.c: Likewise.
2835         * lib/strstr.c: Likewise.
2836         * lib/strtok_r.c: Likewise.
2837         * lib/userspec.c: Likewise.
2838         * lib/w32spawn.h: Likewise.
2839         * lib/xstrndup.c: Likewise.
2840         * lib/mountlist.c (strstr): Remove decl.
2841         * m4/string_h.m4: New file.
2842         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
2843         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
2844         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
2845         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
2846         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
2847         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
2848         Set REPLACE_STRCASECMP if necessary.
2849         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
2850         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
2851         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
2852         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
2853         HAVE_DECL_STRDUP if necessary.
2854         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
2855         since gl_FUNC_STRNDUP does that now.
2856         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
2857         Check for decl here...
2858         (gl_PREREQ_STRNLEN): ... not here.
2859         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
2860         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
2861         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
2862         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
2863         necessary.
2864         * modules/string: New file.
2865         * modules/memmem (Files): Remove special-purpose include file.
2866         (Depends-on): Add string.
2867         (Include): Include <string.h>, not the removed file.
2868         * modules/mempcpy: Likewise.
2869         * modules/memrchr: Likewise.
2870         * modules/stpcpy: Likewise.
2871         * modules/stpncpy: Likewise.
2872         * modules/strcase: Likewise.
2873         * modules/strchrnul: Likewise.
2874         * modules/strdup: Likewise.
2875         * modules/strndup: Likewise.
2876         * modules/strnlen: Likewise.
2877         * modules/strpbrk: Likewise.
2878         * modules/strsep: Likewise.
2879         * modules/strstr: Likewise.
2880         * modules/strtok_r: Likewise.
2881         * tests/test-dirname.c: Don't include "strdup.h", since
2882         <string.h> now suffices.
2883         * tests/test-memmem.c: Don't include "memmem.h", since
2884         <string.h> now suffices.
2885
2886 2007-01-25  Bruno Haible  <bruno@clisp.org>
2887
2888         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
2889         *resultp is 0.
2890
2891         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
2892         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
2893         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
2894         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
2895
2896         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
2897         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
2898         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
2899         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
2900         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
2901         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
2902
2903 2007-01-24  Bruno Haible  <bruno@clisp.org>
2904
2905         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
2906         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
2907         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
2908         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
2909         gl_FUNC_FTS_CORE.
2910         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
2911         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
2912         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
2913         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
2914         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
2915         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
2916         gl_FUNC_FCHOWNAT.
2917         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
2918         gl_FUNC_STRFTIME.
2919         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
2920         Reported by Ralf Wildenhues.
2921
2922 2007-01-24  Bruno Haible  <bruno@clisp.org>
2923
2924         Drop AC_REQUIRE calls that are redundant with the module dependencies.
2925         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
2926         gl_GETADDRINFO.
2927         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
2928         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
2929         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
2930
2931 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
2932
2933         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
2934         Don't use 'exit'; just return from 'main'.
2935         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
2936
2937         * lib/fnmatch_.h: Readjust white space and comments to match
2938         glibc, to avoid spurious diffs.
2939
2940 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2941
2942         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
2943         2004-12-01 change by Jakub Jelinek, since this code won't compile
2944         if !LIBC.  Problem reported by Bob Proulx.
2945
2946 2007-01-23  Bruno Haible  <bruno@clisp.org>
2947
2948         * lib/striconveh.c: Include c-strcaseeq.h.
2949         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
2950         * modules/striconveh (Depends-on): Add c-strcaseeq.
2951
2952 2007-01-23  Bruno Haible  <bruno@clisp.org>
2953
2954         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
2955
2956         * modules/c-strcaseeq: New file.
2957         * lib/c-strcaseeq.h: New file.
2958
2959         * modules/streq: New file.
2960         * lib/streq.h: New file.
2961
2962 2007-01-23  Bruno Haible  <bruno@clisp.org>
2963
2964         * modules/striconveha-tests: New file.
2965         * tests/test-striconveha.c: New file.
2966
2967         * lib/striconveha.h: Include <stdbool.h>.
2968         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
2969         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
2970         (mem_iconveha_notranslit): Renamed from mem_iconveha.
2971         (mem_iconveha): New function.
2972         (str_iconveha_notranslit): Renamed from str_iconveha.
2973         (str_iconveha): New function.
2974         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
2975         c-strcase.
2976
2977 2007-01-23  Bruno Haible  <bruno@clisp.org>
2978
2979         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
2980         encodings without forgiving before trying any encoding with handler.
2981         (str_iconveha): Try all encodings without forgiving before trying any
2982         encoding with handler.
2983
2984 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
2985
2986         Import the following changes from libc.
2987
2988         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
2989
2990         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
2991
2992         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
2993
2994         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
2995         normal_bracket label.
2996
2997         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
2998
2999         [BZ #361]
3000         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
3001         to normal_bracket after fetching the next character.
3002
3003 2007-01-22  Bruno Haible  <bruno@clisp.org>
3004
3005         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
3006         argument.
3007         * lib/striconveh.c (iconv_carefully_1): New function.
3008         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
3009         argument.
3010         (str_cd_iconveh): Update.
3011         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
3012         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
3013         * tests/test-striconveh.c (MAGIC): New macro.
3014         (new_offsets): New function.
3015         (main): Test call with and without offsets.
3016
3017 2007-01-22  Bruno Haible  <bruno@clisp.org>
3018
3019         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
3020         * modules/sys_select (Makefile.am): Likewise.
3021         * modules/sys_socket (Makefile.am): Likewise.
3022         * modules/sys_time (Makefile.am): Likewise.
3023
3024 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
3025
3026         * modules/gettimeofday (License): Change from GPL to LGPL, since
3027         gettimeofday is a library function.
3028
3029 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3030
3031         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
3032
3033 2007-01-21  Bruno Haible  <bruno@clisp.org>
3034
3035         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
3036
3037 2007-01-21  Bruno Haible  <bruno@clisp.org>
3038
3039         * modules/striconveha: New file.
3040         * lib/striconveha.h: New file.
3041         * lib/striconveha.c: New file.
3042         * MODULES.html.sh (Internationalization functions): Add striconveha.
3043         * lib/striconv.c (str_iconv): Optimize the case of an empty input
3044         string.
3045         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
3046
3047 2007-01-21  Bruno Haible  <bruno@clisp.org>
3048
3049         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
3050         * lib/striconveh.c (str_iconveh): Likewise.
3051
3052 2007-01-21  Bruno Haible  <bruno@clisp.org>
3053
3054         * lib/striconveh.h (mem_iconveh): New declaration.
3055         * lib/striconveh.c (mem_iconveh): New function.
3056         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
3057
3058 2007-01-21  Bruno Haible  <bruno@clisp.org>
3059
3060         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
3061
3062         * lib/striconveh.h (mem_cd_iconveh): Change specification.
3063         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
3064         original result buffer.
3065         (str_cd_iconveh): Update.
3066         * tests/test-striconveh.c (main): Update.
3067
3068         * lib/striconv.h (mem_cd_iconv): Change specification.
3069         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
3070         result buffer.
3071         (str_cd_iconv): Update.
3072         * tests/test-striconv.c (main): Update.
3073
3074 2007-01-21  Bruno Haible  <bruno@clisp.org>
3075
3076         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
3077
3078 2007-01-20  Jim Meyering  <jim@meyering.net>
3079
3080         * lib/userspec.c (parse_with_separator): If a user or group string
3081         starts with "+", skip the corresponding name-to-ID look-up, since
3082         such a look-up must fail: user and group names may not include "+".
3083
3084 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
3085
3086         * lib/poll.c: Include sys/time.h and time.h unconditionally,
3087         since we now assume the sys_time module.
3088         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
3089         check for sys/time.h; no longer needed.
3090         * modules/poll (Depends-on): Depend on sys_time.
3091
3092 2007-01-18  Bruno Haible  <bruno@clisp.org>
3093
3094         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
3095         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3096
3097         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
3098         gettimeofday.
3099
3100         * tests/test-gettimeofday.c: Include <time.h>.
3101         (dummy): Remove variable.
3102
3103         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
3104         gl_HEADER_SYS_TIME_H.
3105         (gl_HEADER_SYS_TIME_H): New macro.
3106
3107         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
3108         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3109         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
3110         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
3111         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3112         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
3113         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
3114         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3115         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
3116         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
3117         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3118
3119         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
3120         last change; it caused a compilation error when cross-compiling to
3121         Cygwin.
3122
3123 2007-01-18  Jim Meyering  <jim@meyering.net>
3124
3125         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
3126         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
3127         than the race-prone "test -d sys || mkdir sys".
3128         (configure.ac): Use AC_PROG_MKDIR_P.
3129         * modules/sys_select: Likewise.
3130         * modules/sys_socket: Likewise.
3131         * modules/sys_time: Likewise.
3132
3133 2007-01-18  Eric Blake  <ebb9@byu.net>
3134
3135         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
3136         replace gettimeofday.
3137         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
3138         name, to avoid infinite recursion.
3139
3140 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
3141
3142         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
3143         module sys_time.
3144         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
3145         assume timespec.h defines struct timeval.
3146         * lib/settime.c: Likewise.
3147         * lib/utimens.c: Likewise.
3148         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
3149         since we now assume the gettimeofday module.
3150         * lib/tempname.c (__gen_tempname): Likewise.
3151         * lib/gettimeofday.h: Remove.
3152         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
3153         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
3154         Include <time.h>, for 'time()'.
3155         (localtime_buffer_addr): Also use this workaround if
3156         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
3157         to simplify the uses.  All uses changed.
3158         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
3159         that #undef is inside {}, and 'const' follows type name consistently.
3160         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
3161         (gettimeofday): Do not use the maximum possible value for
3162         tv->tv_usec, since that might break usages other than ls.c.
3163         Instead, we'll leave ls.c alone.  This undoes today's patch
3164         by Bruno.  Add a compile-time warning for 1s-clock resolution;
3165         we've never observed the problem but might as well keep the
3166         canary.
3167         * lib/nanosleep.c: Include timespec.h first, for interface check.
3168         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
3169         now assume the sys_time module.
3170         * lib/tempname.c: Likewise.
3171         * lib/timespec.h: Likewise.
3172         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
3173         needed.
3174         * lib/strftime.c: Likewise.
3175         * lib/timespec.h: Likewise.
3176         * lib/posixtm.c: Include posixtm.h first, for interface check.
3177         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
3178         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
3179         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
3180         * lib/sys_time_.h: New file.
3181         * lib/timespec.h (struct timespec): Use long int, not long.
3182         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
3183         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
3184         Remove obsolescent call to AC_HEADER_TIME.
3185         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
3186         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
3187         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
3188         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
3189         Likewise.
3190         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
3191         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
3192         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
3193         into the sys_time module.  Check for gettimeofday just once.
3194         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
3195         for gettimeofday signature to just check the signature.  Merely
3196         compile it, since linking doesn't test signature.  Improve test for
3197         whether gettimeofday.o is actually needed.
3198         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
3199         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
3200         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
3201         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3202         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
3203         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
3204         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
3205         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
3206         than worrying about sys/time.h.
3207         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3208         Don't bother worrying about TIME_WITH_SYS_TIME.
3209         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
3210         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
3211         * m4/sys_time_h.m4: New file.
3212         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
3213         Don't include sys/time.h.  Return from main rather than exiting.
3214         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
3215         all uses changed.
3216         * modules/gethrxtime (Depends-on): Add sys_time.
3217         * modules/gettime (Depends-on): Likewise.
3218         * modules/gettimeofday (Depends-on): Likewise.
3219         * modules/nanosleep (Depends-on): Likewise.
3220         * modules/settime (Depends-on): Likewise.
3221         * modules/tempname (Depends-on): Likewise.
3222         * modules/utimens (Depends-on): Likewise.
3223         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
3224         (Include:) Change back to <sys/time.h>.
3225         (Maintainer:) Add self.
3226         * modules/sys_time: New file.
3227         * modules/tempname (Depends-on): Add gettimeofday.
3228         * tests/test-gettimeofday.c: Include <sys/time.h>
3229         rather than gettimeofday.h.
3230
3231 2007-01-17  Bruno Haible  <bruno@clisp.org>
3232
3233         * gnulib-tool (func_get_license): Revert last patch. Instead, let
3234         the license default to GPL.
3235         (func_create_testdir): Don't complain if a module is LGPL and its
3236         tests module depends on GPLed modules.
3237
3238 2007-01-17  Bruno Haible  <bruno@clisp.org>
3239
3240         * lib/gettimeofday.c (gettimeofday): Add code for the case
3241         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
3242         maximum possible value for tv->tv_usec, rather than the minimum one.
3243
3244 2005-10-08  Martin Lambers  <marlam@marlam.de>
3245 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3246 2007-01-16  Bruno Haible  <bruno@clisp.org>
3247
3248         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
3249         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
3250         gl_FUNC_GETTIMEOFDAY.
3251         (Include): Add gettimeofday.h.
3252         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
3253         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
3254         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
3255         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
3256         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
3257         * lib/gettimeofday.h: New file.
3258         * lib/gettimeofday.c: Include <sys/timeb.h>.
3259         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
3260         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
3261         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
3262         fall back on time().
3263
3264         * tests/test-gettimeofday.c: New file.
3265         * modules/gettimeofday-tests: New file.
3266
3267 2007-01-16  Eric Blake  <ebb9@byu.net>
3268
3269         * modules/fnmatch (Depends-on): Depend on wchar.
3270         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
3271         * m4/fnmatch.m4: Likewise.
3272         * modules/mbchar (Makefile.am): Assume <wchar.h>.
3273         * m4/mbchar.m4: Likewise.
3274         * modules/mbswidth (Depends-on): Depend on wchar.
3275         * lib/mbswidth.c: Assume <wchar.h>.
3276         * m4/mbswidth.m4: Likewise.
3277         * modules/quotearg (Depends-on): Depend on wchar.
3278         * lib/quotearg.c: Assume <wchar.h>.
3279         * m4/quotearg.m4: Likewise.
3280         * modules/regex (Depends-on): Depend on wchar.
3281         * lib/regex_internal.h: Assume <wchar.h>.
3282         * m4/regex.m4: Likewise.
3283         * modules/stdint (Depends-on): Depend on wchar.
3284         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
3285         * m4/stdint.m4: Likewise.
3286         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
3287         * modules/strftime (Depends-on): Depend on wchar.
3288         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
3289         * modules/strtol (Depends-on): Depend on wchar.
3290         * lib/strtol.c: Assume <wchar.h>.
3291         * modules/wcwidth (Depends-on): Depend on wchar.
3292         * lib/wcwidth.h: Assume <wchar.h>.
3293         * m4/wcwidth.m4: Likewise.
3294
3295 2007-01-16  Bruno Haible  <bruno@clisp.org>
3296
3297         * modules/csharpexec-script: New, created from...
3298         * modules/csharpexec: ... this.
3299
3300 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
3301
3302         * modules/javaexec-script: New, created from...
3303         * modules/javaexec: ... this.
3304
3305 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
3306
3307         * modules/poll (Dependencies): Add sys_select.
3308
3309 2007-01-15  Jim Meyering  <jim@meyering.net>
3310
3311         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
3312         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
3313         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
3314         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
3315
3316 2007-01-15  Bruno Haible  <bruno@clisp.org>
3317
3318         * modules/striconveh: New file.
3319         * lib/striconveh.h: New file.
3320         * lib/striconveh.c: New file.
3321         * MODULES.html.sh (Internationalization functions): Add striconveh.
3322
3323         * modules/striconveh-tests: New file.
3324         * tests/test-striconveh.c: New file.
3325
3326 2007-01-15  Bruno Haible  <bruno@clisp.org>
3327
3328         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
3329         not from GNU libiconv or GNU libc.
3330
3331 2007-01-15  Bruno Haible  <bruno@clisp.org>
3332
3333         * doc/gnulib-intro.texi (Copyright): Explain the different license
3334         terms for module descriptions, autoconf macros, tests, documentation.
3335
3336 2007-01-14  Bruno Haible  <bruno@clisp.org>
3337
3338         * modules/striconv-tests: New file.
3339         * tests/test-striconv.c: New file.
3340
3341 2007-01-14  Bruno Haible  <bruno@clisp.org>
3342
3343         * modules/iconv-tests: New file.
3344         * tests/test-iconv.c: New file.
3345
3346 2007-01-14  Bruno Haible  <bruno@clisp.org>
3347
3348         * gnulib-tool (func_get_license): For test modules, use the license of
3349         the main module.
3350
3351 2007-01-14  Bruno Haible  <bruno@clisp.org>
3352
3353         * modules/iconv (Include): Clarify that <iconv.h> can only be included
3354         if iconv is found to exist.
3355
3356 2007-01-14  Bruno Haible  <bruno@clisp.org>
3357
3358         * modules/c-ctype-tests: New file.
3359         * tests/test-c-ctype.c: New file.
3360
3361 2007-01-14  Bruno Haible  <bruno@clisp.org>
3362
3363         * modules/binary-io-tests: New file.
3364         * tests/test-binary-io.sh: New file.
3365         * tests/test-binary-io.c: New file.
3366
3367 2007-01-14  Bruno Haible  <bruno@clisp.org>
3368
3369         * modules/array-oset-tests: New file.
3370         * tests/test-array_oset.c: New file.
3371
3372 2007-01-14  Bruno Haible  <bruno@clisp.org>
3373
3374         * modules/array-list-tests: New file.
3375         * tests/test-array_list.c: New file.
3376
3377 2007-01-14  Bruno Haible  <bruno@clisp.org>
3378
3379         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
3380         and make.
3381         Reported by Simon Josefsson in
3382         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
3383
3384 2007-01-14  Bruno Haible  <bruno@clisp.org>
3385
3386         * modules/allocsa-tests: New file.
3387         * tests/test-allocsa.c: New file.
3388
3389 2007-01-14  Bruno Haible  <bruno@clisp.org>
3390
3391         * modules/fchdir (Depends-on): Add absolute-header.
3392         * modules/unistd (Depends-on): Likewise.
3393
3394 2006-12-30  Bruno Haible  <bruno@clisp.org>
3395
3396         * modules/fchdir: New file.
3397         * modules/unistd (Files): Add lib/unistd_.h.
3398         (Makefile.am): Generate unistd.h from unistd_.h.
3399         * lib/fchdir.c: New file.
3400         * lib/dirent_.h: New file.
3401         * lib/unistd_.h: New file.
3402         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
3403         * m4/fchdir.m4: New file.
3404         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
3405         (gl_HEADER_UNISTD): Invoke it.
3406         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
3407         function.
3408         * lib/backupfile.c (opendir, closedir): Undefine.
3409         * lib/chown.c (open, close): Undefine.
3410         * lib/clean-temp.c (open, close): Undefine.
3411         * lib/copy-file.c (open, close): Undefine.
3412         * lib/execute.c (open, close): Undefine.
3413         * lib/fsusage.c (open, close): Undefine.
3414         * lib/gc-gnulib.c (open, close): Undefine.
3415         * lib/getcwd.c (opendir, closedir): Undefine.
3416         * lib/glob.c (opendir, closedir): Undefine.
3417         * lib/javacomp.c (open, close): Undefine.
3418         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
3419         * lib/openat-proc.c (open, close): Undefine.
3420         * lib/pagealign_alloc.c (open, close): Undefine.
3421         * lib/pipe.c (open, close): Undefine.
3422         * lib/progreloc.c (open, close): Undefine.
3423         * lib/savedir.c (opendir, closedir): Undefine.
3424         * lib/utime.c (open, close): Undefine.
3425         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
3426
3427 2007-01-10  Bruno Haible  <bruno@clisp.org>
3428
3429         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
3430
3431 2007-01-12  Eric Blake  <ebb9@byu.net>
3432
3433         Provide a robust <wchar.h>.  Further simplifications are now
3434         possible in other modules, but not included here.
3435         * modules/wchar: New module.
3436         * m4/wchar.m4: New file.
3437         * lib/wchar_.h: Likewise.
3438         * modules/mbchar (Depends-on): Depend on wchar, as the first use
3439         of the new module.
3440         * MODULES.html.sh (Extended multibyte and wide character utilities):
3441         New section.
3442
3443 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
3444
3445         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
3446         to a reasonable default for memory allocation.
3447         (xreadlink): Don't allocate a huge buffer, to work around a buggy
3448         file system that reports garbage st_size values for symlinks.
3449         Problem reported by Liyang Hu.
3450
3451 2007-01-11  Simon Josefsson  <simon@josefsson.org>
3452
3453         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
3454         Emacs .#* auto-save files).
3455
3456 2007-01-11  Bruno Haible  <bruno@clisp.org>
3457
3458         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
3459         directory.
3460
3461 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
3462
3463         Use @...@ consistently in lib/wctype_.h.
3464         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
3465         on it being set to 1 or 0.
3466         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
3467         go back to AC_SUBSTing it.
3468         * modules/wctype (Makefile.am): Undo previous change.
3469
3470 2007-01-10  Eric Blake  <ebb9@byu.net>
3471
3472         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
3473         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
3474         * modules/wctype (Makefile.am): Likewise.
3475         Reported by Chris McGuire.
3476
3477 2007-01-10  Jim Meyering  <jim@meyering.net>
3478
3479         fts.c: a small readability/maintainability improvement
3480         * lib/fts.c (fts_read): Make this code slightly more readable and
3481         maintainable by hoisting the "sp->fts_cur = p" assignments to
3482         immediately follow the statements that set P.  Derived from
3483         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
3484
3485 2007-01-10  Eric Blake  <ebb9@byu.net>
3486
3487         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
3488         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
3489         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
3490         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
3491         Reported by Chris McGuire.
3492
3493 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3494
3495         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
3496         in sed script.
3497
3498 2007-01-09  Bruno Haible  <bruno@clisp.org>
3499
3500         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
3501         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
3502         variables.
3503         (func_module): Use them.
3504
3505 2007-01-09  Bruno Haible  <bruno@clisp.org>
3506
3507         * modules/unistr/base: New file.
3508         * lib/unistr.h: New file.
3509
3510         * modules/unistr/u8-to-u16: New file.
3511         * lib/unistr/u8-to-u16.c: New file.
3512
3513         * modules/unistr/u8-to-u32: New file.
3514         * lib/unistr/u8-to-u32.c: New file.
3515
3516         * modules/unistr/u16-to-u8: New file.
3517         * lib/unistr/u16-to-u8.c: New file.
3518
3519         * modules/unistr/u16-to-u32: New file.
3520         * lib/unistr/u16-to-u32.c: New file.
3521
3522         * modules/unistr/u32-to-u8: New file.
3523         * lib/unistr/u32-to-u8.c: New file.
3524
3525         * modules/unistr/u32-to-u16: New file.
3526         * lib/unistr/u32-to-u16.c: New file.
3527
3528         * modules/unistr/u8-check: New file.
3529         * modules/unistr/u16-check: New file.
3530         * modules/unistr/u32-check: New file.
3531         * lib/unistr/u8-check.c: New file.
3532         * lib/unistr/u16-check.c: New file.
3533         * lib/unistr/u32-check.c: New file.
3534
3535         * modules/unistr/u8-chr: New file.
3536         * modules/unistr/u16-chr: New file.
3537         * modules/unistr/u32-chr: New file.
3538         * lib/unistr/u8-chr.c: New file.
3539         * lib/unistr/u16-chr.c: New file.
3540         * lib/unistr/u32-chr.c: New file.
3541
3542         * modules/unistr/u8-cmp: New file.
3543         * modules/unistr/u16-cmp: New file.
3544         * modules/unistr/u32-cmp: New file.
3545         * lib/unistr/u8-cmp.c: New file.
3546         * lib/unistr/u16-cmp.c: New file.
3547         * lib/unistr/u32-cmp.c: New file.
3548
3549         * modules/unistr/u8-cpy: New file.
3550         * modules/unistr/u16-cpy: New file.
3551         * modules/unistr/u32-cpy: New file.
3552         * lib/unistr/u8-cpy.c: New file.
3553         * lib/unistr/u16-cpy.c: New file.
3554         * lib/unistr/u32-cpy.c: New file.
3555         * lib/unistr/u-cpy.h: New file.
3556
3557         * modules/unistr/u8-cpy-alloc: New file.
3558         * modules/unistr/u16-cpy-alloc: New file.
3559         * modules/unistr/u32-cpy-alloc: New file.
3560         * lib/unistr/u8-cpy-alloc.c: New file.
3561         * lib/unistr/u16-cpy-alloc.c: New file.
3562         * lib/unistr/u32-cpy-alloc.c: New file.
3563         * lib/unistr/u-cpy-alloc.h: New file.
3564
3565         * modules/unistr/u8-endswith: New file.
3566         * modules/unistr/u16-endswith: New file.
3567         * modules/unistr/u32-endswith: New file.
3568         * lib/unistr/u8-endswith.c: New file.
3569         * lib/unistr/u16-endswith.c: New file.
3570         * lib/unistr/u32-endswith.c: New file.
3571         * lib/unistr/u-endswith.h: New file.
3572
3573         * modules/unistr/u8-mblen: New file.
3574         * modules/unistr/u16-mblen: New file.
3575         * modules/unistr/u32-mblen: New file.
3576         * lib/unistr/u8-mblen.c: New file.
3577         * lib/unistr/u16-mblen.c: New file.
3578         * lib/unistr/u32-mblen.c: New file.
3579
3580         * modules/unistr/u8-mbtouc: New file.
3581         * modules/unistr/u16-mbtouc: New file.
3582         * modules/unistr/u32-mbtouc: New file.
3583         * lib/unistr/u8-mbtouc.c: New file.
3584         * lib/unistr/u16-mbtouc.c: New file.
3585         * lib/unistr/u32-mbtouc.c: New file.
3586
3587         * modules/unistr/u8-mbtouc-safe: New file.
3588         * modules/unistr/u16-mbtouc-safe: New file.
3589         * modules/unistr/u32-mbtouc-safe: New file.
3590         * lib/unistr/u8-mbtouc-safe.c: New file.
3591         * lib/unistr/u16-mbtouc-safe.c: New file.
3592         * lib/unistr/u32-mbtouc-safe.c: New file.
3593
3594         * modules/unistr/u8-move: New file.
3595         * modules/unistr/u16-move: New file.
3596         * modules/unistr/u32-move: New file.
3597         * lib/unistr/u8-move.c: New file.
3598         * lib/unistr/u16-move.c: New file.
3599         * lib/unistr/u32-move.c: New file.
3600         * lib/unistr/u-move.h: New file.
3601
3602         * modules/unistr/u8-next: New file.
3603         * modules/unistr/u16-next: New file.
3604         * modules/unistr/u32-next: New file.
3605         * lib/unistr/u8-next.c: New file.
3606         * lib/unistr/u16-next.c: New file.
3607         * lib/unistr/u32-next.c: New file.
3608
3609         * modules/unistr/u8-prev: New file.
3610         * modules/unistr/u16-prev: New file.
3611         * modules/unistr/u32-prev: New file.
3612         * lib/unistr/u8-prev.c: New file.
3613         * lib/unistr/u16-prev.c: New file.
3614         * lib/unistr/u32-prev.c: New file.
3615
3616         * modules/unistr/u8-set: New file.
3617         * modules/unistr/u16-set: New file.
3618         * modules/unistr/u32-set: New file.
3619         * lib/unistr/u8-set.c: New file.
3620         * lib/unistr/u16-set.c: New file.
3621         * lib/unistr/u32-set.c: New file.
3622         * lib/unistr/u-set.h: New file.
3623
3624         * modules/unistr/u8-startswith: New file.
3625         * modules/unistr/u16-startswith: New file.
3626         * modules/unistr/u32-startswith: New file.
3627         * lib/unistr/u8-startswith.c: New file.
3628         * lib/unistr/u16-startswith.c: New file.
3629         * lib/unistr/u32-startswith.c: New file.
3630         * lib/unistr/u-startswith.h: New file.
3631
3632         * modules/unistr/u8-stpcpy: New file.
3633         * modules/unistr/u16-stpcpy: New file.
3634         * modules/unistr/u32-stpcpy: New file.
3635         * lib/unistr/u8-stpcpy.c: New file.
3636         * lib/unistr/u16-stpcpy.c: New file.
3637         * lib/unistr/u32-stpcpy.c: New file.
3638         * lib/unistr/u-stpcpy.h: New file.
3639
3640         * modules/unistr/u8-stpncpy: New file.
3641         * modules/unistr/u16-stpncpy: New file.
3642         * modules/unistr/u32-stpncpy: New file.
3643         * lib/unistr/u8-stpncpy.c: New file.
3644         * lib/unistr/u16-stpncpy.c: New file.
3645         * lib/unistr/u32-stpncpy.c: New file.
3646         * lib/unistr/u-stpncpy.h: New file.
3647
3648         * modules/unistr/u8-strcat: New file.
3649         * modules/unistr/u16-strcat: New file.
3650         * modules/unistr/u32-strcat: New file.
3651         * lib/unistr/u8-strcat.c: New file.
3652         * lib/unistr/u16-strcat.c: New file.
3653         * lib/unistr/u32-strcat.c: New file.
3654         * lib/unistr/u-strcat.h: New file.
3655
3656         * modules/unistr/u8-strchr: New file.
3657         * modules/unistr/u16-strchr: New file.
3658         * modules/unistr/u32-strchr: New file.
3659         * lib/unistr/u8-strchr.c: New file.
3660         * lib/unistr/u16-strchr.c: New file.
3661         * lib/unistr/u32-strchr.c: New file.
3662
3663         * modules/unistr/u8-strcmp: New file.
3664         * modules/unistr/u16-strcmp: New file.
3665         * modules/unistr/u32-strcmp: New file.
3666         * lib/unistr/u8-strcmp.c: New file.
3667         * lib/unistr/u16-strcmp.c: New file.
3668         * lib/unistr/u32-strcmp.c: New file.
3669
3670         * modules/unistr/u8-strcpy: New file.
3671         * modules/unistr/u16-strcpy: New file.
3672         * modules/unistr/u32-strcpy: New file.
3673         * lib/unistr/u8-strcpy.c: New file.
3674         * lib/unistr/u16-strcpy.c: New file.
3675         * lib/unistr/u32-strcpy.c: New file.
3676         * lib/unistr/u-strcpy.h: New file.
3677
3678         * modules/unistr/u8-strcspn: New file.
3679         * modules/unistr/u16-strcspn: New file.
3680         * modules/unistr/u32-strcspn: New file.
3681         * lib/unistr/u8-strcspn.c: New file.
3682         * lib/unistr/u16-strcspn.c: New file.
3683         * lib/unistr/u32-strcspn.c: New file.
3684         * lib/unistr/u-strcspn.h: New file.
3685
3686         * modules/unistr/u8-strdup: New file.
3687         * modules/unistr/u16-strdup: New file.
3688         * modules/unistr/u32-strdup: New file.
3689         * lib/unistr/u8-strdup.c: New file.
3690         * lib/unistr/u16-strdup.c: New file.
3691         * lib/unistr/u32-strdup.c: New file.
3692         * lib/unistr/u-strdup.h: New file.
3693
3694         * modules/unistr/u8-strlen: New file.
3695         * modules/unistr/u16-strlen: New file.
3696         * modules/unistr/u32-strlen: New file.
3697         * lib/unistr/u8-strlen.c: New file.
3698         * lib/unistr/u16-strlen.c: New file.
3699         * lib/unistr/u32-strlen.c: New file.
3700         * lib/unistr/u-strlen.h: New file.
3701
3702         * modules/unistr/u8-strmblen: New file.
3703         * modules/unistr/u16-strmblen: New file.
3704         * modules/unistr/u32-strmblen: New file.
3705         * lib/unistr/u8-strmblen.c: New file.
3706         * lib/unistr/u16-strmblen.c: New file.
3707         * lib/unistr/u32-strmblen.c: New file.
3708
3709         * modules/unistr/u8-strmbtouc: New file.
3710         * modules/unistr/u16-strmbtouc: New file.
3711         * modules/unistr/u32-strmbtouc: New file.
3712         * lib/unistr/u8-strmbtouc.c: New file.
3713         * lib/unistr/u16-strmbtouc.c: New file.
3714         * lib/unistr/u32-strmbtouc.c: New file.
3715
3716         * modules/unistr/u8-strncat: New file.
3717         * modules/unistr/u16-strncat: New file.
3718         * modules/unistr/u32-strncat: New file.
3719         * lib/unistr/u8-strncat.c: New file.
3720         * lib/unistr/u16-strncat.c: New file.
3721         * lib/unistr/u32-strncat.c: New file.
3722         * lib/unistr/u-strncat.h: New file.
3723
3724         * modules/unistr/u8-strncmp: New file.
3725         * modules/unistr/u16-strncmp: New file.
3726         * modules/unistr/u32-strncmp: New file.
3727         * lib/unistr/u8-strncmp.c: New file.
3728         * lib/unistr/u16-strncmp.c: New file.
3729         * lib/unistr/u32-strncmp.c: New file.
3730
3731         * modules/unistr/u8-strncpy: New file.
3732         * modules/unistr/u16-strncpy: New file.
3733         * modules/unistr/u32-strncpy: New file.
3734         * lib/unistr/u8-strncpy.c: New file.
3735         * lib/unistr/u16-strncpy.c: New file.
3736         * lib/unistr/u32-strncpy.c: New file.
3737         * lib/unistr/u-strncpy.h: New file.
3738
3739         * modules/unistr/u8-strnlen: New file.
3740         * modules/unistr/u16-strnlen: New file.
3741         * modules/unistr/u32-strnlen: New file.
3742         * lib/unistr/u8-strnlen.c: New file.
3743         * lib/unistr/u16-strnlen.c: New file.
3744         * lib/unistr/u32-strnlen.c: New file.
3745         * lib/unistr/u-strnlen.h: New file.
3746
3747         * modules/unistr/u8-strpbrk: New file.
3748         * modules/unistr/u16-strpbrk: New file.
3749         * modules/unistr/u32-strpbrk: New file.
3750         * lib/unistr/u8-strpbrk.c: New file.
3751         * lib/unistr/u16-strpbrk.c: New file.
3752         * lib/unistr/u32-strpbrk.c: New file.
3753         * lib/unistr/u-strpbrk.h: New file.
3754
3755         * modules/unistr/u8-strrchr: New file.
3756         * modules/unistr/u16-strrchr: New file.
3757         * modules/unistr/u32-strrchr: New file.
3758         * lib/unistr/u8-strrchr.c: New file.
3759         * lib/unistr/u16-strrchr.c: New file.
3760         * lib/unistr/u32-strrchr.c: New file.
3761
3762         * modules/unistr/u8-strspn: New file.
3763         * modules/unistr/u16-strspn: New file.
3764         * modules/unistr/u32-strspn: New file.
3765         * lib/unistr/u8-strspn.c: New file.
3766         * lib/unistr/u16-strspn.c: New file.
3767         * lib/unistr/u32-strspn.c: New file.
3768         * lib/unistr/u-strspn.h: New file.
3769
3770         * modules/unistr/u8-strstr: New file.
3771         * modules/unistr/u16-strstr: New file.
3772         * modules/unistr/u32-strstr: New file.
3773         * lib/unistr/u8-strstr.c: New file.
3774         * lib/unistr/u16-strstr.c: New file.
3775         * lib/unistr/u32-strstr.c: New file.
3776         * lib/unistr/u-strstr.h: New file.
3777
3778         * modules/unistr/u8-strtok: New file.
3779         * modules/unistr/u16-strtok: New file.
3780         * modules/unistr/u32-strtok: New file.
3781         * lib/unistr/u8-strtok.c: New file.
3782         * lib/unistr/u16-strtok.c: New file.
3783         * lib/unistr/u32-strtok.c: New file.
3784         * lib/unistr/u-strtok.h: New file.
3785
3786         * modules/unistr/u8-uctomb: New file.
3787         * modules/unistr/u16-uctomb: New file.
3788         * modules/unistr/u32-uctomb: New file.
3789         * lib/unistr/u8-uctomb.c: New file.
3790         * lib/unistr/u16-uctomb.c: New file.
3791         * lib/unistr/u32-uctomb.c: New file.
3792
3793         * MODULES.html.sh (Unicode string functions): Add the new modules.
3794
3795 2007-01-08  Bruno Haible  <bruno@clisp.org>
3796
3797         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
3798         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
3799         subdirectories.
3800
3801 2007-01-08  Karl Berry  <karl@gnu.org>
3802
3803         * doc/error.texi: mention that main() fns must set program_name
3804         when progname is used.
3805
3806 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
3807
3808         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
3809         WCTYPE_H is empty, for the benefit of builds from non-distclean
3810         directories.  Problem reported by Eric Blake in
3811         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
3812
3813 2007-01-08  Bruno Haible  <bruno@clisp.org>
3814
3815         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
3816         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
3817         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
3818         PROVIDE_CANONICALIZE_FILENAME_MODE.
3819         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
3820
3821 2007-01-08  Bruno Haible  <bruno@clisp.org>
3822
3823         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
3824         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
3825         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
3826         * lib/fts.c: Likewise.
3827         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
3828
3829 2006-12-25  Bruno Haible  <bruno@clisp.org>
3830
3831         * modules/utf8-ucs4-safe: New file.
3832         * lib/utf8-ucs4-safe.h: New file.
3833         * lib/unistr/utf8-ucs4-safe.c: New file.
3834
3835         * modules/utf16-ucs4-safe: New file.
3836         * lib/utf16-ucs4-safe.h: New file.
3837         * lib/unistr/utf16-ucs4-safe.c: New file.
3838
3839         * MODULES.html.sh (Unicode string functions): Add the new modules.
3840
3841 2007-01-08  Bruno Haible  <bruno@clisp.org>
3842
3843         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
3844         (Depends-on): Add unitypes.
3845         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3846         (u8_mbtouc_aux): Move out to separate file.
3847         (u8_mbtouc): Use ucs4_t, uint8_t types.
3848         * lib/unistr/utf8-ucs4.c: New file.
3849
3850         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
3851         (Depends-on): Add unitypes.
3852         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
3853         (u16_mbtouc_aux): Move out to separate file.
3854         (u16_mbtouc): Use ucs4_t, uint16_t types.
3855         * lib/unistr/utf16-ucs4.c: New file.
3856
3857         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
3858         (Depends-on): Add unitypes.
3859         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
3860         (u8_uctomb_aux): Move out to separate file.
3861         (u8_uctomb): Use ucs4_t, uint8_t types.
3862         * lib/unistr/ucs4-utf8.c: New file.
3863
3864         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
3865         (Depends-on): Add unitypes.
3866         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
3867         (u16_uctomb_aux): Move out to separate file.
3868         (u16_uctomb): Use ucs4_t, uint16_t types.
3869         * lib/unistr/ucs4-utf16.c: New file.
3870
3871 2006-12-25  Bruno Haible  <bruno@clisp.org>
3872
3873         * modules/unitypes: New file.
3874         * lib/unitypes.h: New file.
3875         * MODULES.html.sh (func_all_modules): New section "Unicode string
3876         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
3877         this section. Add unitypes.
3878
3879 2007-01-08  Bruno Haible  <bruno@clisp.org>
3880
3881         Avoid variable names that conflict with those from libtool.
3882         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
3883         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
3884         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
3885         library_names_spec to acl_library_names_spec, hardcode_* to
3886         acl_hardcode_*.
3887         Reported by Ralf Wildenhues.
3888
3889 2007-01-08  Bruno Haible  <bruno@clisp.org>
3890
3891         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
3892         definition.
3893         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
3894         definition.
3895         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
3896         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
3897         definition.
3898         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
3899         definition.
3900         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
3901         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
3902         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
3903         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
3904         definition.
3905         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
3906         definition.
3907         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
3908         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
3909         GC_USE_<algorithm>.
3910         * lib/gc-libgcrypt.c: Likewise.
3911         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
3912         * modules/gc-arctwo (configure.ac): Likewise.
3913         * modules/gc-des (configure.ac): Likewise.
3914         * modules/gc-hmac-md5 (configure.ac): Likewise.
3915         * modules/gc-hmac-sha1 (configure.ac): Likewise.
3916         * modules/gc-md2 (configure.ac): Likewise.
3917         * modules/gc-md4 (configure.ac): Likewise.
3918         * modules/gc-md5 (configure.ac): Likewise.
3919         * modules/gc-random (configure.ac): Likewise.
3920         * modules/gc-rijndael (configure.ac): Likewise.
3921         * modules/gc-sha1 (configure.ac): Likewise.
3922
3923 2007-01-08  Bruno Haible  <bruno@clisp.org>
3924
3925         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
3926         macro definition.
3927         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
3928         definition.
3929         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
3930         definition.
3931         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
3932         * modules/fcntl-safer (configure.ac): Likewise.
3933         * modules/fopen-safer (configure.ac): Likewise.
3934         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
3935         GNULIB_FWRITEERROR macro definition.
3936
3937 2007-01-08  Bruno Haible  <bruno@clisp.org>
3938
3939         * m4/gnulib-common.m4: New file.
3940         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
3941         (func_get_filelist): Add m4/gnulib-common.m4.
3942
3943 2007-01-08  Bruno Haible  <bruno@clisp.org>
3944
3945         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
3946         command.
3947
3948 2007-01-08  Jim Meyering  <jim@meyering.net>
3949
3950         Use a more robust test for a "can't happen" condition.
3951         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
3952         narrowed the st_size value.  Presuming the "can't happen" condition
3953         is true, that narrowing could conceivably convert an invalid st_size
3954         value into a valid one.  Instead, use a change based on Matthew
3955         Woehlke's original patch.
3956
3957         Slight readability improvement: use an assert-like macro
3958         in place of literal "abort ()" uses.
3959         * lib/fts.c (fts_assert): Define.
3960         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
3961         Use this macro instead of a bare 'abort'.
3962
3963 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
3964
3965         Don't worry about using IRIX 5.3's wctype.h broken definitions;
3966         simply work around them.
3967         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
3968         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
3969         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
3970         declaring.
3971         Don't bother to define as macros, since the standard doesn't require it.
3972         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
3973         longer worry about IRIX 5.3.
3974         (HAVE_WCTYPE_CTMP_BUG): Remove.
3975
3976 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
3977
3978         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
3979         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
3980         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
3981         Problems reported by Georg Schwarz for IRIX 5.3.
3982
3983         * gnulib-tool (autoconf_minversion): Take the maximum version number
3984         found, not the minimum.  Problem reported by James Youngman.
3985
3986 2007-01-03  Karl Berry  <karl@gnu.org>
3987
3988         * doc/error.texi: new file, explaining interaction with progname.
3989         * doc/gnulib.texi: include it.  Update copyright.
3990
3991 2007-01-03  Simon Josefsson  <simon@josefsson.org>
3992
3993         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
3994         AC_CANONICAL_HOST, to improve autobuild outputs.
3995
3996 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
3997             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
3998
3999         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
4000         sockets, server sockets, and other file descriptors.  Count errors
4001         to compute the return value.  Reorder the code a bit to be easier
4002         to follow.  Don't set event bits that were not requested (except
4003         POLLERR and POLLHUP).
4004
4005 2007-01-01  Bruno Haible  <bruno@clisp.org>
4006
4007         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
4008
4009 2007-01-03  Jim Meyering  <jim@meyering.net>
4010
4011         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
4012
4013 2007-01-02  Bruno Haible  <bruno@clisp.org>
4014
4015         * modules/settime (Include): Require timespec.h.
4016         * modules/nanosleep (Include): Likewise.
4017
4018 2007-01-01  Bruno Haible  <bruno@clisp.org>
4019
4020         * gnulib-tool (func_emit_copyright_notice): Bump year.
4021         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
4022
4023 2007-01-01  Bruno Haible  <bruno@clisp.org>
4024
4025         Improve support for OpenBSD.
4026         * build-aux/config.rpath (libname_spec): Export.
4027         (library_names_spec): New variable. Export.
4028         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
4029         library_names_spec from the config.rpath output. Locate shared library
4030         through the name pattern in library_names_spec.
4031
4032 2007-01-01  Eric Blake  <ebb9@byu.net>
4033
4034         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
4035
4036 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
4037
4038         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
4039         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
4040         assume the C locale, and avoid an "eval" that could cause trouble.
4041         Problem with SORT reported by Bob Proulx.
4042
4043         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
4044         Define.  Trivial patch from Henning Nielsen Lund, originally
4045         sent to bug-grep@gnu.org today.
4046
4047 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
4048
4049         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
4050         struct stat.  Problem reported by Henning Nielsen Lund.
4051         * lib/acl.c: Include acl.h first, to check interface.  Don't
4052         bother to include sys/types.h and sys/stat.h again.
4053
4054 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
4055
4056         Import the following change from libc; problem reported by
4057         Sven Verdoolaege.
4058
4059         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
4060
4061         [BZ #1373]
4062         * lib/argp.h: Remove __NTH for __argp_usage inline function.
4063
4064 2006-12-28  Jim Meyering  <jim@meyering.net>
4065
4066         * build-aux/announce-gen: Do not assume that the package
4067         builds any of tar.gz, tar.bz2, and .xdelta files.
4068         Suggestion from Simon Josefsson.
4069
4070 2006-12-28  Simon Josefsson  <simon@josefsson.org>
4071
4072         * modules/announce-gen: New file.
4073
4074 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
4075
4076         * lib/mbchar.h: Just include <wctype.h>; the wctype module
4077         handles its gotchas now.
4078         * lib/mbswidth.c: Likewise.
4079         * lib/wcwidth.h: Likewise.
4080         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
4081         and iswcntrl; the wctype module does this stuff now.
4082         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4083         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
4084         * modules/mbchar (Depends-on): Add wctype.
4085         * modules/mbswidth (Depends-on): Likewise.
4086         * modules/wcwidth (Depends-on): Likewise.
4087
4088 2006-12-27  Eric Blake  <ebb9@byu.net>
4089
4090         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
4091         module uses more than what <wctype.h> is required to provide.
4092
4093 2006-12-26  Eric Blake  <ebb9@byu.net>
4094
4095         * gnulib-tool (sed_extract_prog): Avoid space-tab.
4096
4097 2006-12-26  Eric Blake  <ebb9@byu.net>
4098
4099         * modules/absolute-header: New module.
4100         * modules/fcntl (Depends-on): Depend on it.
4101         * modules/inttypes (Depends-on): Likewise.
4102         * modules/stdint (Depends-on): Likewise.
4103         * modules/sys_stat (Depends-on): Likewise.
4104         * modules/wctype (Depends-on): Likewise.
4105         * MODULES.html.sh (Support for building libraries and
4106         executables): Document it.
4107
4108 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
4109
4110         * gnulib-tool (SED): Remove, undoing previous change.
4111         The problem was that it broke coreutils on Solaris, because
4112         "sed --posix" leaked into a makefile.
4113         (sed): New alias, if 'alias' and GNU sed.
4114
4115 2006-12-24  Jim Meyering  <jim@meyering.net>
4116
4117         Work around an fchownat bug in glibc-2.4:
4118         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
4119         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
4120         in spite of the -P option.
4121         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
4122         New macros.
4123         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
4124         * modules/openat (Files): Add lib/fchownat.c.
4125         * lib/openat.c (fchownat): Don't define here.  Move to...
4126         * lib/fchownat.c: ...this new file.
4127
4128 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
4129
4130         Fix bug reported by Bruno Haible in
4131         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
4132         where quotearg.c didn't compile on Mac OS X 10.2 because it
4133         lacks <wchar.h> and wint_t.
4134         * lib/wctype_.h (__wctype_wint_t): New type.
4135         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
4136         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
4137         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
4138         Arg is now of type __wctype_wint_t, not wint_t.
4139         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
4140         substitute HAVE_WINT_T.
4141         * modules/wctype (Files): Add m4/wint_t.m4.
4142         (wctype.h): Substitute HAVE_WINT_T.
4143
4144 2006-12-23  Bruno Haible  <bruno@clisp.org>
4145
4146         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
4147
4148 2006-12-23  Bruno Haible  <bruno@clisp.org>
4149
4150         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
4151         S_ISLNK.
4152         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
4153         mingw.
4154
4155 2006-12-22  Bruno Haible  <bruno@clisp.org>
4156
4157         * lib/copy-file.c: Include acl.h.
4158         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
4159         Close the file descriptors only after being done with copy_acl.
4160         * modules/copy-file (Depends-on): Add acl.
4161
4162 2006-12-22  Bruno Haible  <bruno@clisp.org>
4163
4164         * gnulib-tool (SED): New variable.
4165         Use $SED instead of sed everywhere.
4166
4167 2006-12-22  Bruno Haible  <bruno@clisp.org>
4168
4169         * modules/no-c++: New file.
4170         * m4/no-c++.m4: New file.
4171         * MODULES.html.sh (Support for building libraries and executables):
4172         Add no-c++.
4173
4174 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
4175
4176         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4177         Include <limits.h>, and use its INT_MAX to rewrite the
4178         j loop so that it does not overflow 'int'.  Problem reported by
4179         Ralf Wildenhues in
4180         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
4181         Play it safe by shifting left by 1 rather than multiplying by 2,
4182         as GCC is less likely to optimize this away when the value
4183         is signed (when it assumes overflow leads to undefined behavior).
4184         Also, don't assume time_t uses two's complement.
4185
4186 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
4187
4188         * MODULES.html.sh: New module wctype.
4189         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
4190         * lib/fnmatch.c: Don't bother to include <wchar.h> before
4191         <wctype.h>, since the new wctype module should fix this.
4192         * lib/quotearg.c: Include <wctype.h> unconditionally, since
4193         the wctype module should arrange for it.
4194         * lib/regex_internal.h: Likewise.
4195         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
4196         since the wctype module should handle this now.
4197         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
4198         * modules/fnmatch (Depends-on): Add wctype.
4199         * modules/quotearg (Depends-on): Likewise.
4200         * modules/regex (Depends-on): Likewise.
4201
4202 2006-12-19  Bruno Haible  <bruno@clisp.org>
4203
4204         * lib/strdup.h [C++]: Wrap definitions in extern "C".
4205         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
4206
4207 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4208
4209         * modules/savewd (Depends-on): Fix dependency on fcntl.
4210
4211 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4212
4213         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
4214         conforms to C99, rather than relying on the user's environment
4215         setting of STDINT_H.
4216
4217 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
4218         and Eric Blake  <ebb9@byu.net>
4219
4220         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
4221         This is more consistent with the other defines here.
4222         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
4223         Port to z/OS.  Problem reported by Paul Gilmartin.
4224         Change local vars to use gl_ prefix rather than ac_.
4225         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
4226         with other defines.
4227         * modules/double-slash-root: New module.
4228         * modules/dirname (Files): Remove m4/double-slash-root.m4.
4229         (Depends-on): Add double-slash-root.
4230         * MODULES.html.sh (File system functions): Mention new module.
4231
4232 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
4233
4234         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
4235         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
4236         This is for the benefit of gzip, which doesn't do i18n.
4237
4238 2006-12-12  Jim Meyering  <jim@meyering.net>
4239
4240         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
4241         Reported by Andreas Schwab <schwab@suse.de>.
4242
4243 2006-12-12  Bruno Haible  <bruno@clisp.org>
4244
4245         Merge these changes.
4246         2006-09-05  Bruno Haible  <bruno@clisp.org>
4247         * lib/iconvme.c (iconv_string): No need to save and restore errno when
4248         iconv_alloc succeeded.
4249         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
4250         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
4251         test for " && dest " at the end - dest is always != NULL there. Call
4252         iconv with 4xNULL arguments initially, to reset the state. Call iconv
4253         with 2xNULL arguments, also to flush the state storage. Handle the
4254         IRIX iconv behaviour. Realloc the final result, to throw away unused
4255         memory.
4256
4257 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
4258
4259         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
4260         and fchmodat unconditionally, since glibc 2.4 has them.
4261         Problem reported by Arkadiusz Miskiewicz.
4262
4263 2006-12-10  Bruno Haible  <bruno@clisp.org>
4264
4265         * gnulib-tool (func_import): Show the include files only for those
4266         modules that are copied and specified.
4267         Reported by Karl Berry.
4268
4269 2006-12-08  Jim Meyering  <jim@meyering.net>
4270
4271         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
4272         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
4273
4274         * build-aux/announce-gen: Add two new options, both optional:
4275         --bootstrap-tools=TOOL_LIST
4276               a comma-separated list of tools, e.g.,
4277               autoconf,automake,bison,gnulib
4278         --gnulib-snapshot-date=DATE
4279               if gnulib is in the bootstrap tool list,
4280               then report this as the snapshot date.
4281               If not specified, use the current date/time.
4282               If you specify a date here, be sure it's UTC.
4283
4284 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4285
4286         * tests/test-argp-2.sh: Fix test to match actual output.
4287         (func_compare): Fix sed script to be portable.
4288
4289 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
4290
4291         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
4292         workaround for this case.  It is not autoconfigured now; offhand
4293         it's hard to see how to autoconfigure it.
4294
4295 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
4296
4297         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
4298         a directory that is about to be chowned.  Such a directory's
4299         initial file permissions should permit the owner only and this
4300         should not be changed until after the chown, since the group and
4301         other bits would be incorrect if they granted permission before
4302         the chown.
4303
4304         Fix porting problem for iswctype reported by Georg Schwarz in:
4305         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
4306         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
4307         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
4308         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
4309         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
4310
4311 2006-12-03  Jim Meyering  <jim@meyering.net>
4312
4313         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
4314         p->fts_statp may not yet be defined.
4315         (fts_read): Instead, set it in the caller, once p->fts_statp is
4316         sure to be defined, and corresponds to a top-level directory.
4317         This bug made du -x fail.  Here's the coreutils test case:
4318         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
4319         Reported by Mike Frysinger.
4320
4321 2006-12-01  Jim Meyering  <jim@meyering.net>
4322
4323         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
4324         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
4325         Reported by Simon Josefsson.
4326
4327 2006-11-30  Jim Meyering  <jim@meyering.net>
4328
4329         * m4/warning.m4: Use the all-permissive copyright notice
4330         recommended by RMS (rather than LGPL).
4331         * m4/vararrays.m4: Likewise.
4332         * m4/flexmember.m4: Likewise.
4333
4334 2006-11-29  Bruno Haible  <bruno@clisp.org>
4335
4336         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4337         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
4338         using +=.
4339         Reported by Simon Josefsson <simon@josefsson.org>.
4340
4341 2006-11-28  James Youngman <jay@gnu.org>
4342
4343         * README: Advise users that they might find the bug-gnulib@gnu.org
4344         and autotools-announce@gnu.org mailing lists useful.
4345
4346 2006-11-28  Bruno Haible  <bruno@clisp.org>
4347
4348         * m4/ptrdiff_max.m4: Remove file.
4349
4350 2006-11-21  Bruno Haible  <bruno@clisp.org>
4351
4352         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
4353         _AC_COMPUTE_INT.
4354         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4355         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
4356         _AC_COMPUTE_INT.
4357         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4358         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
4359         _AC_COMPUTE_INT.
4360         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4361
4362 2006-11-28  Jim Meyering  <jim@meyering.net>
4363
4364         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
4365         warning from "gcc -Wshadow" about shadowing the builtin.
4366
4367 2006-11-27  Bruno Haible  <bruno@clisp.org>
4368
4369         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
4370         _AC_COMPUTE_INT.
4371         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
4372
4373 2006-11-27  Bruno Haible  <bruno@clisp.org>
4374             Paul Eggert  <eggert@cs.ucla.edu>
4375
4376         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
4377
4378 2006-11-26  Bruno Haible  <bruno@clisp.org>
4379
4380         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4381         noinst_LTLIBRARIES.
4382
4383 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
4384             Bruno Haible  <bruno@clisp.org>
4385
4386         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
4387         if compiling with "gcc -ansi".
4388
4389 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
4390
4391         Fix some incompatibilities with gcc -ansi -pedantic.
4392         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
4393         if compiling pedantically with GCC, unless it's C99 or later.
4394         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
4395         it mishandles gcc -ansi -pedantic as well.
4396         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
4397         if gcc -pedantic.
4398         * lib/regexec.c (check_node_accept_bytes): Don't use auto
4399         initializers for struct if -pedantic, unless it's C99 or later.
4400
4401 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
4402
4403         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
4404         Don't close an fd more than once. Identical atimes indicate
4405         success, not failure.
4406
4407 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
4408
4409         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
4410
4411 2006-11-23  Jim Meyering  <jim@meyering.net>
4412
4413         * build-aux/announce-gen: New file.  From coreutils.
4414
4415 2006-11-22  Jim Meyering  <jim@meyering.net>
4416
4417         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
4418         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
4419         (fts_read): Use a temporary to narrow the overused st_size member
4420         before using it in a switch statement.  Reported by Matthew Woehlke.
4421
4422         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
4423         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
4424
4425 2006-11-20  Bruno Haible  <bruno@clisp.org>
4426
4427         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
4428         changequote instead of pairs of brackets.
4429         Reported by Andreas Schwab <schwab@suse.de>.
4430
4431 2006-11-21  Jim Meyering  <jim@meyering.net>
4432
4433         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
4434         so as to remain compatible with older compilers.
4435         Patch from Michael Deutschmann.
4436
4437 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4438
4439         * MODULES.html.sh (File system functions): Add openat.
4440
4441         * lib/openat.h (rpl_fstatat): New macro, if
4442         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
4443         (fstatat): Define to rpl_fstatat under the same conditions,
4444         unless COMPILING_FSTATAT.
4445         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
4446         seems to have the bug.
4447         * lib/fstatat.c: New file.
4448         * modules/openat (Files): Add it.
4449
4450 2006-11-20  Bruno Haible  <bruno@clisp.org>
4451
4452         * Makefile: New file.
4453
4454 2006-11-20  Jim Meyering  <jim@meyering.net>
4455
4456         The beginnings of syntax-related checks for gnulib.
4457         * lib/Makefile: New file.
4458         * lib/t-idcache: New script.  Ensure that the two halves of
4459         idcache.c stay in sync.
4460
4461         * lib/idcache.c: Adjust comments in user- and group- portions to
4462         be more accurate, and to be consistent with one another.
4463
4464 2006-11-20  Jim Meyering  <jim@meyering.net>
4465
4466         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
4467         continue using the flexible array member (thus, this module performs
4468         half as many malloc calls), with the addition that...
4469         (getgroup, getuser): Consistently record a non-match via an empty
4470         "name" string, and map an empty string match to a NULL return value.
4471         * modules/idcache (Depends-on): Re-add flexmember.
4472
4473         * lib/idcache.c (getuser): Remove all uses of the register keyword.
4474         (getuidbyname, getgroup, getgidbyname): Likewise.
4475
4476         Use cleaner syntax: NULL rather than 0.
4477         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
4478
4479 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
4480
4481         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
4482         It mishandled the case where the group was missing.
4483         Problem reported by Greg Schafer.
4484         * modules/idcache: Likewise.
4485
4486 2006-11-18  Jim Meyering  <jim@meyering.net>
4487
4488         * check-module (%exempt_header): Add exception for some
4489         conditionally-included headers.
4490
4491         * modules/i-ring (Depends-on): Add verify.
4492         (License): Change to LGPL.
4493
4494 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
4495
4496         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
4497         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
4498         and inttostr.h.  Use snprintf rather than uinttostr, so that
4499         LGPLed code doesn't depend on GPLed.
4500
4501 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
4502
4503         * modules/inline (License): Change from GPL to LGPL.
4504
4505 2006-11-17  Jim Meyering  <jim@meyering.net>
4506
4507         * modules/d-type (License): Switch to LGPL.
4508
4509 2006-11-15  Bruno Haible  <bruno@clisp.org>
4510
4511         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
4512
4513 2006-11-15  Eric Blake  <ebb9@byu.net>
4514
4515         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
4516         the module dependency.
4517
4518 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4519             Bruno Haible  <bruno@clisp.org>
4520
4521         * gnulib-tool (func_create_testdir): Add license consistency check.
4522
4523 2006-11-15  Eric Blake  <ebb9@byu.net>
4524
4525         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
4526         random "(cached)" in configure output.
4527
4528 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4529
4530         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
4531         test for conforming inttypes.h is both announced and cached.
4532
4533         * MODULES.html.sh (seen_modules, seen_files): New variables.
4534         (func_module): Rewrite to use a few less gnulib-tool and sed
4535         invocations.  Avoid a couple of quadratic algorithms for ...
4536         (missed_modules, missed_files): ... these, with ...
4537         (func_append, func_tmpdir): ... these new functions, from
4538         gnulib-tool.  Analogously, install traps for cleanup.
4539
4540         * tests/test-gc.c (main): Remove unused variables.
4541         * tests/test-read-file.c: Include stdlib.h, for 'free'.
4542
4543 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
4544
4545         * modules/inttostr (License): Change to LGPL.
4546
4547 2006-11-14  Eric Blake  <ebb9@byu.net>
4548
4549         * modules/tempname (License): Change to LGPL.
4550
4551 2006-11-14  Eric Blake  <ebb9@byu.net>
4552
4553         * doc/functions.texi (Function Portability): *printf functions on
4554         Cygwin now understand all POSIX size specifiers.
4555
4556 2006-11-14  Bruno Haible  <bruno@clisp.org>
4557
4558         * modules/c-ctype (License): Change to LGPL.
4559
4560 2006-11-12  Bruno Haible  <bruno@clisp.org>
4561
4562         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
4563         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
4564         for GNOME libraries, for which the include files are installed in
4565         subdirectories of $prefix/include.
4566
4567 2006-11-12  Bruno Haible  <bruno@clisp.org>
4568
4569         * m4/lib-link.m4: Require at least autoconf-2.54.
4570         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
4571         name to underscores for the --with option.
4572
4573 2006-11-13  Bruno Haible  <bruno@clisp.org>
4574
4575         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
4576         the tests directory.
4577         Reported by Ralf Wildenhues.
4578
4579 2006-11-13  Bruno Haible  <bruno@clisp.org>
4580
4581         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
4582         (func_emit_initmacro_end): Undo the override here.
4583         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
4584         Works around the famous automake error in coreutils.
4585
4586 2006-11-13  Eric Blake  <ebb9@byu.net>
4587
4588         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
4589         element, not its node.
4590
4591 2006-11-12  Bruno Haible  <bruno@clisp.org>
4592
4593         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
4594         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
4595
4596 2006-11-12  Bruno Haible  <bruno@clisp.org>
4597
4598         * gnulib-tool: New option --local-symlink.
4599         (func_usage): Document it.
4600         (lsymbolic): New variable.
4601         (func_import, func_create_testdir): If --symlink was not specified,
4602         test whether --local-symlink was specified and the file comes from
4603         the local_gnulib_dir.
4604
4605 2006-11-12  Bruno Haible  <bruno@clisp.org>
4606
4607         * gnulib-tool (func_ln): New function.
4608         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
4609
4610 2006-11-12  Bruno Haible  <bruno@clisp.org>
4611
4612         Finish support for source files in subdirectories.
4613         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
4614         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
4615         AUTOMAKE_OPTIONS.
4616         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
4617
4618 2006-11-12  Bruno Haible  <bruno@clisp.org>
4619
4620         * gnulib-tool (func_get_automake_snippet): Synthesize also an
4621         EXTRA_lib_SOURCES augmentation.
4622         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
4623
4624 2006-11-12  Jim Meyering  <jim@meyering.net>
4625
4626         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
4627         file descriptors.  This also averts a failure on systems with
4628         native openat support when a traversed directory lacks "x" access.
4629         * lib/fts_.h: Include "i-ring.h"
4630         (struct FTS) [fts_fd_ring]: New member.
4631         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
4632         (FCHDIR): Add parentheses.
4633         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
4634         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
4635         When descending, rather than simply closing the previous
4636         fts_cwd_fd value, push that file descriptor onto the ring.
4637         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
4638         (fts_open): Initialize the new fd_ring member.
4639         (fts_close): Clear the ring.
4640         (fts_safe_changedir): When possible, use our new fd_ring to skip
4641         the diropen and fstat and dev/ino comparison that would normally
4642         accompany a virtual `chdir ("..")'.
4643
4644         * modules/fts (Depends-on): Add i-ring.
4645         * modules/i-ring: New module.
4646         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
4647         * m4/i-ring.m4: New file.
4648
4649 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4650
4651         * gnulib-tool (func_create_testdir): Fix replacement of
4652         `build-aux' in configure.ac.  Run autotools in gltests
4653         subdirectory.
4654         (func_create_testdir, func_create_megatestdir, test): There is
4655         no need for '--force' in most autotool invocations in a new
4656         tree.  Actually fail the whole test if any of the tools, or the
4657         configure or make stages fail.
4658
4659         Sync from Automake.
4660         * build-aux/gnupload: Revert last change.  Add pointer to upload
4661         instructions of the GNU Maintenance Instructions.
4662         Suggestion by Karl Berry.
4663
4664 2006-11-10  Jim Meyering  <jim@meyering.net>
4665
4666         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
4667
4668 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4669
4670         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
4671         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
4672         (bind_textdomain_codeset) [! ENABLE_NLS]:
4673         Evaluate all the arguments.  That way, callers get compatible behavior
4674         if the arguments have side effects.  Also, it avoids some GCC
4675         diagnostics in some cases; Joel E. Denny reported problems when Bison
4676         was configured with --enable-gcc-warnigs.
4677
4678 2006-11-10  Jim Meyering  <jim@meyering.net>
4679
4680         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
4681         relevant options in CFLAGS (like -O, -fno-inline) are taken into
4682         account.
4683
4684 2006-11-10  Jim Meyering  <jim@meyering.net>
4685
4686         * modules/inline: New file/module.
4687         * modules/xalloc (Files): Remove m4/inline.m4.
4688         (Depends-on): Add inline, instead.
4689         * modules/oset: Likewise.
4690         * modules/list: Likewise.
4691
4692 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
4693
4694         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
4695         Problem reported by Matthew Woehlke.
4696
4697 2006-11-09  Bruno Haible  <bruno@clisp.org>
4698
4699         * lib/tempname.c (gen_tempname): Remove variant that invokes
4700         __gen_tempname.
4701         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
4702         __gen_tempname.
4703
4704 2006-11-08  Bruno Haible  <bruno@clisp.org>
4705
4706         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
4707         to 'yes' instead of 'cross-compiling'.
4708
4709 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
4710
4711         * lib/quotearg.h (quotearg_free): New decl.
4712         * lib/quotearg.c (quotearg_free): New function.
4713         (slot0, nslots, slotvec0, slotvec):
4714         Now file-scope so that quotearg_free can get at them.
4715
4716 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4717
4718         Sync from Automake.
4719         * build-aux/gnupload: Add missing 'gnu' to example URL.
4720         Report by Karl Berry.
4721
4722 2006-11-08  Bruno Haible  <bruno@clisp.org>
4723
4724         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
4725         Suggested by Paul Eggert.
4726
4727 2006-11-08  Jim Meyering  <jim@meyering.net>
4728
4729         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
4730         It's already included if !_LIBC.
4731         (fts_safe_changedir): Add a comment.
4732
4733 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4734
4735         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
4736         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
4737         Matthew Woehlke.
4738
4739         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
4740         definitions up, to avoid colliding with change below.
4741         (static_inline) [HAVE_INLINE]: New macro.
4742         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
4743         Provide extern decls when !HAVE_INLINE.  Do not define unless
4744         static_inline is defined, either by us or by xmalloc.c.  Use
4745         static_inline rather than static inline.
4746         (XCALLOC): Optimize sizeof(T) = 1 case.
4747         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
4748
4749 2006-11-07  Bruno Haible  <bruno@clisp.org>
4750
4751         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
4752         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
4753         AC_C_INLINE.
4754         * modules/xalloc (Files): Add m4/inline.m4.
4755
4756 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4757
4758         * README: Fix typo.
4759         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
4760         (Miscellanous Notes): ...from this.
4761
4762 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
4763
4764         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
4765         Mention that offsetof should be used instead of sizeof.
4766         From Bruno Haible.
4767
4768 2006-11-07  Bruno Haible  <bruno@clisp.org>
4769
4770         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
4771
4772 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4773
4774         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4775         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
4776         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4777         (gl_tree_add_before, gl_tree_add_after):
4778         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
4779         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
4780         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4781         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
4782         (gl_linked_add_after, gl_linked_add_at): Likewise.
4783         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
4784         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
4785         (gl_tree_add_before, gl_tree_add_after): Likewise.
4786         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
4787         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
4788         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
4789
4790 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4791
4792         * lib/gl_oset.h: Use C comment style, not C++ comment style.
4793
4794 2006-11-06  Bruno Haible  <bruno@clisp.org>
4795
4796         * m4/inline.m4: New file.
4797         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
4798         * modules/list (Files): Add m4/inline.m4.
4799         * modules/oset (Files): Likewise.
4800
4801 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
4802
4803         * lib/idcache.c: Include <stddef.h>, for offsetof.
4804         (struct userid.name): Change from char * to a flexible array member.
4805         All uses changed.
4806         * modules/idcache (Depends-on): Add flexmember.
4807
4808         * MODULES.html.sh (Core language properties): New module flexmember.
4809         * modules/flexmember, m4/flexmember.m4: New files.
4810
4811         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
4812         inline functions that are identical with the old xnmalloc_inline,
4813         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
4814         that we can avoid some unnecessary integer multiplications and
4815         divisions in the common case where the element size is known at
4816         compile time.
4817         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
4818         needed.
4819         (xnboundedmalloc): Remove.
4820         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
4821         arguments, for consistency with rest of this header.
4822         (xcharalloc): Rewrite using XNMALLOC.
4823         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
4824         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
4825         versions have been moved to lib/xalloc.h and renamed to be the
4826         non-*_inline versions.
4827         (xmalloc, xrealloc): Implement without reference to the xnmalloc
4828         and xnrealloc functions, since those functions are now inline and
4829         now call us.
4830         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
4831         renaming described above.
4832         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
4833         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
4834         captures the dependency in AC_C_INLINE.
4835
4836         New module canonicalize-lgpl, proposed by Charles Wilson in
4837         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
4838         with a few small changes afterwards.
4839         * MODULES.html.sh (File system functions): New module
4840         canonicalize-lgpl.
4841         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
4842         and canonicalize_file_name.
4843         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
4844         * modules/canonicalize-lgpl: New files.
4845
4846 2006-11-05  Bruno Haible  <bruno@clisp.org>
4847
4848         * gnulib-tool (func_import, func_create_testdir): Create directories
4849         also for files in subdirectories of lib/.
4850
4851 2006-11-05  Bruno Haible  <bruno@clisp.org>
4852
4853         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
4854         ANSI C compliant.
4855
4856 2006-11-03  Bruno Haible  <bruno@clisp.org>
4857
4858         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
4859         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
4860         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
4861         (xnboundedmalloc): New inline function.
4862         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
4863         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
4864         xmalloc.
4865         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
4866         xmalloc.
4867         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
4868         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
4869         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
4870         xmalloc.
4871         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4872         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
4873         xmalloc.
4874         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
4875         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4876         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
4877         xmalloc.
4878         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
4879         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
4880         gl_tree_add_after): Use XMALLOC instead of xmalloc.
4881         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
4882         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
4883         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
4884         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
4885
4886 2006-11-03  Bruno Haible  <bruno@clisp.org>
4887
4888         * lib/c-ctype.h [C++]: Define functions without name mangling.
4889         * lib/fwriteerror.h [C++]: Likewise.
4890         * lib/gcd.h [C++]: Likewise.
4891         * lib/linebreak.h [C++]: Likewise.
4892
4893 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
4894
4895         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
4896         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
4897         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
4898         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
4899         Check for functions and headers just once.
4900         Check for declaration of canonicalize_file_name.
4901         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
4902
4903 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4904
4905         * gnulib-tool (func_import): Fix typo in actioncmd.
4906
4907 2006-11-02  Bruno Haible  <bruno@clisp.org>
4908
4909         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
4910         newline sequence in the Makefile.am snippet as a space, like "make"
4911         does.
4912         Reported by Roger Persson <perrog@gmail.com>.
4913
4914 2006-11-01  Bruno Haible  <bruno@clisp.org>
4915
4916         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
4917         already declared in <string.h>.
4918         * lib/strcase.h (strncasecmp): Don't declare it if yes.
4919
4920 2006-11-01  Bruno Haible  <bruno@clisp.org>
4921
4922         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
4923         * lib/strcase.h: Include <string.h>.
4924         (strcasecmp): Define to rpl_strcasecmp here.
4925
4926 2006-11-01  Bruno Haible  <bruno@clisp.org>
4927
4928         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
4929
4930 2006-11-01  Eric Blake  <ebb9@byu.net>
4931
4932         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
4933
4934         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
4935
4936 2006-10-29  Bruno Haible  <bruno@clisp.org>
4937
4938         Make it compile in C++ mode.
4939         * lib/full-write.c (full_rw): Add a cast.
4940
4941 2006-11-01  Bruno Haible  <bruno@clisp.org>
4942
4943         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
4944         be POSIX compliant.
4945         Reported by Roger Persson <perrog@gmail.com>.
4946
4947 2006-11-01  Eric Blake  <ebb9@byu.net>
4948
4949         * lib/getopt_.h: Fix comments.
4950
4951 2006-10-31  Eric Blake  <ebb9@byu.net>
4952
4953         * modules/tmpdir (Depends-on): Add sys_stat.
4954         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
4955         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
4956         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
4957         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
4958         tempname.
4959
4960 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
4961
4962         Avoid some C++ diagnostics reported by Bruno Haible.
4963         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
4964         xmalloc.
4965         (quotearg_alloc): Use xcharalloc rather than xmalloc.
4966         (struct slotvec): Move to top level.
4967         (quotearg_n_options): Rewrite to avoid xmalloc.
4968         * lib/xalloc.h (xcharalloc): New function.
4969         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
4970         [defined __cplusplus]: Add function template that provides result
4971         type propagation.  This part of the change is from Bruno Haible.
4972
4973 2006-10-29  Bruno Haible  <bruno@clisp.org>
4974
4975         Make it compile in C++ mode.
4976         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
4977         * lib/strnlen1.c (strnlen1): Cast memchr result.
4978         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
4979         * lib/clean-temp.c (string_equals, string_hash): Add casts.
4980         (create_temp_dir): Rename local variable 'template'.
4981         (compile_csharp_using_sscli): Add cast.
4982         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
4983         * lib/findprog.c (find_in_path): Likewise.
4984         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
4985         * lib/wait-process.c (register_slave_subprocess): Likewise.
4986
4987 2006-10-22  Bruno Haible  <bruno@clisp.org>
4988
4989         * modules/tsearch: New file.
4990         * lib/tsearch.h: New file.
4991         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
4992         * m4/tsearch.m4: New file.
4993         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
4994
4995 2006-10-29  Eric Blake  <ebb9@byu.net>
4996
4997         * lib/arcfour.c: Assume config.h.
4998         * lib/arctwo.c: Likewise.
4999         * lib/base64.c: Likewise.
5000         * lib/check-version.c: Likewise.
5001         * lib/crc.c: Likewise.
5002         * lib/des.c: Likewise.
5003         * lib/gc-gnulib.c: Likewise.
5004         * lib/gc-libgcrypt.c: Likewise.
5005         * lib/gc-pbkdf2-sha1.c: Likewise.
5006         * lib/getaddrinfo.c: Likewise.
5007         * lib/getdelim.c: Likewise.
5008         * lib/getline.c: Likewise.
5009         * lib/hmac-md5.c: Likewise.
5010         * lib/hmac-sha1.c: Likewise.
5011         * lib/iconvme.c: Likewise.
5012         * lib/md2.c: Likewise.
5013         * lib/md4.c: Likewise.
5014         * lib/memxor.c: Likewise.
5015         * lib/read-file.c: Likewise.
5016         * lib/readline.c: Likewise.
5017         * lib/rijndael-alg-fst.c: Likewise.
5018         * lib/rijndael-api-fst.c: Likewise.
5019         * lib/xgetdomainname.c: Likewise.
5020
5021 2006-10-28  Eric Blake  <ebb9@byu.net>
5022
5023         * lib/xstrndup.c: Assume config.h.
5024
5025 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
5026
5027         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
5028         stat-macros.h is now for our own macros, whereas stat_h is for
5029         macros in the <sys/stat.h> name space.
5030         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
5031         (STAT_MACROS_H): Remove.
5032         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
5033         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
5034         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
5035         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
5036         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
5037         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
5038         Move these macros to ...
5039         * lib/stat_.h: here.  Don't include stat-macros.h.
5040         * lib/canonicalize.c: Don't include stat-macros.h.
5041         * lib/chown.c: Likewise.
5042         * lib/euidaccess.c: Likewise.
5043         * lib/file-type.c: Likewise.
5044         * lib/filemode.c: Likewise.
5045         * lib/glob.c: Likewise.
5046         * lib/isapipe.c: Likewise.
5047         * lib/lchown.c: Likewise.
5048         * lib/lstat.c: Likewise.
5049         * lib/mkdir-p.c: Likewise.
5050         * lib/rmdir.c: Likewise.
5051         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
5052         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
5053         unless mkdir isn't declared, to speed up 'configure'.
5054         Always create sys/stat.h, since it's unlikely any real sys/stat.h
5055         would define all the S_* symbols.
5056         * modules/canonicalize (Depends-on):
5057         Depend on sys_stat, not stat-macros.
5058         * modules/chown: Likewise.
5059         * modules/euidaccess: Likewise.
5060         * modules/filemode: Likewise.
5061         * modules/file-type: Likewise.
5062         * modules/glob: Likewise.
5063         * modules/isapipe: Likewise.
5064         * modules/lchown: Likewise.
5065         * modules/lstat: Likewise.
5066         * modules/mkancesdirs: Likewise.
5067         * modules/rmdir: Likewise.
5068         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
5069         * modules/modechange: Likewise.
5070         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
5071         (configure.ac): Remove gl_STAT_MACROS.
5072         * modules/sys_stat (Depends-on): Remove stat-macros.
5073
5074 2006-10-27  Bruno Haible  <bruno@clisp.org>
5075
5076         * m4/signed.m4: Remove file.
5077         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
5078         invocation.
5079         * modules/vasnprintf (Files): Remove m4/signed.m4.
5080
5081 2006-10-27  Bruno Haible  <bruno@clisp.org>
5082
5083         Update to GNU gettext 0.16.
5084         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
5085         m4/inttypes-h.m4, m4/signed.m4.
5086         * m4/gettext.m4: Update to GNU gettext 0.16.
5087         * m4/intl.m4: New file, from GNU gettext.
5088         * m4/intldir.m4: New file, from GNU gettext.
5089         * config/srclist.txt: Update
5090
5091 2006-10-27  Eric Blake  <ebb9@byu.net>
5092
5093         * MODULES.html.sh: Document tempname.
5094         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
5095         dependencies.
5096         (Files): Move lib/tempname.c...
5097         * modules/tempname: ...to this new module.
5098         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
5099         (gl_PREREQ_TEMPNAME): Move...
5100         * m4/tempname.m4: ...to this new file.
5101         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
5102         * modules/sys_stat (Depends-on): Add stat-macros.
5103         * lib/stat_.h (includes): Pick up stat macros.
5104         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
5105         if stat macros are broken.
5106         * lib/tempname.c (includes): No need to include "stat-macros.h".
5107         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
5108         (direxists, __path_search) [!_LIBC]: Don't compile these in
5109         gnulib; the tmpdir module covers that.
5110         * lib/tempname.h: New file.
5111
5112 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
5113
5114         * COPYING: Explain how gnulib-tool converts licence headers.
5115         Almost all wording by Eric Blake.
5116
5117 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
5118
5119         * lib/mbchar.h (is_basic_table): Make read-only.
5120         * lib/mbchar.c (is_basic_table): Likewise.
5121         Reported by John Darrington.
5122
5123 2006-10-25  Bruno Haible  <bruno@clisp.org>
5124
5125         * lib/progname.h (set_program_name): Undefine before defining.
5126
5127 2006-10-25  Bruno Haible  <bruno@clisp.org>
5128
5129         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
5130         false for non-gcc C++ compilers.
5131         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
5132
5133 2006-10-24  Bruno Haible  <bruno@clisp.org>
5134
5135         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
5136         iconv implementations like Irix iconv.
5137
5138 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5139
5140         * modules/vararrays: New file.
5141         * m4/vararrays.m4: New file, taken from diffutils.
5142         * MODULES.html.sh: New module vararrays.
5143
5144 2006-10-24  Karl Berry  <karl@gnu.org>
5145
5146         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
5147         Don't call GNU Unix.
5148
5149 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5150
5151         * users.txt: Add Libtool.
5152
5153         Sync from Libtool:
5154
5155         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5156
5157         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
5158         to gnulib's policy of including config.h unconditionally.
5159
5160 2006-10-24  Bruno Haible  <bruno@clisp.org>
5161
5162         * modules/wcwidth (Files): Add m4/wint_t.m4.
5163         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
5164         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
5165
5166 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
5167
5168         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
5169         to pacify GCC with some -W flags enabled.  Problem reported by
5170         Bruno Haible.
5171
5172 2006-10-24  Jim Meyering  <jim@meyering.net>
5173
5174         * MODULES.html.sh: Remove uinttostr.  It's not a module.
5175         Reported by Karl Berry.
5176
5177 2006-10-23  Bruno Haible  <bruno@clisp.org>
5178
5179         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
5180
5181 2006-10-24  Bruno Haible  <bruno@clisp.org>
5182
5183         * lib/gl_list.h: Use C comment style, not C++ comment style.
5184
5185 2006-10-23  Eric Blake  <ebb9@byu.net>
5186
5187         * lib/getaddrinfo.c (includes): Add missing include.
5188
5189 2006-10-23  Bruno Haible  <bruno@clisp.org>
5190             Paul Eggert  <eggert@cs.ucla.edu>
5191
5192         Ability to rename obstack_free.
5193         * lib/obstack.h (__obstack_free): New macro. Declare instead of
5194         obstack_free.
5195         (obstack_free): Invoke the __obstack_free macro.
5196         * lib/obstack.c (obstack_free): Use __obstack_free macro.
5197
5198 2006-10-23  Bruno Haible  <bruno@clisp.org>
5199             Paul Eggert  <eggert@cs.ucla.edu>
5200
5201         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
5202         __argc, __argv from the declaration. (They are defined as macros on
5203         mingw.)
5204
5205 2006-10-22  Bruno Haible  <bruno@clisp.org>
5206
5207         * doc/gnulib-intro.texi: New file.
5208         * doc/gnulib.texi: Include it.
5209
5210 2006-10-21  Bruno Haible  <bruno@clisp.org>
5211
5212         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
5213         "Introduction", "Miscellanous Notes", "Particular Modules".
5214
5215 2006-10-21  Bruno Haible  <bruno@clisp.org>
5216
5217         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5218         Change mostlyclean-local rule to avoid sh syntax error from bash
5219         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
5220
5221 2006-10-23  Jim Meyering  <jim@meyering.net>
5222
5223         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
5224         in place of snprintf.
5225
5226         * modules/inttostr (Files): Add lib/uinttostr.c.
5227         * lib/uinttostr.c (inttostr): New file/function.
5228         * lib/inttostr.h (uinttostr): Declare.
5229         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
5230         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
5231         Add uinttostr.
5232         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
5233
5234 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5235
5236         * lib/canonicalize.c (ELOOP): Define if not already defined.
5237         Problem reported by Bruno Haible in
5238         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
5239
5240 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
5241
5242         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
5243         Problem reported by Perry Smith and Ville Laurikari.
5244
5245         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
5246         uses.
5247
5248 2006-10-19  Bruno Haible  <bruno@clisp.org>
5249
5250         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
5251         for mingw.
5252
5253 2006-10-19  Bruno Haible  <bruno@clisp.org>
5254
5255         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
5256         Needed for mingw.
5257
5258 2006-10-19  Bruno Haible  <bruno@clisp.org>
5259
5260         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
5261
5262 2006-10-19  Bruno Haible  <bruno@clisp.org>
5263
5264         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
5265         it.
5266
5267 2006-10-19  Bruno Haible  <bruno@clisp.org>
5268
5269         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
5270         invocation.
5271
5272 2006-10-19  Bruno Haible  <bruno@clisp.org>
5273
5274         * gnulib-tool (func_create_testdir): Don't include ftruncate and
5275         mountlist by default.
5276
5277 2006-10-16  Bruno Haible  <bruno@clisp.org>
5278
5279         * lib/c-strstr.c: Include c-strstr.h.
5280
5281 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
5282
5283         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
5284         in a slash.
5285
5286 2006-10-18  Bruno Haible  <bruno@clisp.org>
5287
5288         * lib/lock.h [C++]: Wrap definitions in extern "C".
5289
5290 2006-10-18  Bruno Haible  <bruno@clisp.org>
5291
5292         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
5293         gl_LIBOBJS list.
5294
5295 2006-10-18  Bruno Haible  <bruno@clisp.org>
5296
5297         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
5298
5299 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
5300
5301         * lib/xstrtol.h: Include gettext.h.
5302         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
5303         Problem reported by Eric Blake.
5304         * modules/xstrtol (Depends-on): Add gettext-h.
5305
5306 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
5307
5308         * lib/strftime.c (advance): New macro.
5309         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
5310         incomplete type, so you can't add 0 to it.  Problem and patch
5311         reported by Eelco Dolstra for dietlibc.
5312
5313 2006-10-18  Jim Meyering  <jim@meyering.net>
5314
5315         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
5316         type for a local, and rename it: s/up/user_proc/.
5317
5318 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
5319
5320         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
5321         READ_UTMP_USER_PROCESS.
5322         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
5323
5324 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
5325
5326         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
5327         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
5328
5329 2006-10-17  Eric Blake  <ebb9@byu.net>
5330
5331         * lib/sigprocmask.c (sigprocmask): Fix typo.
5332
5333         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
5334
5335         * modules/clean-temp (Makefile.am): Don't add to make output...
5336         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
5337         config.h.
5338
5339 2006-10-17  Bruno Haible  <bruno@clisp.org>
5340
5341         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
5342         differently if DEFAULT_TEXT_DOMAIN is set.
5343
5344 2006-10-16  Bruno Haible  <bruno@clisp.org>
5345
5346         * lib/clean-temp.c: Include fwriteerror.h.
5347
5348 2006-10-16  Bruno Haible  <bruno@clisp.org>
5349
5350         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
5351
5352 2006-10-16  Bruno Haible  <bruno@clisp.org>
5353
5354         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
5355         * lib/sigprocmask.h: Include <sys/types.h>.
5356         (sigset_t): Use the system's definition if present.
5357
5358 2006-10-17  Eric Blake  <ebb9@byu.net>
5359
5360         * lib/xvasprintf.c (includes): Assume config.h.
5361         * lib/xasprintf.c (includes): Likewise.
5362
5363 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
5364
5365         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
5366         at least as wide as intmax_t.
5367
5368 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
5369
5370         (Imported from Automake.)
5371         * build-aux/gnupload: Update to version 1.1 of directive file.
5372
5373 2006-10-16  Eric Blake  <ebb9@byu.net>
5374
5375         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
5376         match Automake 1.10a.
5377
5378 2006-10-14  Bruno Haible  <bruno@clisp.org>
5379
5380         * modules/sigprocmask: New file.
5381         * lib/sigprocmask.h: New file.
5382         * lib/sigprocmask.c: New file.
5383         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
5384         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
5385         request sigprocmask.o.
5386         (gl_PREREQ_SIGPROCMASK): New macro.
5387         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
5388         (Depends-on): Add sigprocmask.
5389         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
5390         gt_SIGNALBLOCKING. Test for 'raise' only once.
5391         * lib/fatal-signal.c: Include sigprocmask.h.
5392         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
5393         unblock_fatal_signals): Define always.
5394         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
5395         sigprocmask.
5396
5397 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
5398
5399         Sync from Automake.
5400         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
5401         which incorrectly sets the mode of an existing destination
5402         directory.  In some cases the unpatched install-sh could do the
5403         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
5404         system.  We hope this is rare in practice, but it's clearly worth
5405         fixing.  Problem reported by Alex Unleashed in
5406         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
5407         Also, don't bother to check for -m bugs unless we're using -m;
5408         suggested by Stepan Kasal.
5409
5410 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5411
5412         Sync from Automake.
5413         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
5414         `-c' flag, so they appear at the same position as in %FASTDEP%
5415         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
5416         which ignores unknown options only after the first non-option.
5417         Bug report against M4 by Nelson H. F. Beebe.
5418
5419 2006-10-13  Jim Meyering  <jim@meyering.net>
5420
5421         Fix a bug in yesterday's change.
5422         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
5423         p->fts_statp->st_dev would be used uninitialized.
5424         Ensures that we always call fts_stat on the very first entry.
5425         Miklos Szeredi reported that find -xdev stopped working.
5426
5427 2006-10-12  Bruno Haible  <bruno@clisp.org>
5428
5429         * gnulib-tool (func_get_automake_snippet): Append an automatically
5430         computed EXTRA_DIST augmentation.
5431         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
5432         * modules/alloca-opt (Makefile.am): Likewise.
5433         * modules/allocsa (Makefile.am): Likewise.
5434         * modules/arcfour (Makefile.am): Likewise.
5435         * modules/arctwo (Makefile.am): Likewise.
5436         * modules/argmatch (Makefile.am): Likewise.
5437         * modules/argz (Makefile.am): Likewise.
5438         * modules/atexit (Makefile.am): Likewise.
5439         * modules/backupfile (Makefile.am): Likewise.
5440         * modules/byteswap (Makefile.am): Likewise.
5441         * modules/c-strtod (Makefile.am): Likewise.
5442         * modules/c-strtold (Makefile.am): Likewise.
5443         * modules/calloc (Makefile.am): Likewise.
5444         * modules/canon-host (Makefile.am): Likewise.
5445         * modules/canonicalize (Makefile.am): Likewise.
5446         * modules/chdir-long (Makefile.am): Likewise.
5447         * modules/chdir-safer (Makefile.am): Likewise.
5448         * modules/check-version (Makefile.am): Likewise.
5449         * modules/chown (Makefile.am): Likewise.
5450         * modules/cloexec (Makefile.am): Likewise.
5451         * modules/close-stream (Makefile.am): Likewise.
5452         * modules/closeout (Makefile.am): Likewise.
5453         * modules/crc (Makefile.am): Likewise.
5454         * modules/csharpexec (Makefile.am): Likewise.
5455         * modules/cycle-check (Makefile.am): Likewise.
5456         * modules/des (Makefile.am): Likewise.
5457         * modules/dev-ino (Makefile.am): Likewise.
5458         * modules/dirfd (Makefile.am): Likewise.
5459         * modules/dirname (Makefile.am): Likewise.
5460         * modules/dup2 (Makefile.am): Likewise.
5461         * modules/eealloc (Makefile.am): Likewise.
5462         * modules/error (Makefile.am): Likewise.
5463         * modules/euidaccess (Makefile.am): Likewise.
5464         * modules/exclude (Makefile.am): Likewise.
5465         * modules/exitfail (Makefile.am): Likewise.
5466         * modules/fcntl-safer (Makefile.am): Likewise.
5467         * modules/fcntl (Makefile.am): Likewise.
5468         * modules/file-type (Makefile.am): Likewise.
5469         * modules/fileblocks (Makefile.am): Likewise.
5470         * modules/filemode (Makefile.am): Likewise.
5471         * modules/filenamecat (Makefile.am): Likewise.
5472         * modules/fnmatch (Makefile.am): Likewise.
5473         * modules/fopen-safer (Makefile.am): Likewise.
5474         * modules/fpending (Makefile.am): Likewise.
5475         * modules/fprintftime (Makefile.am): Likewise.
5476         * modules/free (Makefile.am): Likewise.
5477         * modules/fsusage (Makefile.am): Likewise.
5478         * modules/ftruncate (Makefile.am): Likewise.
5479         * modules/fts (Makefile.am): Likewise.
5480         * modules/gc-arcfour (Makefile.am): Likewise.
5481         * modules/gc-des (Makefile.am): Likewise.
5482         * modules/gc-hmac-md5 (Makefile.am): Likewise.
5483         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
5484         * modules/gc-md4 (Makefile.am): Likewise.
5485         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5486         * modules/gc-sha1 (Makefile.am): Likewise.
5487         * modules/gc (Makefile.am): Likewise.
5488         * modules/getaddrinfo (Makefile.am): Likewise.
5489         * modules/getcwd (Makefile.am): Likewise.
5490         * modules/getdelim (Makefile.am): Likewise.
5491         * modules/getdomainname (Makefile.am): Likewise.
5492         * modules/getgroups (Makefile.am): Likewise.
5493         * modules/gethostname (Makefile.am): Likewise.
5494         * modules/gethrxtime (Makefile.am): Likewise.
5495         * modules/getline (Makefile.am): Likewise.
5496         * modules/getloadavg (Makefile.am): Likewise.
5497         * modules/getlogin_r (Makefile.am): Likewise.
5498         * modules/getndelim2 (Makefile.am): Likewise.
5499         * modules/getopt (Makefile.am): Likewise.
5500         * modules/getpagesize (Makefile.am): Likewise.
5501         * modules/getpass-gnu (Makefile.am): Likewise.
5502         * modules/getpass (Makefile.am): Likewise.
5503         * modules/getsubopt (Makefile.am): Likewise.
5504         * modules/gettime (Makefile.am): Likewise.
5505         * modules/gettimeofday (Makefile.am): Likewise.
5506         * modules/getugroups (Makefile.am): Likewise.
5507         * modules/getusershell (Makefile.am): Likewise.
5508         * modules/glob (Makefile.am): Likewise.
5509         * modules/group-member (Makefile.am): Likewise.
5510         * modules/hard-locale (Makefile.am): Likewise.
5511         * modules/hash (Makefile.am): Likewise.
5512         * modules/hmac-md5 (Makefile.am): Likewise.
5513         * modules/hmac-sha1 (Makefile.am): Likewise.
5514         * modules/human (Makefile.am): Likewise.
5515         * modules/idcache (Makefile.am): Likewise.
5516         * modules/imaxabs (Makefile.am): Likewise.
5517         * modules/imaxdiv (Makefile.am): Likewise.
5518         * modules/inet_ntop (Makefile.am): Likewise.
5519         * modules/inet_pton (Makefile.am): Likewise.
5520         * modules/intprops (Makefile.am): Likewise.
5521         * modules/inttostr (Makefile.am): Likewise.
5522         * modules/inttypes (Makefile.am): Likewise.
5523         * modules/isapipe (Makefile.am): Likewise.
5524         * modules/javaversion (Makefile.am): Likewise.
5525         * modules/lchmod (Makefile.am): Likewise.
5526         * modules/lchown (Makefile.am): Likewise.
5527         * modules/localcharset (Makefile.am): Likewise.
5528         * modules/long-options (Makefile.am): Likewise.
5529         * modules/lstat (Makefile.am): Likewise.
5530         * modules/malloc (Makefile.am): Likewise.
5531         * modules/mathl (Makefile.am): Likewise.
5532         * modules/mbchar (Makefile.am): Likewise.
5533         * modules/md2 (Makefile.am): Likewise.
5534         * modules/md4 (Makefile.am): Likewise.
5535         * modules/md5 (Makefile.am): Likewise.
5536         * modules/memcasecmp (Makefile.am): Likewise.
5537         * modules/memchr (Makefile.am): Likewise.
5538         * modules/memcmp (Makefile.am): Likewise.
5539         * modules/memcoll (Makefile.am): Likewise.
5540         * modules/memcpy (Makefile.am): Likewise.
5541         * modules/memmem (Makefile.am): Likewise.
5542         * modules/memmove (Makefile.am): Likewise.
5543         * modules/mempcpy (Makefile.am): Likewise.
5544         * modules/memrchr (Makefile.am): Likewise.
5545         * modules/memset (Makefile.am): Likewise.
5546         * modules/memxor (Makefile.am): Likewise.
5547         * modules/mkancesdirs (Makefile.am): Likewise.
5548         * modules/mkdir-p (Makefile.am): Likewise.
5549         * modules/mkdir (Makefile.am): Likewise.
5550         * modules/mkdtemp (Makefile.am): Likewise.
5551         * modules/mkstemp (Makefile.am): Likewise.
5552         * modules/mktime (Makefile.am): Likewise.
5553         * modules/modechange (Makefile.am): Likewise.
5554         * modules/mountlist (Makefile.am): Likewise.
5555         * modules/nanosleep (Makefile.am): Likewise.
5556         * modules/obstack (Makefile.am): Likewise.
5557         * modules/openat (Makefile.am): Likewise.
5558         * modules/pagealign_alloc (Makefile.am): Likewise.
5559         * modules/pathmax (Makefile.am): Likewise.
5560         * modules/physmem (Makefile.am): Likewise.
5561         * modules/poll (Makefile.am): Likewise.
5562         * modules/posixtm (Makefile.am): Likewise.
5563         * modules/posixver (Makefile.am): Likewise.
5564         * modules/putenv (Makefile.am): Likewise.
5565         * modules/quote (Makefile.am): Likewise.
5566         * modules/quotearg (Makefile.am): Likewise.
5567         * modules/raise (Makefile.am): Likewise.
5568         * modules/read-file (Makefile.am): Likewise.
5569         * modules/readline (Makefile.am): Likewise.
5570         * modules/readlink (Makefile.am): Likewise.
5571         * modules/readtokens (Makefile.am): Likewise.
5572         * modules/readutmp (Makefile.am): Likewise.
5573         * modules/realloc (Makefile.am): Likewise.
5574         * modules/regex (Makefile.am): Likewise.
5575         * modules/rename-dest-slash (Makefile.am): Likewise.
5576         * modules/rename (Makefile.am): Likewise.
5577         * modules/rijndael (Makefile.am): Likewise.
5578         * modules/rmdir (Makefile.am): Likewise.
5579         * modules/rpmatch (Makefile.am): Likewise.
5580         * modules/safe-read (Makefile.am): Likewise.
5581         * modules/safe-write (Makefile.am): Likewise.
5582         * modules/same-inode (Makefile.am): Likewise.
5583         * modules/same (Makefile.am): Likewise.
5584         * modules/save-cwd (Makefile.am): Likewise.
5585         * modules/savedir (Makefile.am): Likewise.
5586         * modules/setenv (Makefile.am): Likewise.
5587         * modules/settime (Makefile.am): Likewise.
5588         * modules/sha1 (Makefile.am): Likewise.
5589         * modules/sig2str (Makefile.am): Likewise.
5590         * modules/snprintf (Makefile.am): Likewise.
5591         * modules/stat-macros (Makefile.am): Likewise.
5592         * modules/stat-time (Makefile.am): Likewise.
5593         * modules/stdbool (Makefile.am): Likewise.
5594         * modules/stdint (Makefile.am): Likewise.
5595         * modules/stdlib-safer (Makefile.am): Likewise.
5596         * modules/stpcpy (Makefile.am): Likewise.
5597         * modules/stpncpy (Makefile.am): Likewise.
5598         * modules/strcase (Makefile.am): Likewise.
5599         * modules/strcasestr (Makefile.am): Likewise.
5600         * modules/strchrnul (Makefile.am): Likewise.
5601         * modules/strcspn (Makefile.am): Likewise.
5602         * modules/strdup (Makefile.am): Likewise.
5603         * modules/strerror (Makefile.am): Likewise.
5604         * modules/strftime (Makefile.am): Likewise.
5605         * modules/strndup (Makefile.am): Likewise.
5606         * modules/strnlen (Makefile.am): Likewise.
5607         * modules/strpbrk (Makefile.am): Likewise.
5608         * modules/strsep (Makefile.am): Likewise.
5609         * modules/strstr (Makefile.am): Likewise.
5610         * modules/strtod (Makefile.am): Likewise.
5611         * modules/strtoimax (Makefile.am): Likewise.
5612         * modules/strtok_r (Makefile.am): Likewise.
5613         * modules/strtol (Makefile.am): Likewise.
5614         * modules/strtoll (Makefile.am): Likewise.
5615         * modules/strtoul (Makefile.am): Likewise.
5616         * modules/strtoull (Makefile.am): Likewise.
5617         * modules/strtoumax (Makefile.am): Likewise.
5618         * modules/strverscmp (Makefile.am): Likewise.
5619         * modules/sys_socket (Makefile.am): Likewise.
5620         * modules/sys_stat (Makefile.am): Likewise.
5621         * modules/sysexits (Makefile.am): Likewise.
5622         * modules/time_r (Makefile.am): Likewise.
5623         * modules/timegm (Makefile.am): Likewise.
5624         * modules/timespec (Makefile.am): Likewise.
5625         * modules/tmpfile-safer (Makefile.am): Likewise.
5626         * modules/trim (Makefile.am): Likewise.
5627         * modules/unistd-safer (Makefile.am): Likewise.
5628         * modules/unlinkdir (Makefile.am): Likewise.
5629         * modules/unlocked-io (Makefile.am): Likewise.
5630         * modules/userspec (Makefile.am): Likewise.
5631         * modules/utime (Makefile.am): Likewise.
5632         * modules/utimecmp (Makefile.am): Likewise.
5633         * modules/utimens (Makefile.am): Likewise.
5634         * modules/vasnprintf (Makefile.am): Likewise.
5635         * modules/vasprintf (Makefile.am): Likewise.
5636         * modules/vsnprintf (Makefile.am): Likewise.
5637         * modules/xalloc (Makefile.am): Likewise.
5638         * modules/xgetcwd (Makefile.am): Likewise.
5639         * modules/xnanosleep (Makefile.am): Likewise.
5640         * modules/xreadlink (Makefile.am): Likewise.
5641         * modules/xstrtod (Makefile.am): Likewise.
5642         * modules/xstrtol (Makefile.am): Likewise.
5643         * modules/xstrtold (Makefile.am): Likewise.
5644         * modules/yesno (Makefile.am): Likewise.
5645         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
5646
5647 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5648
5649         * modules/error (Makefile.am): Distribute files through
5650         EXTRA_DIST, not lib_SOURCES.
5651
5652 2006-10-12  Eric Blake  <ebb9@byu.net>
5653
5654         * modules/error (Makefile.am): Distribute files in /lib.
5655         * modules/obstack (Makefile.am): Likewise.
5656
5657 2006-10-12  Bruno Haible  <bruno@clisp.org>
5658
5659         * modules/acl (Makefile.am): Distribute all files in lib/ through
5660         EXTRA_DIST.
5661         * modules/arcfour (Makefile.am): Likewise.
5662         * modules/arctwo (Makefile.am): Likewise.
5663         * modules/argmatch (Makefile.am): Likewise.
5664         * modules/argz (Makefile.am): Likewise.
5665         * modules/atexit (Makefile.am): Likewise.
5666         * modules/backupfile (Makefile.am): Likewise.
5667         * modules/c-strtod (Makefile.am): Likewise.
5668         * modules/c-strtold (Makefile.am): Likewise.
5669         * modules/calloc (Makefile.am): Likewise.
5670         * modules/canon-host (Makefile.am): Likewise.
5671         * modules/canonicalize (Makefile.am): Likewise.
5672         * modules/chdir-long (Makefile.am): Likewise.
5673         * modules/chdir-safer (Makefile.am): Likewise.
5674         * modules/check-version (Makefile.am): Likewise.
5675         * modules/chown (Makefile.am): Likewise.
5676         * modules/cloexec (Makefile.am): Likewise.
5677         * modules/close-stream (Makefile.am): Likewise.
5678         * modules/closeout (Makefile.am): Likewise.
5679         * modules/crc (Makefile.am): Likewise.
5680         * modules/cycle-check (Makefile.am): Likewise.
5681         * modules/des (Makefile.am): Likewise.
5682         * modules/dirfd (Makefile.am): Likewise.
5683         * modules/dirname (Makefile.am): Likewise.
5684         * modules/dup2 (Makefile.am): Likewise.
5685         * modules/euidaccess (Makefile.am): Likewise.
5686         * modules/exclude (Makefile.am): Likewise.
5687         * modules/exitfail (Makefile.am): Likewise.
5688         * modules/fcntl-safer (Makefile.am): Likewise.
5689         * modules/file-type (Makefile.am): Likewise.
5690         * modules/fileblocks (Makefile.am): Likewise.
5691         * modules/filemode (Makefile.am): Likewise.
5692         * modules/filenamecat (Makefile.am): Likewise.
5693         * modules/fnmatch (Makefile.am): Likewise.
5694         * modules/fopen-safer (Makefile.am): Likewise.
5695         * modules/fpending (Makefile.am): Likewise.
5696         * modules/fprintftime (Makefile.am): Likewise.
5697         * modules/free (Makefile.am): Likewise.
5698         * modules/fsusage (Makefile.am): Likewise.
5699         * modules/ftruncate (Makefile.am): Likewise.
5700         * modules/fts (Makefile.am): Likewise.
5701         * modules/gc (Makefile.am): Likewise.
5702         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
5703         * modules/getaddrinfo (Makefile.am): Likewise.
5704         * modules/getcwd (Makefile.am): Likewise.
5705         * modules/getdelim (Makefile.am): Likewise.
5706         * modules/getdomainname (Makefile.am): Likewise.
5707         * modules/getgroups (Makefile.am): Likewise.
5708         * modules/gethostname (Makefile.am): Likewise.
5709         * modules/gethrxtime (Makefile.am): Likewise.
5710         * modules/getline (Makefile.am): Likewise.
5711         * modules/getloadavg (Makefile.am): Likewise.
5712         * modules/getlogin_r (Makefile.am): Likewise.
5713         * modules/getopt (Makefile.am): Likewise.
5714         * modules/getpass (Makefile.am): Likewise.
5715         * modules/getpass-gnu (Makefile.am): Likewise.
5716         * modules/getsubopt (Makefile.am): Likewise.
5717         * modules/gettime (Makefile.am): Likewise.
5718         * modules/gettimeofday (Makefile.am): Likewise.
5719         * modules/getugroups (Makefile.am): Likewise.
5720         * modules/getusershell (Makefile.am): Likewise.
5721         * modules/glob (Makefile.am): Likewise.
5722         * modules/group-member (Makefile.am): Likewise.
5723         * modules/hard-locale (Makefile.am): Likewise.
5724         * modules/hash (Makefile.am): Likewise.
5725         * modules/hmac-md5 (Makefile.am): Likewise.
5726         * modules/hmac-sha1 (Makefile.am): Likewise.
5727         * modules/human (Makefile.am): Likewise.
5728         * modules/idcache (Makefile.am): Likewise.
5729         * modules/imaxabs (Makefile.am): Likewise.
5730         * modules/imaxdiv (Makefile.am): Likewise.
5731         * modules/inet_ntop (Makefile.am): Likewise.
5732         * modules/inet_pton (Makefile.am): Likewise.
5733         * modules/inttostr (Makefile.am): Likewise.
5734         * modules/isapipe (Makefile.am): Likewise.
5735         * modules/lchown (Makefile.am): Likewise.
5736         * modules/long-options (Makefile.am): Likewise.
5737         * modules/lstat (Makefile.am): Likewise.
5738         * modules/malloc (Makefile.am): Likewise.
5739         * modules/mathl (Makefile.am): Likewise.
5740         * modules/mbchar (Makefile.am): Likewise.
5741         * modules/md2 (Makefile.am): Likewise.
5742         * modules/md4 (Makefile.am): Likewise.
5743         * modules/md5 (Makefile.am): Likewise.
5744         * modules/memcasecmp (Makefile.am): Likewise.
5745         * modules/memchr (Makefile.am): Likewise.
5746         * modules/memcmp (Makefile.am): Likewise.
5747         * modules/memcoll (Makefile.am): Likewise.
5748         * modules/memcpy (Makefile.am): Likewise.
5749         * modules/memmem (Makefile.am): Likewise.
5750         * modules/memmove (Makefile.am): Likewise.
5751         * modules/mempcpy (Makefile.am): Likewise.
5752         * modules/memrchr (Makefile.am): Likewise.
5753         * modules/memset (Makefile.am): Likewise.
5754         * modules/memxor (Makefile.am): Likewise.
5755         * modules/mkancesdirs (Makefile.am): Likewise.
5756         * modules/mkdir (Makefile.am): Likewise.
5757         * modules/mkdir-p (Makefile.am): Likewise.
5758         * modules/mkdtemp (Makefile.am): Likewise.
5759         * modules/mkstemp (Makefile.am): Likewise.
5760         * modules/mktime (Makefile.am): Likewise.
5761         * modules/modechange (Makefile.am): Likewise.
5762         * modules/mountlist (Makefile.am): Likewise.
5763         * modules/nanosleep (Makefile.am): Likewise.
5764         * modules/openat (Makefile.am): Likewise.
5765         * modules/pagealign_alloc (Makefile.am): Likewise.
5766         * modules/physmem (Makefile.am): Likewise.
5767         * modules/poll (Makefile.am): Likewise.
5768         * modules/posixtm (Makefile.am): Likewise.
5769         * modules/posixver (Makefile.am): Likewise.
5770         * modules/putenv (Makefile.am): Likewise.
5771         * modules/quote (Makefile.am): Likewise.
5772         * modules/quotearg (Makefile.am): Likewise.
5773         * modules/raise (Makefile.am): Likewise.
5774         * modules/read-file (Makefile.am): Likewise.
5775         * modules/readline (Makefile.am): Likewise.
5776         * modules/readlink (Makefile.am): Likewise.
5777         * modules/readtokens (Makefile.am): Likewise.
5778         * modules/readutmp (Makefile.am): Likewise.
5779         * modules/realloc (Makefile.am): Likewise.
5780         * modules/regex (Makefile.am): Likewise.
5781         * modules/rename (Makefile.am): Likewise.
5782         * modules/rename-dest-slash (Makefile.am): Likewise.
5783         * modules/rijndael (Makefile.am): Likewise.
5784         * modules/rmdir (Makefile.am): Likewise.
5785         * modules/rpmatch (Makefile.am): Likewise.
5786         * modules/safe-read (Makefile.am): Likewise.
5787         * modules/safe-write (Makefile.am): Likewise.
5788         * modules/same (Makefile.am): Likewise.
5789         * modules/save-cwd (Makefile.am): Likewise.
5790         * modules/savedir (Makefile.am): Likewise.
5791         * modules/setenv (Makefile.am): Likewise.
5792         * modules/settime (Makefile.am): Likewise.
5793         * modules/sha1 (Makefile.am): Likewise.
5794         * modules/sig2str (Makefile.am): Likewise.
5795         * modules/snprintf (Makefile.am): Likewise.
5796         * modules/stdlib-safer (Makefile.am): Likewise.
5797         * modules/stpcpy (Makefile.am): Likewise.
5798         * modules/stpncpy (Makefile.am): Likewise.
5799         * modules/strcase (Makefile.am): Likewise.
5800         * modules/strcasestr (Makefile.am): Likewise.
5801         * modules/strchrnul (Makefile.am): Likewise.
5802         * modules/strcspn (Makefile.am): Likewise.
5803         * modules/strdup (Makefile.am): Likewise.
5804         * modules/strerror (Makefile.am): Likewise.
5805         * modules/strftime (Makefile.am): Likewise.
5806         * modules/strndup (Makefile.am): Likewise.
5807         * modules/strnlen (Makefile.am): Likewise.
5808         * modules/strpbrk (Makefile.am): Likewise.
5809         * modules/strsep (Makefile.am): Likewise.
5810         * modules/strstr (Makefile.am): Likewise.
5811         * modules/strtod (Makefile.am): Likewise.
5812         * modules/strtoimax (Makefile.am): Likewise.
5813         * modules/strtok_r (Makefile.am): Likewise.
5814         * modules/strtol (Makefile.am): Likewise.
5815         * modules/strtoll (Makefile.am): Likewise.
5816         * modules/strtoul (Makefile.am): Likewise.
5817         * modules/strtoull (Makefile.am): Likewise.
5818         * modules/strtoumax (Makefile.am): Likewise.
5819         * modules/strverscmp (Makefile.am): Likewise.
5820         * modules/time_r (Makefile.am): Likewise.
5821         * modules/timegm (Makefile.am): Likewise.
5822         * modules/tmpfile-safer (Makefile.am): Likewise.
5823         * modules/unistd-safer (Makefile.am): Likewise.
5824         * modules/unlinkdir (Makefile.am): Likewise.
5825         * modules/userspec (Makefile.am): Likewise.
5826         * modules/utime (Makefile.am): Likewise.
5827         * modules/utimecmp (Makefile.am): Likewise.
5828         * modules/utimens (Makefile.am): Likewise.
5829         * modules/vasnprintf (Makefile.am): Likewise.
5830         * modules/vasprintf (Makefile.am): Likewise.
5831         * modules/vsnprintf (Makefile.am): Likewise.
5832         * modules/xalloc (Makefile.am): Likewise.
5833         * modules/xgetcwd (Makefile.am): Likewise.
5834         * modules/xnanosleep (Makefile.am): Likewise.
5835         * modules/xreadlink (Makefile.am): Likewise.
5836         * modules/xstrtod (Makefile.am): Likewise.
5837         * modules/xstrtol (Makefile.am): Likewise.
5838         * modules/xstrtold (Makefile.am): Likewise.
5839         * modules/yesno (Makefile.am): Likewise.
5840
5841 2006-10-12  Jim Meyering  <jim@meyering.net>
5842
5843         * m4/getloadavg.m4: Revert the change below.
5844
5845         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
5846         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
5847         fail with a symlink, which is what coreutils' ./bootstrap now
5848         creates by default.
5849
5850 2006-10-12  Bruno Haible  <bruno@clisp.org>
5851
5852         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
5853         mingw.
5854         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
5855         MSVC and mingw explicitly.
5856
5857 2006-10-11  Simon Josefsson  <jas@extundo.com>
5858             Bruno Haible  <bruno@clisp.org>
5859
5860         Add support for multiple gnulib-tool invocations in the scope of a
5861         single configure.ac file.
5862         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
5863         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
5864         with the same contents as the _LIBADD variable.
5865         (func_emit_initmacro_start, func_emit_initmacro_end,
5866         func_emit_initmacro_done): New functions.
5867         (func_import, func_create_testdir): Invoke them. Allow the identifiers
5868         gl_LIBOBJS and gl_LTLIBOBJS.
5869
5870 2006-10-11  Bruno Haible  <bruno@clisp.org>
5871
5872         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
5873         (func_create_testdir): Don't create po/Makefile.am, don't invoke
5874         autoreconf. Instead, invoke autopoint explicitly but move back the
5875         *.m4 files from gnulib.
5876
5877 2006-10-11  Bruno Haible  <bruno@clisp.org>
5878
5879         * gnulib-tool (func_usage): Make module names after --create-testdir
5880         optional.
5881         (func_create_testdir): If no module was specified, use nearly all
5882         modules.
5883
5884 2006-10-12  Jim Meyering  <jim@meyering.net>
5885
5886         Big performance improvement for fts-based tools that use FTS_NOSTAT.
5887         Avoid spurious inode-mismatch problems on non-POSIX file systems.
5888         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
5889         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
5890         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
5891         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
5892         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
5893         (fts_set_stat_required): New function.
5894         (fts_open): Defer the calls to fts_stat, if possible or requested.
5895         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
5896         into fts_stat itself.
5897         (fts_read): Perform any required (deferred) fts_stat call.
5898         (fts_build): Likewise, for the directory we're about to open and read.
5899         In the readdir loop, carefully decide whether each entry will require
5900         an eventual call to fts_stat, using dirent.d_type info if available.
5901         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
5902         a command line argument into this function.  Update all callers.
5903         Map a return value of FTS_DOT to FTS_D for a command line argument.
5904         * modules/fts (Depends-on): Add d-type.  Alphabetize.
5905         Thanks to Miklos Szeredi for his tenacity and for the initial
5906         bug report about "find" failing on a FUSE-based file system.
5907
5908         * lib/fts.c (fts_open): Use consistent indentation.
5909
5910 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
5911
5912         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
5913         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
5914         reported by Jim Meyering.  All uses of cache variables renamed
5915         to match Autoconf's.
5916         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
5917         the other one.
5918
5919         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
5920         Fix misspelling in diagnostic.
5921
5922 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5923
5924         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
5925         defined.  Problem reported by Matthew Woehlke.
5926
5927         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
5928         Add support for Tandem NonStop R series.
5929         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
5930         Use new macro.
5931
5932         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
5933         (has_trailing_slash): Omit size arg; all callers changed.
5934         Omit 'inline', since it doesn't help performance and we'd
5935         need to configure it.
5936         Don't count //, ///, etc. as having a trailing slash.
5937         As a side effect, this removes a C99ism reported by Matthew Woehlke.
5938         (rpl_rename_dest_slash): On failure, use rename's errno rather
5939         than (in some cases) an incorrect or junk errno.
5940         Simplify code by removing need to compute length; this does
5941         cause it to make two passes instead of one over the file name,
5942         but it's worth it.
5943
5944         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
5945         change, since Autoconf's version may no longer be appropriate now
5946         that we are using CVS Autoconf's version.  Add support for Tandem.
5947
5948 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
5949             Bruno Haible  <bruno@clisp.org>
5950
5951         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
5952         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
5953         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
5954         gl_AC_TYPE_LONG_LONG.
5955
5956         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
5957         instead of HAVE_LONG_LONG.
5958         * lib/printf-args.c (printf_fetchargs): Likewise.
5959         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
5960         * lib/vasnprintf.c (VASNPRINTF): Likewise.
5961         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
5962         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
5963         gl_AC_TYPE_LONG_LONG.
5964
5965 2006-10-11  Bruno Haible  <bruno@clisp.org>
5966
5967         * m4/longlong.m4: Add comments.
5968         * m4/ulonglong.m4: Likewise.
5969
5970 2006-10-10  Bruno Haible  <bruno@clisp.org>
5971
5972         Make it possible to #define stpcpy, strdup to aliases.
5973         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
5974         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
5975
5976 2006-10-10  Bruno Haible  <bruno@clisp.org>
5977
5978         Make it possible to #define gcd to an alias.
5979         * lib/gcd.c: Include config.h.
5980
5981 2006-10-10  Bruno Haible  <bruno@clisp.org>
5982
5983         Make it possible to #define c_isascii to an alias.
5984         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
5985         defined. Undefine the macros before defining them, to avoid gcc
5986         warnings.
5987         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
5988         define NO_C_CTYPE_MACROS early.
5989
5990 2006-10-10  Bruno Haible  <bruno@clisp.org>
5991
5992         Make it possible to #define set_program_name to an alias.
5993         * lib/progname.c: Don't undefine set_program_name; instead, undefine
5994         ENABLE_RELOCATABLE early.
5995
5996 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
5997
5998         Port to Tandem NSK OSS, which has 64-bit signed int but at most
5999         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
6000         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
6001         More generally, don't assume that 64-bit signed int is available
6002         if unsigned int is, and vice versa.
6003         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
6004         unsigned symbols, not on their signed counterparts.
6005         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
6006         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
6007         (UINT64_C, UINTMAX_C):
6008         Likewise.
6009         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
6010         unsigned counterparts.
6011         (Have_long_long, Unsigned): New macros.
6012         (Int): Renamed from INT.
6013         (strtoimax): Use the new macros.
6014         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
6015         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
6016         * modules/inttypes (inttypes.h): Substitute
6017         HAVE_UNSIGNED_LONG_LONG_INT.
6018         * modules/stdint (stdint.h): Likewise.
6019         (Files): Add m4/ulonglong.m4.
6020
6021 2006-10-10  Bruno Haible  <bruno@clisp.org>
6022
6023         Fix a gcc -Wshadow warning.
6024         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
6025         to 'bucket'.
6026         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
6027         gl_linked_indexof_from_to): Likewise.
6028         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
6029         Likewise.
6030         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
6031         Likewise.
6032         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
6033         Reported by Eric Blake.
6034
6035 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
6036
6037         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
6038         for NetBSD.  Problem reported by Bruno Haible.
6039
6040 2006-10-09  Jim Meyering  <jim@meyering.net>
6041
6042         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
6043         Patch from Bruno Haible.
6044
6045 2006-10-09  Jim Meyering  <jim@meyering.net>
6046
6047         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
6048         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
6049         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
6050
6051 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
6052
6053         Don't include <config.h> twice; this doesn't work in some cases,
6054         e.g., when config.h has "#define intmax_t long long int" and
6055         we include <config.h>, <inttypes.h>, <config.h> in that order.
6056         Problem reported by Matthew Woehlke in:
6057         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
6058         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
6059         * lib/fts-cycle.c: Don't include config.h.
6060         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
6061         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
6062         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
6063         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
6064         inttypes.h.
6065         * lib/xstrtoumax.c: Likewise.
6066         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
6067         __strtol and the like, so that this module is more like its siblings.
6068         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
6069         Remove; no longer needed now that we assume gnulib inttypes.h.
6070
6071 2006-10-08  Bruno Haible  <bruno@clisp.org>
6072
6073         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
6074         option.
6075
6076 2006-10-07  Jim Meyering  <jim@meyering.net>
6077
6078         * modules/inttypes (inttypes.h): Revert what seems to have been
6079         an inadvertent part of today's change: use "|", not "/" in the
6080         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
6081
6082 2006-10-07  Bruno Haible  <bruno@clisp.org>
6083
6084         * modules/sublist: New file.
6085
6086 2006-10-07  Bruno Haible  <bruno@clisp.org>
6087
6088         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
6089         * modules/argz (argz.h): Likewise.
6090         * modules/arpa_inet (arpa/inet.h): Likewise.
6091         * modules/byteswap (byteswap.h): Likewise.
6092         * modules/configmake (configmake.h): Likewise.
6093         * modules/fcntl (fcntl.h): Likewise.
6094         * modules/fnmatch (fnmatch.h): Likewise.
6095         * modules/getopt (getopt.h): Likewise.
6096         * modules/glob (glob.h): Likewise.
6097         * modules/inttypes (inttypes.h): Likewise.
6098         * modules/netinet_in (netinet/in.h): Likewise.
6099         * modules/poll (poll.h): Likewise.
6100         * modules/stdbool (stdbool.h): Likewise.
6101         * modules/stdint (stdint.h): Likewise.
6102         * modules/sys_select (sys/select.h): Likewise.
6103         * modules/sys_socket (sys/socket.h): Likewise.
6104         * modules/sys_stat (sys/stat.h): Likewise.
6105         * modules/sysexits (sysexits.h): Likewise.
6106         * modules/unistd (unistd.h): Likewise.
6107         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6108         Add a "DO NOT EDIT" comment to the generated file.
6109         (func_import): Likewise for gnulib-comp.m4.
6110
6111 2006-10-07  Bruno Haible  <bruno@clisp.org>
6112
6113         * lib/gl_sublist.h: New file.
6114         * lib/gl_sublist.c: New file.
6115
6116 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
6117
6118         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
6119         name (relative to the original working directory) and the file
6120         name component (relative to the temporary working directory).  All
6121         callers changed.
6122         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
6123         * lib/mkdir-p.c (make_dir_parents): Likewise.
6124         * lib/mkdir-p.h (make_dir_parents): Likewise.
6125
6126 2006-10-06  Eric Blake  <ebb9@byu.net>
6127
6128         Define several macros for use by the clean-temp module.
6129         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
6130         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
6131         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
6132
6133         * lib/clean-temp.h (close_stream_temp): New declaration.
6134         * lib/clean-temp.c (includes): Pull in headers according to what
6135         other modules are in use.
6136         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
6137
6138 2006-10-06  Bruno Haible  <bruno@clisp.org>
6139
6140         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
6141         instead of fopen, fwriteerror.
6142
6143 2006-10-06  Bruno Haible  <bruno@clisp.org>
6144
6145         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
6146         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
6147         int.
6148         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
6149         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
6150         Return an error indicator.
6151         Suggested by Eric Blake.
6152
6153 2006-10-06  Bruno Haible  <bruno@clisp.org>
6154
6155         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
6156         Reported by Eric Blake.
6157
6158 2006-10-06  Bruno Haible  <bruno@clisp.org>
6159
6160         * modules/closeout (Description): Mention stderr too.
6161
6162 2006-10-06  Bruno Haible  <bruno@clisp.org>
6163         and Paul Eggert  <eggert@cs.ucla.edu>
6164
6165         * lib/closeout.c (close_stdout): Also close stderr.
6166         * lib/closeout.h: Update comment.
6167
6168 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6169
6170         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
6171         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
6172         * lib/dirchownmod.c: Include lchown.h.
6173         * lib/lchown.c: Don't include files that lchown.h now includes.
6174         Don't declare chown, since lchown.h now does that.
6175         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
6176         (lchown): Define to rpl_chown if lchown is declared but
6177         does not exist.  Declare using a prototype if lchown is not
6178         declared.  Add a copyright notice.
6179         * lib/mkstemp.h: Include <unistd.h>.
6180         * lib/openat.c: Include lchown.h.
6181
6182         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
6183         we now test for that separately.
6184         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
6185         rather than O_NOFOLLOW, when testing whether it's possible to
6186         avoid a race condition reliably.
6187         * lib/savewd.c (savewd_chdir): Likewise.
6188
6189         Remove macros that are no longer needed now that stdint.h is
6190         reliable.
6191         * lib/fsusage.c (UINTMAX_MAX): Remove.
6192         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
6193         * lib/utimecmp.c (SIZE_MAX): Remove.
6194
6195         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
6196
6197         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
6198         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
6199         O_NOATIME works.
6200
6201 2006-10-05  Bruno Haible  <bruno@clisp.org>
6202
6203         * lib/gl_list.h (gl_sortedlist_search_from_to,
6204         gl_sortedlist_indexof_from_to): New declarations.
6205         (gl_list_implementation): New fields sortedlist_search_from_to,
6206         sortedlist_indexof_from_to.
6207         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
6208         inline functions.
6209         * lib/gl_list.c (gl_sortedlist_search_from_to,
6210         gl_sortedlist_indexof_from_to): New functions.
6211         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
6212         function.
6213         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
6214         (gl_array_sortedlist_search_from_to): New function.
6215         (gl_array_list_implementation): Update.
6216         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
6217         function.
6218         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
6219         (gl_carray_sortedlist_search_from_to): New function.
6220         (gl_carray_list_implementation): Update.
6221         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
6222         gl_linked_sortedlist_indexof_from_to): New functions.
6223         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6224         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6225         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
6226         gl_tree_sortedlist_indexof_from_to): New functions.
6227         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6228         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6229         Update.
6230         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6231         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
6232         Update.
6233
6234 2006-10-05  Bruno Haible  <bruno@clisp.org>
6235
6236         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
6237         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
6238         (struct gl_list_implementation): Add fields search_from_to,
6239         indexof_from_to. Remove fields search, indexof.
6240         (gl_list_search): Use the search_from_to method.
6241         (gl_list_search_from, gl_list_search_from_to): New functions.
6242         (gl_list_indexof): Use the indexof_from_to method.
6243         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6244         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
6245         (gl_list_search_from, gl_list_search_from_to): New functions.
6246         (gl_list_indexof): Use the indexof_from_to method.
6247         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
6248         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
6249         gl_array_indexof. Add start_index, end_index arguments.
6250         (gl_array_search_from_to): Renamed from gl_array_search. Add
6251         start_index, end_index arguments.
6252         (gl_array_remove, gl_array_list_implementation): Update.
6253         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
6254         gl_carray_indexof. Add start_index, end_index arguments.
6255         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
6256         start_index, end_index arguments.
6257         (gl_carray_remove, gl_carray_list_implementation): Update.
6258         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
6259         gl_linked_search. Add start_index, end_index arguments.
6260         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
6261         start_index, end_index arguments.
6262         (gl_linked_remove): Update.
6263         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
6264         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
6265         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
6266         field to 'size_t'.
6267         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
6268         gl_tree_search. Add start_index, end_index arguments.
6269         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6270         start_index, end_index arguments.
6271         (gl_tree_remove): Update.
6272         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
6273         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
6274         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
6275         function.
6276         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
6277         gl_tree_search. Add start_index, end_index arguments.
6278         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
6279         start_index, end_index arguments.
6280         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
6281         Update.
6282         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
6283
6284 2006-10-05  Bruno Haible  <bruno@clisp.org>
6285
6286         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
6287
6288         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
6289         fwriteerror_temp): New declarations.
6290         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
6291         (descriptors): New variable.
6292         (cleanup): First, close the descriptors.
6293         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
6294         fclose_temp, fwriteerror_temp): New functions.
6295
6296 2006-10-04  Jim Meyering  <jim@meyering.net>
6297
6298         * lib/fts.c (fts_open): Tiny comment change.
6299
6300 2006-10-04  Bruno Haible  <bruno@clisp.org>
6301
6302         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
6303         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
6304         gl_LOCK_BODY.
6305         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
6306         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
6307         gl_LOCK_EARLY_BODY.
6308         (gl_LOCK): Require gl_LOCK_BODY.
6309
6310 2006-10-04  Bruno Haible  <bruno@clisp.org>
6311
6312         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
6313         (gl_oset_search_atleast): New declaration.
6314         (struct gl_oset_implementation): Add field 'search_atleast'.
6315         (gl_oset_search_atleast): New inline function.
6316         * lib/gl_oset.c (gl_oset_search_atleast): New function.
6317         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
6318         (gl_array_oset_implementation): Update.
6319         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
6320         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
6321         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
6322
6323 2006-10-04  Bruno Haible  <bruno@clisp.org>
6324
6325         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
6326
6327 2006-10-03  Bruno Haible  <bruno@clisp.org>
6328
6329         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
6330         from gl_avltreehash_list_implementation.
6331
6332 2006-10-03  Bruno Haible  <bruno@clisp.org>
6333
6334         * lib/gl_oset.c (gl_oset_add): Fix return type.
6335
6336 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
6337
6338         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
6339
6340 2006-10-02  Eric Blake  <ebb9@byu.net>
6341
6342         * modules/strnlen (Depends-on): Add extensions.
6343
6344 2006-10-02  Eric Blake  <ebb9@byu.net>
6345
6346         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
6347         definition in 2.60+.
6348
6349 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
6350
6351         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
6352         checks.
6353
6354 2006-10-02  Bruno Haible  <bruno@clisp.org>
6355
6356         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
6357         to the AUTOMAKE_OPTIONS.
6358         Reported by Jim Meyering.
6359
6360 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
6361
6362         Work around bug in Solaris 10 /proc file system:
6363         /proc/self/fd/NNN/.. isn't the parent directory of
6364         the directory whose file descriptor is NNN.  This needs to
6365         be worked around at run time, not compile time, since a
6366         program might be built on Solaris 8, where things work, and
6367         run on Solaris 10.
6368         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
6369         to use the following interface instead:
6370         (OPENAT_BUFFER_SIZE): New macro.
6371         (openat_proc_name): New function.
6372         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
6373         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
6374         Likewise.
6375         * lib/openat-proc.c: New file.
6376         * modules/openat (Files): Add lib/openat-proc.c.
6377         (Depends-on): Add same-inode, stdbool.
6378         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
6379
6380 2006-09-29  Bruno Haible  <bruno@clisp.org>
6381
6382         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
6383         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
6384         argument. Set stdout_closed before testing for ferror, not after.
6385         (fwriteerror, fwriteerror_no_ebadf): New functions.
6386
6387 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6388
6389         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
6390
6391 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
6392
6393         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
6394         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
6395
6396 2006-09-28  Jim Meyering  <jim@meyering.net>
6397
6398         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
6399         Include <unistd.h>.
6400
6401 2006-09-28  Bruno Haible  <bruno@clisp.org>
6402
6403         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
6404         * modules/linkedhash-list (Depends-on): Likewise.
6405         * modules/rbtreehash-list (Depends-on): Likewise.
6406
6407 2006-09-28  Bruno Haible  <bruno@clisp.org>
6408
6409         * lib/strndup.h: Simplify the redefinition of strndup.
6410         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
6411         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
6412
6413 2006-09-28  Bruno Haible  <bruno@clisp.org>
6414
6415         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
6416         * lib/gl_linkedhash_list.c: Likewise.
6417         * lib/gl_rbtreehash_list.c: Likewise.
6418
6419 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
6420
6421         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
6422         getaddrinfo.
6423
6424         * lib/__fpending.h: Don't include <stdio_ext.h> unless
6425         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
6426         it causes <stdio_ext.h> to cause a compile-time error.
6427         Problem reported by Nelson H. F. Beebe.
6428         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
6429         of HAVE_DECL___PENDING.
6430
6431         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
6432         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
6433         declaration.
6434
6435 2006-09-27  Jim Meyering  <jim@meyering.net>
6436
6437         This file could end up with a definition for a function
6438         named __strndup, rather than rpl_strndup on a system with
6439         incomplete weak_alias support.
6440         * lib/strndup.c (strndup): Rename from __strndup.
6441         Remove #defines that used to map __strndup to strndup.
6442         Don't use K&R prototypes.
6443         Remove LIBC-related code, since this file is not sync'd with glibc.
6444         * lib/strndup.h: Revamp, accordingly.
6445         * m4/strndup.m4: Modernize.
6446
6447 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
6448
6449         * modules/savewd (Depends-on): Add 'raise'.
6450         * lib/savewd.c: Include <signal.h>, for 'raise'.
6451
6452 2006-09-26  Jim Meyering  <jim@meyering.net>
6453
6454         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
6455         when we detect Darwin 8.7.0's acl_get_file bug.
6456         Rearrange to perform the new (below) run-test while $LIBS
6457         contains any acl-related library.  Set USE_ACL at the end.
6458         (gl_ACL_GET_FILE): New function.
6459
6460 2006-09-26  Eric Blake  <ebb9@byu.net>
6461
6462         * lib/verror.c: Include <config.h> unconditionally.
6463
6464 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
6465
6466         * modules/clock-time (Maintainer): Add self.
6467         * modules/getlogin_r (Depends-on): Add extensions.
6468
6469 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6470
6471         * modules/clock-time: New module.
6472         * modules/nanosleep (Depends-on): Add clock-time.
6473         * modules/gethrxtime (Depends-on): Likewise.
6474         * modules/gettime (Depends-on): Likewise.
6475         * modules/settime (Depends-on): Likewise.
6476
6477         * modules/fts-lgpl: Depend on openat.
6478         * modules/mkancesdirs: Depend on savewd.
6479         * modules/mkdir-p: Likewise.
6480
6481 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6482
6483         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
6484
6485         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
6486         `gl_have_arbitrary_file_name_length_limit' to
6487         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
6488         actually works between configure runs.
6489
6490 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6491             Bruno Haible  <bruno@clisp.org>
6492
6493         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
6494
6495 2006-09-25  Jim Meyering  <jim@meyering.net>
6496
6497         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
6498         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
6499
6500 2006-09-25  Eric Blake  <ebb9@byu.net>
6501
6502         * gnulib-tool (func_import, func_create_testdir): Fix typos in
6503         exec's in 2006-09-18 patch when shuffling fds.
6504
6505 2006-09-25  Bruno Haible  <bruno@clisp.org>
6506
6507         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
6508         Reported by Jim Meyering.
6509
6510 2006-09-24  Jim Meyering  <jim@meyering.net>
6511
6512         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
6513         compare a pointer against a literal "0".  That caused failures with
6514         at least HP-UX's hpcc.
6515
6516 2006-09-22  Simon Josefsson  <jas@extundo.com>
6517
6518         * modules/gc-sha1:
6519         * modules/gc-md4:
6520         * modules/gc-hmac-sha1:
6521         * modules/gc-hmac-md5:
6522         * modules/gc-des:
6523         * modules/gc-arcfour: Distribute more files.
6524
6525 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6526
6527         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
6528         (gl_linked_iterator_from_to): Initialize struct completely.
6529         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
6530         (gl_tree_iterator_from_to): Likewise
6531         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
6532         * lib/gl_array_list.c [lint] (gl_array_iterator)
6533         (gl_array_iterator_from_to): Likewise.
6534         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
6535         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
6536         (gl_carray_iterator_from_to): Likewise.
6537
6538         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
6539         * lib/md4.c (md4_process_block): Remove unused variable.
6540         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
6541         parentheses for clarity.
6542
6543 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6544
6545         * modules/bison-i18n (Depends-on): Add gettext.
6546
6547 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6548
6549         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
6550         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
6551         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
6552         also add missing comma that caused broken test.
6553         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
6554         stdlib.h, for `abort'.
6555         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
6556         variables.
6557         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
6558         include unistd.h if present, for `rmdir'.
6559         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
6560         variables.
6561         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
6562         in the process include standard headers for prototypes.
6563         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
6564         gets declared on GNU/Linux.
6565         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
6566         unistd.h, for `rmdir'.
6567         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
6568
6569         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
6570         always true.
6571         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
6572
6573         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
6574
6575 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6576
6577         * gnulib-tool (func_version): Create output all at once.  This
6578         may help avoid triggering unnecessary SIGPIPEs, and at any
6579         rate it doesn't hurt.
6580
6581 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6582             Bruno Haible  <bruno@clisp.org>
6583
6584         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
6585         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
6586         * m4/signed.m4 (bh_C_SIGNED): Likewise.
6587
6588         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
6589         (gl_FUNC_VASPRINTF): Invoke it.
6590
6591 2006-09-22  Bruno Haible  <bruno@clisp.org>
6592
6593         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
6594         getloadavg.c as first argument.
6595
6596 2006-09-22  Bruno Haible  <bruno@clisp.org>
6597
6598         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
6599         at the beginning of the gl_INIT macro.
6600         * modules/getloadavg (configure.ac): Pass $gl_source_base to
6601         gl_GETLOADAVG.
6602
6603 2006-09-22  Bruno Haible  <bruno@clisp.org>
6604
6605         * gnulib-tool (func_create_megatestdir): Don't include the config-h
6606         module.
6607         Suggested by Ralf Wildenhues.
6608
6609 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
6610
6611         Import this patch from libc:
6612
6613         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
6614
6615         * lib/regex_internal.c (re_string_reconstruct): Handle
6616         offset < pstr->valid_raw_len && pstr->offsets_needed case.
6617         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
6618         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
6619         re_string_context_at.
6620
6621         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
6622         now requires it.
6623         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
6624         gl_REGEX now does it for us.
6625         (gl_REGEX): Add test taken from
6626         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
6627
6628         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
6629         Check that large offsets work.  Modernize Autoconf usages.
6630         Prefer "yes" to mean a good thing rather than a bad.
6631         Don't put "#define mkstemp" in config.h, as this might interfere
6632         with standard system headers that "#define mkstemp mkstemp64".
6633
6634         * modules/mkstemp (Depends-on): Add extensions, so that
6635         mkstemp is visible on some platforms.
6636         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
6637         (Include): Change to "mkstemp.h" from <stdlib.h>.
6638         (Files): Add mkstemp.h.
6639
6640         * lib/mkstemp.h: New file, since some standard headers
6641         #define mkstemp.
6642         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
6643         Include "mkstemp.h".
6644         Make the _LIBC code resemble glibc original more,
6645         e.g., use K&R style.
6646         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
6647         (mkstemp): Remove, since mkstemp.h does this for us.
6648         * lib/stdlib--.h: Include mkstemp.h.
6649
6650         Import this patch from libc:
6651
6652         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
6653
6654         * lib/tempname.c (__gen_tempname): Change attempts_min
6655         into a macro.  Use preprocessor to decide how to initialize
6656         attempts [Coverity CID 67].
6657
6658 2006-09-20  Bruno Haible  <bruno@clisp.org>
6659
6660         * lib/mkdtemp.c: Import from libc.
6661         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
6662                 * sysdeps/posix/tempname.c (__gen_tempname): Change
6663                 attempts_min into a macro.  Use preprocessor to decide how to
6664                 initialize attempts [Coverity CID 67].
6665         2001-11-27  Paul Eggert  <eggert@twinsun.com>
6666                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
6667                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
6668
6669 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6670
6671         * gnulib-tool (func_exit): New function, to allow to pass the
6672         exit status portably through the trap.  Use everywhere.
6673         (--help, --version): Signal a write error.
6674         (trap): catch SIGPIPE, for write errors.
6675         Exit at the end of the trap, with the correct exit status.
6676
6677 2006-09-19  Karl Berry  <karl@gnu.org>
6678
6679         * doc/gnulib.texi: note about the license texinfo files.
6680
6681 2006-09-19  Eric Blake  <ebb9@byu.net>
6682
6683         * gnulib-tool: Avoid space-tab.
6684
6685 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6686
6687         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
6688         that prevented coreutils 6.1 from building.  Problem reported
6689         by Petter Reinholdtsen.
6690
6691 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
6692
6693         * gnulib-tool (avoidlist): Fix typo that broke options like
6694         --avoid=lock that are used by coreutils bootstrap.
6695
6696 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
6697
6698         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
6699         more systematically.
6700
6701 2006-09-18  Jim Meyering  <jim@meyering.net>
6702
6703         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
6704
6705 2006-09-18  Bruno Haible  <bruno@clisp.org>
6706
6707         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
6708
6709 2006-09-18  Bruno Haible  <bruno@clisp.org>
6710
6711         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
6712         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
6713         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
6714         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
6715         * m4/gettext.m4: Require autoconf >= 2.52.
6716         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
6717         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
6718         of gl_cv_header_inttypes_h.
6719
6720 2006-09-18  Bruno Haible  <bruno@clisp.org>
6721
6722         * lib/javaversion.c: Include configmake.h.
6723
6724 2006-09-18  Bruno Haible  <bruno@clisp.org>
6725
6726         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
6727         avoid that the while loops be executed in a subshell.
6728
6729 2006-09-18  Bruno Haible  <bruno@clisp.org>
6730
6731         * MODULES.html.sh (func_module): Break long lines.
6732         Suggested by Bruce Korb <bkorb@gnu.org>.
6733
6734 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6735
6736         Speed up by a factor of 1.12.
6737         * gnulib-tool (nl): New variable.
6738         (func_import): Rewrite include directive extraction to only read each
6739         directive once.
6740
6741 2006-09-17  Bruno Haible  <bruno@clisp.org>
6742
6743         * modules/javaversion (Makefile.am): Remove DEFS setting.
6744         (Depends-on): Add configmake, for PKGDATADIR definition.
6745
6746 2006-09-17  Bruno Haible  <bruno@clisp.org>
6747
6748         * gnulib-tool (func_create_testdir): Rewrite all files at once.
6749
6750 2006-09-17  Bruno Haible  <bruno@clisp.org>
6751
6752         * gnulib-tool (func_append): New function, stolen from libtool.m4.
6753         (func_modules_transitive_closure, func_modules_add_dummy,
6754         func_modules_to_filelist, func_import, func_create_testdir,
6755         func_create_megatestdir, ...): Use it wherever possible.
6756         Suggested by Ralf Wildenhues.
6757
6758 2006-09-16  Karl Berry  <karl@gnu.org>
6759
6760         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
6761         to avoid sectioning errors.
6762         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
6763         [ifinfo]: blank line after @center-ed titles.
6764         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
6765         Spell FSF address consistently with others.
6766         (These changes approved by rms.)
6767
6768 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6769
6770         Speed up by a factor of 1.61.
6771         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
6772         already checked module names again.
6773
6774 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6775
6776         Speed up by a factor of 1.13.
6777         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
6778         for new_files, and the input to func_add_or_update.
6779
6780 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6781
6782         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
6783         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
6784
6785 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6786
6787         * modules/mkancesdirs (Depends-on): Add fcntl.
6788         * modules/savewd: New file.
6789         * MODULES.html.sh (File system functions): Add savewd.
6790
6791         * modules/configmake (Makefile.am): Add support for the
6792         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
6793
6794 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6795
6796         * m4/savewd.m4: New file.
6797
6798 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
6799
6800         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
6801         (dirchownmod): New arg FD.  All callers changed.
6802         Use FD rather than opening the directory ourself, as opening is
6803         now the caller's responsibility.
6804         * lib/dirchownmod.h: Likewise.
6805         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
6806         hosts that require <sys/types.h> before <sys/stat.h>.  Include
6807         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
6808         (test_dir): Remove.
6809         (mkancesdirs): Return length of prefix of FILE that has already
6810         been made, or -2 if there is a child doing the work.  Redo
6811         algorithm so that it is O(N) rather than O(N**2).  Optimize away
6812         ".", and treat ".." specially since it might stray back into
6813         already-created areas.  Use a subprocess if necessary.  New arg
6814         WD; all users changed.  MAKE_DIR function should now return 1
6815         if it creates a directory that is not readable.  Return -2 if
6816         a child process is spun off.
6817         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
6818         Adjust signature to match code.
6819         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
6820         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
6821         all users changed.
6822         * lib/savewd.c, lib/savewd.h: New files.
6823
6824 2006-09-15  Jim Meyering  <jim@meyering.net>
6825
6826         * modules/rename-dest-slash: New module.
6827         * MODULES.html.sh (posix_compat): Add it here.
6828
6829         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
6830
6831 2006-09-15  Jim Meyering  <jim@meyering.net>
6832
6833         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
6834         file.
6835
6836         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
6837
6838 2006-09-15  Jim Meyering  <jim@meyering.net>
6839
6840         * lib/rename-dest-slash.c (has_trailing_slash): Use
6841         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
6842         (rpl_rename_dest_slash): Perform the cheaper trailing slash
6843         test before testing whether SRC is a directory.
6844         Suggestions from Bruno Haible.
6845
6846         Avoid a warning about an unused variable.
6847         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
6848         into the #ifdef block where it's used.
6849
6850         * lib/rename-dest-slash.c: New file.
6851
6852 2006-09-14  Bruno Haible  <bruno@clisp.org>
6853
6854         * lib/allocsa.c: Include <config.h> unconditionally.
6855         * lib/asnprintf.c: Likewise.
6856         * lib/asprintf.c: Likewise.
6857         * lib/c-strcasecmp.c: Likewise.
6858         * lib/c-strcasestr.c: Likewise.
6859         * lib/c-strncasecmp.c: Likewise.
6860         * lib/c-strstr.c: Likewise.
6861         * lib/classpath.c: Likewise.
6862         * lib/clean-temp.c: Likewise.
6863         * lib/concatpath.c: Likewise.
6864         * lib/copy-file.c: Likewise.
6865         * lib/csharpcomp.c: Likewise.
6866         * lib/csharpexec.c: Likewise.
6867         * lib/execute.c: Likewise.
6868         * lib/fatal-signal.c: Likewise.
6869         * lib/findprog.c: Likewise.
6870         * lib/fwriteerror.c: Likewise.
6871         * lib/gl_array_list.c: Likewise.
6872         * lib/gl_array_oset.c: Likewise.
6873         * lib/gl_avltree_list.c: Likewise.
6874         * lib/gl_avltree_oset.c: Likewise.
6875         * lib/gl_avltreehash_list.c: Likewise.
6876         * lib/gl_carray_list.c: Likewise.
6877         * lib/gl_linked_list.c: Likewise.
6878         * lib/gl_linkedhash_list.c: Likewise.
6879         * lib/gl_list.c: Likewise.
6880         * lib/gl_oset.c: Likewise.
6881         * lib/gl_rbtree_list.c: Likewise.
6882         * lib/gl_rbtree_oset.c: Likewise.
6883         * lib/gl_rbtreehash_list.c: Likewise.
6884         * lib/imaxabs.c: Likewise.
6885         * lib/imaxdiv.c: Likewise.
6886         * lib/javacomp.c: Likewise.
6887         * lib/javaexec.c: Likewise.
6888         * lib/javaversion.c: Likewise.
6889         * lib/linebreak.c: Likewise.
6890         * lib/localcharset.c: Likewise.
6891         * lib/lock.c: Likewise.
6892         * lib/mbchar.c: Likewise.
6893         * lib/mbswidth.c: Likewise.
6894         * lib/mkdtemp.c: Likewise.
6895         * lib/pipe.c: Likewise.
6896         * lib/printf-args.c: Likewise.
6897         * lib/printf-parse.c: Likewise.
6898         * lib/progname.c: Likewise.
6899         * lib/progreloc.c: Likewise.
6900         * lib/readlink.c: Likewise.
6901         * lib/sh-quote.c: Likewise.
6902         * lib/stpcpy.c: Likewise.
6903         * lib/stpncpy.c: Likewise.
6904         * lib/strcasecmp.c: Likewise.
6905         * lib/strcasestr.c: Likewise.
6906         * lib/strcspn.c: Likewise.
6907         * lib/striconv.c: Likewise.
6908         * lib/strncasecmp.c: Likewise.
6909         * lib/strnlen1.c: Likewise.
6910         * lib/strstr.c: Likewise.
6911         * lib/strtok_r.c: Likewise.
6912         * lib/tls.c: Likewise.
6913         * lib/tmpdir.c: Likewise.
6914         * lib/unicodeio.c: Likewise.
6915         * lib/unsetenv.c: Likewise.
6916         * lib/vasnprintf.c: Likewise.
6917         * lib/vasprintf.c: Likewise.
6918         * lib/wait-process.c: Likewise.
6919         * lib/xallocsa.c: Likewise.
6920         * lib/xsetenv.c: Likewise.
6921         * lib/xstriconv.c: Likewise.
6922
6923 2006-09-13  Simon Josefsson  <jas@extundo.com>
6924
6925         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
6926         that internally, suggested by Ralf Wildenhues
6927         <Ralf.Wildenhues@gmx.de>.
6928
6929 2006-09-13  Simon Josefsson  <jas@extundo.com>
6930
6931         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
6932         @LIBOBJS@.
6933         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6934
6935 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
6936
6937         * lib/_fpending.c: Include <config.h> unconditionally, since we no
6938         longer worry about uses that don't define HAVE_CONFIG_H.
6939         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
6940         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
6941         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
6942         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
6943         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
6944         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
6945         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
6946         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
6947         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
6948         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
6949         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
6950         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
6951         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
6952         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
6953         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
6954         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
6955         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
6956         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
6957         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
6958         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
6959         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
6960         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
6961         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
6962         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
6963         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
6964         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
6965         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
6966         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
6967         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
6968         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
6969         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
6970         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
6971         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
6972         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
6973         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
6974         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
6975         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
6976         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
6977         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
6978         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
6979         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
6980         Likewise.
6981
6982 2006-09-13  Eric Blake  <ebb9@byu.net>
6983
6984         * lib/getopt.c: Fix typo in last commit.
6985
6986 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
6987
6988         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
6989         dgettext.
6990
6991 2006-09-12  Jim Meyering  <jim@meyering.net>
6992
6993         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
6994         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
6995         Reported by Nelson H. F. Beebe.
6996
6997 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6998
6999         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
7000         program_invocation_name and program_invocation_short_name are
7001         initialized.
7002         * lib/argp-namefrob.h: Move declarations of program_invocation_name
7003         and program_invocation_short_name to argp.h, so they are visible
7004         to user programs.
7005         * lib/argp.h: Likewise
7006
7007 2006-09-10  Bruno Haible  <bruno@clisp.org>
7008
7009         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
7010         m4/inttypes_h.m4, m4/uintmax_t.m4.
7011
7012 2006-09-10  Bruno Haible  <bruno@clisp.org>
7013
7014         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
7015         gl_AC_TYPE_UINTMAX_T.
7016
7017 2006-09-10  Bruno Haible  <bruno@clisp.org>
7018
7019         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
7020
7021 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
7022
7023         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
7024         convention.  Text proposed by Bruno Haible.
7025         (struct argp_option): Document the use of N_() wrappers.
7026
7027         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
7028         '\v', and translate the two parts separately, instead of feeding
7029         the whole string to gettext.  This allows to exclude
7030         '\v' from the strings visible to the translator by writing doc
7031         strings as N_("..") "\v" N_("..").
7032
7033 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
7034
7035         * config/srclist.txt: Undo latest change; the bug was fixed.
7036
7037 2006-09-09  Bruno Haible  <bruno@clisp.org>
7038
7039         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
7040         assignments if building a library without libtool.
7041         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
7042         in func_emit_lib_Makefile_am.
7043         (func_import): When building a static library libfoo.a, arrange to
7044         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
7045         (func_create_testdir): Likewise.
7046         * modules/gc (configure.ac, Makefile.am): If building statically,
7047         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
7048         * modules/iconvme (configure.ac, Makefile.am): Likewise.
7049         * modules/striconv (configure.ac, Makefile.am): Likewise.
7050         Based on a suggestion by Ralf Wildenhues.
7051
7052 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7053
7054         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
7055         Check for unistd.h too, since Autoconf doesn't assume POSIX.
7056         Also:
7057
7058         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7059         Add year_2050_test to catch glibc bug 2821
7060         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7061
7062         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
7063         Prefer #ifdef to #if.
7064
7065         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
7066         Return from 'main' instead of calling 'exit'.
7067
7068 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7069
7070         * lib/mktime.c (guess_time_tm): Fix bug where mktime
7071         returned the maximum time_t value rather than (time_t) -1.
7072         Problem originally reported by William Bardwell
7073         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
7074
7075         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7076         Moved to here ...
7077         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
7078         ... from here.
7079
7080 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7081
7082         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
7083         2821 is fixed.
7084
7085 2006-09-08  Jim Meyering  <jim@meyering.net>
7086
7087         Don't make generated files read-only.  That would bother too many
7088         people.  However, do retain the ability to work when targets are
7089         read-only: remove the destination and temporary files before writing
7090         them (when generated via sed or echo), or by using the -f option for
7091         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
7092         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7093         * modules/byteswap, modules/configmake, modules/fcntl:
7094         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7095         * modules/localcharset, modules/netinet_in, modules/poll:
7096         * modules/stdbool, modules/stdint, modules/sys_select:
7097         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7098
7099 2006-09-08  Jim Meyering  <jim@meyering.net>
7100
7101         Avoid new build failure on FreeBSD 6.0.
7102         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
7103         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
7104         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
7105
7106 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7107
7108         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
7109
7110 2006-09-07  Jim Meyering  <jim@meyering.net>
7111
7112         Fix global typo in last change: use chmod u-w, not chmod u-x.
7113         Spotted by Paul Eggert and Bruce Korb.
7114         * modules/alloca-opt, modules/argz, modules/arpa_inet:
7115         * modules/byteswap, modules/configmake, modules/fcntl:
7116         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
7117         * modules/localcharset, modules/netinet_in, modules/poll:
7118         * modules/stdbool, modules/stdint, modules/sys_select:
7119         * modules/sys_socket, modules/sys_stat, modules/sysexits:
7120
7121 2006-09-06  Jim Meyering  <jim@meyering.net>
7122
7123         Make generated files be read-only.
7124         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
7125         Ensure that each generated file is now read-only.
7126         * modules/argz: Likewise.
7127         * modules/arpa_inet: Likewise.
7128         * modules/byteswap: Likewise.
7129         * modules/configmake: Likewise.
7130         * modules/fcntl: Likewise.
7131         * modules/fnmatch: Likewise.
7132         * modules/getopt: Likewise.
7133         * modules/glob: Likewise.
7134         * modules/inttypes: Likewise.
7135         * modules/netinet_in: Likewise.
7136         * modules/poll: Likewise.
7137         * modules/stdbool: Likewise.
7138         * modules/stdint: Likewise.
7139         * modules/sys_select: Likewise.
7140         * modules/sys_socket: Likewise.
7141         * modules/sys_stat: Likewise.
7142         * modules/sysexits: Likewise.
7143         * modules/localcharset: Same as above, but continue using temporary
7144         file named "t-$@" (why different?) rather than the "$@-t" used
7145         everywhere else.
7146
7147         * modules/sysexits (Makefile.am): Replace literal occurrences
7148         of "sysexit.h" more readable, and more consistent, "$@".
7149
7150 2006-09-06  Bruno Haible  <bruno@clisp.org>
7151
7152         * modules/striconv: New file.
7153         * modules/xstriconv: New file.
7154         * MODULES.html.sh (Internationalization functions): Add striconv,
7155         xstriconv.
7156
7157 2006-09-06  Bruno Haible  <bruno@clisp.org>
7158
7159         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
7160         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
7161         not using libtool correctly.
7162
7163 2006-09-06  Bruno Haible  <bruno@clisp.org>
7164
7165         * lib/striconv.h: New file.
7166         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
7167         iconvstring.c.
7168         * lib/xstriconv.h: New file.
7169         * lib/xstriconv.c: New file.
7170
7171 2006-09-06  Bruno Haible  <bruno@clisp.org>
7172
7173         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
7174         lib_..._LDFLAGS.
7175
7176 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7177
7178         * lib/argz_.h: Sync from Libtool.
7179
7180         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
7181                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7182
7183         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
7184
7185 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7186
7187         * modules/trim: New file.
7188
7189 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
7190
7191         * lib/trim.h: New file.
7192         * lib/trim.c: New file.
7193
7194 2006-09-05  Bruno Haible  <bruno@clisp.org>
7195
7196         * MODULES.html.sh (String handling): Add trim.
7197
7198 2006-09-04  Karl Berry  <karl@gnu.org>
7199
7200         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
7201         until next release.
7202
7203 2006-09-03  Bruno Haible  <bruno@clisp.org>
7204
7205         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
7206         correctly.
7207
7208 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7209
7210         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
7211         not gl_GETLOADAVG.  Omit unneeded semicolons.
7212         Problems reported by Ralf Wildenhues in
7213         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7214         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
7215         at the end, which is the usual gnulib style.
7216
7217         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
7218         of doing all the work ourselves.
7219         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
7220         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
7221
7222 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7223
7224         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
7225         Problem reported by Ralf Wildenhues in
7226         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
7227
7228         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
7229         HAVE_STRUCT_STATFS_F_FSTYPENAME.
7230
7231 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7232
7233         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
7234         yesterday's patch by changing test -n to test -z.
7235
7236 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7237
7238         * modules/getloadavg (Files): Add m4/getloadavg.m4.
7239         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
7240         the former is now obsolescent.
7241
7242         * modules/chdir-long (Depends-on): Add fcntl.
7243
7244 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7245
7246         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
7247         obsolescent, and programs should use gnulib instead.
7248         * m4/getloadavg.m4: New file, with contents taken from Autoconf
7249         but with prefixes changed.
7250
7251 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7252
7253         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
7254         or stdbool.h, because they might not exist while configuring.
7255
7256         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
7257         Don't include unistd.h or limits.h; not needed, since chdir-long.h
7258         does that for us.
7259         (O_DIRECTORY): Remove.
7260
7261 2006-08-31  Eric Blake  <ebb9@byu.net>
7262
7263         * gnulib-tool: Don't let emacs change spaces to TAB.
7264
7265 2006-08-31  Bruno Haible  <bruno@clisp.org>
7266
7267         * gnulib-tool: When calling func_import more than once, do it in a
7268         subshell.
7269         Reported by Eric Blake <ebb9@byu.net>.
7270
7271 2006-08-31  Bruno Haible  <bruno@clisp.org>
7272
7273         * gnulib-tool (nl): Remove variable.
7274         (sed_transform_lib_file): Use more robust test for config-h module.
7275         (func_import): Fix typo in 2006-08-25 patch.
7276
7277 2006-08-31  Bruno Haible  <bruno@clisp.org>
7278
7279         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
7280         specified, augment Makefile.am variables instead of assigning them.
7281
7282 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7283
7284         Work around a bug in both the Linux and SunOS 64-bit kernels:
7285         nanosleep mishandles sleeps for longer than 2**31 seconds.
7286         Problem reported by Frank v Waveren in
7287         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7288         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
7289         Check for nanosleep bug.
7290         (LIB_NANOSLEEP): Append clock_gettime library if needed.
7291
7292 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7293
7294         Work around a bug in both the Linux and SunOS 64-bit kernels:
7295         nanosleep mishandles sleeps for longer than 2**31 seconds.
7296         Problem reported by Frank v Waveren in
7297         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
7298         * lib/nanosleep.c (BILLION): New constant.
7299         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
7300         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
7301         implementation.
7302
7303 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7304
7305         * modules/nanosleep (Depends-on): Add gettime.
7306
7307 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
7308         and Simon Josefsson  <jas@extundo.com>
7309         and Oskar Liljeblad  <oskar@osk.mine.nu>
7310
7311         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
7312         * gnulib-tool (func_import): New license type 'unmodifiable license
7313         text'.
7314         * modules/fdl: Use it.  Longer description.
7315         * module/gpl, module/lgpl: New files.
7316
7317 2006-08-30  Jim Meyering  <jim@meyering.net>
7318
7319         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
7320         shadowing the parameter.
7321
7322 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7323
7324         Sync from Libtool:
7325
7326         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7327
7328         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
7329         sharing with gnulib.  Report by Eric Blake.
7330
7331 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7332
7333         * modules/isapipe: New file.
7334         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
7335
7336 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7337
7338         * modules/configmake (Makefile.am): Add a comment, and omit
7339         the CONFIGMAKE_ prefix from generated macro names.  Suggested
7340         by Bruno Haible.
7341
7342 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7343
7344         * m4/isapipe.m4: New file.
7345
7346 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
7347
7348         * lib/isapipe.c, lib/isapipe.h: New files.
7349
7350 2006-08-29  Jim Meyering  <jim@meyering.net>
7351
7352         * modules/configmake (Makefile.am): Make configmake.h depend on
7353         Makefile.  Otherwise, a stale configmake.h could hang around.
7354
7355 2006-08-29  Eric Blake  <ebb9@byu.net>
7356
7357         * lib/error.c (error_at_line, print_errno_message): Match libc, after
7358         resolution of upstream bug 3044.
7359
7360 2006-08-29  Bruno Haible  <bruno@clisp.org>
7361
7362         * modules/localcharset (Depends-on): Add configmake.
7363         (Makefile.am): Remove setting of LIBDIR through DEFS.
7364
7365 2006-08-29  Bruno Haible  <bruno@clisp.org>
7366
7367         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
7368         defined.
7369
7370 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7371
7372         * modules/fcntl: New file.
7373         * modules/chdir-safer (Depends-on): Add fcntl.
7374         * modules/fts: Likewise.
7375         * modules/mkdir-p: Likewise.
7376
7377         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
7378         This undoes the most recent change, since we're now addressing the
7379         problem in a different way.
7380
7381         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
7382         into output, since the output might be called Makefile.am even
7383         if $makefile_name is something different.
7384         (func_import): Use $makefile_am rather than
7385         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
7386         empty.
7387
7388         * modules/inttypes (Files): Add m4/inttypes-h.m4.
7389
7390 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7391
7392         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
7393         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
7394         recent change to stdint.m4, since we're now addressing the problem in a
7395         different way.
7396
7397 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7398
7399         * m4/fcntl_h.m4: New file.
7400
7401 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
7402
7403         * lib/fcntl_.h: New file.
7404         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
7405         the fcntl module.
7406         * lib/dirchownmod.c: Likewise.
7407         * lib/fts.c: Likewise.
7408
7409         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
7410         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
7411         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
7412         just before including <inttypes.h>, to avoid circular inclusion.
7413
7414 2006-08-28  Jim Meyering  <jim@meyering.net>
7415
7416         * doc/visibility.texi: Actually read and correct the grammar of the
7417         sentence affected by yesterday's change.
7418
7419 2006-08-28  Eric Blake  <ebb9@byu.net>
7420
7421         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
7422         needs wrapper.
7423
7424 2006-08-28  Eric Blake  <ebb9@byu.net>
7425
7426         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
7427
7428 2006-08-28  Eric Blake  <ebb9@byu.net>
7429
7430         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
7431
7432 2006-08-28  Bruno Haible  <bruno@clisp.org>
7433
7434         * modules/c-strstr: New file, from GNU gettext.
7435         * MODULES.html.sh (String handling): Add c-strstr.
7436
7437 2006-08-28  Bruno Haible  <bruno@clisp.org>
7438
7439         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
7440         macros.
7441         Reported by Eric Blake.
7442
7443 2006-08-28  Bruno Haible  <bruno@clisp.org>
7444
7445         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
7446         (VASNPRINTF): Return a string of length > INT_MAX without failing.
7447         * lib/vasprintf.c: Include errno.h, limits.h.
7448         (EOVERFLOW): New fallback definition.
7449         (vasprintf): Test here whether the string length is > INT_MAX.
7450         * lib/vsnprintf.c: Include errno.h, limits.h.
7451         (EOVERFLOW): New fallback definition.
7452         (vsnprintf): Fix bug when generated string was too long for the buffer.
7453         Test here whether the string length is > INT_MAX.
7454
7455 2006-08-28  Bruno Haible  <bruno@clisp.org>
7456
7457         * lib/inttypes_.h (SCNX*): Remove definitions.
7458         Reported by Eric Blake.
7459
7460 2006-08-28  Bruno Haible  <bruno@clisp.org>
7461
7462         * lib/c-strstr.h: New file, from GNU gettext.
7463         * lib/c-strstr.c: New file, from GNU gettext.
7464
7465 2006-08-28  Bruno Haible  <bruno@clisp.org>
7466
7467         * gnulib-tool: Reorder some statements.
7468
7469 2006-08-28  Bruno Haible  <bruno@clisp.org>
7470
7471         * gnulib-tool: New option --makefile-name.
7472         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
7473         $makefile_name.
7474         (func_import): Write $makefile_name to the cache file, and read it from
7475         there unless explicitly specified. Use $makefile_name as file name
7476         instead of Makefile.am. Adjust the recommendations accordingly.
7477
7478 2006-08-28  Bruno Haible  <bruno@clisp.org>
7479
7480         * gnulib-tool (func_verify_module): Check against misapplying patch.
7481
7482 2006-08-28  Bruno Haible  <bruno@clisp.org>
7483
7484         * gnulib-tool (func_relativize, func_relconcat): New functions.
7485         Give an error if --local-dir is given with --update.
7486         Remove trailing slashes from $local_gnulib_dir.
7487         (func_import): Store the relativized $local_gnulib_dir in
7488         gnulib-cache.m4, and read it from there if not specified explicitly.
7489
7490 2006-08-28  Bruno Haible  <bruno@clisp.org>
7491
7492         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
7493         is the current directory. Respect also $local_gnulib_dir.
7494
7495 2006-08-28  Bruno Haible  <bruno@clisp.org>
7496             Simon Josefsson  <jas@extundo.com>
7497
7498         BeOS portability.
7499         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
7500
7501 2006-08-27  Jim Meyering  <jim@meyering.net>
7502
7503         * doc/visibility.texi: Remove duplicate word: "pointer".
7504
7505 2006-08-26  Bruno Haible  <bruno@clisp.org>
7506
7507         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
7508         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
7509         (Makefile.am): Create inttypes.h from inttypes_.h.
7510         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
7511
7512         * modules/imaxabs: New file.
7513
7514         * modules/imaxdiv: New file.
7515
7516 2006-08-26  Bruno Haible  <bruno@clisp.org>
7517
7518         * m4/inttypes.m4: New file.
7519         * m4/_inttypes_h.m4: Remove file.
7520         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
7521         PRI_MACROS_BROKEN.
7522         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
7523
7524         * m4/imaxabs.m4: New file.
7525
7526         * m4/imaxdiv.m4: New file.
7527
7528 2006-08-26  Bruno Haible  <bruno@clisp.org>
7529
7530         * lib/inttypes_.h: New file.
7531         * lib/inttypes.h: Remove file.
7532         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
7533
7534         * lib/imaxabs.c: New file.
7535
7536         * lib/imaxdiv.c: New file.
7537
7538 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
7539
7540         New config-h module, so that "make" output needn't be cluttered
7541         by -DHAVE_CONFIG_H.
7542         * MODULES.html.sh (Support for building libraries and executables):
7543         Add config-h.
7544         * modules/config-h: New file.
7545         * gnulib-tool (nl, sed_transform_lib_file): New vars.
7546         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
7547         the config-h module is used.
7548
7549         New configmake module, so that "make" output needn't be cluttered
7550         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
7551         * MODULES.html.sh (Support for building libraries and executables):
7552         Add configmake.
7553         * modules/configmake: New file.
7554
7555 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
7556
7557         * m4/config-h.m4: New file.
7558
7559 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7560
7561         * config/srclist.txt: Add elisp-comp.
7562
7563 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
7564
7565         * MODULES.html.sh (Support for building libraries and executables):
7566         Add elisp-comp.
7567         * build-aux/elisp-comp: New file.
7568         * modules/elisp-comp: New file.
7569
7570 2006-08-24  Bruno Haible  <bruno@clisp.org>
7571
7572         * gnulib-tool (func_create_testdir): Use non-default values of
7573         sourcebase and m4base.
7574
7575 2006-08-24  Bruno Haible  <bruno@clisp.org>
7576
7577         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
7578         HTML structure.
7579
7580 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
7581
7582         * modules/openat (Depends-on): Add lchown.
7583
7584 2006-08-23  Bruno Haible  <bruno@clisp.org>
7585
7586         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
7587         of gl_LOCK_EARLY instead of gl_LOCK.
7588
7589 2006-08-23  Bruno Haible  <bruno@clisp.org>
7590
7591         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
7592         on OSF/1 to no.
7593         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
7594
7595 2006-08-23  Bruno Haible  <bruno@clisp.org>
7596
7597         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
7598         as unusable.
7599
7600         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
7601         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
7602         (gl_LOCK): New macro.
7603
7604 2006-08-22  Simon Josefsson  <jas@extundo.com>
7605
7606         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
7607         to md5 module.
7608
7609 2006-08-22  Simon Josefsson  <jas@extundo.com>
7610
7611         * MODULES.html.sh: Add "Support for maintaining and release
7612         projects".
7613
7614         * build-aux/gnupload: New file, from coreutils.
7615
7616 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7617
7618         Avoid the need for AC_LIBSOURCES in m4 macros.
7619         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
7620         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
7621         * modules/check-version (EXTRA_DIST): Add check-version.h.
7622         * modules/crc (EXTRA_DIST): Add crc.h.
7623         * modules/des (EXTRA_DIST): Add des.h.
7624         * modules/gc (EXTRA_DIST): Add gc.h.
7625         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
7626         * modules/getline (EXTRA_DIST): Add getline.h.
7627         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
7628         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
7629         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
7630         * modules/md2 (EXTRA_DIST): Add md2.h.
7631         * modules/md4 (EXTRA_DIST): Add md4.h.
7632         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
7633         * modules/read-file (EXTRA_DIST): Add read-file.h.
7634         * modules/readline (EXTRA_DIST): Add readline.h.
7635         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
7636         rijndael-api-fst.h.
7637
7638 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7639
7640         * m4/rijndael.m4 (gl_ARCFOUR):
7641         * m4/arctwo.m4 (gl_ARCTWO):
7642         * m4/check-version.m4 (gl_CHECK_VERSION):
7643         * m4/crc.m4 (gl_CRC):
7644         * m4/des.m4 (gl_DES):
7645         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
7646         * m4/gc.m4 (gl_GC):
7647         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
7648         * m4/getline.m4 (gl_FUNC_GETLINE):
7649         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
7650         * m4/hmac-md5.m4 (gl_HMAC_MD5):
7651         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
7652         * m4/md2.m4 (gl_MD2):
7653         * m4/md4.m4 (gl_MD4):
7654         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
7655         * m4/read-file.m4 (gl_FUNC_READ_FILE):
7656         * m4/readline.m4 (gl_FUNC_READLINE):
7657         * m4/rijndael.m4 (gl_RIJNDAEL):
7658         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7659         to get the necessary .h files and whatnot.
7660
7661 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
7662
7663         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
7664         gnulib rather than the other way around.
7665         * config/srclistvars.sh (COREUTILS): Remove.
7666
7667 2006-08-22  Jim Meyering  <jim@meyering.net>
7668
7669         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
7670
7671         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
7672
7673 2006-08-22  Eric Blake  <ebb9@byu.net>
7674
7675         * modules/regexprops-generic: New file.
7676         * MODULES.html.sh (Support for building documentation): List it.
7677
7678 2006-08-22  Eric Blake  <ebb9@byu.net>
7679
7680         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
7681         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
7682         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
7683         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
7684
7685 2006-08-22  Bruno Haible  <bruno@clisp.org>
7686
7687         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
7688         and lib_LTLIBRARIES like the other lib_* variables.
7689
7690 2006-08-22  Bruno Haible  <bruno@clisp.org>
7691
7692         * build-aux/x-to-1.in: New file, from GNU gettext.
7693
7694 2006-08-22  Bruno Haible  <bruno@clisp.org>
7695
7696         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
7697         <utmpx.h> exists.
7698
7699 2006-08-22  Bruno Haible  <bruno@clisp.org>
7700
7701         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
7702         <utmpx.h> exists.
7703
7704 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7705
7706         BeOS portability.
7707         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
7708         exist.
7709         Problem reported by Bruno Haible.
7710
7711 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7712
7713         Avoid the need for AC_LIBSOURCES in m4 macros.
7714         * modules/acl (EXTRA_DIST): Add acl.h.
7715         * modules/argmatch (Files): Add m4/argmatch.m4.
7716         (configure.ac): Add gl_ARGMATCH.
7717         (EXTRA_DIST): Renamed from lib_SOURCES, for
7718         consistency with the other modules.  Remove argmatch.c.
7719         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
7720         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
7721         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
7722         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
7723         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
7724         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
7725         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
7726         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
7727         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
7728         * modules/closeout (EXTRA_DIST): Add closeout.h.
7729         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
7730         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
7731         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
7732         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
7733         dirname.h; remove basename.c and stripslash.c.
7734         * modules/exclude (EXTRA_DIST): Add exclude.h.
7735         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
7736         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
7737         * modules/file-type (EXTRA_DIST): Add file-type.h.
7738         * modules/filemode (EXTRA_DIST): Add filemode.h.
7739         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
7740         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7741         * modules/fpending (EXTRA_DIST): Add __fpending.h.
7742         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
7743         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
7744         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
7745         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
7746         * modules/getdate (EXTRA_DIST): Add getdate.c.
7747         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
7748         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
7749         * modules/getpass (EXTRA_DIST): Add getpass.h.
7750         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
7751         * modules/group-member (EXTRA_DIST): Add group-member.h.
7752         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
7753         * modules/hash (EXTRA_DIST): Add hash.h.
7754         * modules/human (EXTRA_DIST): Add human.h.
7755         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
7756         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
7757         * modules/lchown (EXTRA_DIST): Add lchown.h.
7758         * modules/long-options (EXTRA_DIST): Add long-options.h.
7759         * modules/lstat (EXTRA_DIST): Add lstat.h.
7760         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
7761         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
7762         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
7763         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
7764         * modules/memxor (EXTRA_DIST): Add memxor.h.
7765         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
7766         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
7767         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
7768         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
7769         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
7770         * modules/physmem (EXTRA_DIST): Add physmem.h.
7771         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
7772         * modules/posixver (EXTRA_DIST): Add posixver.h.
7773         * modules/quote (EXTRA_DIST): Add quote.h.
7774         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
7775         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
7776         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
7777         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
7778         regex_internal.h regexec.c.
7779         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
7780         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
7781         * modules/same (EXTRA_DIST): Add same.h.
7782         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
7783         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
7784         * modules/savedir (EXTRA_DIST): Add savedir.h.
7785         * modules/sha1 (EXTRA_DIST): Add sha1.h.
7786         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
7787         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
7788         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
7789         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
7790         * modules/strdup (EXTRA_DIST): Add strdup.h.
7791         * modules/strftime (EXTRA_DIST): Add strftime.h.
7792         * modules/strndup (EXTRA_DIST): Add strndup.h.
7793         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
7794         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
7795         * modules/time_r (EXTRA_DIST): Add time_r.h.
7796         * modules/timespec (EXTRA_DIST): Add timespec.h.
7797         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
7798         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
7799         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
7800         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
7801         * modules/userspec (EXTRA_DIST): Add userspec.h.
7802         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
7803         * modules/utimens (EXTRA_DIST): Add utimens.h.
7804         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
7805         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
7806         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
7807         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
7808         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
7809         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
7810         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
7811         * modules/yesno (EXTRA_DIST): Add yesno.h.
7812
7813 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
7814
7815         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
7816
7817         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
7818         * m4/dev-ino.m4, same-inode.m4: Remove.
7819
7820         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
7821         * m4/acl.m4 (AC_FUNC_ACL):
7822         * m4/backupfile.m4 (gl_BACKUPFILE):
7823         * m4/c-strtod.m4 (gl_C99_STRTOLD):
7824         * m4/canon-host.m4 (gl_CANON_HOST):
7825         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
7826         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
7827         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
7828         * m4/cloexec.m4 (gl_CLOEXEC):
7829         * m4/close-stream.m4 (gl_CLOSE_STREAM):
7830         * m4/closeout.m4 (gl_CLOSEOUT):
7831         * m4/dirfd.m4 (gl_FUNC_DIRFD):
7832         * m4/dirname.m4 (gl_DIRNAME):
7833         * m4/exclude.m4 (gl_EXCLUDE):
7834         * m4/exitfail.m4 (gl_EXITFAIL):
7835         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
7836         * m4/file-type.m4 (gl_FILE_TYPE):
7837         * m4/filemode.m4 (gl_FILEMODE):
7838         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
7839         * m4/fpending.m4 (gl_FUNC_FPENDING):
7840         * m4/fprintftime.m4 (gl_FPRINTFTIME):
7841         * m4/fts.m4 (gl_FUNC_FTS):
7842         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
7843         * m4/getdate.m4 (gl_GETDATE):
7844         * m4/gethrxtime.m4 (gl_GETHRXTIME):
7845         * m4/getpagesize.m4 (gl_GETPAGESIZE):
7846         * m4/getpass.m4 (gl_FUNC_GETPASS):
7847         * m4/gettime.m4 (gl_GETTIME):
7848         * m4/getugroups.m4 (gl_GETUGROUPS):
7849         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
7850         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
7851         * m4/hard-locale.m4 (gl_HARD_LOCALE):
7852         * m4/hash.m4 (gl_HASH):
7853         * m4/idcache.m4 (gl_IDCACHE):
7854         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
7855         * m4/lchown.m4 (gl_FUNC_LCHOWN):
7856         * m4/long-options.m4 (gl_LONG_OPTIONS):
7857         * m4/lstat.m4 (gl_FUNC_LSTAT):
7858         * m4/md5.m4 (gl_MD5):
7859         * m4/memcasecmp.m4 (gl_MEMCASECMP):
7860         * m4/memcoll.m4 (gl_MEMCOLL):
7861         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
7862         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
7863         * m4/memxor.m4 (gl_MEMXOR):
7864         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
7865         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
7866         * m4/modechange.m4 (gl_MODECHANGE):
7867         * m4/mountlist.m4 (gl_MOUNTLIST):
7868         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7869         * m4/openat.m4 (gl_FUNC_OPENAT):
7870         * m4/pathmax.m4 (gl_PATHMAX):
7871         * m4/physmem.m4 (gl_PHYSMEM):
7872         * m4/posixtm.m4 (gl_POSIXTM):
7873         * m4/posixver.m4 (gl_POSIXVER):
7874         * m4/quote.m4 (gl_QUOTE):
7875         * m4/quotearg.m4 (gl_QUOTEARG):
7876         * m4/readtokens.m4 (gl_READTOKENS):
7877         * m4/readutmp.m4 (gl_READUTMP):
7878         * m4/regex.m4 (gl_REGEX):
7879         * m4/safe-read.m4 (gl_SAFE_READ):
7880         * m4/safe-write.m4 (gl_SAFE_WRITE):
7881         * m4/same.m4 (gl_SAME):
7882         * m4/save-cwd.m4 (gl_SAVE_CWD):
7883         * m4/savedir.m4 (gl_SAVEDIR):
7884         * m4/settime.m4 (gl_SETTIME):
7885         * m4/sha1.m4 (gl_SHA1):
7886         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
7887         * m4/stat-macros.m4 (gl_STAT_MACROS):
7888         * m4/stat-time.m4 (gl_STAT_TIME):
7889         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
7890         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
7891         * m4/strdup.m4 (gl_FUNC_STRDUP):
7892         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
7893         * m4/strndup.m4 (gl_FUNC_STRNDUP):
7894         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
7895         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
7896         * m4/time_r.m4 (gl_TIME_R):
7897         * m4/timespec.m4 (gl_TIMESPEC):
7898         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
7899         * m4/unlinkdir.m4 (gl_UNLINKDIR):
7900         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
7901         * m4/userspec.m4 (gl_USERSPEC):
7902         * m4/utimecmp.m4 (gl_UTIMECMP):
7903         * m4/utimens.m4 (gl_UTIMENS):
7904         * m4/xalloc.m4 (gl_XALLOC):
7905         * m4/xgetcwd.m4 (gl_XGETCWD):
7906         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
7907         * m4/xreadlink.m4 (gl_XREADLINK):
7908         * m4/xstrtod.m4 (gl_XSTRTOD):
7909         * m4/yesno.m4 (gl_YESNO):
7910         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
7911         to get the necessary .h files and whatnot.
7912
7913 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
7914             Bruno Haible  <bruno@clisp.org>
7915
7916         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
7917         /bin/sh understanding of '!' conditional negation.
7918
7919 2006-08-21  Jim Meyering  <jim@meyering.net>
7920
7921         * modules/openat (Depends-on): Really alphabetize.
7922
7923         * modules/acl (Depends-on): Add error and quote.
7924
7925         * check-module (find_included_lib_files): Add at-func.c to the
7926         ok-to-include-more-than-once white list.
7927
7928         * modules/openat (Depends-on): Add lstat.  Alphabetize.
7929
7930 2006-08-21  Bruno Haible  <bruno@clisp.org>
7931
7932         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7933         Emit a pkgdata_DATA variable only if some snippets add contents to it.
7934         Reported by Martin Lambers <marlam@marlam.de>.
7935
7936 2006-08-21  Bruno Haible  <bruno@clisp.org>
7937
7938         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
7939         specify an installation location, don't emit a noinst_LIBRARIES or
7940         noinst_LTLIBRARIES assignment.
7941
7942 2006-08-21  Bruno Haible  <bruno@clisp.org>
7943
7944         BeOS portability.
7945         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
7946         BeOS has mbrtowc() but no <wctype.h>.
7947
7948 2006-08-21  Bruno Haible  <bruno@clisp.org>
7949
7950         BeOS portability.
7951         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
7952         exist.
7953
7954 2006-08-21  Bruno Haible  <bruno@clisp.org>
7955
7956         BeOS portability.
7957         * lib/mbchar.h: Include <wctype.h> only if it exists.
7958
7959 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
7960
7961         Remove files that are no longer needed by their respective modules.
7962         * m4/obstack.m4: Remove.
7963         * m4/strerror_r.m4: Remove.
7964         * m4/uint32_t.m4: Remove.
7965         * m4/uintptr_t.m4: Remove.
7966         * m4/ullong_max.m4: Remove.
7967         * m4/xstrtoimax.m4: Remove.
7968         * m4/xstrtoumax.m4: Remove.
7969
7970         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
7971         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
7972         dependencies now capture this.
7973
7974         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
7975         Do not use AC_LIBSOURCES, since gnulib modules now do this.
7976         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
7977         * m4/human.m4 (gl_HUMAN): Likewise.
7978         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
7979         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
7980
7981         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
7982
7983         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
7984         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
7985         stdint.
7986         * m4/human.m4 (gl_HUMAN): Likewise.
7987         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
7988         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
7989         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7990         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7991         * m4/xstrtol (gl_XSTRTOL): Likewise.
7992
7993         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
7994         AC_TYPE_LONG_LONG_INT.
7995         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
7996         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
7997         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
7998         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
7999
8000         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
8001         on stdbool.
8002
8003         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
8004         (gl_PREREQ_XSTRTOUL): Remove.
8005
8006         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
8007
8008         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
8009         mode.
8010
8011 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8012
8013         Add and change modules to make it easier for coreutils to use
8014         gnulib-tool.
8015         * modules/backupfile (Files): Remove m4/d-ino.m4.
8016         (Depends-on): Add d-ino.
8017         * modules/cycle-check (Depends-on): Add stdint.
8018         (lib_SOURCES): Add cycle-check.h.
8019         * modules/d-ino: New module.
8020         * modules/d-type: New module.
8021         * modules/error (Files): Remove m4/strerror_r.m4.
8022         * modules/filemode (Files): Add m4/st_dm_mode.m4.
8023         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
8024         m4/inttypes_h.m4, m4/uintmax_t.m4.
8025         (Depends-on): Add stdint.
8026         (lib_SOURCES): Add fsusage.h.
8027         * modules/getcwd (Files): Remove d-ino.m4.
8028         (Depends-on): Add d-ino.
8029         * modules/getndelim2 (Depends-on): Add stdint.
8030         * modules/glob (Files): Remove m4/d-type.m4.
8031         (Depends-on): Add d-type.
8032         * modules/host-os: New module.
8033         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
8034         m4/inttypes_h.m4, m4/uintmax_t.m4.
8035         * Depends-on: Add stdint.
8036         (lib_SOURCES): Add human.h.
8037         * modules/inttostr (Files): Remove m4/intmax_t.m4,
8038         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
8039         m4/uintmax_t.m4, m4/ulonglong.m4.
8040         (Depends-on): Add stdint.
8041         (EXTRA_DIST): Add inttostr.h.
8042         * modules/lchmod: New module.
8043         * modules/link-follow: New module.
8044         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
8045         (Depends-on): Add lchmod.
8046         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
8047         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
8048         (Depends-on): Add stdint.
8049         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
8050         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8051         (Depends-on): Add stdint.
8052         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
8053         * modules/perl: New module.
8054         * modules/regex (Depends-on): Add stdint.
8055         * modules/rmdir-errno: New module.
8056         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8057         m4/intmax_t.m4.
8058         (Depends-on): Add stdint.
8059         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
8060         m4/uintmax_t.m4.
8061         (Depends-on): Add stdint.
8062         * modules/unlink-busy: New module.
8063         * modules/utimecmp (Depends-on): Add stdint.
8064         * modules/uptime: New module.
8065         * modules/winsz-ioctl: New module.
8066         * modules/winsz-termios: New module.
8067         * modules/xnanosleep (Depends-on): Add nanosleep.
8068         * modules/ullong_max: Remove.
8069         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
8070         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
8071         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
8072         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
8073         (Depends-on): Add inttypes.
8074         (lib_SOURCES): Add xstrtol.h.
8075         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
8076         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
8077         * MODULES.html.sh: Move 'assert' into the assert section.
8078         Move 'dummy' into the linking section.
8079         Remove ullong_max.
8080         Add section for compatibility checks for POSIX:2001 functions,
8081         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
8082         winsz-ioctl, and winsz-termios into it.
8083         Add lchmod.
8084         Add top-level Misc section and put host-os, perl, and uptime
8085         into it.
8086
8087 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8088
8089         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
8090         now assume the stdint module.  Do not include inttypes.h.
8091         * lib/fsusage.h: Likewise.
8092         * lib/getndelim2.c: Likewise.
8093         * lib/human.h: Likewise.
8094         * lib/inttostr.h: Likewise.
8095         * lib/obstack.c: Likewise.
8096         * lib/regex_internal.h: Likewise.
8097         * lib/tempname.c: Likewise.
8098         * lib/utimecmp.c: Likewise.
8099         * lib/xstrtol.h: Likewise.
8100
8101         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
8102
8103         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
8104         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
8105         * lib/xtime.h: Likewise.
8106
8107 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8108
8109         * modules/openat (Files): Add lib/fchmodat.c.
8110         Fixes problem reported by Jay Youngman.
8111
8112 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8113
8114         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
8115         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
8116
8117 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
8118             Bruno Haible  <bruno@clisp.org>
8119
8120         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
8121         and is a script that invokes bison. Tighten the code. Add comments.
8122
8123 2006-08-18  Jim Meyering  <jim@meyering.net>
8124
8125         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
8126         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
8127         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
8128         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
8129
8130 2006-08-18  Bruno Haible  <bruno@clisp.org>
8131
8132         * modules/bison-i18n: New file.
8133         * MODULES.html.sh (Internationalization functions): Add it.
8134
8135 2006-08-18  Bruno Haible  <bruno@clisp.org>
8136
8137         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
8138         sys/statvfs.h. When getmntinfo was found, check its declaration and
8139         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
8140
8141 2006-08-18  Bruno Haible  <bruno@clisp.org>
8142
8143         * m4/bison-i18n.m4: New file, from bison.
8144
8145 2006-08-18  Bruno Haible  <bruno@clisp.org>
8146
8147         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
8148         (ME_DUMMY): Treat "kernfs" as a dummy.
8149         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
8150
8151 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8152
8153         Update from coreutils.
8154
8155         2006-08-15  Jim Meyering  <jim@meyering.net>
8156
8157         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
8158
8159         2006-01-17  Jim Meyering  <jim@meyering.net>
8160
8161         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
8162
8163         2006-01-11  Jim Meyering  <jim@meyering.net>
8164
8165         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
8166         Check for the lchmod function.
8167
8168 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8169
8170         Update from coreutils.
8171
8172         * lib/__fpending.h: Add copyright notice.
8173         * lib/fprintftime.h: Likewise.
8174         * lib/savedir.c: Use (C) in copyright notice.
8175         * lib/savedir.h: Likewise.
8176
8177         2006-08-15  Jim Meyering  <jim@meyering.net>
8178
8179         * lib/at-func.c: New file, with the logic of all emulated at-functions.
8180         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
8181         in support of the EXPECTED_ERRNO macro.
8182         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
8183         definitions.  Instead, define the appropriate symbols and include
8184         "at-func.c".
8185         * lib/mkdirat.c (mkdirat): Likewise.
8186         * lib/fchmodat.c (fchmodat): Likewise.
8187         (ENOSYS): Remove definition.
8188         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
8189         it.  Don't include "unistd--.h" -- it wasn't ever used.
8190
8191         2006-01-17  Jim Meyering  <jim@meyering.net>
8192
8193         Rewrite fts.c not to change the current working directory,
8194         by using openat, fstatat, fdopendir, etc..
8195
8196         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
8197         (HAVE_OPENAT_SUPPORT): Define.
8198         [_LIBC] (fchdir): Don't undef or define; no longer used.
8199         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
8200         Now, this `function' always succeeds, and consumes its file descriptor
8201         parameter -- so callers must not close such FDs.  Update callers.
8202         (diropen_fd, opendirat, cwd_advance_fd): New functions.
8203         (diropen): Add parameter, SP.  Adjust all callers.
8204         Implement using diropen_fd, rather than open.
8205         (fts_open): Initialize new member, fts_cwd_fd.
8206         Remove fts_rft-setting code.
8207         (fts_close): Close fts_cwd_fd, if necessary.
8208         (__opendir2): Define in terms of opendir or opendirat,
8209         depending on whether the FST_NOCHDIR flag is set.
8210         (fts_build): Since fts_safe_changedir consumes its FD, and since
8211         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
8212         and close the dup'd file descriptor upon failure.
8213         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
8214         (fts_safe_changedir): Tweak semantics to reflect that this function
8215         now calls cwd_advance_fd and hence consumes its FD argument.
8216         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
8217         [struct FTS] (fts_rft): Remove now-unused member.
8218         [struct FTS] (fts_cycle.state): Improve comment.
8219
8220         * lib/openat.c (openat_needs_fchdir): New function.
8221         * lib/openat.h (openat_needs_fchdir): Declare it.
8222
8223 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
8224
8225         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
8226         Problem and fix reported by Pádraig Brady in
8227         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
8228
8229 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8230
8231         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
8232
8233 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8234
8235         * lib/memcoll.c (memcoll): Optimize for the common case where the
8236         arguments are bytewise equal.
8237
8238 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8239
8240         * doc/regexprops-generic.texi: Add a copyright notice.
8241
8242 2006-08-15  Bruno Haible  <bruno@clisp.org>
8243
8244         * modules/tmpdir (License): Change to LGPL.
8245
8246 2006-08-15  Bruno Haible  <bruno@clisp.org>
8247
8248         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
8249         module.
8250
8251 2006-08-14  Simon Josefsson  <jas@extundo.com>
8252
8253         * config/srclist.txt: Add gnupload.
8254
8255 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8256
8257         Change copyright notice from LGPL 2 to GPL 2, since that's the
8258         standard form used in the gnulib repository.
8259         * tests/test-lock.c: Likewise.
8260         * tests/test-stdint.c: Likewise.
8261         * tests/test-tls.c: Likewise.
8262
8263         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
8264         prelude-manager.  User shorter URLs for GNU projects, without '?'.
8265         Add copyright notice.
8266
8267         * check-module: Add copyright notice.  Output a copyright
8268         notice if "--version" is specified.
8269         * modules/COPYING: New file.
8270         * tests/test-getaddrinfo.c: Add copyright notice.
8271         * tests/test-verify.c: Likewise.
8272
8273 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8274
8275         Change copyright notice from LGPL 2 to GPL 2, since that's the
8276         standard form used in the gnulib repository.
8277         * lib/lock.c: LGPL -> GPL.
8278         * lib/lock.h: Likewise.
8279         * lib/strnlen1.c: Likewise.
8280         * lib/strnlen1.h: Likewise.
8281         * lib/tls.c: Likewise.
8282         * lib/tls.h: Likewise.
8283         * lib/tmpdir.c: Likewise.
8284
8285         * lib/TODO: Remove; this belongs only in coreutils.
8286
8287 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8288
8289         Add copyright notices to long-enough files that lack them, since
8290         otherwise the files aren't clearly free.  Use the same notice that
8291         getdate.texi already uses.
8292         * doc/alloca-opt.texi: Add copyright notice.
8293         * doc/alloca.texi: Likewise.
8294         * doc/ctime.texi: Likewise.
8295         * doc/functions.texi: Likewise.
8296         * doc/gcd.texi: Likewise.
8297         * doc/gnulib-tool.texi: Likewise.
8298         * doc/inet_ntoa.texi: Likewise.
8299         * doc/visibility.texi: Likewise.
8300
8301         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
8302         * doc/quote.texi: Add copyright notice.
8303
8304         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
8305         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
8306         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
8307         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
8308         is now obsolete, and give a pointer to the Sun list.
8309         Add copyright notice.
8310
8311 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
8312
8313         * config/srclistvars.sh: Add copyright notice.
8314
8315 2006-08-14  Eric Blake  <ebb9@byu.net>
8316
8317         Import the following change from libc:
8318
8319         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
8320
8321         Upstream bug 2997.
8322         * lib/misc/error.c: Add space between program name and message if file
8323         name is missing.
8324
8325 2006-08-12  Karl Berry  <karl@gnu.org>
8326
8327         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
8328         remove, these originate in gnulib now.
8329
8330 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8331
8332         * doc/Makefile (standards.info standards.html standards.dvi):
8333         Also depend on make-stds.texi.
8334
8335 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
8336
8337         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
8338         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
8339
8340         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
8341         in wchar_t.  Problem reported by Eric Blake.
8342
8343         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
8344         LEN is smaller than SIZE.  Suggested by Bruno Haible.
8345         Also, help the compiler to keep LEN in a register.
8346
8347 2006-08-11  Eric Blake  <ebb9@byu.net>
8348
8349         * users.txt: Sort.  Add tar.
8350
8351 2006-08-11  Bruno Haible  <bruno@clisp.org>
8352
8353         * users.txt: New file.
8354
8355 2006-08-11  Bruno Haible  <bruno@clisp.org>
8356
8357         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
8358         before <wchar.h>. Needed for OSF/1 and BSD/OS.
8359
8360 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8361
8362         * modules/snprintf (Depends-on): Remove minmax.
8363         (Maintainer): Add self and Bruno.
8364
8365 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
8366
8367         * lib/.cppi-disable: Add snprintf.h, socket_.h.
8368         * lib/snprintf.c: Include <errno.h> and <limits.h>.
8369         (EOVERFLOW): Define if the system does not.
8370         Do not include "minmax.h"; it wasn't used.
8371         (snprintf): Don't assume size_t promotes to an unsigned type.
8372         Fix bug when generated string was too long for the buffer: the
8373         buffer's contents are supposed to be the initial prefix of the
8374         output.  Don't assume vasnprintf returns EOVERFLOW if the size
8375         exceeds INT_MAX; do the check ourselves.
8376
8377         Import the following changes from libc:
8378
8379         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
8380
8381         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
8382         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
8383         set wc to the byte which couldn't be converted.
8384         (re_string_reconstruct): Don't clear valid_raw_len before calling
8385         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
8386         tip_context using re_string_context_at.
8387
8388         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
8389
8390         * lib/posix/regex.h: g++ still cannot handled [restrict].
8391
8392         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
8393
8394         * lib/posix/regex.h: Remove special handling for VMS.
8395
8396 2006-08-10  Jim Meyering  <jim@meyering.net>
8397
8398         * modules/same-inode: New module.
8399         * modules/dev-ino: New module.
8400         * modules/cycle-check: Depend on these modules, rather than simply
8401         including their .h files.
8402         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
8403         required via m4/cycle-check.m4.
8404         * modules/same: Depend on new same-inode module, rather than
8405         including same-inode.h.
8406         * modules/chdir-safer: New file.
8407
8408         * modules/chown (Depends-on): Add stat-macros.
8409
8410 2006-08-10  Jim Meyering  <jim@meyering.net>
8411
8412         * m4/cycle-check.m4: New file.
8413         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
8414         * m4/dev-ino.m4, m4/same-inode.m4: New files.
8415
8416 2006-08-10  Eric Blake  <ebb9@byu.net>
8417
8418         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
8419         in from original proposal.
8420
8421 2006-08-10  Eric Blake  <ebb9@byu.net>
8422         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8423
8424         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
8425         namespace.
8426
8427 2006-08-10  Bruno Haible  <bruno@clisp.org>
8428
8429         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
8430         as well.
8431
8432 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8433
8434         Sync from coreutils.
8435
8436         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
8437
8438         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
8439         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
8440
8441 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8442
8443         * modules/restrict: Remove; no longer needed now that we assume
8444         Autoconf 2.59 or later.
8445         * MODULES.html.sh: Remove 'restrict'.
8446         * modules/argp (Depends-on): Remove 'restrict'.
8447         * modules/base64 (Depends-on): Likewise.
8448         * modules/gc (Depends-on): Likewise.
8449         * modules/getaddrinfo (Depends-on): Likewise.
8450         * modules/glob (Depends-on): Likewise.
8451         * modules/inet_ntop (Depends-on): Likewise.
8452         * modules/inet_pton (Depends-on): Likewise.
8453         * modules/memxor (Depends-on): Likewise.
8454         * modules/regex (Depends-on): Likewise.
8455         * modules/strtok_r (Depends-on): Likewise.
8456         * modules/time_r (Depends-on): Likewise.
8457
8458 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
8459
8460         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
8461         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
8462         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
8463         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
8464         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
8465         * m4/memxor.m4 (gl_MEMXOR): Likewise.
8466         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
8467         gl_C_RESTRICT replaced by AC_C_RESTRICT.
8468
8469         Merge from coreutils.
8470         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
8471         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
8472         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
8473         * m4/time_r.m4 (gl_TIME_R): Likewise.
8474
8475 2006-08-09  Karl Berry  <karl@gnu.org>
8476
8477         * config/srclist.txt: no more gettext-tools, per Bruno.
8478
8479 2006-08-08  Eric Blake  <ebb9@byu.net>
8480
8481         * modules/verror: New module.
8482         * MODULES.html.sh: Document it.
8483
8484 2006-08-08  Eric Blake  <ebb9@byu.net>
8485
8486         * lib/verror.h, lib/verror.c: New files.
8487
8488 2006-08-08  Eric Blake  <ebb9@byu.net>
8489
8490         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
8491         verror_at_line output complies with GNU Coding Standards even when
8492         file is NULL.
8493
8494 2006-08-07  Bruno Haible  <bruno@clisp.org>
8495
8496         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
8497         versions of AIX.
8498         Reported by Ralf Wildenhues.
8499
8500 2006-08-07  Bruno Haible  <bruno@clisp.org>
8501
8502         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
8503         in an AC_DEFUN. Needed so that the autoconf snippets can use
8504         AC_REQUIRE.
8505
8506 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8507
8508         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8509         Initialize pkgdata_DATA.
8510         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
8511         overriding it.
8512
8513 2006-08-06  Eric Blake  <ebb9@byu.net>
8514
8515         * lib/error.h: Fold in some upstream changes from glibc.
8516         * lib/error.c: Likewise.
8517
8518 2006-08-04  Bruno Haible  <bruno@clisp.org>
8519
8520         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8521         Make the mostlyclean-local rule depend on mostlyclean-generic.
8522         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
8523
8524 2006-07-31  Bruno Haible  <bruno@clisp.org>
8525
8526         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
8527         <stdlib.h>, <string.h>.
8528
8529 2006-07-30  Bruno Haible  <bruno@clisp.org>
8530
8531         * modules/readlink (License): Change to LGPL.
8532
8533 2006-07-30  Bruno Haible  <bruno@clisp.org>
8534
8535         * modules/javaversion (Makefile.am): Distribute javaversion.java and
8536         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
8537         set PKGDATADIR to point to it.
8538
8539 2006-07-30  Bruno Haible  <bruno@clisp.org>
8540
8541         * modules/csharpexec (configure.ac): Comment out macro invocation.
8542         * modules/javaexec (configure.ac): Likewise.
8543         * modules/javacomp-script (configure.ac): Likewise.
8544
8545         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
8546
8547 2006-07-30  Bruno Haible  <bruno@clisp.org>
8548
8549         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
8550         linked-list.
8551
8552 2006-07-30  Bruno Haible  <bruno@clisp.org>
8553
8554         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
8555
8556 2006-07-30  Bruno Haible  <bruno@clisp.org>
8557
8558         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
8559         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
8560         get removed.
8561
8562 2006-07-29  Bruno Haible  <bruno@clisp.org>
8563
8564         Make it possible for gnulib-tool to work with locally modified or
8565         augmented gnulib repositories.
8566         * gnulib-tool (func_usage): Document --local-dir option.
8567         (local_gnulib_dir): New variable.
8568         Handle --local-dir option.
8569         (func_lookup_file): New function.
8570         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
8571         (func_get_description, func_get_filelist, func_get_description,
8572         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
8573         func_get_automake_snippet, func_get_include_directive,
8574         func_get_license, func_get_maintainer): Use func_lookup_file.
8575         (func_import, func_create_testdir): Use func_lookup_file.
8576
8577 2006-07-29  Bruno Haible  <bruno@clisp.org>
8578
8579         * modules/setenv (Depends-on): Add unistd.
8580
8581 2006-07-29  Bruno Haible  <bruno@clisp.org>
8582
8583         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
8584
8585 2006-07-29  Bruno Haible  <bruno@clisp.org>
8586
8587         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
8588
8589 2006-07-29  Bruno Haible  <bruno@clisp.org>
8590
8591         * gnulib-tool (import, update): If there is no Makefile.am, look at
8592         aclocal.m4, instead of bailing out.
8593
8594 2006-07-29  Bruno Haible  <bruno@clisp.org>
8595
8596         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
8597         Categorize the options by when they are useful.
8598
8599 2006-07-29  Bruno Haible  <bruno@clisp.org>
8600
8601         * gnulib-tool (func_usage): Document option --no-libtool.
8602         Handle option --no-libtool.
8603         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
8604         for changed semantics of $libtool variable.
8605         (func_import): Likewise. If libtool is not used, show this through
8606         an option --no-libtool.
8607         (func_create_testdir): Update.
8608
8609 2006-07-29  Bruno Haible  <bruno@clisp.org>
8610
8611         * gnulib-tool (func_import): Extend error message about missing
8612         --doc-base.
8613
8614 2006-07-29  Bruno Haible  <bruno@clisp.org>
8615
8616         * gnulib-tool (func_import): Don't create the $docbase directory if
8617         there is no file to store there.
8618
8619 2006-07-29  Bruno Haible  <bruno@clisp.org>
8620
8621         * gnulib-tool (autoconf_minversion): If a --dir option is given and
8622         relevant, look for configure.ac there, not in the current directory.
8623         Also use a simple search for AC_PREREQ, not "autoconf --trace".
8624
8625 2006-07-29  Bruno Haible  <bruno@clisp.org>
8626
8627         * gnulib-tool (SORT): New variable.
8628         (func_usage): Undocument --assume-autoconf option.
8629         Remove --assume-autoconf option handling.
8630         (autoconf_minversion): Determine from the contents of configure.ac.
8631         (func_import): Remove autoconf_minversion handling.
8632         Suggested by Eric Blake.
8633
8634 2006-07-29  Bruno Haible  <bruno@clisp.org>
8635
8636         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
8637
8638 2006-07-29  Bruno Haible  <bruno@clisp.org>
8639
8640         * config/srclist.txt (*setenv.[ch]): Remove rules.
8641
8642 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8643
8644         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
8645
8646 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8647
8648         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
8649         arpa/inet.h.
8650
8651 2006-07-28  Simon Josefsson  <jas@extundo.com>
8652
8653         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
8654         * modules/inet_pton (Depends-on): Likewise.
8655
8656 2006-07-28  Simon Josefsson  <jas@extundo.com>
8657
8658         * m4/netinet_in_h.m4: New file.
8659
8660 2006-07-28  Simon Josefsson  <jas@extundo.com>
8661
8662         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
8663         #include's.
8664
8665 2006-07-28  Simon Josefsson  <jas@extundo.com>
8666
8667         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
8668         #include's.
8669
8670 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
8671
8672         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
8673         setgid on directories only if they set these bits.
8674         * lib/modechange.h: Remove obsolete comment about masks.
8675
8676 2006-07-28  Eric Blake  <ebb9@byu.net>
8677
8678         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
8679         macro expansion.
8680
8681 2006-07-28  Bruno Haible  <bruno@clisp.org>
8682
8683         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
8684
8685 2006-07-28  Bruno Haible  <bruno@clisp.org>
8686
8687         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
8688
8689 2006-07-28  Bruno Haible  <bruno@clisp.org>
8690
8691         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
8692         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
8693         Define fallbacks.
8694         Avoids link error on FreeBSD 4.x.
8695         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
8696
8697         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
8698         encoding.
8699         * lib/mbswidth.c (iswcntrl): Likewise.
8700
8701 2006-07-27  Bruno Haible  <bruno@clisp.org>
8702
8703         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
8704         test.
8705
8706 2006-07-27  Bruno Haible  <bruno@clisp.org>
8707
8708         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
8709         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
8710         defined.
8711
8712 2006-07-26  Eric Blake  <ebb9@byu.net>
8713
8714         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
8715
8716 2006-07-26  Eric Blake  <ebb9@byu.net>
8717
8718         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
8719         like mingw that lack mkstemp.
8720         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
8721         avoid compilation warning on mingw.
8722
8723 2006-07-26  Bruno Haible  <bruno@clisp.org>
8724
8725         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
8726         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
8727         INT_FAST*_MIN, INTPTR_MIN.
8728
8729 2006-07-25  Bruno Haible  <bruno@clisp.org>
8730
8731         * modules/version-etc (Depends-on): Add stdarg.
8732
8733 2006-07-25  Bruno Haible  <bruno@clisp.org>
8734
8735         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
8736         complex commands.
8737
8738 2006-07-25  Bruno Haible  <bruno@clisp.org>
8739
8740         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
8741         defined in <stdarg.h> or config.h.
8742
8743 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8744
8745         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
8746         (gl_STDIO_SAFER): Remove.
8747
8748 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
8749
8750         * MODULES.html.sh (File stream based Input/Output):
8751         Add fopen-safer, tmpfile-safer; remove stdio-safer.
8752         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
8753         * modules/fopen-safer, modules/tmpfile-safer: New files.
8754         * modules/stdio-safer: Remove.
8755
8756 2006-07-24  Bruno Haible  <bruno@clisp.org>
8757
8758         * modules/tmpdir: New file.
8759         * MODULES.html.sh (File system functions): Add it.
8760
8761 2006-07-24  Bruno Haible  <bruno@clisp.org>
8762
8763         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
8764         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
8765
8766 2006-07-24  Bruno Haible  <bruno@clisp.org>
8767
8768         * modules/clean-temp: New file.
8769
8770 2006-07-24  Bruno Haible  <bruno@clisp.org>
8771
8772         * m4/tmpdir.m4: New file, from GNU gettext.
8773
8774 2006-07-24  Bruno Haible  <bruno@clisp.org>
8775
8776         * lib/tmpdir.h: New file, from GNU gettext.
8777         * lib/tmpdir.c: New file, from GNU gettext.
8778
8779 2006-07-24  Bruno Haible  <bruno@clisp.org>
8780
8781         * lib/clean-temp.h: New file, from GNU gettext.
8782         * lib/clean-temp.c: New file, from GNU gettext.
8783
8784 2006-07-23  Eric Blake  <ebb9@byu.net>
8785
8786         * modules/stdio-safer (Files): Add tmpfile-safer.c.
8787         (Depends-on): Add binary-io.
8788
8789 2006-07-23  Eric Blake  <ebb9@byu.net>
8790
8791         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
8792
8793 2006-07-23  Eric Blake  <ebb9@byu.net>
8794
8795         * lib/tmpfile-safer.c: New file.
8796         * lib/stdio-safer.h (fopen_safer): Add prototype.
8797         * lib/stdio--.h (tmpfile): Make safer.
8798
8799 2006-07-23  Bruno Haible  <bruno@clisp.org>
8800
8801         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
8802         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
8803         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
8804         gl_linked_remove_at): Use it.
8805
8806 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8807         and Simon Josefsson <jas@extundo.com>
8808
8809         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
8810
8811         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
8812
8813 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8814
8815         * modules/close-stream: New file.
8816         * modules/closeout (Description): Make it clear that it exits
8817         with a diagnostic on error.
8818         (Depends-on): Add close-stream.  Remove fpending, stdbool.
8819         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
8820
8821 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8822
8823         * m4/close-stream.m4: New file.
8824
8825 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
8826
8827         * lib/close-stream.c, lib/close-stream.h: New files.
8828
8829 2006-07-22  Bruno Haible  <bruno@clisp.org>
8830
8831         Merge from GNU gettext 0.15.
8832
8833         2006-05-01  Bruno Haible  <bruno@clisp.org>
8834
8835                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
8836
8837         2006-07-22  Bruno Haible  <bruno@clisp.org>
8838
8839                 * modules/javaversion: New file.
8840                 * MODULES.html.sh (Java): Add javaversion.
8841
8842         2006-03-12  Bruno Haible  <bruno@clisp.org>
8843
8844                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
8845
8846         2005-12-04  Bruno Haible  <bruno@clisp.org>
8847
8848                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
8849                 (untested).
8850
8851         2006-06-21  Bruno Haible  <bruno@clisp.org>
8852
8853                 Avoid warnings from recent versions of mcs.
8854                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
8855                 -o, -L, -r any more. Use options documented since mcs-1.0
8856                 instead. Similarly for -g.
8857
8858         2005-12-04  Bruno Haible  <bruno@clisp.org>
8859
8860                 * build-aux/csharpcomp.sh.in: Suffix for resources is
8861                 .resources, not .resource.
8862
8863         2005-07-09  Bruno Haible  <bruno@clisp.org>
8864
8865                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
8866                 add a .dll suffix.
8867                 Reported by Mark Junker <mjscod@gmx.de>.
8868
8869         2006-07-22  Bruno Haible  <bruno@clisp.org>
8870
8871                 * modules/gettext: Upgrade to gettext-0.15.
8872                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
8873                 m4/visibility.m4.
8874                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
8875
8876 2006-07-22  Bruno Haible  <bruno@clisp.org>
8877
8878         Merge from GNU gettext 0.15.
8879
8880         2006-03-25  Bruno Haible  <bruno@clisp.org>
8881
8882                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
8883
8884         2006-07-21  Bruno Haible  <bruno@clisp.org>
8885
8886                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
8887                 "1.1".
8888
8889         2006-05-09  Bruno Haible  <bruno@clisp.org>
8890
8891                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
8892                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
8893                 for the conftestver execution.
8894
8895         2006-05-01  Bruno Haible  <bruno@clisp.org>
8896
8897                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
8898                 optional target-version argument. Verify that the compiler
8899                 groks source of the specified source-version, or add -source
8900                 option as necessary. Verify that the compiler produces
8901                 bytecode in the specified target-version, or add -target and
8902                 -source options as necessary. Make the result of the test
8903                 available as variable CONF_JAVAC. Also log error output in
8904                 config.log.
8905
8906         2006-03-11  Bruno Haible  <bruno@clisp.org>
8907
8908                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
8909
8910         2006-05-09  Bruno Haible  <bruno@clisp.org>
8911
8912                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
8913                 CLASSPATH_SEPARATOR to a semicolon.
8914
8915         2006-03-12  Bruno Haible  <bruno@clisp.org>
8916
8917                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
8918                 available as variable CONF_JAVA, for subsequent autoconf
8919                 tests. Also log error output in config.log.
8920
8921         2006-07-19  Bruno Haible  <bruno@clisp.org>
8922
8923                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
8924                 that getline works on glibc2 systems. Needed to avoid trouble
8925                 in relocatable.c.
8926                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
8927
8928         2005-12-04  Bruno Haible  <bruno@clisp.org>
8929
8930                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
8931                 launcher (untested).
8932
8933         2005-12-04  Bruno Haible  <bruno@clisp.org>
8934
8935                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
8936
8937         2006-07-22  Bruno Haible  <bruno@clisp.org>
8938
8939                 * gettext.m4: Update from GNU gettext-0.15.
8940                 * nls.m4: Likewise.
8941                 * po.m4: Likewise.
8942                 * inttypes-pri.m4: Likewise.
8943                 * inttypes-h.m4: Renamed from inttypes.m4.
8944                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
8945
8946 2006-07-22  Bruno Haible  <bruno@clisp.org>
8947
8948         Merge from GNU gettext 0.15.
8949
8950         2005-07-05  Bruno Haible  <bruno@clisp.org>
8951
8952                 * printf-args.c (printf_fetchargs): Work around broken
8953                 definition of wint_t on mingw.
8954
8955         2005-02-12  Bruno Haible  <bruno@clisp.org>
8956
8957                 * xallocsa.h: Add extern "C" for C++.
8958
8959         2006-05-17  Bruno Haible  <bruno@clisp.org>
8960
8961                 Cygwin portability.
8962                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
8963
8964         2006-04-30  Bruno Haible  <bruno@clisp.org>
8965
8966                 * progreloc.c: Include <mach-o/dyld.h> if available.
8967                 (find_executable): Use _NSGetExecutablePath when possible.
8968
8969         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
8970
8971                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
8972                 function.
8973
8974         2005-12-29  Bruno Haible  <bruno@clisp.org>
8975
8976                 * progreloc.c (set_program_name_and_installdir): Fix
8977                 compilation error.
8978
8979         2005-12-04  Bruno Haible  <bruno@clisp.org>
8980
8981                 Cygwin portability.
8982                 * progreloc.c: Include <windows.h> also on Cygwin.
8983                 (find_executable): Add support for Cygwin.
8984                 (set_program_name_and_installdir): Handle also platforms with
8985                 nonempty EXEEXT.
8986
8987         2006-07-11  Bruno Haible  <bruno@clisp.org>
8988
8989                 * javacomp.c: Fix a comment.
8990                 Reported by Jim Meyering.
8991
8992         2006-04-30  Bruno Haible  <bruno@clisp.org>
8993
8994                 * javacomp.h (compile_java_class): Add source_version,
8995                 target_version arguments.
8996                 * javacomp.c: Rewritten to choose only a compiler that
8997                 respects the specified source_version and target_version.
8998
8999         2006-06-27  Bruno Haible  <bruno@clisp.org>
9000
9001                 Assume correct S_ISDIR macro.
9002                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
9003
9004         2006-07-22  Bruno Haible  <bruno@clisp.org>
9005
9006                 * javaversion.h: New file, from GNU gettext.
9007                 * javaversion.c: New file, from GNU gettext.
9008                 * javaversion.java: New file, from GNU gettext.
9009                 * javaversion.class: New file, from GNU gettext.
9010
9011         2006-05-17  Bruno Haible  <bruno@clisp.org>
9012
9013                 Cygwin portability.
9014                 * javaexec.c (execute_java_class): Test for jview program
9015                 also on Cygwin.
9016
9017         2006-04-09  Bruno Haible  <bruno@clisp.org>
9018
9019                 * fatal-signal.c: Don't include string.h.
9020                 (at_fatal_signal): Use a copying loop instead of memcpy.
9021
9022         2005-12-04  Bruno Haible  <bruno@clisp.org>
9023
9024                 * csharpexec.c: Add support for 'clix' launcher (untested).
9025                 (execute_csharp_using_sscli): New function.
9026                 (execute_csharp_program): Call it.
9027
9028         2006-06-21  Bruno Haible  <bruno@clisp.org>
9029
9030                 Avoid warnings from recent versions of mcs.
9031                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
9032                 -o, -L, -r any more. Use options documented since mcs-1.0
9033                 instead. Similarly for -g.
9034
9035         2005-07-09  Bruno Haible  <bruno@clisp.org>
9036
9037                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
9038                 add a .dll suffix.
9039                 Reported by Mark Junker <mjscod@gmx.de>.
9040
9041         2006-06-17  Bruno Haible  <bruno@clisp.org>
9042
9043                 * config.charset: Update for NetBSD 3.0.
9044
9045         2006-05-17  Bruno Haible  <bruno@clisp.org>
9046
9047                 Cygwin portability.
9048                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
9049
9050         2006-05-16  Bruno Haible  <bruno@clisp.org>
9051
9052                 * localcharset.c [CYGWIN]: Include <windows.h>.
9053                 (get_charset_aliases): For Cygwin, return the same CPxxx
9054                 aliases list as under WIN32.
9055                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
9056                 the environment variables. Fall back to GetACP().
9057
9058         2006-04-05  Bruno Haible  <bruno@clisp.org>
9059
9060                 * config.charset: Update Juan Manuel Guerrero's address.
9061
9062         2005-02-12  Bruno Haible  <bruno@clisp.org>
9063
9064                 * allocsa.h: Add extern "C" for C++.
9065
9066         2005-02-10  Bruno Haible  <bruno@clisp.org>
9067
9068                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
9069                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
9070
9071         2006-07-22  Bruno Haible  <bruno@clisp.org>
9072
9073                 * gettext.h: Update to GNU gettext-0.15.
9074
9075 2006-07-22  Bruno Haible  <bruno@clisp.org>
9076
9077         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
9078         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
9079         lib-prefix.m4, longdouble.m4, ssize_t.m4.
9080
9081 2006-07-21  Eric Blake  <ebb9@byu.net>
9082
9083         * modules/stdlib-safer: New file.
9084         * MODULES.html.sh (File stream based Input/Output): Add
9085         stdlib-safer.
9086
9087 2006-07-21  Eric Blake  <ebb9@byu.net>
9088
9089         * lib/stdlib-safer.h: New file from coreutils, required by
9090         stdlib--.h.
9091
9092 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
9093
9094         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
9095
9096 2006-07-20  Bruno Haible  <bruno@clisp.org>
9097
9098         * gnulib-tool: Recognize new option --assume-autoconf.
9099         (autoconf_minversion): New variable.
9100         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
9101
9102 2006-07-20  Bruno Haible  <bruno@clisp.org>
9103
9104         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
9105
9106 2006-07-19  Derek R. Price  <derek@ximbiot.com>
9107
9108         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
9109         Reindent and repaginate.
9110
9111 2006-07-19  Derek Price  <derek@ximbiot.com>
9112
9113         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
9114         Correct grammar.
9115
9116 2006-07-17  Bruno Haible  <bruno@clisp.org>
9117
9118         * modules/list: New file.
9119         * modules/array-list: New file.
9120         * modules/carray-list, modules/carray-list-tests: New files.
9121         * modules/linked-list, modules/linked-list-tests: New files.
9122         * modules/avltree-list, modules/avltree-list-tests: New files.
9123         * modules/rbtree-list, modules/rbtree-list-tests: New files.
9124         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
9125         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
9126         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
9127         * modules/oset: New file.
9128         * modules/array-oset: New file.
9129         * modules/avltree-oset, modules/avltree-oset-tests: New files.
9130         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
9131         * tests/test-carray_list.c: New file.
9132         * tests/test-linked_list.c: New file.
9133         * tests/test-avltree_list.c: New file.
9134         * tests/test-rbtree_list.c: New file.
9135         * tests/test-linkedhash_list.c: New file.
9136         * tests/test-avltreehash_list.c: New file.
9137         * tests/test-rbtreehash_list.c: New file.
9138         * tests/test-avltree_oset.c: New file.
9139         * tests/test-rbtree_oset.c: New file.
9140         * MODULES.html.sh (Container data structures): New section.
9141
9142 2006-07-17  Bruno Haible  <bruno@clisp.org>
9143
9144         * m4/gl_list.m4: New file.
9145
9146 2006-07-17  Bruno Haible  <bruno@clisp.org>
9147
9148         * lib/gl_list.h: New file.
9149         * lib/gl_list.c: New file.
9150         * lib/gl_array_list.h: New file.
9151         * lib/gl_array_list.c: New file.
9152         * lib/gl_carray_list.h: New file.
9153         * lib/gl_carray_list.c: New file.
9154         * lib/gl_linked_list.h: New file.
9155         * lib/gl_linked_list.c: New file.
9156         * lib/gl_anylinked_list1.h: New file.
9157         * lib/gl_anylinked_list2.h: New file.
9158         * lib/gl_avltree_list.h: New file.
9159         * lib/gl_avltree_list.c: New file.
9160         * lib/gl_anyavltree_list1.h: New file.
9161         * lib/gl_anyavltree_list2.h: New file.
9162         * lib/gl_rbtree_list.h: New file.
9163         * lib/gl_rbtree_list.c: New file.
9164         * lib/gl_anyrbtree_list1.h: New file.
9165         * lib/gl_anyrbtree_list2.h: New file.
9166         * lib/gl_anytree_list1.h: New file.
9167         * lib/gl_anytree_list2.h: New file.
9168         * lib/gl_linkedhash_list.h: New file.
9169         * lib/gl_linkedhash_list.c: New file.
9170         * lib/gl_anyhash_list1.h: New file.
9171         * lib/gl_anyhash_list2.h: New file.
9172         * lib/gl_avltreehash_list.h: New file.
9173         * lib/gl_avltreehash_list.c: New file.
9174         * lib/gl_rbtreehash_list.h: New file.
9175         * lib/gl_rbtreehash_list.c: New file.
9176         * lib/gl_anytreehash_list1.h: New file.
9177         * lib/gl_anytreehash_list2.h: New file.
9178
9179         * lib/gl_oset.h: New file.
9180         * lib/gl_oset.c: New file.
9181         * lib/gl_array_oset.h: New file.
9182         * lib/gl_array_oset.c: New file.
9183         * lib/gl_avltree_oset.h: New file.
9184         * lib/gl_avltree_oset.c: New file.
9185         * lib/gl_rbtree_oset.h: New file.
9186         * lib/gl_rbtree_oset.c: New file.
9187         * lib/gl_anytree_oset.h: New file.
9188
9189 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9190
9191         * m4/mkancesdirs.m4: New file.
9192         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
9193         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
9194         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
9195         it.
9196
9197 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9198
9199         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
9200         * lib/mkancesdirs.h: New files.
9201         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
9202         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
9203         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
9204         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
9205         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
9206         callers changed.  Revamp internals significantly, by not
9207         attempting to create directories that are temporarily more
9208         permissive than the final results.  Do not attempt to use
9209         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
9210         This removes some race conditions, fixes some bugs, and simplifies
9211         things.  Use new dirchownmod function to do owner and mode changes.
9212         * lib/mkdir-p.h: Likewise.
9213         * lib/modechange.c (octal_to_mode): New function.
9214         (struct mode_change): New member mentioned.
9215         (make_node_op_equals): New arg mentioned.  All callers changed.
9216         (mode_compile): Keep track of which mode bits the user has explicitly
9217         mentioned.
9218         (mode_adjust): New arg DIR, so that we implement the X op correctly.
9219         New arg PMODE_BITS, to keep track of which mode bits the user
9220         mentioned; it treats S_ISUID and S_ISGID speciall.
9221         All callers changed.
9222         * lib/modechange.h: Likewise.
9223
9224 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
9225
9226         * MODULES.html.sh: Add mkancestors.
9227         * modules/mkancesdirs: New module.
9228         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
9229         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
9230         The chdir-safer and afs files are now orphans; I'll remove them
9231         unless someone speaks up.
9232         Add lib/dirchownmod.c, lib/dirchownmod.h.
9233         (Depends-on): Remove alloca, chown, save-cwd, dirname.
9234         Add lchown, mkancesdirs.
9235         (Maintainer): Add self.
9236
9237 2006-07-15  Karl Berry  <karl@gnu.org>
9238
9239         * gnulib-tool: help message wording/arrangement.
9240
9241 2006-07-14  Simon Josefsson  <jas@extundo.com>
9242
9243         * doc/gnulib.texi (Libtool and Windows): New section.
9244
9245 2006-07-12  Simon Josefsson  <jas@extundo.com>
9246
9247         * modules/gendocs (License): Fix license, approved by Karl.
9248
9249 2006-07-12  Eric Blake  <ebb9@byu.net>
9250
9251         * MODULES.html.sh: Add gendocs.
9252
9253 2006-07-11  Eric Blake  <ebb9@byu.net>
9254
9255         * modules/fdl: New module, to install doc/fdl.texi.
9256         * MODULES.html.sh: Add new section for documentation modules.
9257         * gnulib-tool: Avoid space-tab.
9258         (--doc-base): New option, to manage files from doc.
9259
9260 2006-07-11  Eric Blake  <ebb9@byu.net>
9261
9262         * m4/absolute-header.m4: Fix comments to match recent change.
9263
9264 2006-07-11  Eric Blake  <ebb9@byu.net>
9265
9266         * gnulib-tool: List --doc-base before --tests-base.
9267
9268 2006-07-11  Derek R. Price  <derek@ximbiot.com>
9269
9270         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
9271
9272 2006-07-11  Bruno Haible  <bruno@clisp.org>
9273
9274         * README: Mention where to put documentation.
9275
9276 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9277
9278         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
9279
9280 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9281
9282         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
9283         to stdint.m4.
9284
9285 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
9286
9287         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
9288         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
9289         "no/such/file/stdint.h" when there is no such file, so that
9290         the resulting C code can be parsed by dodgy compilers.
9291         Problems reported by Bob Proulx.
9292
9293 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9294
9295         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
9296         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9297         macros into the GNU _D_EXACT_NAMLEN.
9298         * lib/savedir.c:  Likewise.
9299         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
9300
9301 2006-07-10  Derek R. Price  <derek@ximbiot.com>
9302         and Paul Eggert  <eggert@cs.ucla.edu>
9303
9304         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
9305         * m4/savedir.m4:
9306         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
9307         macros into the GNU _D_EXACT_NAMLEN.
9308
9309 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9310
9311         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
9312         around the absolute name, to work around a problem with the HP-UX
9313         11.23 native C compiler, reported by Bob Proulx.
9314
9315 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9316
9317         * doc/maintain.texi, make-stds.texi: Sync from
9318         <http://savannah.gnu.org/projects/gnustandards>.
9319
9320 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
9321
9322         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
9323
9324 2006-07-09  Jim Meyering  <jim@meyering.net>
9325
9326         * m4/glob.m4: Remove a doubled word in a comment.
9327
9328 2006-07-09  Jim Meyering  <jim@meyering.net>
9329
9330         * lib/argp-pv.c: Remove a doubled word in a comment.
9331         * lib/check-version.c (check_version): Likewise.
9332         * lib/javacomp.c (compile_java_class): Likewise.
9333
9334 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
9335
9336         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
9337         for the benefit of people using Autoconf 2.60.  If you want to
9338         support older Autoconf versions you can copy m4/onceonly_2_57.m4
9339         (or m4/onceonly.m4, if pre-2.57) manually.
9340
9341 2006-07-08  Jim Meyering  <jim@meyering.net>
9342
9343         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
9344         comment.
9345         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
9346         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
9347         comment.
9348
9349 2006-07-08  Jim Meyering  <jim@meyering.net>
9350
9351         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
9352
9353 2006-07-07  Simon Josefsson  <jas@extundo.com>
9354
9355         * tests/test-crc.c: Change expected crc value, the test vector
9356         were probably computed using the old broken crc.c?
9357
9358 2006-07-06  Simon Josefsson  <jas@extundo.com>
9359
9360         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
9361         now the canonical place for the M4 file).
9362
9363         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
9364         from the sys_socket dependency now.
9365
9366         * modules/inet_pton (Files): Ditto.
9367
9368         * modules/inet_ntop (Files): Ditto.
9369
9370 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9371
9372         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
9373         not gl_PREREQ_GETUSERSHELL.
9374
9375 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9376
9377         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
9378         with only one argument, for Autoconf 2.60.
9379         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
9380         expand to nothing, so add a shell command to avoid syntax error.
9381         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
9382
9383 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9384
9385         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
9386
9387 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9388
9389         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
9390         no longer needed.  Check for isblank decl.
9391         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
9392         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
9393         of existence.
9394
9395 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9396
9397         * lib/getloadavg.c: Use __VMS, not VMS.
9398         * lib/getopt.c: Likewise.
9399         * lib/getpagesize.h: Likewise.
9400         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
9401         and probably does not work.
9402
9403 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9404
9405         * lib/.cppi-disable: Add wcwidth.
9406         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
9407         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
9408         (ISGRAPH): Remove.  All uses changed to isgraph.
9409         (FOLD) [!defined _LIBC]: Remove special case.
9410         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
9411         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
9412         HAVE_ISBLANK.
9413         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
9414         case.
9415
9416 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9417
9418         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
9419         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
9420         brackets.  Other minor changes to suppress some compiler
9421         warnings.
9422
9423 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9424         and Paul Eggert  <eggert@cs.ucla.edu>
9425
9426         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
9427         of invoking obsolescent AC_HEADER_DIRENT macro.
9428         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
9429         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
9430         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
9431         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
9432         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
9433         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
9434         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
9435         * m4/readdir.m4: Remove; no longer needed.
9436
9437 2006-07-06  Derek R. Price  <derek@ximbiot.com>
9438         and Paul Eggert  <eggert@cs.ucla.edu>
9439
9440         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
9441         Don't worry about this obsolete case any more.
9442         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
9443         directories.
9444         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
9445         worry about this obsolete case any more.
9446         * lib/fts.c: Likewise.
9447         * lib/getcwd.c: Likewise.
9448         * lib/glob.h: Likewise.
9449         * lib/savedir.c: Likewise.
9450
9451 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9452
9453         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
9454         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
9455         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
9456         needed.
9457         All uses removed.
9458         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9459         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9460         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
9461         needed.
9462         * m4/getdate.m4 (gl_GETDATE): Likewise.
9463         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9464         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9465         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9466         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9467         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
9468         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9469         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
9470         needed.
9471
9472 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9473
9474         * lib/memcasecmp.c: Include <limits.h>.
9475         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
9476         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
9477         Don't assume isdigit succeeds only on '0' through '9'.
9478
9479 2006-07-05  Eric Blake  <ebb9@byu.net>
9480
9481         * modules/getaddrinfo (Depends-on): Add snprintf.
9482
9483 2006-07-05  Eric Blake  <ebb9@byu.net>
9484
9485         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
9486         to avoid 'header present but could not be compiled' on cygwin.
9487
9488 2006-07-05  Eric Blake  <ebb9@byu.net>
9489
9490         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
9491         missing from netdb.h.
9492         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
9493
9494 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9495
9496         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
9497         no longer needed.
9498         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
9499         * m4/getdate.m4 (gl_GETDATE): Likewise.
9500         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
9501         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
9502         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
9503         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
9504         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
9505
9506 2006-07-05  Derek R. Price  <derek@ximbiot.com>
9507
9508         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
9509         All uses of is_space replaced by isspace.
9510         * lib/exit.h: Don't talk about STDC_HEADERS.
9511         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
9512         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
9513         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
9514         replaced by isprint etc.
9515         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
9516         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
9517         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
9518         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
9519         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
9520         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
9521
9522 2006-07-05  Bruno Haible  <bruno@clisp.org>
9523
9524         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
9525         the function exists, before testing against AIX.
9526         Reported by Martin Lambers <marlam@marlam.de>.
9527
9528 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
9529
9530         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
9531         From Mark D. Baushke.
9532
9533 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
9534
9535         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
9536         to the absolute name, not just one, to bypass Sun C 5.8's
9537         "warning: #include of /usr/include/... may be non-portable".
9538
9539 2006-07-04  Eric Blake  <ebb9@byu.net>
9540
9541         * modules/dirname-tests: New test module.
9542         * tests/test-dirname.c: New file, replacing dirname.c
9543         TEST_DIRNAME section that was recently deleted.
9544
9545 2006-07-04  Bruno Haible  <bruno@clisp.org>
9546
9547         Assume ANSI C header files and <ctype.h> functions.
9548         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
9549         (mbsnwidth): Use isprint, iscntrl instead.
9550
9551 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9552
9553         Merge from coreutils.
9554         * MODULES.html.sh: Add xstrtold.
9555         * modules/xstrtold: New file.
9556         * modules/cycle-check (Files): Add lib/same-inode.h.
9557         * modules/dirname (Files): Add m4/double-slash-root.m4.
9558         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
9559         * modules/mkdir-p (Files): Add lib/same-inode.h.
9560         * modules/same (Files): Add lib/same-inode.h.
9561
9562 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9563
9564         * m4/absolute-header.m4: Renamed from full-header-path.m4.
9565         This is to keep the terminology clean; POSIX talks about
9566         "absolute pathnames", not "full pathnames", but the GNU
9567         Coding Standards say to use "path" for something else;
9568         so use "absolute" to keep both sides happy.
9569         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
9570         Set gl_absolute_header, not gl_full_header_path.
9571         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
9572         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
9573         All uses changed.
9574
9575         Merge from coreutils.
9576
9577         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9578
9579         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
9580         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
9581         want to require the building of c-strtod.o.
9582         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
9583         needs -lm directly.
9584         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
9585
9586         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
9587
9588         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
9589         --as-needed option if available.  Problem reported by Albert Chin in
9590         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
9591         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
9592         cc merely issues a bunch of annoying warnings for --as-needed
9593         (this problem was reported by Bob Proulx).  Also, try linking with
9594         -lm to detect a bug in binutils 2.16 (this problem was reported
9595         by Ralf Wildenhues).
9596
9597         2006-06-18  Jim Meyering  <jim@meyering.net>
9598
9599         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
9600         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
9601         macro.
9602         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
9603         also check for glibc-2.4's abort-inducing bug.
9604
9605         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
9606         Low-probability clean-up should be to use rmdir to get rid of
9607         the just-created directory, not unlink.
9608
9609         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
9610         configure fail, and request a bug report to inform us about it.
9611         Add a comment that, barring reports to the contrary, in 2007 we'll
9612         assume ftruncate is universally available.
9613
9614         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
9615
9616         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
9617
9618         2006-03-12  Jim Meyering  <jim@meyering.net>
9619
9620         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
9621         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
9622         * m4/same.m4 (gl_SAME): Likewise.
9623         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
9624
9625         2006-03-11  Eric Blake  <ebb9@byu.net>
9626
9627         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
9628         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
9629         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
9630         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
9631
9632 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9633
9634         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
9635         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
9636         reported by Mark D. Baushke, one in
9637         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
9638
9639         Merge from coreutils.
9640
9641         * lib/.cppi-disable: Add stdint_.h.
9642         * lib/.cvsignore: Add stdint.h.
9643
9644         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
9645
9646         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
9647         both double and long double versions.
9648         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
9649         * lib/xstrtold.c: New file.
9650         * lib/xstrtod.h (xstrtold): New decl.
9651
9652         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
9653
9654         * lib/filemode.c (setst): Remove.
9655         (strmode): Rewrite to avoid setst.  This makes the code shorter,
9656         (arguably) clearer, and the generated code is a bit smaller on my
9657         Debian GNU/Linux stable x86 host.
9658
9659         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
9660
9661         * lib/filemode.c: Include "filemode.h" first, to test the interface.
9662         Assume that filemode.h includes sys/types.h and sys/stat.h.
9663         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
9664         (ftypelet): Reorder to put common cases first, for efficiency.
9665         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
9666         to do 'M'.
9667         (strmode): Renamed from mode_string, and now stores 12 bytes instead
9668         of 10, for compatibility with FreeBSD.  All callers changed.
9669         (filemodestring): Now stores 12 bytes instead of 10, and sets file
9670         types that can't be deduced solely from st_mode.  First arg is now a
9671         const pointer.
9672         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
9673         (strmode): Renamed from mode_string.
9674         (filemodestring): New decl.
9675         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
9676         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
9677         needed.
9678         (S_ISPORT, S_ISWHT): New macros, if not already defined.
9679
9680         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
9681
9682         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
9683         fsusage.h now does that.  Include fsusage.h first, to test interface.
9684         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
9685         at most one method (the old code could have generated decls that
9686         didn't conform to C89, not that this was ever exercised).
9687         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
9688
9689         2006-03-19  Jim Meyering  <jim@meyering.net>
9690
9691         Work even in a chroot where d_ino values for entries in "/"
9692         don't match the stat.st_ino values for the same names.
9693         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
9694         number, iterate through all entries again, using lstat instead.
9695         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
9696         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
9697
9698         * lib/getcwd.c (__getcwd): Clarify a comment.
9699         Use memcpy in place of a call to strcpy.
9700
9701         2006-03-12  Jim Meyering  <jim@meyering.net>
9702
9703         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
9704         matches that of the current directory (which we're about to chdir ".."
9705         out of), then save the dev-ino of the parent, instead.
9706
9707         * lib/same-inode.h (SAME_INODE): New file/macro.
9708         * lib/chdir-safer.c (SAME_INODE): Remove definition.
9709         Include "same-inode.h", instead.
9710         * lib/same.c: Likewise.
9711         * lib/cycle-check.h: Include "same-inode.h".
9712         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
9713         * lib/cycle-check.c (SAME_INODE): Remove definition.
9714         * lib/root-dev-ino.h: Include "same-inode.h".
9715
9716         2006-03-11  Eric Blake  <ebb9@byu.net>
9717
9718         * lib/same.c (same_name): s/base_name/last_component/
9719         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
9720         * lib/filenamecat.c (file_name_concat): Likewise.
9721
9722         2006-03-11  Eric Blake  <ebb9@byu.net>,
9723                     Paul Eggert  <eggert@cs.ucla.edu>
9724
9725         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
9726         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
9727         drive prefix.
9728         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
9729         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
9730         (last_component): New method.
9731         * lib/dirname.c (dir_len): Determine when drive letters need a
9732         subsequent slash.  Preserve // when it is special.
9733         (dir_name): Don't append dot when drive letter is absolute.
9734         [TEST_DIRNAME]: Move into a full-blown gnulib test.
9735         * lib/basename.c (base_name): New semantics - malloc the result.
9736         Preserve // when it is special.  Preserve relative files that look
9737         like drive letters.
9738         (base_len): Preserve // when it is special.
9739         (last_component): New method, similar to old base_name semantics.
9740         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
9741         base_name.  Strip redundant slashes from ///.
9742
9743 2006-07-03  Jim Meyering  <jim@meyering.net>
9744
9745         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
9746         macro is used before the first cycle_check call.
9747
9748 2006-07-03  Eric Blake  <ebb9@byu.net>
9749
9750         * modules/dirname (Depends-on): Add xstrndup.
9751
9752 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9753
9754         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
9755         test cases, so that config.log is a bit easier to follow.
9756
9757 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
9758
9759         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
9760         both are 64 bits, since this seems to be the tradition, and this
9761         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
9762         we ever run into a host that prefers long long to long in this
9763         case, we'll need another configure-time test.  Problem reported by
9764         Jim Meyering.
9765
9766 2006-07-02  Eric Blake  <ebb9@byu.net>
9767
9768         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
9769
9770 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9771
9772         * modules/inttypes (Depends-on): No longer depends on stdint.
9773         * modules/stdint (Description): Say more about assumptions.
9774         Say that the fast types might differ.  Say macros are used.
9775         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
9776         (Makefile.am): Revise list of substituted symbols to match
9777         new stdint.m4.
9778         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
9779         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
9780         * tests/test-stdint.c (verify_same_types)
9781         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
9782         the code conforms to C99/C89.
9783         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
9784         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
9785
9786 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9787
9788         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
9789         but fix a bug, by requiring at least 64 bits.
9790         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
9791         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
9792         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
9793         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
9794
9795         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
9796         changes.  Make 2.59 a prerequisite.  Check and substitute for
9797         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
9798         inttypes.h.  Do not use special include files; just use the
9799         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
9800         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
9801         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
9802         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
9803         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
9804         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
9805         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
9806         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
9807         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
9808         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
9809         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
9810         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
9811         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
9812         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
9813         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
9814         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
9815         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
9816         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
9817         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
9818         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
9819         WINT_MAX.  Check for C99 conformance more strictly, by detecting
9820         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
9821         not check for things that C99 does not require, e.g., int8_t.  If
9822         a test isn't needed unless <stdint.h> isn't working, and is
9823         unlikely to be needed for any other reason, then don't do it
9824         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
9825         size_t, since we assume C89 freestanding at least.  Do not check
9826         for sig_atomic_t, wchar_t, or wint_t, since the code now does
9827         the right thing even if the types are not defined.  Instead use:
9828         (gl_STDINT_TYPE_PROPERTIES): New macro.
9829         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
9830         testing whether <sys/types.h> clashes, as Autoconf does this for
9831         us now.  All uses removed.
9832         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
9833         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
9834         (gl_CHECK_TYPE_SAME):
9835         Remove; no longer needed.
9836         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
9837         exists, since we'll return 0 anyway in that case.
9838         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
9839
9840 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9841
9842         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
9843         possible collision with system files.
9844         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
9845         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
9846         WCHAR_MIN and WCHAR_MAX in this case.
9847         (<stddef.h>): Do not include; no longer needed.
9848         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
9849         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
9850         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
9851         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
9852         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
9853         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
9854         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
9855         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
9856         !defined(__c99))]: Include in this case too, since it's harmless
9857         now.
9858         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
9859         dangerous to do so.
9860         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
9861         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
9862         (_STDINT_MIN, _STDINT_MAX): New macros.
9863         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
9864         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
9865         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
9866         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
9867         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
9868         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
9869         macros, not typedefs; this simplifies things quite a bit.
9870         Use long int for all types narrower than int64_t.
9871         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
9872         Define in terms of long long int or int64_t or long int,
9873         not int64_t or int32_t.  This saves some compile-time testing.
9874         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
9875         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
9876         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
9877         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
9878         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
9879         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
9880         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
9881         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
9882         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
9883         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
9884         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9885         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9886         undef any previous version and define our own version, for
9887         simplicity and consistency with the new macros for types.
9888         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
9889         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
9890         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
9891         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
9892         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
9893         @WINT_T_SUFFIX@ to keep things simple here.
9894         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
9895         Simplify by assuming typical 8/16/32/64 host, since we're
9896         already doing that elsewhere anyway.
9897         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
9898         and assume long long int is 64 bits if available.  This
9899         speeds up 'configure'.
9900
9901 2006-07-01  Eric Blake  <ebb9@byu.net>
9902
9903         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
9904         Reported by Andreas Buening.
9905
9906 2006-07-01  Eric Blake  <ebb9@byu.net>
9907
9908         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
9909
9910 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
9911
9912         * lib/getaddrinfo.c: fixed typo
9913
9914 2006-06-29  Jim Meyering  <jim@meyering.net>
9915
9916         * modules/strftime (Maintainer): Add my name, since with the
9917         FPRINTFTIME changes strftime.c has forked from glibc.
9918
9919 2006-06-29  Eric Blake  <ebb9@byu.net>
9920
9921         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
9922
9923 2006-06-29  Eric Blake  <ebb9@byu.net>
9924
9925         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
9926
9927 2006-06-29  Eric Blake  <ebb9@byu.net>
9928
9929         * lib/stat_.h: New file.
9930
9931 2006-06-29  Eric Blake  <ebb9@byu.net>
9932
9933         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
9934         unused static function.
9935
9936 2006-06-29  Eric Blake  <ebb9@byu.net>
9937
9938         * doc/functions.texi (Function Portability): Document missing lstat
9939         on mingw.
9940
9941 2006-06-29  Eric Blake  <ebb9@byu.net>
9942
9943         * MODULES.html.sh: Add sys_stat.
9944         * modules/sys_stat: New module.
9945         * modules/mkstemp (Depends-on): Add sys_stat.
9946
9947 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9948
9949         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
9950
9951 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9952
9953         * m4/c-bs-a.m4: Removed.
9954
9955 2006-06-29  Derek R. Price  <derek@ximbiot.com>
9956
9957         * lib/strftime.c: Assume strftime() exists.
9958
9959 2006-06-29  Derek Price  <derek@ximbiot.com>
9960
9961         * modules/c-bs-a: Removed - \a is C89.
9962         * MODULES.html.sh: Remove c-bs-a.
9963
9964 2006-06-29  Bruno Haible  <bruno@clisp.org>
9965
9966         * modules/wcwidth (License): Change to LGPL.
9967
9968 2006-06-28  Simon Josefsson  <jas@extundo.com>
9969
9970         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
9971         on _WIN32.
9972
9973         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
9974         getnameinfo.
9975
9976 2006-06-28  Simon Josefsson  <jas@extundo.com>
9977
9978         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
9979
9980 2006-06-28  Simon Josefsson  <jas@extundo.com>
9981
9982         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
9983         functions there.  It will succeed on Windows XP, but on Windows
9984         2000 and (presumably) earlier, it will fail, and use the internal
9985         re-implementation.
9986         (use_win32_p): New function.
9987         (getaddrinfo): Use strtoul on servname, to support numeric ports.
9988         Support AI_NUMERICSERV to disable getservbyname.
9989         (getnameinfo): New function, only supports
9990         NI_NUMERICHOST|NI_NUMERICSERV for now.
9991
9992         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
9993         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
9994         getnameinfo.
9995
9996 2006-06-28  Eric Blake  <ebb9@byu.net>
9997
9998         * modules/wcwidth: New file.
9999         * modules/mbchar (Depends-on): Add wcwidth.
10000         * modules/mbswidth (Depends-on): Add wcwidth.
10001         * MODULES.html.sh: Add wcwidth.
10002
10003 2006-06-28  Eric Blake  <ebb9@byu.net>
10004
10005         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
10006         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
10007
10008 2006-06-28  Eric Blake  <ebb9@byu.net>
10009
10010         * lib/xvasprintf.h: Fix comments.
10011
10012 2006-06-28  Eric Blake  <ebb9@byu.net>
10013
10014         * lib/mbchar.h (wcwidth): Include wcwidth.h.
10015         * lib/mbswidth.c (wcwidth): Move from here...
10016         * lib/wcwidth.h: ...to this new file.
10017
10018 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10019
10020         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
10021
10022         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
10023         it's obsolete.
10024         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
10025
10026 2006-06-28  Derek R. Price  <derek@ximbiot.com>
10027
10028         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
10029         Autoconf 2.60 says this stuff was obsolete.
10030
10031 2006-06-28  Bruno Haible  <bruno@clisp.org>
10032
10033         * modules/wcwidth (Files): Add m4/wchar_t.m4.
10034
10035 2006-06-28  Bruno Haible  <bruno@clisp.org>
10036
10037         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
10038         gt_TYPE_WCHAR_T.
10039
10040 2006-06-28  Bruno Haible  <bruno@clisp.org>
10041
10042         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
10043         declaration for wcwidth.
10044         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
10045
10046 2006-06-28  Bruno Haible  <bruno@clisp.org>
10047
10048         * lib/mkdtemp.c [MINGW]: Include <io.h>.
10049         (mkdir): Define using _mkdir.
10050
10051 2006-06-28  Bruno Haible  <bruno@clisp.org>
10052
10053         * lib/getaddrinfo.h: Fix POSIX URL.
10054         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
10055         _WIN32.
10056         (use_win32_p): Make static.
10057         (getaddrinfo): Reject service name if it is empty or does not consist
10058         solely of decimal digits, or if its value is > 65535.
10059         (getnameinfo): Remove useless casts.
10060
10061 2006-06-27  Simon Josefsson  <jas@extundo.com>
10062
10063         * modules/sys_select: New file, suggested by Bruno Haible, Paul
10064         Eggert and Martin Lambers.
10065
10066 2006-06-27  Simon Josefsson  <jas@extundo.com>
10067
10068         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
10069         Eggert and Martin Lambers.
10070
10071 2006-06-27  Bruno Haible  <bruno@clisp.org>
10072
10073         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
10074         result to 0, not to empty.
10075         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
10076
10077 2006-06-27  Bruno Haible  <bruno@clisp.org>
10078
10079         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
10080
10081 2006-06-26  Simon Josefsson  <jas@extundo.com>
10082
10083         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
10084         present.
10085
10086 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
10087
10088         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
10089         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
10090         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
10091
10092 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
10093
10094         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
10095
10096 2006-06-26  Bruno Haible  <bruno@clisp.org>
10097
10098         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
10099
10100 2006-06-26  Bruno Haible  <bruno@clisp.org>
10101
10102         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
10103
10104 2006-06-26  Bruno Haible  <bruno@clisp.org>
10105
10106         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
10107         SGI C compiler in pre-C99 mode.
10108         Suggested by Mark D. Baushke and Larry Jones.
10109
10110 2006-06-26  Bruno Haible  <bruno@clisp.org>
10111
10112         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
10113         WCHAR_MAX.
10114         Reported by Mark D. Baushke and Larry Jones.
10115
10116 2006-06-26  Bruno Haible  <bruno@clisp.org>
10117
10118         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
10119         in pre-C99 mode.
10120         Suggested by Mark D. Baushke and Larry Jones.
10121
10122 2006-06-23  Simon Josefsson  <jas@extundo.com>
10123             Bruno Haible  <bruno@clisp.org>
10124
10125         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
10126         Emit mostlyclean-local rule.
10127         (func_emit_tests_Makefile_am): Likewise.
10128         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
10129
10130 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
10131
10132         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
10133
10134 2006-06-23  Bruno Haible  <bruno@clisp.org>
10135
10136         * tests/test-stdint.c: Update to match ISO C 99 Technical
10137         Corrigendum 1.
10138
10139 2006-06-23  Bruno Haible  <bruno@clisp.org>
10140
10141         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
10142
10143 2006-06-23  Bruno Haible  <bruno@clisp.org>
10144
10145         * lib/stdint_.h: Treat IRIX like OpenBSD.
10146
10147 2006-06-23  Bruno Haible  <bruno@clisp.org>
10148
10149         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
10150         ISO C 99 Technical Corrigendum 1.
10151
10152 2006-06-22  Simon Josefsson  <jas@extundo.com>
10153
10154         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
10155         MinGW.
10156
10157 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
10158
10159         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
10160         needed.  Some compiler complained about some of them.  Problem reported
10161         by Larry Jones in
10162         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
10163
10164 2006-06-21  Simon Josefsson  <jas@extundo.com>
10165
10166         * tests/test-getaddrinfo.c: New file.
10167
10168         * modules/getaddrinfo-tests: New file.
10169
10170         * MODULES.html.sh: Add inet_pton.
10171
10172         * modules/inet_pton: New file.
10173
10174 2006-06-21  Simon Josefsson  <jas@extundo.com>
10175
10176         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
10177         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
10178         of using the (limited) gnulib implementation on Windows XP.
10179
10180         * m4/inet_pton.m4: New file.
10181
10182 2006-06-21  Simon Josefsson  <jas@extundo.com>
10183
10184         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
10185         variable.
10186
10187         * lib/socket_.h: Don't define WINVER.
10188
10189         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
10190         slightly modified to work in gnulib.
10191
10192 2006-06-21  Simon Josefsson  <jas@extundo.com>
10193
10194         * doc/gnulib.texi (Windows sockets): Add.
10195
10196 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
10197
10198         * lib/read-file.c (fread_file): Start with buffer allocation of
10199         0 bytes rather than 1 byte; this simplifies the code.
10200         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
10201         code to free buffer and save/restore errno.
10202         (internal_read_file): Remove unused local.
10203
10204 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
10205
10206         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
10207         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
10208         Problem reported by Denis Excoffier in
10209         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
10210
10211 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
10212
10213         * modules/sys_socket, modules/socklen: Include sys/types since
10214         FreeBSD 4.x's sys/socket.h needs it.
10215
10216 2006-06-19  Simon Josefsson  <jas@extundo.com>
10217
10218         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
10219
10220 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
10221
10222         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
10223
10224 2006-06-19  Bruno Haible  <bruno@clisp.org>
10225
10226         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
10227         and FULL_PATH_INTTYPES_H in angle brackets.
10228         Reported by Mark D. Baushke <mdb@gnu.org>.
10229
10230 2006-06-17  Eric Blake  <ebb9@byu.net>
10231
10232         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
10233         errno.
10234
10235 2006-06-17  Bruno Haible  <bruno@clisp.org>
10236
10237         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
10238         <sys/inttypes.h>.
10239
10240 2006-06-17  Bruno Haible  <bruno@clisp.org>
10241
10242         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
10243         whether errno is declared. Assume <errno.h> declares errno.
10244
10245 2006-06-17  Bruno Haible  <bruno@clisp.org>
10246
10247         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
10248
10249 2006-06-17  Bruno Haible  <bruno@clisp.org>
10250
10251         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
10252         problem on Solaris 2.5.1.
10253
10254 2006-06-16  Eric Blake  <ebb9@byu.net>
10255
10256         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
10257         * lib/unicodeio.c [!defined errno]: Likewise.
10258         * lib/strtol.c [!defined errno]: Likewise.
10259         * lib/strtod.c [!defined errno]: Likewise.
10260
10261 2006-06-15  Eric Blake  <ebb9@byu.net>
10262
10263         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
10264
10265 2006-06-15  Eric Blake  <ebb9@byu.net>
10266
10267         * config/srclist.txt (ssize_t.m4): Lose sync.
10268
10269 2006-06-15  Bruno Haible  <bruno@clisp.org>
10270
10271         * modules/stdint (Files): Include m4/full-header-path.m4,
10272         m4/size_max.m4, m4/wchar_t.m4.
10273         (Makefile.am): Many more substitutions.
10274         * modules/stdint-tests: New file.
10275         * tests/test-stdint.c: New file.
10276
10277 2006-06-15  Bruno Haible  <bruno@clisp.org>
10278
10279         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
10280         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
10281         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
10282         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
10283         gl_CHECK_TYPE_SAME): New macros.
10284
10285 2006-06-15  Bruno Haible  <bruno@clisp.org>
10286
10287         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
10288
10289 2006-06-15  Bruno Haible  <bruno@clisp.org>
10290
10291         * lib/stdint_.h: Rewritten to be fully auto-configured.
10292         Fixes bug on HP-UX/IA64.
10293
10294 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
10295
10296         * lib/getdate.y (__attribute__): Don't define if already defined.
10297         Problem reported by Larry Jones.
10298         * lib/utimens.c (__attribute__): Likewise.
10299
10300 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
10301
10302         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
10303         reported by Andreas Schwab.
10304
10305 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10306             Bruno Haible  <bruno@clisp.org>
10307
10308         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
10309         check for the declaration of strnlen and a run test that exposes the
10310         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
10311         rpl_strndup.
10312
10313 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10314             Bruno Haible  <bruno@clisp.org>
10315
10316         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
10317
10318 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10319
10320         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
10321         compile test, for Tru64 4.0D.
10322
10323 2006-05-28  Karl Berry  <karl@gnu.org>
10324
10325         * config/srclist.txt (printf-args.c): lose sync.
10326
10327 2006-05-26  Martin Lambers  <marlam@marlam.de>
10328
10329         * lib/getpass.c: Updates the test for the native W32 API, and adds
10330         missing includes, thus fixing compilation warnings.
10331
10332 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
10333
10334         * lib/exclude.c (exclude_fnmatch): New function.
10335         (excluded_file_name): Call exclude_fnmatch.
10336         * lib/exclude.h (excluded_file_name): New prototype
10337
10338 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
10339
10340         * lib/tempname.c (small_open, large_open): New macros.
10341         (__open, __open64) [!_LIBC]: Remove.
10342         (__gen_tempname): Use small_open and large_open instead of __open
10343         and __open64.  This fixes a portability bug on HP-UX 11.11i
10344         reported by Simon Wing-Tang in
10345         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
10346
10347 2006-05-24  Bruno Haible  <bruno@clisp.org>
10348
10349         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
10350         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
10351         Reported by Thorsten Maerz <torte@netztorte.de> via
10352         Aaron Stone <aaron@serendipity.cx>.
10353
10354 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10355
10356         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
10357         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
10358         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
10359         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
10360         not really conditional on the cache.
10361         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
10362
10363 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
10364
10365         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
10366         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
10367         (my_usleep): Don't mishandle maximum value.
10368
10369 2006-05-19  Jim Meyering  <jim@meyering.net>
10370
10371         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
10372
10373 2006-05-17  Bruno Haible  <bruno@clisp.org>
10374
10375         Cygwin portability.
10376         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
10377
10378 2006-05-17  Bruno Haible  <bruno@clisp.org>
10379
10380         * lib/stdint_.h: Fix recognition of Cygwin.
10381
10382 2006-05-15  Bruno Haible  <bruno@clisp.org>
10383
10384         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
10385         on libtool patch by Ralf Wildenhues.
10386
10387 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
10388
10389         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
10390         test for C99 conformance; (bool) 0.5 is an integer constant
10391         expression, but (bool) -0.5 is not.  Problem reported by Fedor
10392         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
10393
10394 2006-05-11  Simon Josefsson  <jas@extundo.com>
10395
10396         * m4/xvasprintf.m4: Fix obvious typo.
10397
10398 2006-05-11  Jim Meyering  <jim@meyering.net>
10399
10400         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
10401         James Lemley.
10402
10403 2006-05-10  Simon Josefsson  <jas@extundo.com>
10404
10405         * lib/md4.c: Typo fix, update copyright years.
10406         (K1, K2): Don't use L because it turn computations into 64-bit on
10407         64-bit platforms.
10408
10409 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
10410
10411         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
10412         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
10413         unwanted sign propagation, e.g., on hosts with 64-bit int.
10414         There still are some problems with reeelly weird theoretical hosts
10415         (e.g., 33-bit int) but it's not worth worrying about now.
10416         * lib/sha1.c (rol): Likewise.
10417         (K1, K2, K3, K4): Remove unnecessary L suffix.
10418
10419 2006-05-10  Bruno Haible  <bruno@clisp.org>
10420
10421         * lib/des.c: Cast to avoid warnings.
10422
10423 2006-05-09  Bruno Haible  <bruno@clisp.org>
10424
10425         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
10426         (Depends-on): Depend also on xsize, stdarg.
10427         (configure.ac): Add gl_XVASPRINTF.
10428
10429 2006-05-09  Bruno Haible  <bruno@clisp.org>
10430
10431         * m4/xvasprintf.m4: New file.
10432
10433 2006-05-09  Bruno Haible  <bruno@clisp.org>
10434
10435         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
10436         (EOVERFLOW): Define fallback value.
10437         (xstrcat): New function.
10438         (xvasprintf): Recognize the special case of a string concatenation.
10439
10440 2006-05-08  Eric Blake  <ebb9@byu.net>
10441
10442         * gnulib-tool (func_version): Base copyright year on CVS date.
10443         (func_emit_copyright_notice): New function.
10444         (func_emit_lib_Makefile_am): Use it.
10445         (func_emit_tests_Makefile_am): Likewise.
10446         (func_import): Likewise.
10447
10448 2006-05-08  Bruno Haible  <bruno@clisp.org>
10449
10450         * modules/stdarg: New file.
10451         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
10452
10453 2006-05-08  Bruno Haible  <bruno@clisp.org>
10454
10455         * m4/stdarg.m4: New file, from GNU gettext.
10456
10457 2006-05-08  Bruno Haible  <bruno@clisp.org>
10458
10459         * config/srclist.txt (build-aux/config.rpath): different from latest
10460         release.
10461
10462 2006-05-08  Bruno Haible  <bruno@clisp.org>
10463
10464         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
10465
10466 2006-05-05  Jim Meyering  <jim@meyering.net>
10467
10468         * m4/warning.m4: New file, derived from bison's file by the same name.
10469
10470 2006-05-03  Bruno Haible  <bruno@clisp.org>
10471
10472         * lib/stdint_.h: Shorter URL.
10473         * lib/inttypes.h: Likewise.
10474
10475 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10476
10477         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
10478
10479 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10480
10481         * lib/verify.h: Document the internals better.  Most of this change
10482         was written by Bruno Haible.
10483
10484 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
10485
10486         * doc/verify.texi: New file, partly based on a proposal by
10487         Bruno Haible.
10488
10489 2006-05-02  Bruno Haible  <bruno@clisp.org>
10490
10491         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
10492         test from here...
10493         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
10494
10495 2006-04-29  Bruno Haible  <bruno@clisp.org>
10496
10497         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
10498         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
10499
10500 2006-04-29  Bruno Haible  <bruno@clisp.org>
10501
10502         * gnulib-tool: Make --update option actually work.
10503
10504 2006-04-29  Bruno Haible  <bruno@clisp.org>
10505
10506         * doc/gcd.texi: New file.
10507         * doc/gnulib.texi: Include it.
10508
10509 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
10510
10511         * lib/getdate.y (get_date): When adding relative date, start with the
10512         initial time, not with the result of the first mktime call.
10513
10514 2006-04-25  Bruno Haible  <bruno@clisp.org>
10515
10516         * gnulib-tool (func_import): Output the include directives in three
10517         blocks, sorted separately.
10518         Reported by Ben Pfaff <blp@cs.stanford.edu>.
10519
10520 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
10521
10522         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
10523         to define main with arguments, for C++.  Reported by Eric Blake.
10524         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
10525         Prefer 'int main ()' to 'int main (void)', for C++.
10526         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
10527         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
10528         for 'main', for C99 and C++.
10529
10530 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
10531
10532         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
10533         Don't assume that exit status -1 is valid.
10534         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
10535         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
10536         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
10537         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
10538         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
10539         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
10540         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
10541         functions can be used without declaring them, or that you can
10542         exit with status -1.
10543         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
10544
10545 2006-04-24  Karl Berry  <karl@gnu.org>
10546
10547         * config/srclist.txt (longdouble.m4): sync lost.
10548
10549 2006-04-24  Eric Blake  <ebb9@byu.net>
10550
10551         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
10552
10553 2006-04-24  Bruno Haible  <bruno@clisp.org>
10554
10555         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
10556         poll() implementation in AIX.
10557         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10558
10559 2006-04-24  Bruno Haible  <bruno@clisp.org>
10560
10561         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
10562         assigned exactly once.
10563
10564 2006-04-23  Claudio Fontana  <claudio@gnu.org>
10565             Bruno Haible  <bruno@clisp.org>
10566
10567         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
10568         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
10569         for AM_CPPFLAGS.
10570
10571 2006-04-23  Bruno Haible  <bruno@clisp.org>
10572
10573         * modules/copy-file: Depend on unistd.
10574         * modules/execute: Likewise.
10575         * modules/fatal-signal: Likewise.
10576         * modules/findprog: Likewise.
10577         * modules/mkdtemp : Likewise.
10578         * modules/pipe: Likewise.
10579         * modules/wait-process: Likewise.
10580
10581 2006-04-23  Bruno Haible  <bruno@clisp.org>
10582
10583         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
10584         condition was already detected.
10585         Reported by Ben Pfaff <blp@cs.stanford.edu>.
10586
10587 2006-04-23  Bruno Haible  <bruno@clisp.org>
10588
10589         * lib/copy-file.c: Include <unistd.h> unconditionally.
10590         * lib/execute.c: Likewise.
10591         * lib/fatal-signal.c: Likewise.
10592         * lib/findprog.c: Likewise.
10593         * lib/mkdtemp.c: Likewise.
10594         * lib/pipe.h: Likewise.
10595         * lib/pipe.c: Likewise.
10596         * lib/wait-process.h: Likewise.
10597
10598 2006-04-23  Bruno Haible  <bruno@clisp.org>
10599
10600         * gnulib-tool (func_usage): Fix --import description. Document
10601         --update.
10602         (func_import): Create temporary file in a temporary directory, if
10603         --dry-run is specified. Silence errors from 'grep' when there are no
10604         m4 files in $m4dir.
10605         (func_create_testdir): Silence errors from 'grep' when there are no
10606         m4 files in $m4dir.
10607         Reported by Karl Berry <karl@freefriends.org>.
10608
10609 2006-04-20  Bruno Haible  <bruno@clisp.org>
10610
10611         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
10612         one argument, so that the code will be portable to Autoconf 2.60.
10613         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
10614         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
10615         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
10616
10617 2006-04-19  Derek Price  <derek@ximbiot.com>
10618             Eric Blake  <ebb9@byu.net>
10619
10620         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
10621         rather than "/full/path.h".  Update comment to match.  Shorten &
10622         generalize m4_translit call via AS_TR_CPP.
10623
10624 2006-04-19  Derek Price  <derek@ximbiot.com>
10625             Eric Blake  <ebb9@byu.net>
10626
10627         * lib/inttypes.h: Correct grammar in comment.
10628
10629 2006-04-18  Derek Price  <derek@ximbiot.com>
10630             Paul Eggert  <eggert@cs.ucla.edu>
10631
10632         * modules/inttypes: New file.
10633         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
10634
10635 2006-04-18  Derek Price  <derek@ximbiot.com>
10636             Paul Eggert  <eggert@cs.ucla.edu>
10637
10638         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
10639         New files.
10640
10641 2006-04-18  Derek Price  <derek@ximbiot.com>
10642             Paul Eggert  <eggert@cs.ucla.edu>
10643
10644         * lib/inttypes.h: New file.
10645         * lib/strtoimax.c: Assume <inttypes.h>.
10646
10647 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
10648
10649         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
10650         isn't mounted.  Problem reported by Kir Kolyshkin.
10651
10652 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
10653
10654         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
10655         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
10656         Derek R. Price.
10657         * lib/regex.h (RE_DUP_MAX): Update comment to match current
10658         implementation.
10659
10660 2006-04-12  Eric Blake  <ebb9@byu.net>
10661
10662         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
10663         is now done automatically by the corresponding Autoconf macro.
10664
10665 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
10666
10667         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
10668         time_r.h.
10669
10670 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10671
10672         Merge regex changes from libc, removing some of our
10673         POSIX-conformance changes that were rejected and redoing them in a
10674         less-intrusive way.
10675
10676         * lib/regcomp.c (re_compile_internal, init_dfa):
10677         Length arg is now size_t, not Idx.  All uses changed.
10678         (peek_token): Forward decl now says internal_function.
10679         (__re_error_msgid, __re_error_msgid_idx):
10680         Now static rather than extern with attribute_hidden.
10681         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
10682         For some reason libc prefers K&R style defns for external functions.
10683         (regerror) [!defined _LIBC]: Likewise.
10684         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
10685         (seek_collating_symbol_entry, lookup_collation_sequence_value):
10686         (build_range_exp, build_collating_symbol):
10687         Use K&R-style defn.
10688         (re_compile_fastmap): Use '\0' to memset, not 0.
10689         (utf8_sb_map): Make the calculations more obvious.
10690         (init_dfa, parse_bracket_exp, build_charclass_op):
10691         Call calloc and cast result, as glibc does.
10692         (init_word_char, fetch_token, peek_token, peek_token_bracket):
10693         (build_range_exp, build_collating_symbol):
10694         Now internal functions.
10695
10696         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
10697
10698         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
10699         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
10700         Don't depend on VMS; depend on __VMS instead, for POSIX
10701         namespace cleanness.
10702         (regoff_t): Define to ssize_t, not long int.
10703
10704         Remove the REG_ macros named below.  Instead, make the old names
10705         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
10706         __USE_GNU_REGEX.
10707         (REG_BACKSLASH_ESCAPE_IN_LISTS):
10708         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
10709         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
10710         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
10711         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
10712         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
10713         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
10714         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
10715         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
10716         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
10717         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
10718         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
10719         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
10720         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
10721         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
10722         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
10723         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
10724         (REG_NREGS):
10725         Remove.  All uses replaced by the old RE_* names.
10726         (RE_BACKSLASH_ESCAPE_IN_LISTS):
10727         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
10728         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
10729         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
10730         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
10731         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
10732         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
10733         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
10734         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
10735         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
10736         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
10737         Don't bother having these macros be independent of each others'
10738         values, since they no longer exist in the POSIX name space.
10739
10740         Rename the following member names back to their old names,
10741         unless !__USE_GNU_REGEX.  All uses changed back.
10742         (buffer): Renamed from re_buffer.
10743         (allocated): Renamed from re_allocated.
10744         (used): Renamed from re_used.
10745         (syntax): Renamed from re_syntax.
10746         (fastmap): Renamed from re_fastmap.
10747         (translate): Renamed from re_translate.
10748         (can_be_null): Renamed from re_can_be_null.
10749         (regs_allocated): Renamed from re_regs_allocated.
10750         (fastmap_accurate): Renamed from re_fastmap_accurate.
10751         (no_sub): Renamed from re_no_sub.
10752         (not_bol): Renamed from re_not_bol.
10753         (not_eol): Renamed from re_not_eol.
10754         (newline_anchor): Renamed from re_newline_anchor.
10755         (num_regs): Renamed from rm_num_regs.
10756         (start): Renamed from rm_start.
10757         (end): Renamed from rm_end.
10758
10759         (free_state): Move up a bit.
10760
10761         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
10762         #define to be empty.
10763         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
10764         when that is what is intended.
10765         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
10766         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
10767         (MAX): New macro.
10768         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
10769         All uses changed back to re_malloc, etc.  It's now the caller's
10770         responsibility to check for overflow; all callers changed.
10771         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
10772         (re_x2nrealloc): Remove.
10773         (free_state): Remove decl.
10774
10775         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
10776         (re_set_registers, re_exec):
10777         Use K&R-style defn.
10778
10779         2006-01-31  Roland McGrath  <roland@redhat.com>
10780
10781         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
10782         Reported by Mike Frysinger <vapier@gentoo.org>.
10783
10784         2006-01-15  Andreas Jaeger  <aj@suse.de>
10785
10786         [BZ #1950]
10787         * lib/regex_internal.c (re_string_reconstruct): Adjust for
10788         build_wcs_upper_buffer change.
10789         (build_wcs_upper_buffer): Change return type.
10790
10791         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
10792
10793         * lib/regex_internal.h: Include <stdint.h> if available.
10794
10795         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
10796
10797         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
10798
10799         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
10800
10801         * lib/regcomp.c: Adjust for changed secondary hash function.
10802
10803         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
10804
10805         * lib/regex.h: Pretty printing.
10806         Clean up namespace a bit.
10807
10808         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
10809
10810         * lib/regexec.c (update_cur_sifted_state, check_arrival,
10811         check_arrival_add_next_nodes): Avoid using uninitialized variable.
10812
10813         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
10814                     Ulrich Drepper  <drepper@redhat.com>
10815
10816         [BZ #1302]
10817         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
10818         changed.
10819         (bitset_word_t): Renamed from bitset_word.  All uses changed.
10820
10821         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
10822
10823         [BZ #281]
10824         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
10825         * lib/regcomp.c: Remove unnecessary uses of
10826         unsigned RE_TRANSLATE_TYPE.
10827         * lib/regex_internal.h: Likewise.
10828         * lib/regex_internal.c: Likewise.
10829         * lib/regexec.c: Likewise.
10830         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
10831
10832         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
10833
10834         * lib/regexec.c (find_recover_state): Remove unnecessary
10835         initialization.
10836         (transit_state_bkref): Make DFA a const pointer.
10837         (get_subexp): Likewise.
10838         (check_arrival): Likewise.
10839         (update_cur_sifted_state): Likewise.
10840         (re_search_internal): Likewise.
10841         (prune_impossible_nodes): Likewise.
10842         (acquire_init_state_context): Likewise.
10843         (proceed_next_node): Likewise.
10844         (set_regs): Likewise.
10845         (free_fail_stack_return): Likewise.
10846         (check_arrival_expand_ecl): Mark DFA parameter as const.
10847         (check_arrival_expand_ecl_sub): Likewise.
10848         (check_subexp_limits): Likewise.
10849         (sub_epsilon_src_nodes):  Likewise.
10850         (add_epsilon_src_nodes):  Likewise.
10851         (merge_state_array): Likewise.
10852         (update_regs): Likewise.
10853         (build_trtable): Likewise.
10854         (sift_states_backward): Mark MCTX parameter as const.
10855         (build_sifted_states): Likewise.
10856         (update_cur_sifted_state): Likewise.
10857         (sift_states_mkref): Likewise.
10858         (check_arrival_expand_ecl): Mark eclosure as const.
10859         (check_dst_limits_calc_pos_1): Likewise.
10860         * lib/regex_internal.h (re_match_context_t): Make dfa a const
10861         pointer.
10862
10863         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
10864
10865         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
10866         (transit_state_sb): Likewise.
10867         (transit_state_mb): Likewise.
10868         (sift_states_iter_mb): Likewise.
10869         (check_arrival_add_next_nodes): Likewise.
10870         (check_node_accept_bytes): Change first parameter to pointer-to-const.
10871         [_LIBC] (re_search_2_stub): Use mempcpy.
10872
10873         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
10874         mbrtowc for very simple UTF-8 case.
10875
10876         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
10877         a pointer-to-const.
10878         (re_acquire_state_context): Likewise.
10879         * lib/regex_internal.h: Adjust prototypes.
10880
10881         * lib/regex.c: Prevent using C++ compilers.
10882
10883         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
10884         (re_acquire_state_context): Likewise.
10885
10886 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10887
10888         * modules/regex (Depends-on): Add ssize_t.
10889
10890 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10891
10892         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
10893         translation table.
10894
10895 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
10896
10897         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
10898
10899 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
10900             Bruno Haible  <bruno@clisp.org>
10901
10902         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
10903         <sys/types.h> and <inttypes.h>.
10904
10905 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10906
10907         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
10908         `__error_t_defined', so argp.h will not typedef the former.
10909
10910 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
10911
10912         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
10913         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
10914         glibc names.  Even if glibc is changed to conform to POSIX, the
10915         traditional names will be available anyway, since regex depends on
10916         the extensions module.  Also, fix a longstanding typo in the
10917         implementation of Spencer ERE test #75 from grep 2.3.  Problems
10918         reported by Emanuele Giaquinta.  Also, change sense of cached
10919         variable, so that the message makes sense.
10920
10921 2006-03-24  Simon Josefsson  <jas@extundo.com>
10922
10923         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
10924         including some doc fixes.
10925         (base64_encode_alloc): Fix +1 bug on allocation failures.
10926
10927 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10928
10929         * lib/base64.c (base64_encode): Do not read past end of array with
10930         unsanitized input on systems with CHAR_BIT > 8.
10931
10932 2006-03-24  Eric Blake  <ebb9@byu.net>
10933
10934         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
10935
10936 2006-03-22  Karl Berry  <karl@gnu.org>
10937
10938         * config/srclist.txt (*setenv.[ch]): get from coreutils.
10939         * config/srclistvars.sh (COREUTILS): new var.
10940
10941 2006-03-17  Jim Meyering  <jim@meyering.net>
10942
10943         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
10944         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
10945
10946 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10947
10948         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
10949         no longer needs it.  Instead, check that regoff_t is as least
10950         as wide as ptrdiff_t.
10951
10952         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
10953         so that our regex.h stays compatible with the installed regex.
10954         This is helpful for installers who configure --without-included-regex.
10955         Problem reported by Emanuele Giaquinta.
10956
10957 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
10958
10959         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
10960         Typedef to long int, not to off_, as POSIX will likely change
10961         in that direction.
10962
10963 2006-03-15  Eric Blake  <ebb9@byu.net>
10964
10965         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
10966
10967 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
10968
10969         * lib/argp-help.c (validate_uparams): Fix typo
10970         * lib/argp-parse.c (argp_default_options): Consistently begin help
10971         messages with a lowercase letter.
10972
10973 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
10974
10975         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
10976         overrun buffers and shouldn't be used (much as gets shouldn't be
10977         used).
10978         * lib/time_r.c (asctime_r, ctime_r): Likewise.
10979
10980 2006-03-08  Simon Josefsson  <jas@extundo.com>
10981
10982         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
10983         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10984
10985 2006-03-08  Simon Josefsson  <jas@extundo.com>
10986
10987         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
10988         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10989
10990 2006-03-08  Simon Josefsson  <jas@extundo.com>
10991
10992         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
10993         signal that configure disabled the device.
10994
10995 2006-03-08  Simon Josefsson  <jas@extundo.com>
10996
10997         * build-aux/maint.mk: Fix refresh-po, to handle no translated
10998         languages.
10999
11000 2006-03-07  Simon Josefsson  <jas@extundo.com>
11001
11002         * modules/getopt (Depends-on): Add unistd.
11003
11004         * modules/unistd: New file.
11005
11006 2006-03-07  Simon Josefsson  <jas@extundo.com>
11007
11008         * modules/gc-random: New file.
11009
11010 2006-03-07  Simon Josefsson  <jas@extundo.com>
11011
11012         * m4/unistd_h.m4: New file.
11013
11014 2006-03-07  Simon Josefsson  <jas@extundo.com>
11015
11016         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
11017         test to be side-effect free by storing the result in the cache
11018         variable gl_cv_lib_readline, and moving the assignment of
11019         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
11020         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11021
11022 2006-03-07  Simon Josefsson  <jas@extundo.com>
11023
11024         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
11025         error on missing devices (the functions will return an error).
11026
11027         * m4/gc.m4: Move random stuff to gc-random.m4
11028
11029 2006-03-07  Simon Josefsson  <jas@extundo.com>
11030
11031         * lib/unistd_.h: New file.
11032
11033 2006-03-07  Simon Josefsson  <jas@extundo.com>
11034
11035         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
11036
11037 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11038
11039         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
11040         Problem reported by Juan Manuel Guerrero.
11041
11042 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11043
11044         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
11045         the unistd module.
11046         * lib/getlogin_r.c: Likewise.
11047         * lib/getlogin_r.h: Likewise.
11048         * lib/glob.c: Likewise.
11049         * lib/pagealign_alloc.c: Likewise.
11050         * lib/unistd_.h: Remove; no longer needed.
11051
11052 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
11053
11054         * MODULES.html.sh (Support for systems lacking POSIX:2001):
11055         Add unistd.
11056         * modules/c-stack (Depends-on): Add unistd.
11057         * modules/getlogin_r: Likewise.
11058         * modules/glob: Likewise.
11059         * modules/pagealign_alloc: Likewise.
11060         * modules/unistd (Files): Remove lib/unistd_.h.
11061         (EXTRA_DIST): Remove.
11062         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
11063         need unistd_.h.
11064         (MOSTLYCLEANFILES): Remove unistd.h-t.
11065
11066 2006-03-03  Simon Josefsson  <jas@extundo.com>
11067
11068         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
11069
11070 2006-03-03  Simon Josefsson  <jas@extundo.com>
11071
11072         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
11073         libidn and bison.
11074
11075 2006-03-03  Simon Josefsson  <jas@extundo.com>
11076
11077         * build-aux/maint.mk: Add indent target.
11078
11079 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
11080
11081         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
11082         our replacement poll.h in any case, to avoid a differing
11083         declaration from a system header.  Seen on AIX.
11084
11085 2006-03-01  Simon Josefsson  <jas@extundo.com>
11086
11087         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
11088         <kasal@ucw.cz>.
11089
11090 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11091
11092         * modules/gettime (Depends-on): Add extensions module.
11093         * modules/nanosleep (Depends-on): Likewise.
11094         * modules/settime (Depends-on): Likewise.
11095
11096 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
11097
11098         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
11099         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
11100         pedantically.
11101         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
11102         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
11103
11104         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
11105         not "==".  Reported by Ralf Wildenhues.
11106
11107 2006-03-01  Karl Berry  <karl@gnu.org>
11108
11109         * doc/Copyright/request-*: new files, synced from gnuorg.
11110
11111 2006-03-01  Karl Berry  <karl@gnu.org>
11112
11113         * config/srclist.txt (Copyright/*): new entries.
11114
11115 2006-02-28  Simon Josefsson  <jas@extundo.com>
11116
11117         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
11118
11119 2006-02-27  Simon Josefsson  <jas@extundo.com>
11120
11121         * lib/base64.h: Indent #define's.  From Jim Meyering
11122         <jim@meyering.net>.
11123
11124 2006-02-27  Jim Meyering  <jim@meyering.net>
11125
11126         Revert the change of 2006-02-24, so these files can continue
11127         to be sync'd from gettext.
11128         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
11129         of `config.h'.
11130
11131 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
11132
11133         * modules/intprops: New file.
11134         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
11135         Add intprops.
11136         * modules/getloadavg (Files): Remove lib/intprops.h.
11137         (Depends-on): Add intprops.
11138         * modules/human: Likewise.
11139         * modules/inttostr: Likewise.
11140         * modules/openat: Likewise.
11141         * modules/sig2str: Likewise.
11142         * modules/userspec: Likewise.
11143         * modules/utimecmp: Likewise.
11144         * modules/xnanosleep: Likewise.
11145         * modules/xstrtol: Likewise.
11146
11147 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
11148
11149         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
11150         * modules/lock-tests (TESTS): Use $(EXEEXT).
11151         * modules/tls-tests: Likewise.
11152         * modules/argp-tests: Likewise.
11153         (check_PROGRAMS): New var, replacing...
11154         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
11155
11156 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11157
11158         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
11159         `config.h'.
11160
11161 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
11162
11163         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
11164
11165 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11166
11167         Sync from coreutils.
11168         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
11169         gl_CHDIR_SAFER.
11170
11171 2006-02-22  Jim Meyering  <jim@meyering.net>
11172
11173         Sync from coreutils.
11174         * m4/chdir-safer.m4: New file.
11175
11176 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
11177
11178         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
11179         AT_FDCWD exceeds INT_MAX.
11180         * lib/openat.h (AT_FDCWD): Likewise.
11181
11182 2006-02-17  Eric Blake  <address@hidden>
11183
11184         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
11185
11186 2006-02-16  Simon Josefsson  <jas@extundo.com>
11187
11188         * modules/getaddrinfo (Depends-on): Add sys_socket.
11189
11190 2006-02-15  Simon Josefsson  <jas@extundo.com>
11191
11192         * build-aux/maint.mk: Add dsyntax-check rule.
11193
11194 2006-02-15  Eric Blake  <ebb9@byu.net>
11195
11196         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
11197         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
11198         'present but cannot compile' warnings on cygwin.
11199         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
11200         use ws2tcpip.h if sys/socket.h works.
11201         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
11202         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
11203
11204 2006-02-14  Simon Josefsson  <jas@extundo.com>
11205
11206         * modules/maintainer-makefile (Files): Rename.
11207
11208         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
11209         and (the local) Makefile.cfg to maint-cfg.mk.
11210
11211         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
11212         to the latter.
11213
11214         * modules/maintainer-makefile: New module.
11215
11216         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
11217         severaly stripped to make it possible to build it up from scratch
11218         with reliable tests.
11219
11220         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
11221         fixes to permit overriding the default actions when configure and
11222         makefile are not available.
11223
11224 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
11225
11226         Sync from coreutils.
11227         * modules/lstat (Depends-on): Don't depend on xalloc.
11228         (License): Change from GPL to LGPL, since this is now simply a
11229         replacement for a libc function.
11230
11231 2006-02-14  Jim Meyering  <jim@meyering.net>
11232
11233         Sync from coreutils.
11234
11235         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
11236         failure on deficient systems, and simplify gnulib lgpl dependencies.
11237         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
11238         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
11239
11240         * lib/xalloc-die.c: Remove unused definition of N_.
11241
11242 2006-02-14  Jim Meyering  <jim@meyering.net>
11243
11244         Sync from coreutils.
11245         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
11246         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
11247         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
11248         double-quote uses of that variable, to accommodate the rare case in
11249         which getmntent is available in none of the libraries checked.  This
11250         happens at least on FreeBSD 5.0.
11251
11252 2006-02-13  Simon Josefsson  <jas@extundo.com>
11253
11254         * gnulib-tool (Usage): Fix --import, from
11255         karl@freefriends.org (Karl Berry).
11256
11257 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
11258
11259         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
11260
11261 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
11262
11263         * lib/argp-namefrob.h: Restore changes accidentally lost during the
11264         "autoupdate" on 2005-12-12.
11265
11266 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11267
11268         * modules/closeout (Depends-on): Remove atexit.
11269
11270 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
11271
11272         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
11273         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
11274
11275 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
11276
11277         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
11278         __EXTENSIONS__ if this causes compilation to fail.  Problem
11279         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
11280         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
11281
11282 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
11283
11284         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
11285         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
11286         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
11287         All uses changed.
11288
11289 2006-01-26  Simon Josefsson  <jas@extundo.com>
11290
11291         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
11292         prototype is visible on mingw32.
11293
11294         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
11295         for mingw32.
11296
11297         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
11298         mingw32).
11299
11300 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
11301
11302         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
11303         attempt to open for write; this always fails, at least on POSIX
11304         hosts.  This reinstates the 2006-01-09 change, which was
11305         inadvertently removed.
11306
11307 2006-01-26  Bruno Haible  <bruno@clisp.org>
11308
11309         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
11310         Reported by Paul Eggert.
11311
11312 2006-01-26  Bruno Haible  <bruno@clisp.org>
11313             Paul Eggert  <eggert@cs.ucla.edu>
11314
11315         * lib/stdbool_.h (_Bool)
11316         [(! (defined __cplusplus || defined __BEOS__)
11317           && !defined __GNUC__
11318           && !(defined __HP_cc || defined __xlc__
11319                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
11320                || defined __sgi))]:
11321         #define to signed char in these cases too; this simplifies
11322         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
11323         etc., separately) and makes it more conservative.
11324
11325 2006-01-25  Simon Josefsson  <jas@extundo.com>
11326
11327         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
11328         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
11329         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
11330
11331 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
11332
11333         * lib/argp-namefrob.h: Bugfix. Remove stray #
11334
11335 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
11336
11337         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
11338         so that we test the test.
11339         Check for yet another HP-UX cc bug involving *bool |= bool.
11340
11341 2006-01-25  Karl Berry  <karl@gnu.org>
11342
11343         * config/srclist.txt (vasnprintf.c): sync lost.
11344
11345 2006-01-25  Jim Meyering  <jim@meyering.net>
11346
11347         Sync from the stable (b5) branch of coreutils:
11348
11349         * lib/fts.c (fts_children): Don't let close() clobber errno from
11350         failed fchdir().
11351
11352         * lib/fts.c (fts_stat): When following a symlink-to-directory,
11353         don't necessarily interpret stat-fails+lstat-succeeds as indicating
11354         a dangling symlink.  That can also happen at least for ELOOP.
11355         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
11356         FYI, this bug predates the inclusion of fts.c in coreutils.
11357
11358         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
11359         in their own block, so pre-c99 compilers don't object.
11360
11361         Avoid the double-free (first in fts_read, second in fts_close) that
11362         would occur when an `active' directory is made inaccessible (e.g.,
11363         via chmod a-x) during a traversal.
11364         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11365         before returning.  Reproduce this failure by
11366         mkdir -p a/b; cd a; chmod a-x . b
11367         Reported by Stavros Passas.
11368
11369 2006-01-25  Jim Meyering  <jim@meyering.net>
11370
11371         * lib/fileblocks.c: Remove more useless parentheses.
11372         * lib/readutmp.h: Likewise.
11373
11374 2006-01-25  Bruno Haible  <bruno@clisp.org>
11375
11376         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
11377         warnings.
11378         Reported by Paul Eggert.
11379
11380 2006-01-25  Bruno Haible  <bruno@clisp.org>
11381
11382         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
11383         rid of a trap command. For Solaris sh.
11384         Reported by Mark D. Baushke <mdb@gnu.org>.
11385
11386 2006-01-24  Simon Josefsson  <jas@extundo.com>
11387
11388         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
11389         Bruno.
11390
11391 2006-01-24  Karl Berry  <karl@gnu.org>
11392
11393         * config/srclist.txt (argp-namefrob.h): sync lost.
11394
11395 2006-01-24  Jim Meyering  <jim@meyering.net>
11396
11397         * modules/openat (Files): Add lib/intprops.h.
11398         From Mark D. Baushke.
11399
11400 2006-01-24  Jim Meyering  <jim@meyering.net>
11401
11402         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
11403         Reported by Mark D. Baushke.
11404
11405 2006-01-24  Jim Meyering  <jim@meyering.net>
11406
11407         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
11408
11409 2006-01-24  Bruno Haible  <bruno@clisp.org>
11410
11411         * modules/strnlen (Maintainer): Change from glibc to all.
11412
11413 2006-01-24  Bruno Haible  <bruno@clisp.org>
11414
11415         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
11416         Patch by Paul Eggert.
11417
11418 2006-01-24  Bruno Haible  <bruno@clisp.org>
11419
11420         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
11421         already has it.
11422         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
11423         2005-11-26.
11424
11425         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
11426         'signed char' to avoid problems with the built-in _Bool type.
11427         Reported by Paul Eggert on 2005-11-26.
11428
11429 2006-01-24  Bruno Haible  <bruno@clisp.org>
11430
11431         * gnulib-tool (func_import): Avoid constructing complicated sed
11432         expressions inside backquote.
11433         Report and solution by Mark D. Baushke <mdb@gnu.org>.
11434
11435 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
11436
11437         These changes imported from libc.
11438         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
11439         test and two separate function calls.
11440         * lib/strndup.c (__strndup): Add libc_hidden_def.
11441
11442 2006-01-23  Simon Josefsson  <jas@extundo.com>
11443
11444         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
11445         Remove the test_*_SOURCES variable: automake infers it by default.
11446         * modules/tls-tests: Likewise.
11447
11448 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11449
11450         Work around porting bugs reported by Dieter in
11451         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
11452         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
11453         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
11454         Include "getopt.h" first, to check interface.
11455         (getenv): Declare only if defined HAVE_DECL_GETENV &&
11456         !HAVE_DECL_GETENV.
11457         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
11458         (__strndup): Revert to K&R-style function dfns, the glibc style.
11459         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
11460         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
11461         Include strnlen.h first, to get prototype properly.
11462         (strnlen): Renamed from __strnlen.
11463         Remove weak alias.
11464
11465 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11466
11467         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
11468
11469 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
11470
11471         * config/srclist.txt: Adjust to reflect glibc reorganization.
11472         This affects only comments.
11473
11474 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11475
11476          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
11477          Reported by Bruce Korb <bkorb@gnu.org>.
11478
11479 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
11480
11481         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
11482         to pacify gcc -Wswitch-default.
11483
11484 2006-01-22  Bruno Haible  <bruno@clisp.org>
11485
11486         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
11487         temporary buffer for sprintf, take into account the precision also
11488         for 'd', 'i', 'u', 'o', 'x', 'X'.
11489
11490 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11491
11492         * modules/argp-tests: New module
11493         * tests/test-argp.c: New file
11494         * tests/test-argp-2.sh: New file
11495
11496 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
11497
11498         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
11499         (__argp_base_name): Removed
11500         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
11501         typo.
11502         (__argp_base_name): Provide macro definition or extern declaration
11503         depending on the configuration
11504
11505 2006-01-20  Simon Josefsson  <jas@extundo.com>
11506
11507         * modules/inet_ntop (Depends-on): Depend on sys_socket.
11508
11509 2006-01-20  Simon Josefsson  <jas@extundo.com>
11510
11511         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
11512
11513 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11514
11515         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
11516         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
11517         Suggested by Bruno Haible.
11518
11519 2006-01-20  Karl Berry  <karl@gnu.org>
11520
11521         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
11522         until changes propagate, I guess.
11523
11524 2006-01-19  Simon Josefsson  <jas@extundo.com>
11525
11526         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
11527
11528 2006-01-19  Simon Josefsson  <jas@extundo.com>
11529
11530         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
11531
11532 2006-01-19  Simon Josefsson  <jas@extundo.com>
11533
11534         * gnulib-tool: Set check_PROGRAMS.
11535
11536         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
11537         modules/des-tests, modules/gc-arcfour-tests,
11538         modules/gc-arctwo-tests, modules/gc-des-tests,
11539         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
11540         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
11541         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
11542         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
11543         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
11544         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
11545         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
11546         test_*_SOURCES.
11547
11548 2006-01-18  Simon Josefsson  <jas@extundo.com>
11549
11550         * modules/socklen (Depends-on): Depend on sys_socket.
11551
11552 2006-01-18  Simon Josefsson  <jas@extundo.com>
11553
11554         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
11555         modules/des-tests, modules/gc-arcfour-tests,
11556         modules/gc-arctwo-tests, modules/gc-des-tests,
11557         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
11558         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
11559         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
11560         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
11561         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
11562         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
11563         $(EXEEXT) to automake TESTS variable, for mingw32.
11564
11565 2006-01-17  Simon Josefsson  <jas@extundo.com>
11566
11567         * modules/socklen (Include): Need sys/socket.h.
11568
11569 2006-01-17  Bruno Haible  <bruno@clisp.org>
11570
11571         * modules/ssize_t (Include): Add <sys/types.h>.
11572
11573 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
11574
11575         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
11576         it's not portable and it doesn't work with cross-compiles.
11577         Problem reported by Bruno Haible.  Fix missing-$ typo in
11578         'test "gl_cv_ignore_unused_libraries" ...' that prevented
11579         -zignore from being used with Sun's C compiler.
11580
11581 2006-01-12  Simon Josefsson  <jas@extundo.com>
11582
11583         * lib/base64.c: Fix warning, reported by Bruno Haible
11584         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
11585
11586 2006-01-12  Bruno Haible  <bruno@clisp.org>
11587
11588         * modules/ldd: New file.
11589         * build-aux/ldd.sh.in: New file.
11590         * MODULES.html.sh (Support for building libraries and executables): Add
11591         ldd.
11592
11593 2006-01-12  Bruno Haible  <bruno@clisp.org>
11594
11595         * m4/ldd.m4: New file.
11596
11597 2006-01-12  Bruno Haible  <bruno@clisp.org>
11598
11599         * gnulib-tool (func_import, func_create_testdir): Don't go into an
11600         endless loop while replacing $auxdir with build-aux.
11601
11602 2006-01-11  Simon Josefsson  <jas@extundo.com>
11603
11604         * lib/stdint_.h (SIZE_MAX): Add missing (.
11605
11606 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
11607
11608         Sync from coreutils.
11609         * lib/md5.c: Fix commentary typos.
11610         (alignof, UNALIGNED_P): No need for a GCC-specific version.
11611         * lib/md5.h (__attribute__): Remove; unused.
11612         * lib/sha1.c: Fix commentary to match md5 better.
11613         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
11614         so that we don't need to worry about alignment.  All uses changed.
11615         This merges the 2005-10-28 md5 change into sha1.
11616
11617 2006-01-11  Jim Meyering  <jim@meyering.net>
11618
11619         Sync from coreutils.
11620         * lib/md5.c (OP): Fix spacing.
11621
11622 2006-01-11  Bruno Haible  <bruno@clisp.org>
11623
11624         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11625         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
11626         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
11627
11628 2006-01-11  Bruno Haible  <bruno@clisp.org>
11629
11630         Ensure automatic ordering between gl_LOCK and gl_ARGP.
11631         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
11632         the "early" section as well.
11633
11634 2006-01-11  Bruno Haible  <bruno@clisp.org>
11635
11636         Avoid "ar: no archive members specified" error on MacOS X.
11637         * gnulib-tool (func_modules_add_dummy): New function.
11638         (func_import, func_create_testdir): Invoke it.
11639
11640 2006-01-11  Bruno Haible  <bruno@clisp.org>
11641
11642         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
11643         with $auxdir in AC_CONFIG_FILES statements.
11644
11645 2006-01-11  Bruno Haible  <bruno@clisp.org>
11646
11647         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
11648         Initialize also noinst_HEADERS to empty.
11649
11650 2006-01-11  Bruno Haible  <bruno@clisp.org>
11651
11652         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
11653         variables.
11654         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
11655         autoreconf.
11656
11657 2006-01-11  Bruno Haible  <bruno@clisp.org>
11658
11659         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
11660         overridable by the user.
11661         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11662
11663 2006-01-10  Simon Josefsson  <jas@extundo.com>
11664
11665         * modules/sys_socket: New file.
11666
11667 2006-01-10  Simon Josefsson  <jas@extundo.com>
11668
11669         * m4/sys_socket_h.m4: New file.
11670
11671 2006-01-10  Simon Josefsson  <jas@extundo.com>
11672
11673         * lib/socket_.h: New file.
11674
11675 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11676
11677         * modules/readutmp (Maintainer): Add myself.
11678
11679 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11680
11681         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
11682         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
11683         People who are still concerned with buggy memcmp implementations
11684         can invoke gl_FUNC_MEMCMP themselves.
11685
11686 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
11687
11688         * lib/regex_internal.h (BITSET_WORD_BITS):
11689         Work around a bug in 64-bit PGC (before version 6.1-2), where the
11690         preprocessor mishandles large unsigned values as if they were signed.
11691         Problem reported by Claudio Fontana in
11692         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
11693
11694 2006-01-10  Jim Meyering  <jim@meyering.net>
11695
11696         Avoid the double-free (first in fts_read, second in fts_close) that
11697         would occur when an `active' directory is made inaccessible (e.g.,
11698         via chmod a-x) during a traversal.
11699         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
11700         before returning.  Reproduce this failure by
11701         mkdir -p a/b; cd a; chmod a-x . b
11702         Reported by Stavros Passas.
11703
11704         Sync from coreutils.
11705         * lib/sha1.c: Tweak grammar in a comment.
11706
11707 2006-01-10  Jim Meyering  <jim@meyering.net>
11708
11709         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
11710         Patch by Joerg Sonnenberger.
11711
11712 2006-01-10  Bruno Haible  <bruno@clisp.org>
11713
11714         * modules/readutmp: Depend on module free.
11715         * modules/strtok_r: Depend on module restrict.
11716
11717 2006-01-10  Bruno Haible  <bruno@clisp.org>
11718
11719         * modules/gettext (configure.ac): Add an invocation of
11720         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
11721
11722 2006-01-10  Bruno Haible  <bruno@clisp.org>
11723
11724         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
11725         Reported by Werner Lemberg <wl@gnu.org>.
11726
11727 2006-01-10  Bruno Haible  <bruno@clisp.org>
11728
11729         * lib/localcharset.c: Update from GNU gettext.
11730
11731 2006-01-10  Bruno Haible  <bruno@clisp.org>
11732
11733         * lib/argp.h (__const): Remove macro. Use const instead.
11734         * lib/argp-fmtstream.h (__const): Likewise.
11735         * lib/glob_.h (__const): Remove macro.
11736         * lib/glob-libc.h: Use const instead of __const.
11737
11738 2006-01-10  Bruno Haible  <bruno@clisp.org>
11739
11740         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
11741         variable.
11742         Needed to avoid an automake error regarding the 'gettext' module.
11743
11744 2006-01-09  Simon Josefsson  <jas@extundo.com>
11745
11746         * modules/inet_ntop (Depends-on): Add restrict.
11747
11748 2006-01-09  Simon Josefsson  <jas@extundo.com>
11749
11750         * modules/gc-rijndael-tests (License): Put under LGPL.
11751
11752         * modules/gc-des-tests (License): Likewise.
11753
11754         * modules/gc-arcfour-tests (License): Likewise.
11755
11756         * modules/gc-arctwo-tests (License): Likewise.
11757
11758         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
11759
11760         * modules/gc-hmac-sha1-tests (Files): Likewise.
11761
11762         * modules/gc-hmac-md5-tests (License): Likewise.
11763
11764         * modules/gc-sha1-tests (License): Likewise.
11765
11766         * modules/gc-md5-tests (License): Likewise.
11767
11768         * modules/gc-md4-tests (License): Likewise.
11769
11770         * modules/gc-md2-tests (License): Likewise.
11771
11772         * modules/gc-tests (License): Likewise.
11773
11774         * modules/des-tests (License): Likewise.
11775
11776         * modules/md4-tests (License): Likewise.
11777
11778         * modules/md2-tests (License): Likewise.
11779
11780 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11781
11782         Sync from coreutils:
11783
11784         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
11785         * modules/lib-ignore: New file.
11786         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
11787         chdir-safer.m4, lchmod.m4.
11788         * modules/openat: Add mkdirat.c, openat-priv.h.
11789
11790 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11791
11792         Sync from coreutils.
11793         * m4/lib-ignore.m4: New file.
11794         * m4/lchmod.m4: New file.
11795
11796 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11797
11798         Sync from coreutils.
11799         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
11800         for write access: POSIX says that must fail.
11801         * lib/fts.c (diropen): Likewise.
11802         * lib/save-cwd.c (save_cwd): Likewise.
11803         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
11804         well, for minor improvements on hosts that lack O_DIRECTORY.
11805         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
11806         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
11807         Fall back on chown if open failed with EACCES.
11808
11809         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
11810         Report an error at compile-time if only a 1-second nominal clock
11811         resolution is found.
11812
11813         * lib/lchmod.h: New file.
11814         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
11815         (make_dir_parents): Use lchown rather than chown, and
11816         lchmod rather than chmod.
11817
11818         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
11819         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
11820         "proc" reported by n0dalus.
11821
11822         * lib/mountlist.c: Include <limits.h>.
11823         (dev_from_mount_options)
11824         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
11825         New function.  It no longer assumes "dev=" has the System V meaning
11826         on Linux (since it doesn't).  It also parses "dev=" more carefully.
11827         (read_file_system_list)
11828         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
11829         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
11830         dev= in that case.
11831
11832         * lib/posixtm.h (PDS_PRE_2000): New macro.
11833         * lib/posixtm.c (year): Arg is now syntax_bits rather than
11834         allow_century.  All usages changed.  Reject dates outside the range
11835         1969-1999 if PDS_PRE_2000 is used.
11836
11837 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
11838
11839         Sync from coreutils.
11840         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
11841         (Time of day items): Mention the possibility of leap seconds.
11842         Problem reported by Dr. David Alan Gilbert.
11843
11844 2006-01-09  Jim Meyering  <jim@meyering.net>
11845
11846         Sync from coreutils.
11847
11848         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
11849
11850         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
11851
11852         * lib/modechange.c (mode_compile): Reject an invalid mode string
11853         that starts with an octal digit.  From Andreas Gruenbacher.
11854
11855         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
11856         and dup to open_safer and dup_safer, respectively.
11857         (openat_permissive): Fix typo in comment.
11858
11859         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
11860         "gettext.h"; either no longer needed or are guaranteed by openat.h.
11861         (_): Remove; no longer needed.
11862         (openat): Renamed from rpl_openat; no need for rpl_openat
11863         since openat.h renames openat for us.
11864         Replace most of the body with a call to openat_permissive,
11865         to avoid duplicate code.
11866         Port to (probably hypothetical) environments were mode_t is
11867         wider than int.
11868         (openat_permissive): Require mode arg, so that we can check
11869         types better.  Put it just after flags.  Change cwd failure
11870         indicator from pointer-to-bool to pointer-to-errno-value.
11871         All callers changed.
11872         Invoke openat_save_fail and/or openat_restore_fail if
11873         cwd_errno is null, so that openat can call us.
11874         (openat_permissive, fdopendir, fstatat, unlinkat):
11875         Simplify errno handling to avoid some duplicate code,
11876         as it's OK to set errno on success.
11877         * lib/openat.h: Revamp code so that function macros depend on
11878         __OPENAT_PREFIX only, not also on AT_FDCWD.
11879         (openat_ro): Remove.  Caller changed to use openat_permissive.
11880         (openat_permissive): Now a macro, if not a function.
11881         (openat_restore_fail, openat_save_fail): Now always functions,
11882         since mkdirat needs them even if __OPENAT_PREFIX is defined.
11883
11884         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
11885         and openat.c.
11886         * lib/mkdirat.c: Include openat-priv.h.
11887         Remove definitions of macros defined therein.
11888         * lib/openat.c: Likewise.
11889
11890         * lib/mkdirat.c (mkdirat): New file and function.
11891         * lib/openat.h (mkdirat): Declare.
11892
11893         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
11894
11895         * lib/openat.h (openat_permissive): Declare.
11896         (openat_ro): Define.
11897
11898         * lib/openat.c (EXPECTED_ERRNO): New macro.
11899         (openat_permissive): New function -- used in remove.c rewrite.
11900         (all functions): Set errno just before returning, only if there
11901         was an actual failure.
11902         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
11903
11904         Emulate openat-family functions using Linux's procfs, if possible.
11905         Idea and some code based on Ulrich Drepper's glibc changes.
11906
11907         * lib/openat.c: (BUILD_PROC_NAME): New macro.
11908         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
11909         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
11910         before falling back on save_cwd and restore_cwd.
11911         (fdopendir, fstatat, unlinkat): Likewise.
11912
11913         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
11914         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
11915
11916         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
11917         as second argument to va_arg.  Otherwise, some versions of gcc
11918         warn that `if this code is reached, the program will abort'.
11919
11920 2006-01-09  Jim Meyering  <jim@meyering.net>
11921
11922         Sync from coreutils.
11923         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
11924         Require openat-priv.h.
11925
11926 2006-01-09  Bruno Haible  <bruno@clisp.org>
11927
11928         * modules/strnlen (Include): Use strnlen.h.
11929
11930 2006-01-09  Bruno Haible  <bruno@clisp.org>
11931
11932         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
11933
11934 2006-01-09  Bruno Haible  <bruno@clisp.org>
11935
11936         * lib/sysexit_.h (EX_OK): New macro.
11937         Suggested by Martin Lambers <marlam@marlam.de>.
11938
11939 2006-01-09  Bruno Haible  <bruno@clisp.org>
11940
11941         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
11942         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
11943
11944 2006-01-09  Bruno Haible  <bruno@clisp.org>
11945
11946         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
11947         numbers.
11948
11949 2006-01-09  Bruno Haible  <bruno@clisp.org>
11950
11951         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
11952         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
11953         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
11954         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
11955
11956 2006-01-09  Bruno Haible  <bruno@clisp.org>
11957
11958         * build-aux/javacomp.sh.in: New file, moved from lib/.
11959         * modules/javacomp-script (Files): Update.
11960         (configure.ac): Add AC_CONFIG_FILES invocation.
11961         (EXTRA_DIST): Remove variable.
11962
11963         * build-aux/javaexec.sh.in: New file, moved from lib/.
11964         * modules/javaexec (Files): Update.
11965         (configure.ac): Add AC_CONFIG_FILES invocation.
11966         (EXTRA_DIST): Remove javaexec.sh.in.
11967
11968         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
11969         * modules/csharpcomp-script (Files): Update.
11970         (configure.ac): Add AC_CONFIG_FILES invocation.
11971         (EXTRA_DIST): Remove variable.
11972
11973         * build-aux/csharpexec.sh.in: New file, moved from lib/.
11974         * modules/csharpexec (Files): Update.
11975         (configure.ac): Add AC_CONFIG_FILES invocation.
11976         (EXTRA_DIST): Remove csharpexec.sh.in.
11977
11978 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11979
11980         Sync from coreutils.
11981
11982         Add POSIX ACL support
11983         * lib/acl.h (copy_acl, set_acl): Add declarations.
11984         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
11985         systems other than Linux.
11986         (chmod_or_fchmod): New function: use fchmod when possible,
11987         and chmod otherwise.
11988         (file_has_acl): Add a POSIX ACL implementation, with a
11989         Linux-specific subcase.
11990         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
11991         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
11992         acls are unsupported.
11993         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
11994         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
11995         are unsupported.
11996
11997 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
11998
11999         Sync from coreutils.
12000         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
12001
12002 2006-01-07  Bruno Haible  <bruno@clisp.org>
12003
12004         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
12005         gl_EARLY.
12006
12007 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12008
12009         * lib/strftime.c (tzname): Don't declare if it is already #defined.
12010         Problem reported for Mingw by Mark Junker.
12011
12012 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
12013
12014         * README: Gnulib normally doesn't generate a tarball.
12015
12016 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
12017
12018         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
12019         long int, not int, for nanosecond counts, so that people who are
12020         used to POSIX struct timespec won't be surprised.  Reported by Jim
12021         Meyering.
12022
12023 2005-12-28  Bruno Haible  <bruno@clisp.org>
12024
12025         * build-aux/config.rpath: Update from GNU gettext.
12026
12027 2005-12-16  Jim Meyering  <jim@meyering.net>
12028
12029         * modules/fprintftime: New module.
12030         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
12031
12032 2005-12-16  Jim Meyering  <jim@meyering.net>
12033
12034         * m4/fprintftime.m4: New file.
12035
12036 2005-12-16  Jim Meyering  <jim@meyering.net>
12037
12038         * lib/fprintftime.c, lib/fprintftime.h: New files.
12039
12040 2005-12-15  Simon Josefsson  <jas@extundo.com>
12041
12042         * modules/socklen (configure.ac): Fix M4 macro name, to align with
12043         new m4/socklen.m4.
12044
12045 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12046
12047         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
12048         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
12049
12050 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
12051
12052         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
12053         * lib/argp-help.c (fill_in_uparams): Check if the constructed
12054         struct uparams is valid. Fall back to the default values if it is
12055         not.
12056
12057 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12058
12059         * modules/argp (Files): Add argp-pin.c
12060         (Depends-on): dirname
12061         (lib_SOURCES): Add argp-pin.c
12062
12063 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12064
12065         * m4/argp.m4:  Check if program_invocation_name and
12066         program_invocation_short_name are declared and define appropriate
12067         macros if they are not.
12068
12069 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12070
12071         * lib/argp-help.c (__argp_base_name): New function
12072         (__argp_short_program_name): Rewrite using __argp_base_name
12073         * lib/argp-namefrob.h: Define program_invocation_name and
12074         program_invocation_short_name if requested
12075         (__argp_base_name): Add prototype
12076         * lib/argp-parse.c (argp_def): Use gettext wrappers
12077         (argp_default_parser): Use __argp_base_name
12078         * lib/argp-pin.c: New file. Defines program_invocation_name and
12079         program_invocation_short_name on systems that lack them.
12080
12081 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12082
12083         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
12084         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12085         porting problem reported by Georg Schwarz in
12086         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12087
12088 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
12089
12090         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
12091         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
12092         porting problem reported by Georg Schwarz in
12093         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
12094
12095 2005-12-05  Bruno Haible  <bruno@clisp.org>
12096
12097         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
12098         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
12099         Reported by Mark Junker <mjscod@gmx.de>.
12100
12101 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
12102
12103         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
12104         Use implementation from Albert Chin, with some
12105         comments/corrections by Stepan Kasal and myself.
12106
12107 2005-12-02  Bruno Haible  <bruno@clisp.org>
12108
12109         * gnulib-tool (func_import): Accept GPLed build tool modules when
12110         --lgpl is given.
12111         * modules/csharpcomp-script: New file.
12112         * modules/csharpcomp: Depend on it.
12113         * modules/javacomp-script: New file.
12114         * modules/javacomp: Depend on it.
12115         Suggested by Simon Josefsson.
12116
12117 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
12118
12119         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
12120         statement, to work around an HP-UX 10.20 compiler bug reported by
12121         Peter O'Gorman.
12122
12123 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12124
12125         * modules/savedir (Depends-on): Add openat.
12126
12127 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
12128
12129         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
12130         (uintmax_t) [defined uintmax_t]: Do not declare.
12131         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
12132         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
12133         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
12134         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
12135         sake of portability to weird hosts that C allows (though we don't
12136         know of any practical examples).
12137
12138         * lib/savedir.h (fdsavedir): New decl.
12139         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
12140         contains most of the former guts of savedir.
12141         (savedir): Use savedirstream.
12142         Include "openat.h".
12143
12144 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
12145
12146         * modules/obstack (Files): Add m4/ulonglong.m4.
12147         Problem reported by Davide Angelocola.
12148
12149 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
12150
12151         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
12152         coreutils no longer futzes with rounding modes.
12153
12154 2005-11-14  Jim Meyering  <jim@meyering.net>
12155
12156         * lib/mkstemp-safer.c: Include <config.h>, required for possible
12157         replacement of mkstemp.
12158
12159 2005-11-10  Simon Josefsson  <jas@extundo.com>
12160
12161         * lib/readline.c: Remove EOL.
12162
12163 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12164
12165         * modules/gethrxtime (Depends-on): Add gettime.
12166
12167 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12168
12169         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
12170         or gettimeofday; no longer needed.
12171
12172 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
12173
12174         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
12175         time business.
12176         (gethrxtime) [! (HAVE_NANOUPTIME
12177         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
12178         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
12179         our own approximation.
12180
12181 2005-11-08  Eric Blake  <ebb9@byu.net>
12182
12183         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12184
12185 2005-11-08  Eric Blake  <ebb9@byu.net>
12186
12187         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
12188
12189 2005-11-04  Bruno Haible  <bruno@clisp.org>
12190
12191         * gnulib-tool: Implement --update mode.
12192
12193 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12194
12195         Fix porting problem reported by Theodoros V. Kalamatianos.
12196         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
12197         Don't assume that futimes failing means we must fail.
12198
12199 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
12200
12201         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
12202         variables to suggest the intended function of the PATH_MAX check.
12203
12204 2005-10-30  Kean Johnston  <jkj@sco.com>
12205
12206         Trivial changes to support SCO systems.
12207         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
12208         as PATH_MAX.
12209         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
12210         where __ptr is null when no I/O is pending.
12211
12212 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
12213
12214         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
12215         leave errno alone.  Problem reported by Dmitry V. Levin.
12216
12217 2005-10-28  Simon Josefsson  <jas@extundo.com>
12218
12219         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
12220         Test more.
12221
12222         * tests/test-gc-md2.c, tests/test-md2.c: New files.
12223
12224         * modules/md2, modules/md2-tests: New files.
12225
12226 2005-10-28  Simon Josefsson  <jas@extundo.com>
12227
12228         * m4/inet_ntop.m4: More tests.
12229
12230         * m4/gc-md2.m4, md2.m4: New file.
12231
12232 2005-10-28  Simon Josefsson  <jas@extundo.com>
12233
12234         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
12235         "restrict" keywords, as per POSIX.  Protect the function
12236         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
12237         Don't use K&R prototypes.  Check the sprintf return values.
12238         Re-define EAFNOSUPPORT if not present.  Indent.
12239
12240         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
12241         suggested by Bruno Haible <bruno@clisp.org>.
12242
12243         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
12244
12245         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
12246
12247         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
12248         libgcrypt).
12249
12250         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
12251
12252         * lib/md2.h, lib/md2.c: New files.
12253
12254 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
12255
12256         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
12257         errno alone.  Problem reported by Frederic Jolliton.
12258
12259 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
12260
12261         * modules/verify (License): Change from GPL to LGPL.  This is a
12262         tiny module and there are apparently near-equivalents that are
12263         under the BSD license.
12264
12265 2005-10-24  Simon Josefsson  <jas@extundo.com>
12266
12267         * modules/sha1: Relicense to LGPL.
12268
12269 2005-10-24  Simon Josefsson  <jas@extundo.com>
12270
12271         * lib/md4.h: Shrink buffer size, now that we changed the type.
12272
12273 2005-10-23  Simon Josefsson  <jas@extundo.com>
12274
12275         * gnulib-tool (func_import): Fix --tests-base.
12276
12277 2005-10-22  Simon Josefsson  <jas@extundo.com>
12278
12279         * modules/arcfour (Depends-on): Need stdint.
12280
12281 2005-10-22  Simon Josefsson  <jas@extundo.com>
12282
12283         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
12284         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
12285
12286 2005-10-22  Simon Josefsson  <jas@extundo.com>
12287
12288         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
12289         suggested by Bruno Haible <bruno@clisp.org>.
12290
12291 2005-10-22  Simon Josefsson  <jas@extundo.com>
12292
12293         * lib/crc.h: Include stddef.h, for size_t.
12294
12295 2005-10-22  Simon Josefsson  <jas@extundo.com>
12296
12297         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
12298         arcfour_context struct (simplify test vector testing in GNU
12299         Shishi).
12300
12301 2005-10-21  Simon Josefsson  <jas@extundo.com>
12302
12303         * modules/des, modules/des-tests: New files.
12304
12305         * modules/gc-des, modules/gc-des-tests: New files.
12306
12307         * tests/test-des.c, tests/test-gc-des.c: New file.
12308
12309 2005-10-21  Simon Josefsson  <jas@extundo.com>
12310
12311         * modules/arctwo, modules/arctwo-tests: New files.
12312
12313         * tests/test-arctwo.c: New file.
12314
12315         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
12316
12317         * tests/test-gc-arctwo.c: New file.
12318
12319 2005-10-21  Simon Josefsson  <jas@extundo.com>
12320
12321         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
12322         Bruno Haible <bruno@clisp.org>.
12323
12324         * m4/gc-des.m4: New file.
12325
12326 2005-10-21  Simon Josefsson  <jas@extundo.com>
12327
12328         * m4/arctwo.m4: New file.
12329
12330         * m4/gc-arctwo.m4: New file.
12331
12332 2005-10-21  Simon Josefsson  <jas@extundo.com>
12333
12334         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
12335         block.
12336
12337 2005-10-21  Simon Josefsson  <jas@extundo.com>
12338
12339         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
12340         <bruno@clisp.org>.
12341
12342         * lib/hmac-sha1.c (hmac_sha1): Likewise.
12343
12344         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
12345         Bruno Haible <bruno@clisp.org>.
12346
12347         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
12348         <bruno@clisp.org>.
12349
12350 2005-10-21  Simon Josefsson  <jas@extundo.com>
12351
12352         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
12353
12354 2005-10-21  Simon Josefsson  <jas@extundo.com>
12355
12356         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
12357
12358 2005-10-21  Simon Josefsson  <jas@extundo.com>
12359
12360         * lib/des.h, lib/des.c: New files.
12361
12362         * lib/gc-gnulib.c: Support DES.c
12363
12364 2005-10-21  Simon Josefsson  <jas@extundo.com>
12365
12366         * lib/arctwo.h, lib/arctwo.c: New files.
12367
12368         * lib/gc-gnulib.c: Support ARCTWO.
12369
12370 2005-10-21  Simon Josefsson  <jas@extundo.com>
12371
12372         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
12373         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
12374
12375 2005-10-21  Simon Josefsson  <jas@extundo.com>
12376
12377         * gnulib-tool (func_import, func_create_testdir): Define automake
12378         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
12379         Makefile.am snippet),
12380         suggested by Bruno Haible <bruno@clisp.org>.
12381
12382         * modules/gc (Makefile.am): Use it.
12383
12384 2005-10-21  Bruno Haible  <bruno@clisp.org>
12385
12386         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
12387         patch.
12388
12389 2005-10-19  Simon Josefsson  <jas@extundo.com>
12390
12391         * tests/test-gc-rijndael.c: New file.
12392
12393         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
12394
12395 2005-10-19  Simon Josefsson  <jas@extundo.com>
12396
12397         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
12398         interface too.
12399
12400 2005-10-19  Simon Josefsson  <jas@extundo.com>
12401
12402         * tests/test-gc-arcfour.c: New file.
12403
12404         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
12405
12406 2005-10-19  Simon Josefsson  <jas@extundo.com>
12407
12408         * modules/gc-md4, modules/gc-md4-tests: New file.
12409
12410         * tests/test-gc-md4.c: New file.
12411
12412 2005-10-19  Simon Josefsson  <jas@extundo.com>
12413
12414         * m4/gc-md4.m4: New file.
12415
12416 2005-10-19  Simon Josefsson  <jas@extundo.com>
12417
12418         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
12419         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
12420         <kasal@ucw.cz>.
12421
12422 2005-10-19  Simon Josefsson  <jas@extundo.com>
12423
12424         * m4/gc-arcfour.m4: New file.
12425
12426         * m4/gc-rijndael.m4: New file.
12427
12428 2005-10-19  Simon Josefsson  <jas@extundo.com>
12429
12430         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
12431
12432 2005-10-19  Simon Josefsson  <jas@extundo.com>
12433
12434         * lib/gc-gnulib.c: Support ARCFOUR.
12435
12436 2005-10-19  Simon Josefsson  <jas@extundo.com>
12437
12438         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
12439         support.
12440
12441         * lib/gc.h: Add ECB enum type.
12442
12443         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
12444
12445 2005-10-18  Simon Josefsson  <jas@extundo.com>
12446
12447         * tests/test-md5.c: New file.
12448
12449         * modules/md5-tests: New file.
12450
12451 2005-10-18  Simon Josefsson  <jas@extundo.com>
12452
12453         * tests/test-md4.c: New file.
12454
12455         * modules/md4, modules/md4-tests: New files.
12456
12457 2005-10-18  Simon Josefsson  <jas@extundo.com>
12458
12459         * m4/md4.m4: New file.
12460
12461 2005-10-18  Simon Josefsson  <jas@extundo.com>
12462
12463         * lib/md4.h, lib/md4.c: New files, based on md5.?.
12464
12465 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
12466
12467         * gnulib-tool (func_create_testdir): Omit the second check whether
12468         BUILT_SOURCES in nonempty.
12469
12470 2005-10-17  Simon Josefsson  <jas@extundo.com>
12471
12472         * tests/test-rijndael.c: New file.
12473
12474 2005-10-17  Simon Josefsson  <jas@extundo.com>
12475
12476         * modules/sha1: Depend on stdint instead of md5.
12477
12478         * modules/md5: Depend on stdint, remove uint32_t.
12479
12480 2005-10-17  Simon Josefsson  <jas@extundo.com>
12481
12482         * modules/gc-sha1-tests: New file.
12483
12484         * tests/test-gc-sha1.c: New file.
12485
12486 2005-10-17  Simon Josefsson  <jas@extundo.com>
12487
12488         * m4/md5.m4: Remove call to uint32_t.m4.
12489
12490 2005-10-17  Simon Josefsson  <jas@extundo.com>
12491
12492         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
12493
12494         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
12495         md5.h.
12496
12497         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
12498
12499         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
12500
12501 2005-10-17  Simon Josefsson  <jas@extundo.com>
12502
12503         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
12504
12505 2005-10-17  Simon Josefsson  <jas@extundo.com>
12506
12507         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
12508
12509 2005-10-17  Simon Josefsson  <jas@extundo.com>
12510
12511         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
12512
12513         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
12514
12515 2005-10-17  Bruno Haible  <bruno@clisp.org>
12516
12517         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
12518         that it can also be used in a test.
12519
12520 2005-10-16  Bruno Haible  <bruno@clisp.org>
12521
12522         * gnulib-tool (func_emit_tests_Makefile_am): Also define
12523         TESTS_ENVIRONMENT, so that individual tests can augment it.
12524
12525         * gnulib-tool (func_create_testdir): Use an intermediate target for
12526         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
12527         macros, like $(ALLOCA_H), which cannot be passed through the command
12528         line.
12529
12530 2005-10-15  Simon Josefsson  <jas@extundo.com>
12531
12532         * modules/rijndael-tests: New file.
12533
12534         * modules/rijndael: New file.
12535
12536 2005-10-15  Simon Josefsson  <jas@extundo.com>
12537
12538         * m4/rijndael.m4: New file.
12539
12540 2005-10-15  Simon Josefsson  <jas@extundo.com>
12541
12542         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
12543
12544         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
12545
12546 2005-10-14  Simon Josefsson  <jas@extundo.com>
12547
12548         * tests/test-arcfour.c: New file.
12549
12550         * modules/arcfour, modules/arcfour-tests: New files.
12551
12552 2005-10-14  Simon Josefsson  <jas@extundo.com>
12553
12554         * m4/arcfour.m4: New file.
12555
12556 2005-10-14  Simon Josefsson  <jas@extundo.com>
12557
12558         * lib/arcfour.h, lib/arcfour.c: New files.
12559
12560 2005-10-14  Roland McGrath  <roland@redhat.com>
12561
12562         Import from libc.  [BZ #1331]
12563         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
12564         macro argument.
12565         Reported by Matej Vela <vela@debian.org>.
12566
12567 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12568
12569         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
12570         include <wchar.h>; no longer needed.
12571
12572 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
12573
12574         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
12575
12576 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
12577         and  Ulrich Drepper  <drepper@redhat.com>
12578
12579         Import from libc.
12580         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
12581         instead of inline stream orientation test and two separate
12582         function calls.  Pay no attention to USE_IN_LIBIO.
12583
12584 2005-10-13  Simon Josefsson  <jas@extundo.com>
12585
12586         * modules/gc-hmac-md5-tests: New file.
12587
12588         * tests/test-gc-hmac-sha1.c: New file.
12589
12590         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
12591
12592         * modules/gc-hmac-md5-tests: New file.
12593
12594         * tests/test-gc-md5.c: New file.
12595
12596         * modules/gc-md5-tests: New file.
12597
12598 2005-10-13  Simon Josefsson  <jas@extundo.com>
12599
12600         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
12601         Move memory allocation outside of loop.
12602
12603 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
12604
12605         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
12606         intermediate directory is in a read-only file system.  Problem
12607         reported by Eric Blake.
12608
12609 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
12610
12611         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
12612
12613 2005-10-12  Simon Josefsson  <jas@extundo.com>
12614
12615         * tests/test-hmac-sha1.c: New file.
12616
12617         * modules/hmac-sha1-tests: New file.
12618
12619         * modules/hmac-sha1: New file.
12620
12621 2005-10-12  Simon Josefsson  <jas@extundo.com>
12622
12623         * modules/gc-sha1: New file.
12624
12625 2005-10-12  Simon Josefsson  <jas@extundo.com>
12626
12627         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
12628
12629         * tests/test-gc-pbkdf2-sha1.c: New file.
12630
12631 2005-10-12  Simon Josefsson  <jas@extundo.com>
12632
12633         * modules/gc-md5, modules/gc-hmac-md5: New files.
12634
12635         * modules/gc (Files): Remove md5, memxor and hmac files.
12636
12637 2005-10-12  Simon Josefsson  <jas@extundo.com>
12638
12639         * m4/gc-pbkdf2-sha1.m4: New file.
12640
12641         * m4/gc-hmac-sha1.m4: New file.
12642
12643         * m4/gc-sha1: New file.
12644
12645         * m4/hmac-sha1.m4: New file.
12646
12647 2005-10-12  Simon Josefsson  <jas@extundo.com>
12648
12649         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
12650
12651         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
12652
12653 2005-10-12  Simon Josefsson  <jas@extundo.com>
12654
12655         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
12656         suggested by Bruno Haible <bruno@clisp.org>.
12657
12658 2005-10-12  Simon Josefsson  <jas@extundo.com>
12659
12660         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
12661
12662 2005-10-12  Simon Josefsson  <jas@extundo.com>
12663
12664         * lib/gc-pbkdf2-sha1.c: New file.
12665
12666         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
12667
12668 2005-10-12  Simon Josefsson  <jas@extundo.com>
12669
12670         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
12671
12672         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
12673
12674 2005-10-12  Simon Josefsson  <jas@extundo.com>
12675
12676         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
12677         GC_USE_HMAC_MD5, respectively.
12678
12679         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
12680         (gc_md5): Fix typo.
12681
12682         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
12683
12684         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
12685
12686         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
12687
12688 2005-10-12  Bruno Haible  <bruno@clisp.org>
12689
12690         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
12691         Reported by Stepan Kasal <kasal@ucw.cz>.
12692
12693 2005-10-11  Simon Josefsson  <jas@extundo.com>
12694
12695         * tests/test-crc.c: New file.
12696
12697         * modules/crc, modules/crc-tests: New files.
12698
12699 2005-10-11  Simon Josefsson  <jas@extundo.com>
12700
12701         * m4/crc.m4: New file.
12702
12703 2005-10-11  Simon Josefsson  <jas@extundo.com>
12704
12705         * lib/gc.h: Add gc_hash and gc_hash_buffer.
12706
12707         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
12708
12709         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
12710
12711 2005-10-11  Simon Josefsson  <jas@extundo.com>
12712
12713         * lib/crc.h, lib/crc.c: New files.
12714
12715         * lib/gc.h (gc_hash_buffer): Add doc.
12716
12717 2005-10-11  Bruno Haible  <bruno@clisp.org>
12718
12719         * modules/c-strcasestr: New file.
12720         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
12721
12722 2005-10-11  Bruno Haible  <bruno@clisp.org>
12723
12724         * modules/c-strcase: New file.
12725         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
12726
12727 2005-10-11  Bruno Haible  <bruno@clisp.org>
12728
12729         * lib/strcasecmp.c: Include limits.h.
12730         (strcasecmp): Avoid integer overflow on exotic platforms.
12731         * lib/strncasecmp.c: Include limits.h.
12732         (strncasecmp): Avoid integer overflow on exotic platforms.
12733         Reported by Paul Eggert.
12734
12735 2005-10-11  Bruno Haible  <bruno@clisp.org>
12736
12737         * lib/c-strcasestr.h: New file, from GNU gettext.
12738         * lib/c-strcasestr.c: New file, from GNU gettext.
12739
12740 2005-10-11  Bruno Haible  <bruno@clisp.org>
12741
12742         * lib/c-strcase.h: New file, from GNU gettext.
12743         * lib/c-strcasecmp.c: New file, from GNU gettext.
12744         * lib/c-strncasecmp.c: New file, from GNU gettext.
12745
12746 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12747
12748         * modules/mempcpy (License): GPL -> LGPL.
12749         * modules/strchrnul (License): Likewise.
12750         * modules/sysexits (License): Likewise.
12751
12752 2005-10-08  Simon Josefsson  <jas@extundo.com>
12753
12754         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
12755
12756 2005-10-07  Simon Josefsson  <jas@extundo.com>
12757
12758         * m4/memxor.m4: Remove gl_C_RESTRICT call.
12759
12760 2005-10-06  Simon Josefsson  <jas@extundo.com>
12761
12762         * tests/test-hmac-md5.c: New file.
12763
12764         * modules/hmac-md5-tests: New file.
12765
12766         * modules/hmac-md5: New file.
12767
12768 2005-10-06  Simon Josefsson  <jas@extundo.com>
12769
12770         * m4/hmac-md5.m4: New file.
12771
12772         * m4/memxor.m4: Require gl_C_RESTRICT.
12773
12774 2005-10-06  Simon Josefsson  <jas@extundo.com>
12775
12776         * lib/memxor.c (memxor): Avoid casts and warnings.
12777
12778 2005-10-06  Simon Josefsson  <jas@extundo.com>
12779
12780         * lib/hmac-md5.c: New file.
12781
12782         * lib/hmac.h: New file.
12783
12784 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12785
12786         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
12787         promotes to int, not unsigned int, to catch the AIX 5.3
12788         compiler bug.
12789
12790 2005-10-05  Simon Josefsson  <jas@extundo.com>
12791
12792         * modules/memxor: New file.
12793
12794         * modules/iconv (Files): Move config.rpath to havelib, it is used
12795         there.
12796
12797         * modules/havelib (Files): Add config.rpath.
12798
12799 2005-10-05  Simon Josefsson  <jas@extundo.com>
12800
12801         * m4/memxor.m4: New file.
12802
12803 2005-10-05  Simon Josefsson  <jas@extundo.com>
12804
12805         * lib/memxor.c (memxor): Fix compiler error.
12806
12807         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
12808         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
12809
12810         * lib/memxor.h, lib/memxor.c: New files.
12811
12812         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
12813         we assume all systems have it, suggested by Jim Meyering
12814         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
12815         any systems lack sys/socket.h; mingw32 is known to lack it, but we
12816         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
12817         same reasons.
12818
12819 2005-10-05  Simon Josefsson  <jas@extundo.com>
12820
12821         * config/srclist.txt: Add glibc bug 1423 for md5.h.
12822
12823 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
12824
12825         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
12826         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
12827         needed, since the source code now assumes these .h files.
12828
12829 2005-10-05  Derek Price  <derek@ximbiot.com>
12830
12831         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
12832
12833 2005-10-05  Bruno Haible  <bruno@clisp.org>
12834
12835         * modules/stdint (License): Change to LGPL.
12836
12837 2005-10-04  Simon Josefsson  <jas@extundo.com>
12838
12839         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
12840         D. Baushke" <mdb@gnu.org>.
12841
12842 2005-10-04  Bruno Haible  <bruno@clisp.org>
12843
12844         * lib/verify.h (verify_true): Provide alternative definition for C++.
12845
12846 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
12847
12848         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
12849         (SSIZE_MAX): New macro, if not already defined.
12850         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
12851         than 2 GiB.
12852
12853 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12854
12855         Sync from coreutils.
12856         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
12857         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
12858         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
12859         ULLONG_MAX doesn't work with 2.7.2.1.
12860
12861 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12862
12863         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
12864         From Ben Pfaff.
12865
12866         * modules/exclude (Depends-on): Depend on verify.
12867         * modules/strtoimax (Depends-on): Likewise.
12868         * modules/utimecmp (Depends-on): Likewise.
12869
12870 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
12871
12872         * lib/exclude.c: Include verify.h.
12873         (verify): Remove.  All callers changed to use verify.h's version.
12874         * lib/strtoimax.c: Likewise.
12875         * lib/utimecmp.c: Likewis.e
12876
12877         Sync from coreutils.
12878         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
12879         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
12880         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
12881         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
12882         bother returning ENOSYS if settimeofday or stime fails; just let
12883         them return whatever errno they want to return.
12884         * lib/utimens.c: Include unistd.h, for dup2.
12885         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
12886         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
12887
12888 2005-10-02  Jim Meyering  <jim@meyering.net>
12889
12890         Sync from coreutils.
12891         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
12892         from glibc-2.2.5 that fails for read-only files.
12893
12894 2005-10-02  Jim Meyering  <jim@meyering.net>
12895
12896         Sync from coreutils.
12897         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
12898         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
12899         `#if HAVE_CONFIG_H'.
12900         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
12901         Remove AT_FDCWD test.
12902         Do not consume the fd unless successful.
12903         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
12904         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
12905         block, so that we don't even try to compile it if settimeofday is
12906         available.  This works around a compilation failure on OSF1 V5.1,
12907         due to stime requiring a `long int*' while tv_sec is `int'.
12908
12909 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
12910
12911         Sync from coreutils.
12912         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
12913         against `yes', rather than just testing for nonempty.
12914
12915 2005-10-01  Simon Josefsson  <jas@extundo.com>
12916
12917         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
12918         and Darwin.
12919
12920         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
12921         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
12922         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
12923         freeaddrinfo and gai_strerror are declared by the POSIX headers.
12924         Check if struct addrinfo is declared.
12925
12926 2005-10-01  Simon Josefsson  <jas@extundo.com>
12927
12928         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
12929         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
12930         AI_* and EAI_* definitions.  Protect function declarations.
12931
12932 2005-10-01  Jim Meyering  <jim@meyering.net>
12933
12934         Sync from coreutils.
12935
12936         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
12937         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
12938         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
12939         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12940         in the inet and nsl libraries.  Required on Solaris 5.7.
12941
12942 2005-10-01  Jim Meyering  <jim@meyering.net>
12943
12944         Sync from coreutils.
12945         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
12946         in the inet and nsl libraries.  Required on Solaris 5.7.
12947
12948 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
12949
12950         * lib/getdelim.c (getdelim): Remove unused variables.
12951
12952 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
12953
12954         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
12955         so that the code works even with ancient cpp.  Portability problem
12956         with GCC 2.7.2.1 reported by Thomas M.Ott.
12957
12958 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
12959
12960         * modules/regex (Depends-on): Add strcase.
12961
12962         * modules/gethostname (Licence): Change from GPL to LGPL, since
12963         gethostname.c is a trivial implementation of a standard library
12964         function.
12965         * modules/poll (License): Change from GPL to LGPL, since it's
12966         derived from LGPL code.
12967
12968 2005-09-27  Jim Meyering  <jim@meyering.net>
12969
12970         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
12971         HAVE_CONFIG_H.
12972
12973         * lib/intprops.h (signed_type_or_expr__): Define.
12974         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
12975         for unsigned types.
12976
12977 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
12978
12979         * lib/verify.h (verify_expr): Remove, replacing with:
12980         (verify_true): New macro that returns true instead of void.
12981         (verify_type__): Remove.
12982         (verify): Use verify_true rather than verify_type__.
12983
12984 2005-09-26  Bruno Haible  <bruno@clisp.org>
12985
12986         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
12987         is necessary.
12988         (lib_SOURCES): Remove mbchar.c.
12989         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
12990         (Files): Add m4/mbrtowc.m4.
12991         * modules/mbiter: Likewise.
12992         * modules/mbuiter: Likewise.
12993
12994 2005-09-26  Bruno Haible  <bruno@clisp.org>
12995
12996         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
12997         compile mbchar.c if they are not both present.
12998         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
12999         * m4/mbiter.m4 (gl_MBITER): Likewise.
13000         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
13001         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
13002         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
13003
13004 2005-09-25  Jim Meyering  <jim@meyering.net>
13005
13006         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
13007         also uses socklen_t.
13008
13009 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
13010
13011         * lib/utimens.c (ENOSYS): Define if not already defined.
13012         (futimens): Support having a null PATH if the file descriptor
13013         is nonnegative.
13014
13015         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
13016         Remove.
13017         (__attribute): Define to empty unless GCC 3.1 or later.
13018         This works around a core dump on OpenBSD 3.4, which has GCC
13019         2.95.3, which dumps core when given __attribute__(()).  It also
13020         simplifies other tests, since we really don't want to bother with
13021         worrying about which ancient version of GCC supported what.
13022         Original problem reported by Yoann Vandoorselaere, with part of
13023         the fix suggested by Derek Price.
13024
13025 2005-09-24  Jim Meyering  <jim@meyering.net>
13026
13027         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
13028         so we can once again use a positive bitfield width of 1 -- now we
13029         don't have to explain why we were using a bitfield width of 2.
13030
13031 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13032
13033         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
13034         and similarly for the other external symbols.  Problem reported
13035         by James Gallager.
13036
13037         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
13038         bug reported by Jim Meyering.
13039
13040         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
13041         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
13042         not needed, since socklen is a prerequisite module.
13043
13044 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
13045
13046         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
13047         Problem reported by Eric Blake.
13048         (getaddrinfo): Initialize se so that it's not garbage.
13049         Redo internal storage allocation so that it doesn't make unportable
13050         assumptions about alignment.
13051         Fix a memory leak.
13052
13053         * lib/utimens.c (futimens): Use futimesat if available.
13054         Prefer it to futimes since it doesn't have the futimes bug.
13055
13056         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
13057         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
13058         Instead, declare a function that returns a pointer to an array,
13059         and use verify_type__ to declare the size of the array.
13060         Problem and germ of a solution reported by Bruno Haible.
13061         (verify_type__): Use 2, not 1, for bitfield size, to avoid
13062         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
13063
13064 2005-09-23  Jim Meyering  <jim@meyering.net>
13065
13066         Sync from coreutils.
13067         Correct build failure (socklen_t not defined) on at least
13068         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
13069         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
13070
13071 2005-09-23  Jim Meyering  <jim@meyering.net>
13072
13073         * modules/getaddrinfo (Depends-on): Add socklen.
13074
13075 2005-09-23  Bruno Haible  <bruno@clisp.org>
13076
13077         * tests/test-verify.c: New file.
13078
13079 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13080
13081         Sync from coreutils.
13082
13083         * modules/argmatch (Depends-on): Add verify.
13084         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
13085         unistd-safer.
13086         * modules/save-cwd (Depends-on): Likewise.
13087
13088         * modules/openat (Files): Add lib/openat-die.c.
13089         (Depends-on): Remove error, exitfail.
13090         Add dirname.
13091
13092         * modules/verify: New file.
13093         * MODULES.html.sh (Diagnostics <assert.h>): New section,
13094         with "verify" module.
13095
13096 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13097
13098         Sync from coreutils.
13099
13100         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
13101         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
13102         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
13103         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
13104         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
13105         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
13106         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
13107         Don't bother checking for string.h, stdlib.h, unistd.h.
13108         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
13109         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
13110         module's job.
13111         * m4/jm-macros.m4 (gl_MACROS): Likewise.
13112         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
13113
13114         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
13115         (gl_GETDATE): Use it.
13116
13117         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
13118
13119 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13120
13121         Sync from coreutils.
13122
13123         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
13124         stat-time.h.
13125         * lib/argmatch.h: Include verify.h
13126         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
13127         (ARGMATCH_ASSERT): Remove; unused.
13128         * lib/canonicalize.c: Assume STDC_HEADERS.
13129         * lib/exclude.c: Include "strcase.h".
13130         * lib/regex_internal.h [!defined _LIBC]: Likewise.
13131         * lib/getusershell.c: Include stdio--.h rather than stdio.h
13132         and stdio-safer.h.
13133         (getusershell): Call fopen, not fopen_safer.
13134         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
13135         Do not include unistd-safer.h.
13136         (save_cwd): Don't call fd_safer; no longer needed
13137         now that we include fcntl--.h.
13138
13139         * lib/getdate.y (relative_time): New type.
13140         (RELATIVE_TIME_0): New constant.
13141         (parser_control): Use relative_time instead of doing it ourselves.
13142         (%union): Add new relative_time rel member.
13143         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
13144         Now typeless.
13145         (relunit, relunit_snumber): Now of type rel.
13146         (zone, rel, relunit, get_date): Adjust to above changes.
13147
13148         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
13149         Do not include unistd-safer.h.
13150         (getloadavg): Don't call fd_safer; no longer needed
13151         now that we include fcntl--.h.
13152
13153         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
13154         (make_dir_parents): Treat ENOSYS like EEXIST.
13155
13156         Improve quality of diagnostics on restore_cwd failure.
13157         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
13158         (make_dir_parents): Last arg is now int * (for errno), not bool *.
13159         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
13160         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
13161         each time through the loop.  Do not diagnose restore_cwd failure;
13162         that is the caller's job (and perhaps the caller does not care).
13163
13164         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
13165         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
13166         If the file already exists but is not a directory, don't bother
13167         to try to make its parents.
13168         Close potential file descriptor leak if we can't chdir("/") (!).
13169         Don't always return true if chdir($PWD) fails; return true only
13170         if the requested action was done successfully (except for the
13171         chdir($PWD)).
13172         Don't log final directory unless we actually made it.
13173         Refactor to avoid duplicate code to fix up permissions.
13174         Don't attempt to fix up parent permissions if chdir($PWD) fails.
13175
13176         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
13177         to make it a bit faster and (I hope) clearer.
13178         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
13179         Fix bug in formats like %2N.
13180
13181         * lib/verify.h: New file.
13182
13183 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
13184
13185         Sync from coreutils.
13186         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
13187
13188 2005-09-22  Jim Meyering  <jim@meyering.net>
13189
13190         Sync from coreutils.
13191
13192         * m4/lstat.m4 (gl_FUNC_LSTAT):
13193         Use AC_LIBSOURCES to require lstat.c and lstat.h.
13194         Remove obsolete comment.
13195         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
13196         * m4/xstrtod.m4: Likewise.
13197
13198         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
13199
13200 2005-09-22  Jim Meyering  <jim@meyering.net>
13201
13202         Sync from coreutils.
13203
13204         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
13205
13206         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
13207         the .tm_year member, since otherwise gcc-4.0 would now warn about
13208         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
13209
13210         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
13211         order to avoid an unsuppressible warning from gcc on 64-bit systems.
13212
13213         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
13214         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
13215         when run in a time zone for which daylight savings time is in effect
13216         for the starting date.
13217
13218         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
13219         stop us from restricting permissions of just-created absolute-named
13220         directories.
13221         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
13222         to restore initial working directory.
13223         * lib/mkdir-p.c (make_dir_parents): New parameter:
13224         different_working_dir, to tell caller if/when we change the working
13225         directory and are unable to return to the initial one.
13226         * lib/mkdir-p.h (make_dir_parents): Update prototype.
13227         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
13228         `return false'.  This fixes a bug introduced on 2004-07-30.
13229
13230         * lib/openat.c (fdopendir): Be sure to close the supplied
13231         file descriptor before returning.  This makes our replacement
13232         implementation a little closer to Solaris's, where fdopendir
13233         ties the file descriptor to the returned DIR* pointer.
13234         * lib/openat.c (unlinkat): New function.
13235         * lib/openat.h (unlinkat): Add prototype.
13236         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
13237         (openat_restore_fail): Rename from openat_restore_die.
13238         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
13239
13240         Provide an alternative to exiting immediately upon save_cwd or
13241         restore_cwd failure.  Now, an application can arrange e.g.,
13242         to perform a longjump in that case.
13243         * lib/openat.c: Include dirname.h.
13244         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
13245         (rpl_openat, fdopendir, fstatat): Call openat_save_die
13246         and openat_restore_die rather than calling error directly.
13247         Don't include "error.h" or "exitfail.h"; they're no longer needed.
13248
13249         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
13250         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
13251         define.
13252
13253         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
13254         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
13255                             int utc, int nanoseconds);
13256         Background:
13257         date should not have to allocate a megabyte of virtual memory to
13258         handle a format argument like +%1048575T.  When implemented with
13259         strftime, it must allocate such a buffer, use strftime to fill it
13260         in, print it, then free it.
13261         With fprintftime, it simply prints everything and exits.
13262         With no need for memory allocation, that's one fewer way to fail.
13263         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
13264         optional field width, not before, so we accept %9:z, not %:9z.
13265         (my_strftime): Be sure to use L_('x') for literals.
13266
13267         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
13268         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
13269         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
13270         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
13271         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
13272         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
13273         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
13274         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
13275         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
13276         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
13277         * lib/xgethostname.c, lib/xreadlink.c:
13278         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
13279
13280         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
13281         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
13282         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
13283         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13284         and don't include <sys/file.h>).
13285
13286 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
13287
13288         Sync from coreutils.
13289
13290         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
13291         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
13292         [!LDAV_DONE]: Avoid unused variable warning.
13293
13294 2005-09-21  Bruno Haible  <bruno@clisp.org>
13295
13296         * lib/unicodeio.h (unicode_to_mb): New declaration.
13297
13298 2005-09-20  Derek Price  <derek@ximbiot.com>
13299
13300         * lib/getaddrinfo.c: Don't include <netdb.h> included from
13301         getaddrinfo.h.
13302
13303 2005-09-20  Bruno Haible  <bruno@clisp.org>
13304
13305         * gnulib-tool: Remove trailing slashes from the values specified for
13306         --source-base, --m4-base, --tests-base, --aux-dir.
13307         Suggested by Simon Josefsson <jas@extundo.com>.
13308
13309 2005-09-20  Bruno Haible  <bruno@clisp.org>
13310
13311         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
13312         func_modules_to_filelist, func_import, func_create_testdir): Make all
13313         sorting results locale-independent, so that gnulib-cache.m4 doesn't
13314         change when gnulib-tool is invoked in a different locale.
13315
13316 2005-09-19  Simon Josefsson  <jas@extundo.com>
13317
13318         * m4/socklen.m4: Fix typo.
13319
13320 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13321
13322         Use a consistent style for including <config.h>.
13323         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
13324         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
13325         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
13326         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
13327         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
13328         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
13329         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
13330         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
13331         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
13332         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
13333         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
13334         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
13335         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
13336         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
13337         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
13338         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
13339         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
13340         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
13341         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
13342         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
13343         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
13344         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
13345         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
13346         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
13347         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
13348         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
13349         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
13350         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
13351         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
13352         lib/xstrtoumax.c, lib/yesno.c:
13353         Standardize inclusion of config.h.
13354         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
13355         lib/inttostr.h:  Removed inclusion of config.h from header files.
13356         * lib/inttostr.c:  Adjusted in-tree users.
13357         * lib/timespec.h: Remove superfluous warning to include config.h.
13358         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
13359         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
13360         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
13361         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
13362         config.h with HAVE_CONFIG_H.
13363
13364 2005-09-19  Jim Meyering  <jim@meyering.net>
13365
13366         * modules/pathmax (License): Change to LGPL.
13367
13368 2005-09-19  Derek Price  <derek@ximbiot.com>
13369
13370         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
13371
13372 2005-09-19  Bruno Haible  <bruno@clisp.org>
13373
13374         * gnulib-tool (import): Provide default for --tests-base.
13375
13376 2005-09-19  Bruno Haible  <bruno@clisp.org>
13377
13378         * doc/quote.texi: New file, extracted from gnulib.texi.
13379         * doc/ctime.texi: New file, extracted from gnulib.texi.
13380         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
13381         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
13382         * doc/gnulib.texi: Include them.
13383
13384 2005-09-18  Bruno Haible  <bruno@clisp.org>
13385
13386         Portability fix.
13387         * gnulib-tool (func_readlink): New function.
13388         (func_ln_if_changed): Use it.
13389
13390 2005-09-18  Bruno Haible  <bruno@clisp.org>
13391
13392         * gnulib-tool: Support --with-tests also with --import.
13393         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
13394         (func_import): Use variables $testsbase and $inctests. Emit a
13395         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
13396         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
13397         SUBDIRS += $testsdir.
13398         (func_create_testdir): Update.
13399
13400 2005-09-18  Bruno Haible  <bruno@clisp.org>
13401
13402         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
13403         instead of $dry_run.
13404         (func_cp_if_changed, func_mv_if_changed): Remove functions.
13405         (func_ln_if_changed): Don't handle dry-run here.
13406         (func_import): In dry-run mode, detect more precisely which actions
13407         would be performed, and don't use "...ing" verbs.
13408
13409 2005-09-18  Bruno Haible  <bruno@clisp.org>
13410
13411         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
13412         (func_import): Use join on two temporary files instead of three nested
13413         loops, in order to determine which files are new or old.
13414
13415 2005-09-18  Bruno Haible  <bruno@clisp.org>
13416
13417         * gnulib-tool (func_import): Comment out code that spits out the
13418         new files with --dry-run.
13419
13420 2005-09-18  Bruno Haible  <bruno@clisp.org>
13421
13422         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
13423
13424 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13425
13426         * lib/stat-time.h: New file.
13427         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
13428         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
13429         in a different way.
13430         (timespec_cmp): New function.
13431         * lib/utimecmp.c: Include stat-time.h.
13432         (SYSCALL_RESOLUTION): Depend on whether various struct stat
13433         members exist, not on the obsolescent ST_MTIM_NSEC.
13434         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
13435
13436 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13437
13438         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
13439
13440 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
13441
13442         * MODULES.html.sh (File system functions): Add stat-time.
13443         * modules/stat-time: New file.
13444         * modules/timespec (Files): Remove m4/st_mtim.m4; this
13445         is now done in a different way, by the stat-time module.
13446         * modules/utimecmp (Depends-on): Add stat-time.
13447
13448 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
13449
13450         * m4/st_mtim.m4: Remove.  Superseded by...
13451         * m4/stat-time.m4: New file.
13452         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
13453         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
13454
13455 2005-09-15  Derek Price  <derek@ximbiot.com>
13456
13457         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
13458
13459 2005-09-15  Derek Price  <derek@ximbiot.com>
13460
13461         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
13462         * lib/regex_internal.c: Ditto, using this...
13463         (__GNUC_PREREQ): ...new macro.
13464         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
13465         using...
13466         (__GNUC_PREREQ): ...this new macro.
13467
13468         * lib/strstr.h: Include string.h. Define strstr as a macro here.
13469
13470 2005-09-15  Derek Price  <derek@ximbiot.com>
13471             Paul Eggert  <eggert@cs.ucla.edu>
13472
13473         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
13474         changes, consolidating in...
13475         * lib/regex_internal.h: ...this file.
13476
13477 2005-09-13  Jim Meyering  <jim@meyering.net>
13478
13479         * lib/canon-host.c: Filter through gnu indent and reword comments
13480         slightly.
13481         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
13482
13483 2005-09-13  Derek Price  <derek@ximbiot.com>
13484
13485         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
13486         failure.
13487         Reported by Jim Meyering  <jim@meyering.net>.
13488
13489 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13490
13491         * lib/base64.c: Typo.
13492         (base64_encode): Put b64str in initialized data section.
13493
13494 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
13495
13496         Merge glibc and coreutils changes into gnulib, plus a few
13497         extra fixes.
13498         * lib/md5.c: Use #error rather than a string.
13499         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
13500         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
13501         (__attribute__): Define to empty for non recent-GCC.
13502         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
13503         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
13504         Renamed from their non-__ counterparts, with new macros replacing
13505         them if not _LIBC.  Add __THROW attribute.
13506         (rol): Remove.
13507         (struct md5_ctx): Align buffer if using GCC.
13508         * lib/sha1.h (struct sha1_ctx): Likewise.
13509         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
13510         The old name was backwards.
13511         (NOTSWAP): Remove; not used.
13512         (rol): New macro, moved here from md5.h.
13513         (sha1_process_block): Remove a FIXME that doesn't make sense.
13514
13515 2005-09-12  Derek Price  <derek@ximbiot.com>
13516
13517         Return usable errors from canon-host.
13518         * lib/canon-host.h: New file.
13519         * lib/canon-host.c (canon_host): Wrap...
13520         (canon_host_r): ...this new function, which now relies exclusively on
13521         getaddrinfo.
13522         (ch_strerror): New function.
13523         (last_cherror): New global.
13524         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
13525         interface.
13526         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
13527         void *.
13528         (freeaddrinfo): Free ai->ai_canonname when set.
13529
13530 2005-09-12  Derek Price  <derek@ximbiot.com>
13531
13532         Make canon-host require getaddrinfo.
13533         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
13534         AC_LIBSOURCE canon-host.h.  Call...
13535         (gl_PREREQ_CANON_HOST): ...this new function, which requires
13536         gl_GETADDRINFO.
13537         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
13538
13539 2005-09-12  Derek Price  <derek@ximbiot.com>
13540
13541         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
13542         LGPL.
13543         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
13544
13545 2005-09-12  Derek Price  <derek@ximbiot.com>
13546
13547         * lib/gai_strerror.c: Include config.h when available.  Include
13548         getaddrinfo.h before other headers to test interface.
13549         Reported by Larry Jones <lawrence.jones@ugs.com>.
13550
13551 2005-09-12  Derek Price  <derek@ximbiot.com>
13552             Paul Eggert  <eggert@cs.ucla.edu>
13553
13554         * modules/glob (Files): Add glob-libc.h.
13555
13556 2005-09-12  Derek Price  <derek@ximbiot.com>
13557             Paul Eggert  <eggert@cs.ucla.edu>
13558
13559         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
13560         glob_.h, glob-libc.h.
13561         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
13562
13563 2005-09-12  Derek Price  <derek@ximbiot.com>
13564             Paul Eggert  <eggert@cs.ucla.edu>
13565
13566         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
13567         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
13568         protecting things that should be done only in gnulib contexts.
13569         * lib/glob_.h: New file, containing only the glob things needed for
13570         gnulib.
13571         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
13572         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
13573         (glob, globfree, glob_pattern_p): Now defined simply in terms of
13574         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
13575         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
13576         and to respect the namespace rules better.
13577
13578 2005-09-08  Simon Josefsson  <jas@extundo.com>
13579
13580         * modules/socklen: New file.
13581
13582 2005-09-08  Simon Josefsson  <jas@extundo.com>
13583
13584         * m4/socklen.m4: New file.
13585
13586 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13587
13588         * modules/utimens (Files): Add m4/utimbuf.m4, since
13589         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
13590         Reported by Sergey Poznyakoff.
13591
13592 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13593
13594         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
13595         definitions, since that's the preferred style in glibc.
13596         Fix a minor spacing issue, and update copyright notice to match
13597         glibc's.
13598
13599 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
13600
13601         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
13602
13603 2005-09-06  Simon Josefsson  <jas@extundo.com>
13604
13605         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
13606         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
13607
13608 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13609
13610         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
13611         warning.
13612
13613 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
13614
13615         * config/srclist.txt: Add glibc bug 1302.
13616
13617 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
13618
13619         Change bitset word type from unsigned int to unsigned long int,
13620         as this has better performance on typical 64-bit hosts.
13621         Port bitset code to hosts with unusual word sizes.
13622         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
13623         (build_collating_symbol):
13624         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
13625         argument is a bitset.  This is merely a style issue, but it makes
13626         it clearer that an entire array is expected.
13627         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
13628         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
13629         Port to the case where bitset_word is not the same as unsigned int.
13630         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13631         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
13632         Likewise.
13633         * lib/regexec.c (check_dst_limits_calc_pos_1,
13634         check_subexp_matching_top):
13635         (build_trtable, group_nodes_into_DFAstates):
13636         Likewise.
13637         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
13638         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
13639         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
13640         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
13641         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
13642         * lib/regcomp.c (optimize_subexps, lower_subexp):
13643         Work even if bitset_word has holes in its bitwise representation.
13644         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
13645         * lib/regexec.c (check_dst_limits_calc_pos_1,
13646         check_subexp_matching_top):
13647         Likewise.
13648         * lib/regex_internal.c (re_string_reconstruct):
13649         Don't assume UCHAR_MAX == 255.
13650         * lib/regex_internal.h (bitset_set_all): Likewise.
13651         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
13652         All uses changed.
13653         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
13654         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
13655         All uses changed.
13656         (BITSET_WORD_MAX): New macro.
13657         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
13658         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
13659         (bitset_empty, bitset_copy):
13660         Prefer sizeof (bitset) to multiplying it out ourselves.
13661         (bitset_not_merge): Remove; unused.
13662         (bitset_contain): Return bool, not unsigned int with one bit on.
13663         All callers changed.
13664         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
13665         alignment than re_node_set; do this by defining a new internal
13666         type struct dests_alloc and using it to allocate memory.
13667
13668 2005-09-05  Bruno Haible  <bruno@clisp.org>
13669
13670         * gnulib-tool (func_import): Fix comparison in handling of symbolic
13671         links.
13672
13673 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
13674
13675         * modules/size_max (Makefile.am): Add size_max.h
13676
13677 2005-09-04  Derek Price  <derek@ximbiot.com>
13678
13679         * gnulib-tool (func_import): Fix reversed $symbolic logic.
13680
13681 2005-09-03  Simon Josefsson  <jas@extundo.com>
13682
13683         * gnulib-tool: Fix typo.
13684
13685 2005-09-03  Simon Josefsson  <jas@extundo.com>
13686
13687         * config/srclist.txt: Add glibc bug 1293.
13688
13689 2005-09-03  Derek Price  <derek@ximbiot.com>
13690
13691         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
13692         From Larry Jones <lawrence.jones@ugs.com>.
13693
13694 2005-09-02  Simon Josefsson  <jas@extundo.com>
13695
13696         * modules/socklen: New file.
13697
13698 2005-09-02  Simon Josefsson  <jas@extundo.com>
13699
13700         * modules/havelib: New module.
13701
13702         * modules/gettext, modules/iconv, modules/lock, modules/readline:
13703         Use havelib.
13704
13705 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13706
13707         Check for arithmetic overflow when calculating sizes, to prevent
13708         some buffer-overflow issues.  These patches are conservative, in the
13709         sense that when I couldn't determine whether an overflow was possible,
13710         I inserted a run-time check.
13711         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
13712         macros.
13713         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
13714         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
13715         (re_xnrealloc, re_x2nrealloc): New inline functions.
13716         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
13717         parse_bracket_exp):
13718         (build_equiv_class, build_charclass): Check for arithmetic overflow
13719         in size expression calculations.
13720         * lib/regex_internal.c (re_string_realloc_buffers):
13721         (build_wcs_upper_buffer, re_node_set_add_intersect):
13722         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
13723         (re_dfa_add_node, register_state): Likewise.
13724         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
13725         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
13726         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
13727         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
13728
13729 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
13730
13731         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
13732         m4/ulonglong.m4.  Problem reported by Martin Lambers.
13733
13734 2005-09-02  Bruno Haible  <bruno@clisp.org>
13735
13736         Support for lib vs. lib64 distinction on biarch platforms.
13737         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
13738         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
13739         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
13740
13741 2005-09-02  Bruno Haible  <bruno@clisp.org>
13742
13743         * gnulib-tool (import): In the other first-use case, provide defaults
13744         as well.
13745
13746 2005-09-02  Bruno Haible  <bruno@clisp.org>
13747
13748         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
13749         patches not yet found in the latest gettext release.
13750
13751 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13752
13753         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
13754         to avoid a collision with bits/local_lim.h in glibc.
13755         All uses changed.  Problem reported by Dmitry V. Levin in
13756         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
13757
13758         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
13759         bugs in int versus size_t comparisons.
13760         (re_string_context_at): Fix bug where the code assumed that
13761         Idx is signed.
13762
13763         Use bool where appropriate.
13764         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
13765         All callers changed.
13766         (calc_eclosure_iter): Likewise, for ROOT arg.
13767         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
13768         (build_charclass_op): Likewise, for NON_MATCH arg.
13769         * lib/regex_internal.c (re_string_allocate, re_string_construct):
13770         (re_string_construct_common): Likewise, for ICASE arg.
13771         * lib/regexec.c (re_search_2_stub, re_search_stub):
13772         Likewise, for RET_LEN arg.
13773         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
13774         (set_regs): Likewise, for FL_BACKTRACK arg.
13775         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
13776         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
13777         (calc_eclosure_iter, parse_bracket_exp):
13778         Use bool for internal variables that are booleans.
13779         * lib/regexec.c (re_search_internal, check_matching,
13780         proceed_next_node):
13781         (set_regs, build_sifted_states, sift_states_bkref):
13782         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
13783         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
13784         (find_collation_sequence_value):
13785         Likewise.
13786         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
13787         (re_node_set_compare):
13788         Return bool, not int. All callers changed.
13789         * lib/regexec.c (check_halt_node_context, check_dst_limits):
13790         (build_trtable, check_node_accept): Likewise.
13791         * lib/regex_internal.h: Include stdbool.h.
13792
13793         Fix bugs uncovered when converting to bool.
13794         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
13795         failure instead of charging ahead blindly.
13796         * lib/regex_internal.c (register_state): Likewise.
13797         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
13798         for freeing internal storage.
13799         (group_nodes_into_DFA_states): Use unsigned int, not int, for
13800         bitset pieces used as boolean, to avoid undefined behavior
13801         on hosts that do int overflow checking.
13802
13803 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
13804
13805         * config/srclist.txt: Add glibc bugs 1285-1287.
13806
13807 2005-09-01  Jim Meyering  <jim@meyering.net>
13808
13809         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
13810         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
13811         Require gl_STAT_MACROS, too.
13812
13813 2005-09-01  Bruno Haible  <bruno@clisp.org>
13814
13815         * gnulib-tool (import): In the first-use case, provide defaults.
13816
13817 2005-09-01  Bruno Haible  <bruno@clisp.org>
13818
13819         * gnulib-tool (func_import): Remove the .tmp files.
13820
13821 2005-09-01  Bruno Haible  <bruno@clisp.org>
13822
13823         * gnulib-tool (func_import): Fix handling of symbolic links.
13824
13825 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13826
13827         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
13828         old glibc regex code mishandles strings longer than 2**31 bytes.
13829         This patch fixes this when the regex code is used in gnulib
13830         (i.e., outside glibc).
13831
13832         This patch should not affect the use of the regex code inside
13833         glibc.  No doubt this problem also needs to be handled for glibc
13834         as well, but the result will be an incompatible change to the
13835         glibc ABI, and the old ABI will have to be supported too.  That
13836         can be the the subject for another patch.
13837
13838         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
13839         governing whether the rest of this patch is active.  By default,
13840         the macro is disabled and the patch has no effect.
13841         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
13842         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
13843         (struct re_pattern_buffer, re_search, re_search_2, re_match):
13844         (re_match_2, re_set_registers): Use the new types.
13845         * lib/regex_internal.h (Idx, re_hashval_t): New types.
13846         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
13847         New macros.
13848         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
13849         (re_string_context_at, bin_tree_t, re_dfastate_t):
13850         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
13851         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
13852         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
13853         (re_string_char_size_at, re_string_wchar_at):
13854         (re_string_elem_size_at):
13855         Use the new types and macros to port to 64-bit hosts.
13856         Use unsigned types for internal values, so that the code
13857         mostly works even for arrays larger than SSIZE_MAX.
13858         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
13859         (search_duplicated_node, calc_eclosure_iter, fetch_number):
13860         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
13861         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
13862         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
13863         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
13864         (calc_inveclosure, parse_dup_op, build_range_exp):
13865         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
13866         (fetch_number, create_token_tree, mark_opt_subexp):
13867         Likewise.
13868         * lib/regex_internal.c (re_string_construct_common,
13869         create_ci_newstate):
13870         (create_cd_newstate, re_string_allocate, re_string_construct):
13871         (re_string_realloc_buffers, build_wcs_upper_buffer):
13872         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
13873         (re_string_reconstruct, re_string_peek_byte_case):
13874         (re_string_fetch_byte_case, re_string_context_at):
13875         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
13876         (re_node_set_init_copy, re_node_set_add_intersect):
13877         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
13878         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
13879         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
13880         (re_acquire_state, re_acquire_state_context, register_state):
13881         Likewise.
13882         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
13883         search_cur_bkref_entry):
13884         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
13885         (re_search_internal, re_search_2_stub, re_search_stub)
13886         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
13887         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
13888         (update_cur_sifted_state, check_dst_limits):
13889         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13890         (check_subexp_limits, sift_states_bkref, merge_state_array):
13891         (check_subexp_matching_top, get_subexp, get_subexp_sub):
13892         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
13893         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
13894         (expand_bkref_cache, check_node_accept_bytes):
13895         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
13896         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
13897         (acquire_init_state_context, check_halt_node_context):
13898         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
13899         (sift_states_backward, clean_state_log_if_needed):
13900         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
13901         (find_recover_state, transit_state_sb, transit_state_mb):
13902         (transit_state_bkref, build_trtable, match_ctx_clean):
13903         Likewise.
13904         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
13905         to work around an assumption that REG_MISSING is negative.
13906
13907         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
13908         (seek_collating_symbol_entry) [defined _LIBC]:
13909         (lookup_collation_sequence_value) [defined _LIBC]:
13910         (build_range_exp, build_collating_symbol) [defined _LIBC]:
13911         Use prototypes rather than old-style function definitions.
13912         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
13913         (transit_state_sb) [0]:
13914         (find_collation_sequence_value) [defined _LIBC]: Likewise.
13915
13916         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
13917         rm_eo.
13918
13919         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
13920         (optimize_subexps, lower_subexp):
13921         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
13922         since the signed shift might overflow.  Use 1u<<31 instead.
13923         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
13924         Likewise.
13925         * lib/regexec.c (check_dst_limits_calc_pos_1,
13926         check_subexp_matching_top): Likewise.
13927
13928         * lib/regcomp.c (optimize_subexps, lower_subexp):
13929         Use CHAR_BIT rather than 8, for clarity.
13930         * lib/regexec.c (check_dst_limits_calc_pos_1):
13931         (check_subexp_matching_top): Likewise.
13932         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
13933         have to worry about portability issues when shifting it left.
13934         Remove no-longer-needed test for table_size > 0.
13935         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
13936         in a word, as the resulting behavior is undefined.
13937         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
13938         in one case, a <= should have been an <, and in another case the
13939         whole test was missing.
13940         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
13941         the standard name CHAR_BIT.
13942         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
13943         this is not true on one's complement and signed-magnitude hosts.
13944
13945         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
13946         next_last_offset.
13947         (struct re_dfa_t): Remove unused member states_alloc.
13948         * lib/regcomp.c (init_dfa): Don't initialize unused members.
13949
13950 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13951
13952         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
13953         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
13954         and large-file glibc and in 32-bit large-file Solaris.
13955
13956 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13957
13958         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
13959         lengths fit in regoff_t; this isn't true if regoff_t is the same
13960         width as size_t.
13961         * lib/regex.c (re_search_internal): 5th arg is LAST_START
13962         (= START + RANGE) instead of RANGE.  This avoids overflow
13963         problems when regoff_t is the same width as size_t.
13964         All callers changed.
13965         (re_search_2_stub): Check for overflow when adding the
13966         sizes of the two strings.
13967         (re_search_stub): Check for overflow when adding START
13968         to RANGE; if it occurs, substitute the extreme value.
13969
13970 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
13971
13972         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
13973
13974 2005-08-31  Jim Meyering  <jim@meyering.net>
13975
13976         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
13977         a pointer-to-const.
13978         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
13979         (register_state): Likewise.
13980         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
13981         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
13982         (group_nodes_into_DFAstates): Likewise.
13983
13984 2005-08-31  Jim Meyering  <jim@meyering.net>
13985
13986         * check-module: Add a FIXME comment.
13987
13988 2005-08-31  Eric Blake  <ebb9@byu.net>
13989
13990         * modules/unistd-safer (Files): Add unistd--.h.
13991         * modules/stdio-safer (Files): Add stdio--.h.
13992
13993 2005-08-31  Derek Price  <derek@ximbiot.com>
13994
13995         * lib/getdelim.c (getdelim): Return EOF on EOF.
13996         Reported by Larry Jones <lawrence.jones@ugs.com>.
13997
13998 2005-08-31  Bruno Haible  <bruno@clisp.org>
13999
14000         Avoid unnecessary diffs in the generated lib/Makefile.am.
14001         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
14002         the generated files.
14003         (func_import): Don't set cmd.
14004
14005 2005-08-31  Bruno Haible  <bruno@clisp.org>
14006
14007         * lib/strstr.c: Include <stddef.h>, for NULL.
14008         * lib/strcasestr.c: Likewise.
14009         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
14010
14011 2005-08-31  Bruno Haible  <bruno@clisp.org>
14012
14013         * gnulib-tool: New option --macro-prefix.
14014         (func_import): Use macro_prefix.
14015         (import): Handle option --macro-prefix.
14016
14017 2005-08-31  Bruno Haible  <bruno@clisp.org>
14018
14019         * gnulib-tool (import): Rename most ac_* variables to cached_*.
14020         Also use new variables cached_lgpl, cached_libtool.
14021
14022 2005-08-31  Bruno Haible  <bruno@clisp.org>
14023
14024         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
14025         always instantiating them.
14026
14027 2005-08-31  Bruno Haible  <bruno@clisp.org>
14028
14029         * gnulib-tool (func_import): Read the previous cached settings
14030         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
14031         earlier added by gnulib but are now dropped. Warn when a gnulib file
14032         overwrites a non-gnulib file.
14033
14034 2005-08-31  Bruno Haible  <bruno@clisp.org>
14035
14036         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
14037         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
14038         projects that don't keep autogenerated files in CVS. Put into
14039         actioncmd only the specified modules, not the transitive closure.
14040
14041 2005-08-31  Bruno Haible  <bruno@clisp.org>
14042
14043         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
14044         Create directories that shall be filled.
14045         (import): Don't look for gl_* macros in configure.ac. Recurse across
14046         all directories containing a gnulib-cache.m4 files, if meaningful.
14047
14048 2005-08-31  Bruno Haible  <bruno@clisp.org>
14049
14050         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
14051         (import): Set seen_libtool when we see gl_LIBTOOL.
14052
14053 2005-08-31  Bruno Haible  <bruno@clisp.org>
14054
14055         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
14056         declaration macro definitions from generated gnulib.m4.
14057
14058 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
14059
14060         * lib/iconvme.h: Add prototype for iconv_alloc.
14061
14062 2005-08-29  Simon Josefsson  <jas@extundo.com>
14063
14064         * lib/iconvme.c: Fix errno.
14065
14066 2005-08-29  Bruno Haible  <bruno@clisp.org>
14067
14068         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
14069         that it works when the directory contains spaces.
14070
14071 2005-08-29  Bruno Haible  <bruno@clisp.org>
14072
14073         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
14074
14075 2005-08-29  Bruno Haible  <bruno@clisp.org>
14076
14077         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
14078         Emit more advice.
14079
14080 2005-08-29  Bruno Haible  <bruno@clisp.org>
14081         and Stepan Kasal  <kasal@ucw.cz>
14082
14083         * check-module: If more parameters are given, check each of them
14084         separately; add more exceptions, as noted by Jim Meyering.
14085         (check_module): New procedure.
14086         (%exempt_header): Now contains all exceptions.
14087
14088 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
14089
14090         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
14091
14092 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14093
14094         * lib/iconvme.c: Split iconv_string into iconv_alloc.
14095
14096 2005-08-28  Bruno Haible  <bruno@clisp.org>
14097
14098         * m4/gnulib-tool.m4: New file.
14099
14100 2005-08-27  Jim Meyering  <jim@meyering.net>
14101
14102         * modules/unistd-safer (Files): Add pipe-safer.c.
14103         * modules/fcntl-safer (Files): Add creat-safer.c.
14104
14105 2005-08-27  Jim Meyering  <jim@meyering.net>
14106
14107         * m4/stdlib-safer.m4: New file.  From coreutils.
14108         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
14109         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
14110         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
14111         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
14112         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
14113
14114 2005-08-27  Jim Meyering  <jim@meyering.net>
14115
14116         * lib/fopen-safer.c: Merge minor changes from coreutils.
14117         * lib/dup-safer.c: Likewise.
14118         * lib/fd-safer.c: Likewise.
14119
14120         Merge from coreutils.
14121         * lib/stdio--.h: New file.
14122         * lib/stdlib--.h: New file.
14123         * lib/mkstemp-safer.c: New file.
14124
14125         GNU tar needs these.
14126         * lib/pipe-safer.c: New file.
14127         * lib/creat-safer.c: New file.
14128         * lib/fcntl--.h (creat): Define to creat_safer.
14129         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
14130         * lib/unistd--.h (pipe): Define to pipe_safer.
14131         * lib/unistd-safer.h: Declare pipe_safer.
14132
14133 2005-08-26  Simon Josefsson  <jas@extundo.com>
14134
14135         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
14136         Haible <bruno@clisp.org>.
14137
14138 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
14139
14140         * lib/regex_internal.h: Remove all references to
14141         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
14142         or better.
14143         (bitset_not, bitset_merge, bitset_not_merge):
14144         (bitset_mask, re_string_allocate, re_string_construct):
14145         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
14146         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
14147         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
14148         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
14149         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14150         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14151         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
14152         (re_acquire_state_context):
14153         Remove unnecessary forward decls.
14154         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
14155         Put __attribute at function definition,
14156         now that the function decl has been removed.
14157         * lib/regex_internal.c (re_string_peek_byte_case):
14158         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
14159         Likewise.
14160
14161 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
14162
14163         * m4/regex.m4: Add AC_PREREQ(2.50).
14164         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
14165
14166 2005-08-25  Simon Josefsson  <jas@extundo.com>
14167
14168         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
14169         __fsetlocking.
14170
14171 2005-08-25  Simon Josefsson  <jas@extundo.com>
14172
14173         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
14174         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
14175         GLIBC specific code.
14176
14177 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14178
14179         Make regex safe for g++.  This fixes one real bug (an "err"
14180         that should have been "*err").  g++ problem reported by
14181         Sam Steingold.
14182         * lib/regex_internal.h (re_calloc): New macro, consistent with
14183         re_malloc etc.  All callers of calloc changed to use re_calloc.
14184         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
14185         not int.  All callers changed.
14186         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
14187         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
14188         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
14189         (find_recover_state): Change "err" to "*err"; this fixes what
14190         appears to be a real bug.
14191         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
14192         versus int.
14193
14194 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14195
14196         * modules/regex (Depends-on): Add malloc, since the code
14197         assumes that !malloc(0) means failure.
14198
14199 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14200
14201         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
14202
14203         alloca modernization/simplification for regex.
14204         * lib/regex.c: Remove portability cruft for alloca.  This no longer
14205         needs to be at the start of the file, and can be moved into
14206         regex_internal.h and simplified.
14207         * lib/regex_internal.h: Include <alloca.h>.
14208         (__libc_use_alloca) [!defined _LIBC]: New macro.
14209         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
14210         now works outside glibc.
14211
14212 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
14213
14214         * config/srclist.txt: Add glibc bugs 1241, 1245.
14215
14216 2005-08-25  Jim Meyering  <jim@meyering.net>
14217
14218         * lib/open-safer.c: Include <config.h>.
14219         Otherwise, we'd lose LARGEFILE support in any file using
14220         e.g. "fcntl--.h"
14221
14222 2005-08-25  Bruno Haible  <bruno@clisp.org>
14223
14224         * m4/minmax.m4: Require autoconf 2.52.
14225         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
14226         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
14227         alternatives of translit over the alphabet.
14228         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
14229
14230 2005-08-24  Simon Josefsson  <jas@extundo.com>
14231
14232         * tests/test-getpass.c: New file.
14233
14234 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14235
14236         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
14237         for GNU regex features.
14238
14239 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14240
14241         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
14242         * lib/regex.h (regerror): Likewise.
14243
14244         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
14245         requires this.  (The code never needed it.)
14246
14247         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
14248         All uses of recently-renamed identifiers changed to use the new,
14249         POSIX-compliant names.  The code will build and run just fine
14250         without these changes, but it's better to eat our own dog food
14251         and use the standard-conforming names.
14252
14253         * lib/regex.h: Fix a multitude of POSIX name space violations.
14254         These changes have an effect only for programs that define
14255         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
14256         do not change anything for programs compiled in the normal way.
14257         Also, there is no effect on the ABI.
14258
14259         (_REGEX_SOURCE): New macro.
14260         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
14261         defined and _GNU_SOURCE is not; this fixes a name space violation.
14262
14263         Rename the following macros to obey POSIX requirements.
14264         The old names are still visible as macros if _REGEX_SOURCE is defined.
14265         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
14266         RE_BACKSLASH_ESCAPE_IN_LISTS.
14267         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
14268         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
14269         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
14270         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
14271         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
14272         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
14273         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
14274         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
14275         (REG_INTERVALS): renamed from RE_INTERVALS.
14276         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
14277         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
14278         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
14279         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
14280         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
14281         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
14282         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
14283         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
14284         RE_UNMATCHED_RIGHT_PAREN_ORD.
14285         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
14286         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
14287         (REG_DEBUG): renamed from RE_DEBUG.
14288         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
14289         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
14290         unusual, since we can't clash with the POSIX REG_ICASE.
14291         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
14292         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
14293         (REG_NO_SUB): renamed from RE_NO_SUB.
14294         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
14295         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
14296         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
14297         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
14298         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
14299         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
14300         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
14301         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
14302         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
14303         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
14304         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
14305         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
14306         RE_SYNTAX_POSIX_MINIMAL_BASIC.
14307         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
14308         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
14309         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
14310         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
14311         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
14312         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
14313         (REG_FIXED): Renamed from REGS_FIXED.
14314         (REG_NREGS): Renamed from RE_NREGS.
14315
14316         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
14317         of other REG_* macros, since POSIX says the user is allowed to
14318         #undef these macros selectively.
14319
14320         (reg_errcode_t): Update comment stating what other tables need
14321         to be consistent.
14322
14323         Rename the following enum values to obey POSIX requirements.
14324         The old names are still visible as macros.
14325         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
14326         is not defined, since GNU is supposed to be a superset of POSIX as
14327         much as possible, and since we want reg_errcode_t to be a signed
14328         type for implementation consistency.
14329         (_REG_NOERROR): Renamed from REG_NOERROR.
14330         (_REG_NOMATCH): Renamed from REG_NOMATCH.
14331         (_REG_BADPAT): Renamed from REG_BADPAT.
14332         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
14333         (_REG_ECTYPE): Renamed from REG_ECTYPE.
14334         (_REG_EESCAPE): Renamed from REG_EESCAPE.
14335         (_REG_ESUBREG): Renamed from REG_ESUBREG.
14336         (_REG_EBRACK): Renamed from REG_EBRACK.
14337         (_REG_EPAREN): Renamed from REG_EPAREN.
14338         (_REG_EBRACE): Renamed from REG_EBRACE.
14339         (_REG_BADBR): Renamed from REG_BADBR.
14340         (_REG_ERANGE): Renamed from REG_ERANGE.
14341         (_REG_ESPACE): Renamed from REG_ESPACE.
14342         (_REG_BADRPT): Renamed from REG_BADRPT.
14343         (_REG_EEND): Renamed from REG_EEND.
14344         (_REG_ESIZE): Renamed from REG_ESIZE.
14345         (_REG_ERPAREN): Renamed from REG_ERPAREN.
14346         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
14347         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
14348         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
14349         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
14350
14351         (_REG_RE_NAME, _REG_RM_NAME): New macros.
14352         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
14353         changed.  But support the old name if the new one is not defined
14354         and if _REGEX_SOURCE.
14355
14356         Change the following member names in struct re_pattern_buffer.
14357         The old names are still supported if !_REGEX_SOURCE.
14358         The new names are always supported, regardless of _REGEX_SOURCE.
14359         (re_buffer): Renamed from buffer.
14360         (re_allocated): Renamed from allocated.
14361         (re_used): Renamed from used.
14362         (re_syntax): Renamed from syntax.
14363         (re_fastmap): Renamed from fastmap.
14364         (re_translate): Renamed from translate.
14365         (re_can_be_null): Renamed from can_be_null.
14366         (re_regs_allocated): Renamed from regs_allocated.
14367         (re_fastmap_accurate): Renamed from fastmap_accurate.
14368         (re_no_sub): Renamed from no_sub.
14369         (re_not_bol): Renamed from not_bol.
14370         (re_not_eol): Renamed from not_eol.
14371         (re_newline_anchor): Renamed from newline_anchor.
14372
14373         Change the following member names in struct re_registers.
14374         The old names are still supported if !_REGEX_SOURCE.
14375         The new names are always supported, regardless of _REGEX_SOURCE.
14376         (rm_num_regs): Renamed from num_regs.
14377         (rm_start): Renamed from start.
14378         (rm_end): Renamed from end.
14379
14380         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
14381         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
14382         Prepend __ to parameter names.
14383
14384         Undo yesterday's changes.
14385
14386 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
14387
14388         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
14389         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
14390         lib/regex.c.
14391
14392 2005-08-24  Jim Meyering  <jim@meyering.net>
14393
14394         Sync from coreutils.
14395         * m4/fcntl-safer.m4: New file.
14396
14397         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
14398         and object files for this module.
14399
14400 2005-08-24  Jim Meyering  <jim@meyering.net>
14401
14402         Sync from coreutils.
14403         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
14404
14405 2005-08-24  Jim Meyering  <jim@meyering.net>
14406
14407         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
14408         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
14409
14410 2005-08-24  Jim Meyering  <jim@meyering.net>
14411
14412         * modules/fcntl-safer: New module.
14413         * modules/fts (Depends-on): Add fcntl-safer.
14414         * MODULES.html.sh (File descriptor based Input/Output):
14415         Add fcntl-safer.
14416
14417 2005-08-24  Bruno Haible  <bruno@clisp.org>
14418
14419         Support for unit test modules.
14420         * modules/README: Mention tests modules.
14421         * modules/TEMPLATE-TESTS: New file.
14422         * gnulib-tool: New options --extract-tests-module, --with-tests and
14423         --tests-base (unused for the moment).
14424         (testsbase, inctests): New variables.
14425         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
14426         (func_verify_module): Exclude TEMPLATE-TESTS.
14427         (func_verify_nontests_module, func_verify_tests_module): New functions.
14428         (func_get_dependencies): Add implicit dependency for tests modules.
14429         (func_get_tests_module): New function.
14430         (func_modules_transitive_closure): When --with-tests was specified,
14431         include the unit tests as well, unless explicitly avoided.
14432         (func_emit_lib_Makefile_am): Ignore the tests modules here.
14433         (func_emit_tests_Makefile_am): New function.
14434         (func_create_testdir): When --with-tests was specified, emit a
14435         tests/ directory.
14436         * MODULES.html.sh (Future developments): Update.
14437
14438 2005-08-24  Bruno Haible  <bruno@clisp.org>
14439
14440         * modules/tls-tests: New file.
14441         * tests/test-tls.c: New file, from GNU gettext.
14442
14443 2005-08-24  Bruno Haible  <bruno@clisp.org>
14444
14445         * modules/lock-tests: New file.
14446         * tests/test-lock.c: New file, from GNU gettext.
14447
14448 2005-08-24  Bruno Haible  <bruno@clisp.org>
14449
14450         * lib/lock.h: Add multiple inclusion guard.
14451         * lib/tls.h: Add multiple inclusion guard.
14452
14453 2005-08-24  Bruno Haible  <bruno@clisp.org>
14454
14455         * gnulib-tool: Add support for the --aux-dir option to
14456         --create-testdir, --create-megatestdir, --test, --megatest.
14457         (func_create_testdir, func_create_megatestdir): Optionally emit a
14458         AC_CONFIG_AUX_DIR directive.
14459         (create-testdir, create-megatestdir, test, megatest): Provide a
14460         default value for $auxdir.
14461
14462 2005-08-24  Bruno Haible  <bruno@clisp.org>
14463
14464         * gnulib-tool (import): Use compound statement instead of subshell
14465         where possible.
14466
14467 2005-08-24  Bruno Haible  <bruno@clisp.org>
14468
14469         * gnulib-tool (import): Change --aux-dir default to "build-aux".
14470
14471 2005-08-24  Bruno Haible  <bruno@clisp.org>
14472
14473         * gnulib-tool (func_version): Update.
14474
14475 2005-08-24  Bruno Haible  <bruno@clisp.org>
14476
14477         * gnulib-tool (func_import, func_create_testdir,
14478         func_create_megatestdir): Quote all autoconf macro arguments.
14479
14480 2005-08-24  Bruno Haible  <bruno@clisp.org>
14481
14482         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
14483         option --force, because --force causes the aclocal.m4 of each
14484         subdirectory to be newer than the corresponding config.h.in.
14485
14486 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14487
14488         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
14489         All contents moved to gl_REGEX.
14490         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
14491         assume that it does.
14492
14493 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14494
14495         * lib/regex.h (REG_NOSYS)
14496         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
14497         Define, since POSIX requires it as of 2001.
14498         (_REG_ENOSYS)
14499         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
14500         New private symbol, used to keep the enum signed in all cases.
14501         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
14502         Youngman in
14503         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
14504
14505         * lib/regex_internal.c (re_string_skip_chars, register_state):
14506         (calc_state_hash):
14507         Remove forward decls; no longer needed now that we use prototypes.
14508         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
14509         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
14510         (clean_state_log_if_needed): Likewise.
14511
14512 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
14513
14514         * config/srclist.txt: Add glibc bugs 1231-1233.
14515
14516 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14517
14518         Fix problems reported by Sam Steingold in
14519         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
14520         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
14521         assumed that reg_errcode_t is a signed type, which is not
14522         necessarily true if _XOPEN_SOURCE is not defined.
14523         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
14524         since some compilers warn about it otherwise.
14525
14526 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14527
14528         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
14529         (init_word_char, create_initial_state, duplicate_node_closure):
14530         (fetch_token, peek_token_bracket, build_range_exp):
14531         (build_collating_symbol): Remove forward decls; no longer needed
14532         now that we use prototypes.
14533
14534         * lib/regcomp.c:
14535         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
14536         (re_compile_fastmap_iter, regcomp, regerror, regfree):
14537         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
14538         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
14539         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
14540         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
14541         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
14542         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
14543         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
14544         (build_range_exp, build_collating_symbol, parse_bracket_exp):
14545         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
14546         (build_charclass, build_charclass_op, fetch_number, create_tree):
14547         (create_token_tree, mark_opt_subexp, duplicate_tree):
14548         Use prototypes rather than old-style definitions.
14549
14550         * lib/regex_internal.c:
14551         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
14552         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
14553         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
14554         (re_string_reconstruct, re_string_peek_byte_case):
14555         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
14556         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
14557         (re_node_set_init_copy, re_node_set_add_intersect):
14558         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
14559         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
14560         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
14561         (re_acquire_state, re_acquire_state_context, register_state):
14562         (create_ci_newstate, create_cd_newstate, free_state):
14563         Likewise.
14564         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
14565         re_search_2):
14566         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
14567         (re_search_internal, prune_impossible_nodes):
14568         (acquire_init_state_context, check_matching, static):
14569         (check_halt_node_context, check_halt_state_context, proceed_next_node):
14570         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
14571         (update_regs, sift_states_backward, build_sifted_states):
14572         (clean_state_log_if_needed, merge_state_array):
14573         (update_cur_sifted_state, add_epsilon_src_nodes):
14574         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
14575         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
14576         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
14577         (find_recover_state, check_subexp_matching_top, transit_state_mb):
14578         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
14579         (check_arrival, check_arrival_add_next_nodes):
14580         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
14581         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
14582         (check_node_accept_bytes, check_node_accept, extend_buffers):
14583         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
14584         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
14585         (sift_ctx_init):
14586         Likewise.
14587
14588         * lib/regex_internal.h:
14589         (re_string_allocate, re_string_construct, re_string_reconstruct):
14590         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
14591         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
14592         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
14593         (re_string_context_at, re_string_peek_byte_case):
14594         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
14595         is defined, since we now use prototypes always.
14596
14597         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
14598         C89 or better.  All uses removed.
14599
14600 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
14601
14602         * config/srclist.txt: Add glibc bugs 1220-1227.
14603
14604 2005-08-20  Jim Meyering  <jim@meyering.net>
14605
14606         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
14607         of unused local, dfa.
14608
14609 2005-08-20  Bruno Haible  <bruno@clisp.org>
14610
14611         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
14612
14613 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14614
14615         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
14616         (re_node_set_insert_last, re_dfa_add_node):
14617         Rename local variables to avoid GCC shadowing warnings.
14618
14619 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14620
14621         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
14622         [defined lint]: Suppress bogus uninitialized-variable warnings.
14623
14624         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
14625         and let the caller return REG_ESPACE if out of space.  This
14626         removes an uninitialied-variable warning with GCC 4.0.1, and also
14627         avoids taking the address of a local variable.  All callers
14628         changed.
14629
14630 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14631
14632         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
14633         $LIBCSRC/posix/regexec.c.
14634         Add glibc bug 1217 for regcomp.c.
14635
14636 2005-08-19  Jim Meyering  <jim@meyering.net>
14637
14638         * lib/regexec.c (proceed_next_node): Redo local variables to
14639         avoid GCC shadowing warnings.
14640
14641 2005-08-18  Bruno Haible  <bruno@clisp.org>
14642
14643         * lib/strstr.c (strstr): Fix return value in multibyte case.
14644         * lib/strcasestr.c (strcasestr): Likewise.
14645
14646 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14647
14648         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
14649
14650 2005-08-17  Jim Meyering  <jim@meyering.net>
14651
14652         Make the %s format (seconds since the epoch) work for a negative
14653         number and when used with a zero-padded field width, e.g. %015s.
14654
14655         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
14656         label so that it precedes the code to set `digits'.  Otherwise,
14657         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
14658         print `00-22'.  Now, it prints `-0022', as it should.
14659
14660 2005-08-17  Bruno Haible  <bruno@clisp.org>
14661
14662         * modules/strstr (Files): Add m4/mbrtowc.m4.
14663         (Depends-on): Add mbuiter.
14664
14665 2005-08-17  Bruno Haible  <bruno@clisp.org>
14666
14667         * modules/strcasestr: New file.
14668         * MODULES.html.sh (String handling, based on ANSI C 89): Add
14669         strcasestr.
14670
14671 2005-08-17  Bruno Haible  <bruno@clisp.org>
14672
14673         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
14674
14675 2005-08-17  Bruno Haible  <bruno@clisp.org>
14676
14677         * modules/mbuiter: New file.
14678         * MODULES.html.sh (Extended multibyte and wide character utilities):
14679         Add mbuiter.
14680
14681 2005-08-17  Bruno Haible  <bruno@clisp.org>
14682
14683         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
14684         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
14685
14686 2005-08-17  Bruno Haible  <bruno@clisp.org>
14687
14688         * m4/strcasestr.m4: New file.
14689
14690 2005-08-17  Bruno Haible  <bruno@clisp.org>
14691
14692         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
14693         * lib/strstr.c: Completely rewritten, with multibyte locale support.
14694
14695 2005-08-17  Bruno Haible  <bruno@clisp.org>
14696
14697         * lib/strcasestr.h: New file.
14698         * lib/strcasestr.c: New file.
14699
14700 2005-08-17  Bruno Haible  <bruno@clisp.org>
14701
14702         * lib/strcasecmp.c: Use mbuiter.h.
14703
14704 2005-08-17  Bruno Haible  <bruno@clisp.org>
14705
14706         * lib/mbuiter.h: New file.
14707
14708 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
14709
14710         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
14711         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
14712         and gl_GETOPT are both invoked via different paths (as happens
14713         with GNU tar CVS because it uses both argp and getopt), the former
14714         wins.
14715
14716 2005-08-16  Bruno Haible  <bruno@clisp.org>
14717
14718         * modules/tls: New file.
14719         * MODULES.html.sh (Multithreading): Add tls.
14720
14721 2005-08-16  Bruno Haible  <bruno@clisp.org>
14722
14723         * modules/strnlen1: New file.
14724         * MODULES.html.sh (String handling): Add strnlen1.
14725
14726 2005-08-16  Bruno Haible  <bruno@clisp.org>
14727
14728         * modules/strcase (Files): Add m4/mbrtowc.m4.
14729         (Depends-on): Add strnlen1, mbchar.
14730
14731 2005-08-16  Bruno Haible  <bruno@clisp.org>
14732
14733         * modules/mbiter: New file.
14734         * MODULES.html.sh (Extended multibyte and wide character utilities):
14735         Add mbiter.
14736
14737 2005-08-16  Bruno Haible  <bruno@clisp.org>
14738
14739         * modules/mbfile: New file.
14740         * MODULES.html.sh (Extended multibyte and wide character utilities):
14741         Add mbfile.
14742
14743 2005-08-16  Bruno Haible  <bruno@clisp.org>
14744
14745         * modules/mbchar: New file.
14746         * MODULES.html.sh (Extended multibyte and wide character utilities):
14747         New section.
14748
14749 2005-08-16  Bruno Haible  <bruno@clisp.org>
14750
14751         * m4/tls.m4: New file, from GNU gettext.
14752
14753 2005-08-16  Bruno Haible  <bruno@clisp.org>
14754
14755         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
14756         always.
14757         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
14758
14759 2005-08-16  Bruno Haible  <bruno@clisp.org>
14760
14761         * m4/mbiter.m4: New file.
14762
14763 2005-08-16  Bruno Haible  <bruno@clisp.org>
14764
14765         * m4/mbfile.m4: New file.
14766
14767 2005-08-16  Bruno Haible  <bruno@clisp.org>
14768
14769         * m4/mbchar.m4: New file.
14770
14771 2005-08-16  Bruno Haible  <bruno@clisp.org>
14772
14773         * lib/tls.h: New file, from GNU gettext.
14774         * lib/tls.c: New file, from GNU gettext.
14775
14776 2005-08-16  Bruno Haible  <bruno@clisp.org>
14777
14778         * lib/strnlen1.h: New file.
14779         * lib/strnlen1.c: New file.
14780
14781 2005-08-16  Bruno Haible  <bruno@clisp.org>
14782
14783         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
14784         (mbi_init): Update.
14785         (mbi_avail, mbi_advance): Let the iteration end before the terminating
14786         NUL byte, not after it.
14787
14788 2005-08-16  Bruno Haible  <bruno@clisp.org>
14789
14790         * lib/strcase.h (strcasecmp): Add note in comments.
14791         * lib/strncasecmp.c: Use code from strcasecmp.c.
14792         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
14793         (strcasecmp): Work correctly in multibyte locales.
14794
14795 2005-08-16  Bruno Haible  <bruno@clisp.org>
14796
14797         * lib/mbiter.h: New file.
14798
14799 2005-08-16  Bruno Haible  <bruno@clisp.org>
14800
14801         * lib/mbfile.h: New file.
14802
14803 2005-08-16  Bruno Haible  <bruno@clisp.org>
14804
14805         * lib/mbchar.h: New file.
14806         * lib/mbchar.c: New file.
14807
14808 2005-08-16  Bruno Haible  <bruno@clisp.org>
14809
14810         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
14811         the valid ones. Makes the comparison operations transitive:
14812         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
14813         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
14814
14815 2005-08-15  Simon Josefsson  <jas@extundo.com>
14816
14817         * modules/ssize_t (License): Change to 'unlimited'.
14818
14819         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
14820
14821 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
14822
14823         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
14824         Add comments for each pending glibc patch.
14825
14826 2005-08-15  Bruno Haible  <bruno@clisp.org>
14827
14828         * lib/regex.h (__restrict_arr): Don't define to __restrict if
14829         __cplusplus is defined.
14830
14831 2005-08-14  Jim Meyering  <jim@meyering.net>
14832
14833         Sync from coreutils.
14834
14835         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
14836         Use the hash-table-based cycle-detection code not just when
14837         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
14838         Reported by James Youngman in
14839         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
14840         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
14841         FTS_TIGHT_CYCLE_CHECK.
14842         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
14843         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
14844         once again.
14845         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
14846         * lib/fts.c (fd_safer): Remove decl.
14847         Include fcntl--.h rather than unistd-safer.h
14848         (fts_safe_changedir): Don't call fd_safer; no longer needed
14849         now that we include fcntl--.h.
14850
14851 2005-08-12  Simon Josefsson  <jas@extundo.com>
14852
14853         * modules/getndelim2: Use ssize_t module.
14854         * modules/getnline: Likewise.
14855         * modules/safe-read: Likewise.
14856         * modules/xreadlink: Likewise.
14857
14858         * modules/ssize_t: New file.
14859
14860 2005-08-12  Simon Josefsson  <jas@extundo.com>
14861
14862         * m4/readline.m4: Look for termcap, curses or ncurses if required.
14863
14864 2005-08-12  Simon Josefsson  <jas@extundo.com>
14865
14866         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14867         ssize_t.
14868
14869 2005-08-12  Simon Josefsson  <jas@extundo.com>
14870
14871         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
14872         readline, getdelim and check_version.
14873         (Support for systems lacking ISO C 99: Sizes of integer types):
14874         Add size_max.
14875
14876 2005-08-12  Bruno Haible  <bruno@clisp.org>
14877
14878         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
14879
14880 2005-08-11  Simon Josefsson  <jas@extundo.com>
14881
14882         * modules/readline: New file.
14883
14884         * modules/strnlen (Files): Add strnlen.h.
14885
14886 2005-08-11  Simon Josefsson  <jas@extundo.com>
14887
14888         * m4/readline.m4: New file.
14889
14890 2005-08-11  Simon Josefsson  <jas@extundo.com>
14891
14892         * lib/readline.h, readline.c: New file.
14893
14894 2005-08-11  Simon Josefsson  <jas@extundo.com>
14895
14896         * doc/gnulib.texi (Initial import, Finishing touches): Mention
14897         gl_AVOID.
14898
14899 2005-08-11  Bruno Haible  <bruno@clisp.org>
14900
14901         * lib/strnlen.h (strnlen): Change parameter name to match comment.
14902
14903 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
14904
14905         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
14906
14907 2005-08-10  Simon Josefsson  <jas@extundo.com>
14908
14909         * tests/test-iconvme.c: New file.
14910
14911 2005-08-10  Simon Josefsson  <jas@extundo.com>
14912
14913         * m4/strnlen.m4: New file.
14914
14915         * m4/strndup.m4: Don't check for strnlen declaration, done in
14916         strnlen.m4.
14917
14918 2005-08-10  Simon Josefsson  <jas@extundo.com>
14919
14920         * lib/strndup.c: Use strnlen.h.
14921
14922         * lib/strnlen.h: New file.
14923
14924 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14925
14926         * README: Typos.
14927
14928 2005-08-02  Simon Josefsson  <jas@extundo.com>
14929
14930         * modules/readline: New file.
14931
14932 2005-08-02  Simon Josefsson  <jas@extundo.com>
14933
14934         * modules/getdelim: New file.
14935
14936         * modules/getline: Rewrite, don't use getndelim2.
14937
14938 2005-08-02  Simon Josefsson  <jas@extundo.com>
14939
14940         * m4/getline.m4: Separate out getdelim stuff into separate module.
14941
14942         * m4/getdelim.m4: New file.
14943
14944 2005-08-02  Simon Josefsson  <jas@extundo.com>
14945
14946         * lib/getline.h, getline.c: Rewrite.
14947
14948         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
14949
14950 2005-07-31  Bruno Haible  <bruno@clisp.org>
14951
14952         * lib/lock.h (gl_lock_initializer): New macro.
14953         (gl_lock_define_initialized): Use it.
14954         (gl_rwlock_initializer): New macro.
14955         (gl_rwlock_define_initialized): Use it.
14956         (gl_recursive_lock_initializer): New macro.
14957         (gl_recursive_lock_define_initialized): Use it.
14958
14959 2005-07-30  Karl Berry  <karl@gnu.org>
14960
14961         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
14962         Report from Ben Pfaff, regarding getopt.
14963
14964 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
14965
14966         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
14967         normal way.
14968         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
14969         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
14970         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
14971         (gl_GETOPT): Use the new macros.  Most of the implementation
14972         is moved to the new macros.  This is for programs like Emacs
14973         that don't want all the functionality of gl_GETOPT.
14974
14975 2005-07-26  Bruno Haible  <bruno@clisp.org>
14976
14977         * m4/lock.m4: Update from GNU gettext.
14978
14979 2005-07-26  Bruno Haible  <bruno@clisp.org>
14980
14981         * lib/lock.h: Update from GNU gettext.
14982         * lib/lock.c: Update from GNU gettext.
14983
14984 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
14985
14986         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
14987         obsolescent AC_TRY_RUN.  Include the default includes files, for
14988         'exit'.
14989
14990 2005-07-24  Bruno Haible  <bruno@clisp.org>
14991
14992         * modules/visibility: New file.
14993         * MODULES.html.sh (Misc): Add visibility.
14994
14995 2005-07-24  Bruno Haible  <bruno@clisp.org>
14996
14997         * m4/visibility.m4: New file.
14998
14999 2005-07-24  Bruno Haible  <bruno@clisp.org>
15000
15001         * doc/visibility.texi: New file.
15002
15003 2005-07-22  Bruno Haible  <bruno@clisp.org>
15004
15005         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
15006         $(ALLOCA_H), redundant through BUILT_SOURCES.
15007         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
15008         redundant through BUILT_SOURCES.
15009         * modules/byteswap (Makefile.am): Remove explicit dependency on
15010         $(BYTESWAP_H), redundant through BUILT_SOURCES.
15011         * modules/fnmatch (Makefile.am): Remove explicit dependency on
15012         $(FNMATCH_H), redundant through BUILT_SOURCES.
15013         * modules/getopt (Makefile.am): Remove explicit dependency on
15014         $(GETOPT_H), redundant through BUILT_SOURCES.
15015         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
15016         redundant through BUILT_SOURCES.
15017         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
15018         redundant through BUILT_SOURCES.
15019         * modules/stdbool (Makefile.am): Remove explicit dependency on
15020         $(STDBOOL_H), redundant through BUILT_SOURCES.
15021         * modules/stdint (Makefile.am): Remove explicit dependency on
15022         $(STDINT_H), redundant through BUILT_SOURCES.
15023         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
15024         Remove explicit dependency on $(SYSEXITS_H).
15025         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
15026
15027 2005-07-18  Simon Josefsson  <jas@extundo.com>
15028
15029         * lib/check-version.c (check_version): Accept identical versions too.
15030
15031 2005-07-18  Bruno Haible  <bruno@clisp.org>
15032
15033         * modules/lock: New file.
15034         * MODULES.html.sh (Multithreading): New section.
15035
15036 2005-07-18  Bruno Haible  <bruno@clisp.org>
15037
15038         * m4/lock.m4: New file, from GNU gettext.
15039
15040 2005-07-18  Bruno Haible  <bruno@clisp.org>
15041
15042         * lib/lock.h: New file, from GNU gettext.
15043         * lib/lock.c: New file, from GNU gettext.
15044
15045 2005-07-18  Bruno Haible  <bruno@clisp.org>
15046
15047         * lib/lock.h (gl_once_t): New type.
15048         (gl_once_define, gl_once): New macros.
15049         * lib/lock.c (fresh_once): New variable.
15050         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
15051         functions.
15052
15053 2005-07-16  Simon Josefsson  <jas@extundo.com>
15054
15055         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
15056         workaround, suggested by Bruno.
15057
15058 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15059
15060         * modules/xalloc (Depends-on): Add xalloc-die.
15061         * modules/xvasprintf (Depends-on): Add xalloc-die.
15062
15063 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
15064
15065         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
15066         with a minor change.
15067
15068 2005-07-15  Bruno Haible  <bruno@clisp.org>
15069
15070         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
15071         When using lib/poll.c, define poll as rpl_poll.
15072
15073 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
15074
15075         * modules/argp (Depends-on): Remove unlocked-io.
15076
15077 2005-07-14  Derek Price  <derek@ximbiot.com>
15078
15079         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
15080         for glob symlink bug.
15081
15082 2005-07-14  Bruno Haible  <bruno@clisp.org>
15083
15084         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
15085         Instead, test for *_unlocked function declarations directly.
15086
15087 2005-07-11  Simon Josefsson  <jas@extundo.com>
15088
15089         * modules/size_max: New file.
15090
15091         * modules/xsize: Depend on size_max module for size_max.m4.
15092
15093 2005-07-11  Simon Josefsson  <jas@extundo.com>
15094
15095         * lib/size_max.h: New file.
15096
15097 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
15098
15099         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
15100         copyright symbol and the year.
15101         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
15102         (version_etc_va): Use parameterized copyright notice.
15103         Reword to conform to the current GNU coding standards.
15104
15105 2005-07-11  Karl Berry  <karl@gnu.org>
15106
15107         * doc/gnulib.texi (Quoting): new node.
15108         (Initial import): more info, from Patrice.
15109
15110 2005-07-11  Bruno Haible  <bruno@clisp.org>
15111
15112         * gnulib-tool (func_usage): Document option --avoid.
15113         (Command line options): Handle --avoid.
15114         (func_acceptable): New function.
15115         (func_modules_transitive_closure): Use it.
15116
15117 2005-07-11  Bruno Haible  <bruno@clisp.org>
15118
15119         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
15120         Reported by Jim Meyering.
15121
15122 2005-07-10  Bruno Haible  <bruno@clisp.org>
15123
15124         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
15125         Needed when size_t is smaller than 'unsigned int'.
15126         Reported by Paul Eggert.
15127
15128 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15129
15130         * modules/argp (Depends-on): Add unlocked-io
15131
15132 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
15133
15134         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
15135         block of defines.
15136
15137 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
15138
15139         * config/srclist.txt: Comment out regcomp.c, since we have a porting
15140         fix now.
15141
15142 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
15143         and Paul Eggert  <eggert@cs.ucla.edu>
15144
15145         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
15146         in wint_t, not wchar_t.  Remove now-unnecessary cast.
15147
15148 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15149
15150         * modules/regex (Files): Add lib/regex_internal.c,
15151         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
15152         (Depends-on): Add extensions.
15153         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
15154
15155 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15156
15157         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
15158         pathconf.
15159         * m4/same.m4 (gl_SAME): Likewise.
15160         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
15161
15162         * m4/regex.m4: Adjust to new libc regex implementation.
15163         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
15164         all the .c and .h parts of (the new) regex.
15165         Quote the m4 stuff better.
15166         Check for RE_ICASE bug of old gnulib.
15167         Check for REG_STARTEND of recent libc.
15168         Rename local variables from jm_* to gl_*.
15169         Quote operand of "test -f".
15170         Say "recent enough" version of libc, not "version 2".
15171         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
15172         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
15173         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
15174         Remove check for btowc, isascii.
15175         Require AM_LANGINFO_CODESET.
15176
15177 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15178
15179         * lib/regex.c, regex.h: Sync from libc.
15180         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
15181         * lib/regexec.c:
15182         New files, synced from libc, except that regex_internal.h
15183         currently has a small porting fix.
15184
15185 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
15186
15187         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
15188         regex_internal.c, regexec.c.
15189         Add regex_internal.h too, but as a comment, since the libc version
15190         is currently broken in gnulib mode.
15191
15192 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
15193
15194         Support programs like Emacs that use gnulib but not gettext.
15195         * MODULES.html.sh (Internationalization functions): Add gettext-h.
15196         * modules/gettext-h: New file.
15197         * modules/gettext (Files): Remove lib/gettext.h.
15198         (Depends-on): Add gettext-h.
15199         (Makefile.am): Remove lib_SOURCES.
15200         * modules/argmatch, modules/c-stack, modules/closeout:
15201         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
15202         * modules/execute, modules/file-type, modules/getaddrinfo:
15203         * modules/getopt, modules/human, modules/javacomp:
15204         * modules/javaexec, modules/mkdir-p, modules/obstack:
15205         * modules/openat, modules/pagealign_alloc, modules/pipe:
15206         * modules/quotearg, modules/regex, modules/rpmatch:
15207         * modules/unicodeio, modules/userspec, modules/version-etc:
15208         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
15209         * modules/xsetenv:
15210         Depend on gettext-h, not gettext.
15211
15212 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
15213
15214         * gnulib-tool (func_import): Add support for 'public domain' license.
15215         * modules/alloca, modules/atexit, modules/memmove:
15216         Now public domain, not GPL.
15217         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
15218         * modules/realloc, modules/strerror, modules/strtod:
15219         Now LGPL, not GPL.
15220
15221 2005-07-05  Bruno Haible  <bruno@clisp.org>
15222
15223         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
15224         autoconf CVS. Needed for mingw.
15225
15226 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15227
15228         Remove the dependency of the strftime module on the tzset module.
15229         * modules/strftime (Depends-on): Remove dependency on tzset.
15230
15231 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15232
15233         Remove the dependency of the strftime module on the tzset module.
15234         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
15235         gl_FUNC_TZSET_CLOBBER.
15236
15237 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
15238
15239         Remove the dependency of the strftime module on the tzset module.
15240         * lib/strftime.c (my_strftime)
15241         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
15242         Copy the input structure, to work around some of the bug with
15243         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
15244         Solaris releases, you should also use the tzset module, but we won't
15245         require it as a dependency any more since we don't want LGPLed code
15246         to depend on GPLed code.
15247
15248 2005-07-02  Jim Meyering  <jim@meyering.net>
15249
15250         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
15251         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
15252         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
15253         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
15254
15255 2005-07-02  Jim Meyering  <jim@meyering.net>
15256
15257         * lib/backupfile.c (backup_args): Change a `0' to NULL.
15258
15259 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
15260
15261         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
15262         declares only 'struct timespec;' (!).
15263
15264 2005-07-01  Jim Meyering  <jim@meyering.net>
15265
15266         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
15267         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
15268         * lib/save-cwd.c, tempname.c:
15269         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
15270         and don't include <sys/file.h>).
15271
15272 2005-06-29  Jim Meyering  <jim@meyering.net>
15273
15274         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
15275         type name.  Use the variable name instead.
15276         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
15277         Likewise.
15278
15279 2005-06-28  Simon Josefsson  <jas@extundo.com>
15280
15281         * modules/check-version (Files): Add check-version.m4.
15282
15283 2005-06-28  Simon Josefsson  <jas@extundo.com>
15284
15285         * m4/check-version.m4: New file, suggested by Jim Meyering
15286         <jim@meyering.net>.
15287
15288 2005-06-28  Simon Josefsson  <jas@extundo.com>
15289
15290         * lib/check-version.h, lib/check-version.c: New files.
15291
15292 2005-06-28  Simon Josefsson  <jas@extundo.com>
15293
15294         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
15295         collision with global variable.  Better indentation.  Don't
15296         increment buffer pointer beyond buffer end.  Based on comments
15297         from Paul Eggert <eggert@cs.ucla.edu>.
15298
15299         * lib/base64.h: Indent.
15300
15301 2005-06-28  Simon Josefsson  <jas@extundo.com>
15302
15303         * doc/gnulib.texi (Library version handling): New section.
15304
15305 2005-06-28  Jim Meyering  <jim@meyering.net>
15306
15307         * check-module (find_included_lib_files): Hard-code another
15308         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
15309         but modules/fts-lgpl (correctly) does not list those files.
15310
15311         * modules/canonicalize (Files): Add lib/pathmax.h.
15312
15313 2005-06-25  Simon Josefsson  <jas@extundo.com>
15314
15315         * modules/check-version: New file.
15316
15317 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
15318
15319         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
15320         initializer of struct addrinfo, as an indication that we don't
15321         care how many members the structure has.
15322
15323 2005-06-24  Derek Price  <derek@ximbiot.com>
15324         and Bruno Haible  <bruno@clisp.org>
15325
15326         Remove stat module & update lstat.
15327         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
15328         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
15329         * m4/stat.m4: Remove this file.
15330
15331 2005-06-24  Derek Price  <derek@ximbiot.com>
15332         and Bruno Haible  <bruno@clisp.org>
15333
15334         Remove stat module & update lstat.
15335         * lib/stat.c: Remove this file...
15336         (slash_aware_lstat): ...moving this content and its support...
15337         * lib/lstat.c (rpl_lstat): ...into here.
15338         * lib/lstat.h: New file.
15339
15340 2005-06-24  Derek Price  <derek@ximbiot.com>
15341         and Bruno Haible  <bruno@clisp.org>
15342
15343         Remove stat module & update lstat.
15344         * config/srclist.txt (libc sources): Remove stat.
15345
15346 2005-06-24  Derek Price  <derek@ximbiot.com>
15347         and Bruno Haible  <bruno@clisp.org>
15348
15349         Remove stat module & update lstat.
15350         * MODULES.html.sh (stat): Remove.
15351         * MODULES.html: Regenerated.
15352         * modules/lstat (Description): Correct function name.
15353         (Files): Add "lstat.h".
15354         (Depends-on): Remove stat, add xalloc, stat-macros.
15355         * modules/stat: Remove this file.
15356         (Include): Add "lstat.h", remove <sys/stat.h>.
15357
15358 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
15359
15360         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
15361         (ranged_convert): Don't save conversion in a temporary struct.
15362         This causes a warning with GCC 4.0.0, and anyway in the typical
15363         case it's not worth the extra 100 bytes or so of code.
15364         (ranged_convert, __mktime_internal): When calling a function via a
15365         pointer P, use P () rather than (*P) (), as we now assume C89 or
15366         better.
15367
15368 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
15369
15370         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
15371         "who -r" failed to give output.  Problem reported by Tim Waugh.
15372
15373         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
15374         (xcalloc): Use it to avoid needless tests.
15375         Problem reported by Jim Meyering.
15376
15377 2005-06-20  Derek Price  <derek@ximbiot.com>
15378
15379         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
15380         unnecessary for Autoconfs > 2.59c.
15381
15382 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15383
15384         * lib/argp.h (__option_is_short): Check upper limit of
15385         __key. Isprint() requires its argument to have the value
15386         of an unsigned char or EOF.
15387
15388 2005-06-16  Jim Meyering  <jim@meyering.net>
15389
15390         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
15391         when either N or S is zero.
15392
15393 2005-06-16  Derek Price  <derek@ximbiot.com>
15394
15395         * m4/bison.m4: Declare YACC & YFLAGS precious.
15396
15397 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
15398
15399         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
15400         multibyte string or pattern, fall back on unibyte matching.
15401         Problem reported by James Youngman.
15402
15403 2005-06-08  Bruno Haible  <bruno@clisp.org>
15404
15405         * modules/csharpcomp: New file.
15406         * MODULES.html.sh (C#): Add csharpcomp.
15407
15408 2005-06-08  Bruno Haible  <bruno@clisp.org>
15409
15410         * m4/csharpcomp.m4: New file, from GNU gettext.
15411
15412 2005-06-08  Bruno Haible  <bruno@clisp.org>
15413
15414         * lib/csharpcomp.h: New file, from GNU gettext.
15415         * lib/csharpcomp.c: New file, from GNU gettext.
15416         * lib/csharpcomp.sh.in: New file, from GNU gettext.
15417
15418 2005-06-08  Bruno Haible  <bruno@clisp.org>
15419
15420         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
15421         warning on mingw.
15422
15423 2005-06-07  Derek Price  <derek@ximbiot.com>
15424
15425         Sync from CVS.
15426         * lib/glob_.h: Indent nested #ifdef.
15427
15428 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15429
15430         Sync from coreutils.
15431         Use "file name" when talking about file names, instead of "filename"
15432         or "path", as per the GNU coding standards.
15433         * lib/mkdir-p.c: Renamed from makepath.c.
15434         (make_dir_parents): Renamed from make_path.  All callers changed.
15435         * lib/mkdir-p.h: Likewise.  All includers changed.
15436         * lib/filenamecat.c: Renamed from path-concat.c.
15437         (file_name_concat): Renamed from path_concat.  All callers changed.
15438         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
15439         * lib/filenamecat.h: Likewise.  All includers changed.
15440         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
15441         in comments or local variable names.
15442         * lib/basename.c: Likewise.
15443         * lib/canonicalize.c, canonicalize.h: Likewise.
15444         * lib/dirname.c, dirname.h: Likewise.
15445         * lib/euidaccess.c: Likewise.
15446         * lib/exclude.c: Likewise
15447         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
15448         * lib/fsusage.c, fsuage.h: Likewise.
15449         * lib/fts.c, fts_.h: Likewise.
15450         * lib/getcwd.c: Likewise.
15451         * lib/getloadavg.c: Likewise.
15452         * lib/mkstemp.c: Likewise.
15453         * lib/mountlist.c, mountlist.h: Likewise.
15454         * lib/openat.c, openat.h: Likewise.
15455         * lib/readlink-stub.c: Likewise.
15456         * lib/readutmp.c, readutmp.h: Likewise.
15457         * lib/rename.c: Likewise.
15458         * lib/rmdir.c: Likewise.
15459         * lib/same.c: Likewise.
15460         * lib/savedir.c: Likewise.
15461         * lib/stripslash.c: Likewise.
15462         * lib/tempname.c: Likewise.
15463         * lib/xreadlink.c: Likewise.
15464         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
15465         All uses changed.
15466         * lib/exclude.h: Likewise.
15467
15468         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
15469         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15470         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
15471         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15472         * lib/pathmax.h: Include <limits.h> unconditionally, since other
15473         files have been getting away with it for years (MORE/BSD 4.3
15474         is extinct now).
15475         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
15476         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
15477
15478         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
15479         Define to 256, not 255, as per modern POSIX.
15480
15481 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15482
15483         Sync from coreutils.
15484         Use "file name" when talking about file names, instead of "filename"
15485         or "path", as per the GNU coding standards.
15486         * MODULES.html.sh: mkdir-p renamed from makepath.
15487         filenamecat renamed from path-concat.
15488         * modules/filenamecat: Renamed from modules/path-concat.
15489         (Files): filenamecat.h and filenamecat.c renamed from
15490         path-concat.h and path-concat.c.
15491         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
15492         (Include): filenamecat.h, not path-concat.h.
15493         * modules/mkdir-p: Renamed from modules/makepath.
15494         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
15495         makepath.c.
15496         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
15497         (Include): mkdir-p.h, not makepath.h.
15498
15499 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
15500
15501         Sync from coreutils.
15502         * m4/mkdir-p.m4: Renamed from makepath.m4.
15503         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
15504         Rename files from makepath.c to mkdir-p.c, and from
15505         makepath.h to mkdir-p.h.
15506         * m4/filenamecat.m4: Renamed from path-concat.m4.
15507         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
15508         Rename files from path-concat.c to filenamecat.c,
15509         and from path-concat.h to filenamecat.h.
15510         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
15511         "file name" in local variables or comments.
15512         * m4/rename.m4: Likewise.
15513
15514 2005-06-01  Bruno Haible  <bruno@clisp.org>
15515
15516         * modules/csharpexec: New file.
15517         * MODULES.html.sh (C#): New section.
15518
15519 2005-06-01  Bruno Haible  <bruno@clisp.org>
15520
15521         * m4/csharp.m4: New file, from GNU gettext.
15522         * m4/csharpexec.m4: New file, from GNU gettext.
15523
15524 2005-06-01  Bruno Haible  <bruno@clisp.org>
15525
15526         * lib/csharpexec.h: New file, from GNU gettext.
15527         * lib/csharpexec.c: New file, from GNU gettext.
15528         * lib/csharpexec.sh.in: New file, from GNU gettext.
15529
15530 2005-05-31  Derek Price  <derek@ximbiot.com>
15531             Paul Eggert  <eggert@cs.ucla.edu>
15532
15533         Sync from cvs.
15534         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
15535
15536 2005-05-31  Derek Price  <derek@ximbiot.com>
15537             Paul Eggert  <eggert@cs.ucla.edu>
15538
15539         Sync from cvs.
15540         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
15541
15542 2005-05-29  Derek Price  <derek@ximbiot.com>
15543
15544         * config/srclist.txt (glob_.h, glob.c): Add these files.
15545
15546 2005-05-29  Derek Price  <derek@ximbiot.com>
15547
15548         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
15549         * modules/glob: New file.
15550         * modules/getlogin_r: Add link to POSIX spec in description.
15551
15552 2005-05-29  Derek Price  <derek@ximbiot.com>
15553             Paul Eggert  <eggert@cs.ucla.edu>
15554
15555         * m4/glob.m4: New file.
15556
15557 2005-05-29  Derek Price  <derek@ximbiot.com>
15558             Paul Eggert  <eggert@cs.ucla.edu>
15559
15560         * lib/glob_.h, lib/glob.c: New files.
15561
15562 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15563
15564         * modules/fts (Files): Remove m4/inttypes-pri.m4.
15565         * modules/fts-lgpl (Depends-on): Remove gettext.
15566
15567 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15568
15569         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
15570         and don't require gt_INTTYPES_PRI.
15571
15572 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
15573
15574         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
15575
15576         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
15577         the configuration hassle isn't worth it.
15578         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
15579         (LONGEST_MODIFIER, PRIuMAX): Remove.
15580
15581 2005-05-27  Bruno Haible  <bruno@clisp.org>
15582
15583         * lib/getlogin_r.h: Remove second include of <stddef.h>.
15584
15585 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
15586
15587         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
15588         _POSIX_PTHREAD_SEMANTICS for Solaris.
15589
15590 2005-05-25  Derek Price  <derek@ximbiot.com>
15591
15592         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
15593
15594 2005-05-25  Derek Price  <derek@ximbiot.com>
15595             Paul Eggert  <eggert@cs.ucla.edu>
15596
15597         * modules/getlogin_r, m4/getlogin_r.m4: New files.
15598         * lib/getlogin_r.c, getlogin_r.h: New files.
15599
15600 2005-05-25  Bruno Haible  <bruno@clisp.org>
15601             Derek Price  <derek@ximbiot.com>
15602
15603         * lib/getlogin_r.h: Simplify API documentation.
15604
15605 2005-05-23  Derek Price  <derek@ximbiot.com>
15606
15607         * modules/minmax (Files): Add m4/minmax.m4.
15608         (configure.ac): Add gl_MINMAX.
15609
15610 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
15611
15612         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
15613         so that unistd-safer.h (GPL'ed code) need not be included.
15614
15615 2005-05-22  Bruno Haible  <bruno@clisp.org>
15616
15617         * m4/minmax.m4: New file.
15618         Based on a patch by Derek Price <derek@ximbiot.com>.
15619
15620 2005-05-22  Bruno Haible  <bruno@clisp.org>
15621
15622         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
15623         (INT64_MIN): Fix definition.
15624         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
15625
15626         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
15627         NEED_SIGNED_INT_TYPES.
15628
15629         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
15630         HAVE_SYSTEM_INTTYPES.
15631
15632 2005-05-22  Bruno Haible  <bruno@clisp.org>
15633
15634         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
15635         Also include <sys/param.h> if it defines MIN, MAX.
15636         Based on a patch by Derek Price <derek@ximbiot.com>.
15637
15638 2005-05-21  Jim Meyering  <jim@meyering.net>
15639
15640         * modules/fts (Files): Add m4/inttypes-pri.m4.
15641         (Depends-on): Add lstat and remove gettext.  Alphabetize.
15642
15643 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15644
15645         New fts module.
15646         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
15647         (setup_dir, free_dir): New functions.
15648         (enter_dir, leave_dir): Define trivial
15649         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
15650         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
15651         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
15652         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
15653         Move to fts-cycle.c.
15654         (fts_open): Use setup_dir.
15655         (fts_close): Use free_dir.
15656         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
15657         This adds a label and some gotos, but the alternatives were messier.
15658         Check for memory allocation failure when entering a dir.
15659         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
15660         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
15661         (FTS): New member fts_cycle, that is a union that contains the
15662         old active_dir_ht and cycle_state.  All uses changed to mention
15663         fts_cycle.ht and fts_cycle.state.
15664         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
15665         fts.c, with the following changes:
15666         (setup_dir, free_dir): New functions.
15667         (enter_dir): Now returns bool.  Return true if successful, false
15668         if memory exhausted.  All callers changed.
15669         Do not bother partly cleaning up on
15670         memory allocation failure; that is free_dir's job.
15671         However, free ad if hash_insert fails, to avoid memory leak.
15672         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
15673         fts->fts_options to see which union member to use.
15674
15675 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15676
15677         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
15678         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
15679
15680 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
15681
15682         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
15683
15684 2005-05-20  Jim Meyering  <jim@meyering.net>
15685
15686         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
15687         Now a macro, to pacify GCC.
15688
15689 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15690
15691         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
15692         of -1.
15693
15694 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
15695
15696         * lib/chown.c (rpl_chown): Return -1 on failure.
15697
15698 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15699
15700         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
15701         Don't check for stddef.h.
15702         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
15703         don't use its results.
15704         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
15705         since we include them unconditionally.  Don't require
15706         AM_STDBOOL_H, since stdbool is a prerequisite.
15707         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
15708         since we assume C89 or better.
15709         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
15710         as we don't use their results.
15711         Don't check for fchdir, memmove, memset, strrchr, as we use
15712         them unconditionally.
15713         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
15714         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
15715
15716 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
15717
15718         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
15719         Include <stddef.h> unconditionally, since we assume C89 now.
15720         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
15721         * lib/fts.c: Include fts_.h first, to check interface.
15722         Do not include intprops.h; no longer needed.
15723         Include cycle-check.h and hash.h, since fts_.h no longer does.
15724         Remove unnecessary casts of closedir to void.
15725         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
15726         decide whether to decrement nlinks.
15727         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
15728         (FTS): Use struct hash_table * instead of Hash_table, so that
15729         we no longer need to include hash.h here.
15730
15731 2005-05-18  Jim Meyering  <jim@meyering.net>
15732
15733         * modules/dirfd (License): Change to LGPL.  Most of the code
15734         is already in the public domain.
15735
15736 2005-05-18  Jim Meyering  <jim@meyering.net>
15737
15738         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
15739         Reported by Yoann Vandoorselaere.
15740
15741 2005-05-17  Jim Meyering  <jim@meyering.net>
15742
15743         * m4/fts.m4: New file, from coreutils.
15744
15745 2005-05-17  Jim Meyering  <jim@meyering.net>
15746
15747         * lib/fts.c, lib/fts_.h: New files, from coreutils.
15748
15749 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15750
15751         Sync from coreutils.
15752         * m4/unlinkdir.m4: New file.
15753
15754 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15755
15756         Sync from coreutils.
15757         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
15758         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
15759         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
15760         White space changes only.
15761         * lib/makepath.c (make_path): Port to hosts where leading "//" is
15762         special.
15763         * lib/yesno.c: Include getline.h, not ctype.h.
15764         (yesno): Don't remove leading white space; POSIX doesn't allow it.
15765         Use getline to remove arbitrary restriction on response length.
15766
15767 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15768
15769         * config/srclist-update: Spell out "Street" in FSF postal
15770         mail address; this is the style the FSF seems to prefer.
15771
15772         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
15773         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
15774         this updates FSF postal mail address.
15775
15776         Sync from coreutils.
15777         * modules/unlinkdir: New file.
15778         * modules/yesno (Depends-on): Add getline.
15779         * MODULES.html.sh (File system functions): Add unlinkdir.
15780
15781 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15782
15783         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
15784         lib/strsep.h:
15785         Change the initial comment to refer to GPL, not LGPL.
15786         gnulib-tool will change it to LGPL as needed.
15787
15788         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
15789         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
15790         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
15791         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
15792         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
15793         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
15794         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
15795         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
15796         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
15797         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
15798         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
15799         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
15800         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
15801         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
15802         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
15803         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
15804         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
15805         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
15806         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
15807         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
15808         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
15809         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
15810         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
15811         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
15812         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
15813         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
15814         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
15815         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
15816         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
15817         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
15818         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
15819         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
15820         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
15821         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
15822         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
15823         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
15824         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
15825         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
15826         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
15827         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
15828         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
15829         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
15830         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
15831         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
15832         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
15833         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
15834         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
15835         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
15836         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
15837         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
15838         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
15839         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
15840         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
15841         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
15842         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
15843         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
15844         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
15845         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
15846         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
15847         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
15848         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
15849         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
15850         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
15851         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
15852         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
15853         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
15854         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
15855         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
15856         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
15857         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
15858         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
15859         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
15860         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
15861         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
15862         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
15863         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
15864         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
15865         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
15866         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
15867         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
15868         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
15869         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
15870         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
15871         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
15872         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
15873         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
15874         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
15875         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
15876         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
15877         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
15878         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
15879         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
15880         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
15881         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
15882         lib/yesno.c, lib/yesno.h:
15883         Update FSF postal mail address.
15884
15885 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
15886
15887         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
15888         tests/test-memmem.c, tests/test-stpncpy.c:
15889         Update FSF postal mail address.
15890
15891 2005-05-13  Bruno Haible  <bruno@clisp.org>
15892
15893         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
15894         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
15895         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
15896         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
15897         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
15898         Add support for 64-bit integers in the MSVC compiler.
15899
15900 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15901
15902         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
15903
15904 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
15905
15906         * gnulib-tool (func_import): Sort and uniquify recommended includes.
15907
15908 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
15909
15910         * doc/getdate.texi (General date syntax): Don't say that date
15911         date --iso-8601=ns generates acceptable dates; it doesn't yet.
15912         Problem reported by Nic Ferrier.
15913
15914 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15915
15916         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
15917         specified in ai_socktype. Fix invalid ai_protocol
15918         check. ai_protocol is usually set to 0 or depending on
15919         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
15920         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
15921         ai_socktype / ai_protocol in the returned addrinfo structure.
15922
15923 2005-05-10  Simon Josefsson  <jas@extundo.com>
15924
15925         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
15926         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
15927
15928 2005-05-10  Karl Berry  <karl@gnu.org>
15929
15930         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
15931         (from http://www.gnu.org/licenses).
15932         * doc/COPYING.LIB: also rename to COPYING.LESSER.
15933         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
15934         fdl.texi suffices.
15935
15936 2005-05-10  Karl Berry  <karl@gnu.org>
15937
15938         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
15939         (COPYING.DOC): remove.
15940
15941         * config/srclist-update: new FSF address.
15942
15943 2005-05-10  Derek Price  <derek@ximbiot.com>
15944
15945         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
15946         possible.
15947
15948 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15949             Bruno Haible  <bruno@clisp.org>
15950
15951         * modules/inet_ntop: New file.
15952         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15953         inet_ntop.
15954
15955 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15956             Bruno Haible  <bruno@clisp.org>
15957
15958         * m4/inet_ntop.m4: New file.
15959
15960 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
15961             Bruno Haible  <bruno@clisp.org>
15962
15963         * lib/inet_ntop.h: New file.
15964         * lib/inet_ntop.c: New file, from glibc with modifications.
15965
15966 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
15967
15968         * modules/time_r (License): Change to LGPL.
15969         * modules/extensions (License): Change to LGPL.  Actually,
15970         the license is more permissive than that, but currently gnulib-tool
15971         doesn't know how to handle more-permissive licenses.
15972
15973         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
15974         Problem reported by Dave Love.
15975
15976 2005-05-08  Jim Meyering  <jim@meyering.net>
15977
15978         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
15979         blank.
15980
15981 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
15982
15983         * modules/argmatch (Depends-on): Add stdbool.
15984         * modules/backupfile (Depends-on): Likewise.
15985         * modules/chdir-long (Depends-on): Likewise.
15986         * modules/closeout (Depends-on): Likewise.
15987         * modules/cycle-check (Depends-on): Likewise.
15988         * modules/dirname (Depends-on): Likewise.
15989         * modules/fnmatch (Depends-on): Likewise.
15990         * modules/fsusage (Depends-on): Likewise.
15991         * modules/fwriteerror (Depends-on): Likewise.
15992         * modules/getcwd (Depends-on): Likewise.
15993         * modules/getloadavg (Depends-on): Likewise.
15994         * modules/hard-locale (Depends-on): Likewise.
15995         * modules/makepath (Depends-on): Likewise.
15996         * modules/mountlist (Depends-on): Likewise.
15997         * modules/nanosleep (Depends-on): Likewise.
15998         * modules/posixtm (Depends-on): Likewise.
15999         * modules/quotearg (Depends-on): Likewise.
16000         * modules/readtokens (Depends-on): Likewise.
16001         * modules/readtokens0 (Depends-on): Likewise.
16002         * modules/readutmp (Depends-on): Likewise.
16003         * modules/save-cwd (Depends-on): Likewise.
16004         * modules/strftime (Depends-on): Likewise.
16005         * modules/userspec (Depends-on): Likewise.
16006         * modules/utimecmp (Depends-on): Likewise.
16007         * modules/xgetcwd (Depends-on): Likewise.
16008         * modules/xnanosleep (Depends-on): Likewise.
16009         * modules/xstrtod (Depends-on): Likewise.
16010         * modules/yesno (Depends-on): Likewise.
16011
16012 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
16013
16014         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
16015         needless checks.
16016
16017 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16018
16019         Merge from coreutils.  Among other things,
16020         add bulletproofing for cases where stdin, stdout, or stderr are closed.
16021         * lib/fd-safer.c: New file.
16022         * lib/fcntl-safer.h, open-safer.c: Remove.
16023         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
16024         * lib/dup-safer.c: Include unistd-safer.h first.
16025         Don't include errno.h.
16026         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
16027         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
16028         * lib/file-type.c: Rely on file-type.h change.
16029         * lib/getloadavg.c: Include unistd-safer.h.
16030         (getloadavg): Use safer open.
16031         * lib/getusershell.c: Include "stdio-safer.h".
16032         (getusershell): Use safer fopen.
16033         * lib/long-options.c (long_options): Use NULL rather than 0.
16034         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
16035         'free'.
16036         * lib/modechange.c: Likewise.
16037         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
16038         (MODE_DONE): New constant.
16039         (struct mode_change): Remove 'next' member.
16040         (make_node_op_equals): New function; like the old one of the
16041         same name, except it allocates an array.
16042         (mode_compile, mode_create_from_ref): Use it.
16043         (mode_compile): Allocate result as an array, not a linked list.
16044         Parse octal string ourself, so that we catch mistakes like "+0".
16045         (mode_adjust): Arg is an array, not a linked list.
16046         * lib/modechange.c: Include stat-macros.h, xalloc.h.
16047         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
16048         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
16049         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
16050         Remove.  This is now stat-macros.h's job.
16051         (talloc): Remove.  All callers replaced by xalloc, so that
16052         our invokers don't have to worry about reporting memory failures.
16053         (make_node_op_equals): Remove.
16054         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16055         New constants.
16056         (struct mode_change): Moved here from modechange.h.
16057         (mode_append_entry): Remove.
16058         (mode_compile): Remove MASKED_OPS arg, since it encouraged
16059         apps to have incorrect behavior.  Use simpler algorithm for head
16060         and tail.  Don't futz with umask; that's now the job of mode_adjust.
16061         Detect more invalid usages rather than having somewhat-random behavior.
16062         Don't insert an "a=" action, as that leads to incorrect behavior.
16063         (mode_compile, mode_create_from_ref): Return NULL on error instead
16064         of an enum, since now there's only one way to have an error.  All
16065         callers changed.
16066         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
16067         at the correct time.  Simplify calculation of "+u" and its ilk.
16068         Don't mishandle "+X".
16069         (mode_free): Remove "register" and localize decls.
16070         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
16071         (struct mode_change): Move to modechange.c; callers don't
16072         need to see this stuff.
16073         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
16074         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
16075         (mode_change, mode_adjust): Reflect the new signatures noted above.
16076         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
16077         that might redefine system include files.
16078         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
16079         (my_usleep): Use NULL rather than (void *) 0.
16080         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
16081         Use siginterrupt to specify that system calls should be interrupted.
16082         (rpl_nanosleep): Move initialization of suspended closer to call of
16083         my_usleep.
16084         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
16085         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
16086         (desirable_utmp_entry): New function.
16087         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
16088         using x2nrealloc, to simplify logic.
16089         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
16090         size calculation.  Do not assume utmp file is a regular file.
16091         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
16092         (READ_UTMP_CHECK_PIDS): New constant.
16093         * lib/save-cwd.c: Include unistd-safer.h.
16094         (save_cwd): Use fd_safer.
16095         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
16096         [!_LIBC] Include "stat-macros.h" instead.
16097         * lib/unistd-safer.h (fd_safer): New decl.
16098
16099 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16100
16101         * modules/getloadavg (Depends-on): Add unistd-safer.
16102         * modules/getusershell (Depends-on): Add stdio-safer.
16103         * modules/lstat (Depends-on): Remove xalloc.
16104         * modules/mkstemp (Depends-on): Add stat-macros.
16105         * modules/modechange (Depends-on): Remove xstrtol.
16106         Add stat-macros, xalloc.
16107         * modules/save-cwd (Depends-on): Add unistd-safer.
16108         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
16109         * modules/unistd-safer (Files): Add lib/fd-safer.c
16110         (Makefile.am): Remove lib_SOURCES.
16111
16112         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
16113         Remove fcntl-safer; unistd-safer supersedes it.
16114
16115 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16116
16117         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
16118         AC_HEADER_STAT.
16119         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
16120         (gl_PREREQ_CHOWN): Remove.
16121         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
16122         it.  Don't require AC_HEADER_STAT.
16123         (gl_PREREQ_LSTAT): Remove.
16124         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
16125         Don't require AC_HEADER_STAT.
16126         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
16127         (gl_PREREQ_RMDIR): Remove.
16128         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
16129         mention stat-macros.h or AC_HEADER_STAT, since we'll make
16130         the stat-macros module a prerequisite.
16131         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
16132         * m4/filemode.m4 (gl_FILEMODE): Likewise.
16133         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
16134         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
16135         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
16136         variable names.
16137         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
16138         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
16139         variable prefixes.
16140         * m4/fcntl-safer.m4: Remove.
16141         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
16142         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
16143         Invoke gl_PREREQ_FD_SAFER.
16144         (gl_PREREQ_FD_SAFER): New macro.
16145         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
16146         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
16147         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
16148         Remove duplicate call to AC_LIBOBJ(readutmp).
16149         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
16150
16151         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
16152         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
16153
16154 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
16155
16156         * MODULES.html.sh (Misc): Add byteswap.
16157
16158 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16159
16160         * modules/getcwd (Depends-on): Add extensions.
16161         * modules/openat (Depends-on): Likewise.
16162
16163 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16164
16165         * modules/byteswap: New file.
16166
16167 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16168
16169         * m4/byteswap.m4: New file.
16170
16171 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
16172
16173         * lib/byteswap_.h: New file.
16174
16175 2005-04-25  Karl Berry  <karl@gnu.org>
16176
16177         * m4/gettext.m4: Update from GNU gettext 0.14.4.
16178
16179 2005-04-25  Albert Chin  <china@thewrittenword.com>
16180
16181         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
16182         Toolkit C bug.
16183
16184 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
16185
16186         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
16187         (func_ln_if_changed) Remove forcibly for no error message
16188         in case file does not exist.
16189
16190 2005-04-19  Simon Josefsson  <jas@extundo.com>
16191
16192         * gnulib-tool (Options): Make --symlink mean --symbolic.
16193
16194 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
16195
16196         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
16197
16198 2005-04-16  Simon Josefsson  <jas@extundo.com>
16199
16200         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
16201
16202 2005-04-15  Simon Josefsson  <jas@extundo.com>
16203
16204         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
16205
16206 2005-04-15  Simon Josefsson  <jas@extundo.com>
16207
16208         * gnulib-tool: Rename --symlink to --symbolic.
16209
16210 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
16211
16212         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
16213         symbolic links to files instead of copying/moving.  Add --aux-dir,
16214         specifying directory relative --dir where auxiliary build tools
16215         are placed.
16216
16217 2005-04-14  Bruno Haible  <bruno@clisp.org>
16218
16219         * modules/allocsa (License): Change to LGPL.
16220         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
16221
16222 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
16223
16224         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
16225         that "UTC +1 second" continues to work.  Problem reported
16226         by Dmitry V. Levin.
16227         (relunit_snumber): New rule.
16228         (relunit): Use it.
16229
16230 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
16231
16232         * lib/getdate.y (universal_time_zone_table): New constant.
16233         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
16234         universal_time_zone_table.
16235         (lookup_zone): Prefer universal_time_zone_table to
16236         local_time_zone_table, so that "GMT" time stamps are allowed in
16237         London during the summer.  Problem reported by Ian Abbott.
16238
16239 2005-04-12  Jim Meyering  <jim@meyering.net>
16240
16241         * lib/human.c (humblock): Set *options even when returning due to
16242         xstrtoumax conversion failure.  Thanks to a used-uninitialized
16243         warning from gcc-4.
16244
16245 2005-04-09  Jim Meyering  <jim@meyering.net>
16246
16247         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
16248         -Wuninitialized: initialize tm0.tm_year.
16249
16250 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
16251
16252         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
16253         count, since there's no maximum.  All uses changed.
16254         Add member dsts_seen.
16255         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
16256         not being INT_MAX.
16257         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
16258         Use pc_rels_seen to decide whther a date is absolute.
16259
16260         * lib/getdate.y (number): Don't overwrite year.
16261         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
16262         check.
16263
16264 2005-04-02  Simon Josefsson  <jas@extundo.com>
16265
16266         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
16267         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
16268
16269 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
16270
16271         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
16272         where no absolute path name can be longer than PATH_MAX.
16273
16274 2005-03-27  Jim Meyering  <jim@meyering.net>
16275
16276         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
16277
16278 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
16279
16280         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
16281         "one's complement" -> "ones' complement" in comment, as per Knuth.
16282         "value of type" -> "type or expression" in comment.
16283         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
16284
16285 2005-03-26  Jim Meyering  <jim@meyering.net>
16286
16287         Comment nits.
16288         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
16289         Correct typos: s/or/of/.
16290
16291 2005-03-26  Jim Meyering  <jim@meyering.net>
16292
16293         * modules/check-include-files: Move to ../ and rename to...
16294         * check-module: ...this.
16295
16296 2005-03-25  Jim Meyering  <jim@meyering.net>
16297
16298         * modules/xvasprintf (Files): Add xalloc.h.
16299
16300 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
16301
16302         * modules/gettext (Files): config/config.rpath ->
16303         build-aux/config.rpath
16304         * modules/iconv (Files): Likewise.
16305         Problem reported by Oskar Liljeblad.
16306
16307 2005-03-23  Jim Meyering  <jim@meyering.net>
16308
16309         * modules/check-include-files: New script to check for
16310         missing dependencies, multiple includes, etc.
16311
16312         * modules/c-strtold (Depends-on): Add xalloc.
16313         * modules/c-strtod (Depends-on): Add xalloc.
16314         * modules/hash (Depends-on): Add xalloc.
16315         (Files): Remove lib/xalloc.h.
16316
16317         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
16318         * modules/userspec (Files): Add lib/inttostr.h.
16319
16320 2005-03-23  Jim Meyering  <jim@meyering.net>
16321
16322         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
16323
16324 2005-03-22  Jim Meyering  <jim@meyering.net>
16325
16326         * modules/stat-macros: New module.
16327         * modules/canonicalize, modules/euidaccess, modules/file-type,
16328         * modules/filemode, modules/lchown, modules/makepath,
16329         * modules/rmdir, modules/stat: Depend on new stat-macros module
16330         rather than listing lib/stat-macros.h manually.
16331         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
16332
16333 2005-03-22  Jim Meyering  <jim@meyering.net>
16334
16335         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
16336
16337 2005-03-22  Bruno Haible  <bruno@clisp.org>
16338
16339         * config/srclist.txt: Replace target directory 'config' with
16340         'build-aux'.
16341         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
16342         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
16343         ../build-aux/.
16344
16345 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
16346
16347         * modules/chdir-long (Depends-on): Add mempcpy.
16348
16349         * modules/acl, modules/backupfile, modules/c-strtod,
16350         modules/c-strtold, modules/canon-host, modules/canonicalize,
16351         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
16352         modules/exclude, modules/exitfail, modules/file-type,
16353         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
16354         modules/getdate, modules/getline, modules/getpagesize,
16355         modules/getpass, modules/getugroups, modules/group-member,
16356         modules/hard-locale, modules/hash, modules/human, modules/idcache,
16357         modules/inttostr, modules/long-options, modules/makepath,
16358         modules/md5, modules/memcasecmp, modules/memcoll,
16359         modules/modechange, modules/mountlist, modules/path-concat,
16360         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
16361         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
16362         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
16363         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
16364         modules/strftime, modules/strndup, modules/strverscmp,
16365         modules/timespec, modules/unlocked-io, modules/userspec,
16366         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
16367         modules/yesno:
16368         Remove lib_SOURCES line from Makefile.am section, as this is now
16369         done automatically by the corresponding Autoconf macro.
16370
16371 2005-03-21  Jim Meyering  <jim@meyering.net>
16372
16373         Changes imported from coreutils.
16374
16375         * lib/cycle-check.c: Don't include xalloc.h.
16376
16377         * lib/path-concat.c: Don't include assert.h.
16378         (path_concat): Remove assertion that would have triggered
16379         for ABASE starting with more than one slash.
16380         Reported by Andreas Schwab.
16381
16382         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
16383         properly when ABASE is an absolute file name.
16384         Correct the description of this function.
16385         Include <assert.h>.
16386         Add an assertion and a test driver.
16387         This fixes a bug introduced on 2004-07-02.
16388         Andreas Schwab reported the resulting failure of cp --parents:
16389         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
16390
16391 2005-03-21  Jim Meyering  <jim@meyering.net>
16392
16393         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
16394         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
16395
16396 2005-03-21  Jim Meyering  <jim@meyering.net>
16397         and  Paul Eggert  <eggert@cs.ucla.edu>
16398
16399         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
16400         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
16401         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
16402         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
16403         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
16404         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
16405         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
16406         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
16407         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
16408         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
16409         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
16410         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
16411         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
16412         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
16413         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
16414         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
16415         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
16416         for these modules.
16417
16418 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
16419
16420         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
16421         (which shouldn't happen), generate nothing instead of returning 0
16422         immediately, so that nstrftime (NULL, ...) doesn't return 0.
16423
16424 2005-03-16  Bruno Haible  <bruno@clisp.org>
16425
16426         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
16427         HAVE_LONGLONG_64BIT.
16428
16429 2005-03-16  Bruno Haible  <bruno@clisp.org>
16430
16431         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
16432         HAVE_LONGLONG_64BIT.
16433
16434 2005-03-16  Bruno Haible  <bruno@clisp.org>
16435
16436         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
16437         HAVE_LONGLONG_64BIT.
16438
16439 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16440
16441         * lib/strftime.c (my_strftime): Prepend space to format so that we can
16442         reliably distinguish strftime failure from empty output on POSIX
16443         hosts.
16444
16445 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
16446
16447         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
16448         (iconv_string): Don't guess a size-zero buffer, as that might cause
16449         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
16450         result would be 'too large', where 'too large' is (heuristically)
16451         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
16452         overflow concerns.  This will prevent some unwanted malloc failures
16453         when the inputs are very large.
16454
16455 2005-03-15  Karl Berry  <karl@gnu.org>
16456
16457         * config/srclist.txt (config.rpath): from gettext.
16458         * config/config.rpath: update.
16459
16460 2005-03-15  Bruno Haible  <bruno@clisp.org>
16461
16462         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
16463         to 'negate'.
16464
16465         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
16466         variable.
16467
16468         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
16469         results.
16470
16471 2005-03-14  Simon Josefsson  <jas@extundo.com>
16472
16473         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
16474         <fx@gnu.org>.
16475
16476 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
16477
16478         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
16479         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
16480         intprops.h.
16481         * lib/strtol.c: Likewise.
16482
16483 2005-03-14  Jim Meyering  <jim@meyering.net>
16484
16485         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
16486         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
16487         to be nonzero so that we (and caller) can detect the difference
16488         between a valid zero-length expansion and an error return, even
16489         when the underlying strftime fails before writing anything into
16490         that location.
16491
16492 2005-03-14  Bruno Haible  <bruno@clisp.org>
16493
16494         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
16495         Update from GNU gettext 0.14.3.
16496
16497 2005-03-10  Jim Meyering  <jim@meyering.net>
16498
16499         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
16500
16501 2005-03-10  Jim Meyering  <jim@meyering.net>
16502
16503         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
16504         so that this module works on systems without fchdir.
16505
16506 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
16507
16508         Factor int-properties macros into a single file, except for
16509         glibc-related files.
16510         * lib/intprops.h: New file.
16511         * lib/getloadavg.c: Include it instead of limits.h.
16512         (INT_STRLEN_BOUND): Remove.
16513         * lib/human.c: Include intprops.h.
16514         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
16515         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
16516         302/1000.
16517         * lib/inttostr.h: Include intprops.h instead of limits.h.
16518         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
16519         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
16520         for consistency with intprops.h.
16521         (time_t_is_integer, twos_complement_arithmetic): Use them.
16522         * lib/sig2str.h: Include <signal.h>, intprops.h.
16523         (INT_STRLEN_BOUND): Remove.
16524         * lib/strftime.c (TYPE_SIGNED): Remove.
16525         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
16526         * lib/strtol.c: Adjust comments to match intprops.h.
16527         * lib/userspec.c: Include intprops.h.
16528         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
16529         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
16530         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
16531         instead of rolling our own expressions.
16532         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
16533
16534         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
16535         instead of int.
16536         (my_strftime): Do not mishandle years close to INT_MAX, by doing
16537         the right thing even if adding 1900 would overflow.  Similarly
16538         for tm_mon + 1 and tm_yday + 1.
16539         Make %Y always equivalent to %C%y, and similarly for %G and %g.
16540         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
16541         (DO_SIGNED_NUMBER): New macro.
16542         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
16543
16544 2005-03-07  Bruno Haible  <bruno@clisp.org>
16545
16546         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
16547
16548 2005-03-07  Bruno Haible  <bruno@clisp.org>
16549
16550         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
16551
16552 2005-03-04  Derek R. Price  <derek@ximbiot.com>
16553
16554         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
16555         (func_import): Only replace files via --import when they have actually
16556         changed.
16557
16558 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16559
16560         * m4/mmap-anon.m4: New file.
16561         * m4/pagealign_alloc.m4: New file.
16562
16563 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16564             Bruno Haible  <bruno@clisp.org>
16565
16566         * modules/pagealign_alloc: New file.
16567         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
16568
16569 2005-03-03  Derek R. Price  <derek@ximbiot.com>
16570             Bruno Haible  <bruno@clisp.org>
16571
16572         * lib/pagealign_alloc.h: New file.
16573         * lib/pagealign_alloc.c: New file.
16574
16575 2005-03-03  Bruno Haible  <bruno@clisp.org>
16576
16577         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
16578         Use an all-permissive copyright notice, recommended by RMS.
16579
16580 2005-03-02  Bruno Haible  <bruno@clisp.org>
16581
16582         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
16583         of AIX, the replacement has to be done only after <string.h> is
16584         included, therefore not in config.h. stpncpy.h does the replacement,
16585         and stpncpy.c uses it.
16586
16587 2005-03-02  Bruno Haible  <bruno@clisp.org>
16588
16589         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
16590         stpncpy.c uses it.
16591
16592 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16593
16594         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
16595         The workaround isn't strictly needed for POSIX conformance, and
16596         it's too much of a pain to configure and maintain.  We'll ask
16597         people to fix their kernels instead.
16598         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
16599         (NANOSLEEP_BUG_WORKAROUND): Remove.
16600         (xnanosleep): Remove the workaround.
16601
16602 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16603
16604         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
16605         Reported by Derek Price.
16606         (Include): Add "timespec.h".
16607
16608         * modules/xnanosleep (Depends-on): Remove gethrxtime.
16609
16610 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
16611
16612         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
16613         to detect nanosleep bug.
16614
16615 2005-03-01  Bruno Haible  <bruno@clisp.org>
16616
16617         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
16618
16619 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
16620
16621         * modules/gethrxtime: New file.
16622         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
16623         (Depends-on): Add gethrxtime.
16624         (configure.ac): Add gl_XNANOSLEEP.
16625         (Makefile.am): Remove lib_SOURCES line.
16626
16627 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16628
16629         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
16630         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
16631
16632 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
16633
16634         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
16635         * lib/timespec.h (gettime): Return void, since it always
16636         succeeds now.  All uses changed.
16637         * lib/gettime.c (gettime) Likewise.
16638         [HAVE_NANOTIME]: Prefer nanotime.
16639         Assume gettimeofday succeeds, as POSIX requires.
16640         Assime time () succeeds, since other code already does.
16641         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
16642         (timespec_subtract): Remove.
16643         (NANOSLEEP_BUG_WORKAROUND): New constant.
16644         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
16645         things considerably.  Use it only on GNU/Linux hosts, since the
16646         workaround shouldn't be needed elsewhere.
16647
16648 2005-02-24  Bruno Haible  <bruno@clisp.org>
16649
16650         * modules/gettext (Files): Add m4/glibc2.m4.
16651
16652 2005-02-24  Bruno Haible  <bruno@clisp.org>
16653
16654         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
16655         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
16656         * m4/progtest.m4:
16657         Update from GNU gettext 0.14.2.
16658         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
16659
16660 2005-02-24  Bruno Haible  <bruno@clisp.org>
16661
16662         * lib/localcharset.c: Update from GNU gettext 0.14.2.
16663         * lib/config.charset: Update from GNU gettext 0.14.2.
16664
16665 2005-02-24  Bruno Haible  <bruno@clisp.org>
16666
16667         * lib/gettext.h: Update from GNU gettext 0.14.2.
16668
16669 2005-02-23  Simon Josefsson  <jas@extundo.com>
16670
16671         * m4/iconvme.m4: New file.
16672
16673 2005-02-23  Jim Meyering  <jim@meyering.net>
16674
16675         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
16676         change.
16677         Thanks to Bruno Haible for catching it.
16678
16679 2005-02-22  Simon Josefsson  <jas@extundo.com>
16680
16681         * modules/iconvme: New file.
16682
16683         * MODULES.html.sh: Add iconvme.
16684
16685 2005-02-22  Simon Josefsson  <jas@extundo.com>
16686
16687         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
16688
16689 2005-02-22  Simon Josefsson  <jas@extundo.com>
16690
16691         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
16692
16693 2005-02-22  Jim Meyering  <jim@meyering.net>
16694
16695         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
16696         s/ifndef/ifdef/.
16697
16698 2005-02-20  Neil Conway  <neilc@samurai.com>
16699
16700         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
16701         returned by OSX/Darwin if the specified buffer is not large
16702         enough for the hostname.
16703
16704 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16705
16706         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
16707         pass it to _help, otherwise the latter coredumps trying to
16708         dereference state.root_argp.
16709
16710 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16711
16712         * modules/chdir-long (Depends-on): Add memrchr.
16713         * modules/memrchr (Files): Add lib/memrchr.h.
16714         (Include): "memrchr.h".
16715
16716 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16717
16718         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
16719
16720 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
16721
16722         * lib/memrchr.h: New file.
16723         * lib/chdir-long.c: Include it.
16724         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
16725         Don't bother including stddef.h.
16726
16727 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
16728
16729         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
16730         inclusion.
16731         Include <sys/types.h>, for dev_t.
16732         (ME_DUMMY, ME_REMOTE): Move from here....
16733         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
16734         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
16735         Dmitry V. Levin.
16736         Include mountlist.h first, to test the interface.
16737
16738 2005-01-29  Bruno Haible  <bruno@clisp.org>
16739
16740         * lib/progname.c (program_name): Initialize.
16741         Needed when linking statically on MacOS X.
16742
16743 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16744
16745         Sync from coreutils.
16746         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
16747         (Depends-on): Add c-strtod.
16748         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
16749
16750 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
16751
16752         Sync from coreutils.
16753         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
16754
16755         Remove files that are specific to coreutils.
16756         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
16757
16758 2005-01-28  Bruno Haible  <bruno@clisp.org>
16759
16760         * modules/javacomp: New file.
16761         * MODULES.html.sh (Java): Add javacomp.
16762
16763 2005-01-28  Bruno Haible  <bruno@clisp.org>
16764
16765         * m4/javacomp.m4: New file, from GNU gettext.
16766
16767 2005-01-28  Bruno Haible  <bruno@clisp.org>
16768
16769         * lib/javacomp.sh.in: New file, from GNU gettext.
16770         * lib/javacomp.h: New file, from GNU gettext.
16771         * lib/javacomp.c: New file, from GNU gettext.
16772
16773 2005-01-26  Simon Josefsson  <jas@extundo.com>
16774
16775         * lib/gai_strerror.c: Use GPL in header.
16776
16777 2005-01-26  Bruno Haible  <bruno@clisp.org>
16778
16779         * modules/javaexec: New file.
16780         * MODULES.html.sh (Java): Add javaexec.
16781
16782 2005-01-26  Bruno Haible  <bruno@clisp.org>
16783
16784         * m4/javaexec.m4: New file, from GNU gettext.
16785
16786 2005-01-26  Bruno Haible  <bruno@clisp.org>
16787
16788         * lib/javaexec.sh.in: New file, from GNU gettext.
16789         * lib/javaexec.h: New file, from GNU gettext.
16790         * lib/javaexec.c: New file, from GNU gettext.
16791
16792 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16793
16794         * modules/lchown (Depends-on): Remove lchown.h
16795
16796 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16797
16798         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
16799         must be defined if the header file was not found, in order
16800         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
16801
16802 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16803
16804         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
16805         initializers for struct pentry_state.
16806         (__argp_error): Check return value of __asprintf
16807         (__argp_failure): Translate error message
16808
16809         * lib/argp-parse.c: Removed braces around the expansion of N_()
16810
16811 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16812
16813         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
16814         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
16815         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
16816         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
16817         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
16818         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
16819         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
16820         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
16821         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
16822         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
16823         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
16824         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
16825         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
16826         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
16827         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
16828         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
16829         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
16830         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
16831         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
16832         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
16833         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
16834         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
16835         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
16836         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
16837         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
16838         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
16839         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
16840         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
16841         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
16842         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
16843         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
16844         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
16845         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
16846         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
16847         xstrtol.m4, xstrtoumax.m4, yesno.m4:
16848         Use an all-permissive copyright notice, recommended by RMS.
16849
16850 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
16851
16852         * modules/chdir-long (Depends-on): Remove mempcpy.
16853
16854 2005-01-21  Jim Meyering  <jim@meyering.net>
16855
16856         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
16857         same value as for Solaris 9.
16858
16859         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
16860         component length.  This included changing the parameter to be
16861         of type `char *' rather than `char const *'.
16862         * lib/chdir-long.h (chdir_long): Update prototype.
16863
16864         * lib/openat.c (fdopendir, fstatat): New functions.
16865         * lib/openat.h: Include headers required for use of DIR and struct
16866         stat.
16867         [AT_SYMLINK_NOFOLLOW]: Define.
16868         (fdopendir, fstatat): Add prototypes.
16869
16870 2005-01-21  Bruno Haible  <bruno@clisp.org>
16871
16872         * modules/classpath: New file.
16873         * MODULES.html.sh (Java): Add classpath.
16874
16875 2005-01-21  Bruno Haible  <bruno@clisp.org>
16876
16877         * lib/classpath.h: New file, from GNU gettext.
16878         * lib/classpath.c: New file, from GNU gettext.
16879
16880 2005-01-20  Simon Josefsson  <jas@extundo.com>
16881
16882         * modules/version-etc-fsf: New file.
16883
16884 2005-01-20  Simon Josefsson  <jas@extundo.com>
16885
16886         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
16887         * lib/version-etc.c: Remove version_etc_copyright.
16888         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
16889         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
16890
16891 2005-01-20  Simon Josefsson  <jas@extundo.com>
16892
16893         * lib/base64.h (isbase64): Add.
16894
16895         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
16896         using a unsigned prototype, don't inline.
16897         (base64_decode): Use it.
16898
16899 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16900
16901         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
16902         it.
16903
16904 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16905
16906         * lib/save-cwd.c (save_cwd): Remove code to support the case
16907         where fchdir is missing or flaky.
16908
16909 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16910
16911         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
16912
16913 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
16914
16915         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
16916         AC_LIBSOURCES now does this.
16917         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
16918         with new ullong_max module.
16919
16920 2005-01-19  Bruno Haible  <bruno@clisp.org>
16921
16922         * modules/sh-quote: New file.
16923         * MODULES.html.sh (Executing programs): Add sh-quote.
16924
16925 2005-01-19  Bruno Haible  <bruno@clisp.org>
16926
16927         * lib/sh-quote.h: New file, from GNU gettext.
16928         * lib/sh-quote.c: New file, from GNU gettext.
16929
16930 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16931
16932         Merge from coreutils.
16933         * m4/ullong_max.m4: New file.
16934         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
16935         (gl_MACROS): Assume localeconv exists.
16936
16937 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16938
16939         Merge changes from coreutils, as described below in several
16940         changelogs dated today.
16941
16942         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
16943         (O_DIRECTORY): Remove; not needed here, since "." must be
16944         a directory.  All uses removed.
16945         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
16946         universal on Suns, and we also need to test for IRIX.
16947         Revamp code to use 'if' rather than '#if'.
16948         Avoid unnecessary comparison of cwd->desc to 0.
16949
16950         * lib/utimens.c (futimens): Robustify the previous patch, by checking
16951         for known valid error numbers rather than observed invalid ones.
16952
16953 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
16954
16955         * modules/ullong_max: New file.
16956
16957         * modules/chdir-long, modules/openat: New files.
16958         * modules/save-cwd (Depends-on): Depend on chdir-long.
16959         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
16960
16961 2005-01-18  Jim Meyering  <jim@meyering.net>
16962
16963         Merge from coreutils.
16964         * m4/chdir-long.m4, m4/openat.m4: New files.
16965         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
16966         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
16967         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
16968         is sane and DOES follow symlinks.  Besides, testing 20 different
16969         systems found no broken chown implementations.
16970         Prompted by a change in rsync's copy of this macro.
16971         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
16972
16973         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
16974
16975         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
16976         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
16977         NULL-means-set-to-current-time semantics.
16978         Remove temporary file immediately, rather than waiting
16979         for configure's at-exit trap code to do it.
16980
16981 2005-01-18  Jim Meyering  <jim@meyering.net>
16982
16983         * lib/version-etc.c (version_etc_copyright): Update copyright date.
16984
16985         * lib/utimens.c (futimens): Account for the fact that futimes
16986         can also fail with errno == ENOSYS or errno == ENOENT.
16987         Patch from Dmitry V. Levin.
16988
16989         Change the name of the robust chdir function from chdir to chdir_long.
16990         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
16991         (restore_cwd): Use chdir_long, not chdir.
16992         * lib/chdir-long.c: Renamed from chdir.c.
16993         * lib/chdir-long.h: Renamed from chdir.h.
16994         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
16995         Hurd.
16996
16997 2005-01-18  Bruno Haible  <bruno@clisp.org>
16998
16999         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
17000         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
17001         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
17002         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
17003         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
17004         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
17005         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
17006         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
17007         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
17008         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
17009         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
17010         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
17011         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
17012         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
17013         Use an all-permissive copyright notice, recommended by RMS.
17014
17015 2005-01-18  Bob Proulx  <bob@proulx.com>
17016
17017         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
17018         simplify offsetof() macro construct to avoid compile failure with
17019         native HP-UX 11.0 ANSI C compiler.
17020
17021 2005-01-17  Bruno Haible  <bruno@clisp.org>
17022
17023         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
17024         redundant because stpncpy.m4 takes care of it.
17025
17026 2005-01-17  Bruno Haible  <bruno@clisp.org>
17027
17028         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
17029
17030 2005-01-17  Bruno Haible  <bruno@clisp.org>
17031
17032         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
17033         used.
17034
17035 2005-01-17  Bruno Haible  <bruno@clisp.org>
17036
17037         * lib/fwriteerror.h (fwriteerror): Change specification to include
17038         fclose.
17039         * lib/fwriteerror.c: Include <stdbool.h>.
17040         (fwriteerror): At the end, close the file stream. Record whether
17041         stdout was already closed.
17042
17043 2005-01-17  Bruno Haible  <bruno@clisp.org>
17044
17045         * lib/execute.c (environ): Declare if needed.
17046         * lib/pipe.c (environ): Likewise.
17047         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
17048
17049 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17050
17051         * modules/argp: Depend on vsnprintf
17052
17053 2005-01-10  Jim Meyering  <jim@meyering.net>
17054
17055         * modules/closeout (Depends-on): Add atexit.
17056
17057 2005-01-06  Bruno Haible  <bruno@clisp.org>
17058
17059         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
17060
17061 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
17062
17063         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
17064         definitions to be after all include files, to avoid collisions.
17065         Problem reported by Bob Proulx.
17066
17067 2005-01-04  Jim Meyering  <jim@meyering.net>
17068
17069         Changes imported from coreutils.
17070         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
17071         as the mkstemp template, use a temporary directory and an
17072         8.3-friendly template to avoid trouble on systems like DJGPP.
17073         Reported by Juan M. Guerrero via Stepan Kasal.
17074         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
17075         close. Remove the temporary directory right away, rather than waiting
17076         for configure's at-exit trap code to do it.
17077         Suggestion from Stepan Kasal.
17078
17079 2005-01-01  Simon Josefsson  <jas@extundo.com>
17080
17081         * gnulib-tool: Print #include directives when --import'ing.
17082
17083 2004-12-28  Simon Josefsson  <jas@extundo.com>
17084
17085         * tests/test-base64.c: Include required header files.  Remove
17086         unused variables.
17087
17088 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17089
17090         * modules/error (Depends-on): Remove gettext.
17091
17092 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
17093
17094         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
17095         not needed.  This removes a dependency on the gettext module.
17096         [defined _LIBC]: Do not include <libintl.h>; not needed.
17097
17098 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17099
17100         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
17101         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
17102
17103 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
17104
17105         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
17106         HAVE_DECL_STRTOLD.
17107
17108 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17109
17110         * modules/getdate (Depends-on): Remove alloca-opt.
17111
17112 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17113
17114         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
17115
17116 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
17117
17118         * lib/argp-parse.c: Include <stddef.h>.
17119         (alignof, alignto): New macros.
17120         (parser_init): Don't assume that void * is aligned sufficiently
17121         for struct option.
17122
17123         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
17124         need to extend the stack.
17125         (YYINITDEPTH): New macro, so that the initial stack isn't overly
17126         large.
17127
17128 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17129
17130         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
17131
17132 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17133
17134         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
17135         (2004-10-24) change.  Apparently this was a false alarm.
17136
17137         * modules/getdate: Depend on alloca-opt, not alloca.
17138
17139 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
17140
17141         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
17142         Remove now-obsolete comment about AIX.
17143         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
17144         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
17145         (YYMAXDEPTH): New macro.
17146
17147 2004-12-18  Simon Josefsson  <jas@extundo.com>
17148
17149         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
17150
17151 2004-12-18  Bruno Haible  <bruno@clisp.org>
17152
17153         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
17154
17155 2004-12-18  Bruno Haible  <bruno@clisp.org>
17156
17157         * lib/fatal-signal.c (fatal_signals): Make non-const.
17158         (init_fatal_signals): New function.
17159         (uninstall_handlers, install_handlers): Ignore signals that were set to
17160         SIG_IGN.
17161         (at_fatal_signal): Call init_fatal_signals.
17162         (init_fatal_signal_set): Likewise. Ignore signals that were set to
17163         SIG_IGN.
17164         Reported by Paul Eggert.
17165
17166 2004-12-18  Bruno Haible  <bruno@clisp.org>
17167
17168         * doc/alloca.texi: New file.
17169         * doc/alloca-opt.texi: New file.
17170
17171 2004-12-17  Jim Meyering  <jim@meyering.net>
17172
17173         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
17174         Otherwise, install-sh could exit with improper exit status when
17175         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
17176
17177 2004-12-16  Simon Josefsson  <jas@extundo.com>
17178
17179         * tests/test-base64.c: Add license.
17180
17181 2004-12-15  Stepan Kasal  <address@hidden>
17182
17183         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
17184
17185 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
17186
17187         * modules/getcwd (Files): Add m4/d-ino.m4.
17188         Suggested by Mark D. Baushke.
17189
17190 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17191
17192         * lib/getdate.y (textint): New member "negative".
17193         (time_zone_hhmm): New function.
17194         Expect 14 shift-reduce conflicts, not 13.
17195         (o_colon_minutes): New rule.
17196         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
17197         (yylex): Set the "negative" member of signed numbers.
17198
17199 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
17200
17201         * doc/getdate.texi (Time of day items, Time zone items):
17202         Describe new formats +00:00, UTC+00:00.
17203
17204 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
17205
17206         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
17207         spurious "-l"s.  Problem reported by Stepan Kasal.
17208
17209 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
17210
17211         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
17212         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
17213
17214 2004-12-04  Simon Josefsson  <jas@extundo.com>
17215
17216         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
17217         Vandoorselaere <yoann@prelude-ids.org>.
17218
17219 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17220
17221         Changes imported from coreutils.
17222         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
17223         exist.
17224         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
17225
17226 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17227
17228         Changes imported from coreutils.
17229         * lib/hard-locale.c: Assume <locale.h> exists.
17230         Include "strdup.h".
17231         (GLIBC_VERSION): New macro.
17232         (hard_locale): Assume setlocale exists.
17233         Rewrite to avoid #ifdef.
17234         Use strdup rather than malloc + strcpy.
17235         * lib/human.c: Assume <locale.h> exists.
17236         (human_readable): Assume localeconv exists.
17237
17238 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
17239
17240         * modules/hard-locale (Depends-on): Add strdup.
17241
17242 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
17243
17244         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
17245         convert T2, not T.  (Imported from libc.)
17246
17247 2004-11-30  Simon Josefsson  <jas@extundo.com>
17248
17249         * modules/restrict (License): Change to LGPL.
17250
17251 2004-11-30  Simon Josefsson  <jas@extundo.com>
17252
17253         * m4/restrict.m4: Add copyright and copying conditions.
17254
17255 2004-11-30  Simon Josefsson  <jas@extundo.com>
17256
17257         * m4/base64.m4: New file.
17258
17259 2004-11-30  Simon Josefsson  <jas@extundo.com>
17260
17261         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
17262         base64.
17263
17264         * tests/test-base64.c: New file.
17265
17266         * modules/base64: New file.
17267
17268 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17269
17270         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
17271         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
17272
17273         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
17274
17275 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
17276
17277         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
17278         (__getcwd.c): Don't restore errno; glibc doesn't.
17279         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
17280         first, falling back to our code only if its results look suspicious.
17281         Ensure that the resulting buffer is only as large as necessary.
17282
17283         * lib/readutmp.c: Include readutmp.h first.
17284         Include <errno.h>, since readutmp.h no longer does that.
17285         * lib/readutmp.h: Don't include <errno.h>,
17286         <sys/param.h>, <time.h>; not needed to establish interface.
17287         (errno): Remove decl.
17288         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
17289         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
17290         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
17291
17292 2004-11-28  Simon Josefsson  <jas@extundo.com>
17293
17294         * lib/base64.h, base64.c: New file.
17295
17296 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
17297
17298         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
17299
17300 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
17301
17302         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
17303         (Depends-on): Remove pathmax, same.  Add mempcpy.
17304         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
17305         (Makefile.am): Append getcwd.h to lib_SOURCES.
17306         (Include): Add getcwd.h.
17307         (Maintainer): Change from Jim Meyering to "all, glibc",
17308         since getdate now uses intended-for-glibc code.
17309         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
17310         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
17311
17312 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17313
17314         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
17315         HP's ANSI C compiler.
17316         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
17317         Declaring int functions causes warnings on some modern systems and
17318         shouldn't be needed to compile on ancient ones.
17319         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
17320         defined.
17321
17322         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
17323         with the following changes.
17324         (__set_errno): Parenthesize properly.
17325         Include <stdbool.h>.
17326         (MIN, MAX, MATCHING_INO): New macros.
17327         (__getcwd): Define with prototype, not K&R form.
17328         Use heuristics to allocate default buffer on stack if possible.
17329         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
17330         behavior, and to avoid the PATH_MAX limit when computing
17331         ../../../../...
17332         Use MATCHING_INO to compare inode number to file.
17333         Check for arithmetic overflow in size calculations.
17334         Fix bug in reallocation of dot array that caused getcwd to fail
17335         on directories nested deeper than 75.
17336         Be more careful about saving errno on error.
17337         Do not use realloc; use only free+malloc, as this is a bit
17338         more flexible and avoids a needless copy operation.
17339         Do not inspect st_dev and st_ino for symbolic links; POSIX
17340         doesn't specify the latter.
17341         Check for closedir errors.
17342         Avoid needless casts.
17343         Use "#ifdef weak_alias" around weak_alias, to be like other
17344         glibc code.
17345         The following changes to getcwd.c have effect only when used in
17346         gnulib; they have no effect inside glibc proper.
17347         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
17348         as alloca isn't used.
17349         (alloca, __alloca): Likewise.
17350         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
17351         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
17352         unconditionally, as gnulib assumes C89 or better.
17353         Do not include <sys/param.h>.
17354         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
17355         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
17356         better.
17357         (NULL) [!defined NULL]: Remove; we assume C89 or better.
17358         Include <dirent.h> in a way that is compatible with modern Autoconf.
17359         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
17360         New macros, if not already defined.
17361         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
17362         Use "_LIBC", not "defined _LIBC", for consistency.
17363         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
17364         a mempcpy module.
17365         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
17366         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
17367         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
17368         credit only to Jim Meyering and adjust the copyright dates.
17369         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
17370         <stdlib.h>, <unistd.h>, "pathmax.h".
17371         Instead, include "xgetcwd.h" (first) and "getcwd.h".
17372         (INITIAL_BUFFER_SIZE): Remove.
17373         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
17374
17375 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
17376
17377         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
17378         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
17379         Use the _ONCE methods, for efficiency.
17380         Check for fcntl.h.  In test program, include <errno.h>
17381         and <fcntl.h> if available.  Remove old K&R cruft from
17382         test program.  Check for common errors in GNU/Linux,
17383         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
17384         don't do AC_LIBOBJ, as that's getcwd.m4's job.
17385         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
17386         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
17387         name accordingly.
17388         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
17389         accommodate new getcwd.c.
17390         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
17391         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
17392         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
17393         that's all we need now.
17394
17395 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17396
17397         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
17398         argp-parse.c depends on getopt internals, that means we should
17399         always use our getopt, to be on the safe side.
17400         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
17401         order not to spoil the result of an eventual previous invocation
17402         of gl_GETOPT_SUBSTITUTE.
17403
17404 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
17405
17406         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
17407         redefinition warnings. To avoid them, include the defines
17408         in `#if !defined __need_getopt ... #endif'. The only place
17409         where __getopt_argv_const is used is in definitions
17410         of getopt_long and getopt_long_only below, which are as well
17411         protected by `#ifndef __need_getopt'.
17412         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
17413         __need_getopt after including <stdio.h> and <unistd.h> These
17414         headers might have defined it.
17415
17416 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17417
17418         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
17419
17420 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
17421
17422         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
17423         (futimens): New function, which uses futimes if available.
17424         (futimens, utimens): Support timespec==NULL, with same semantics
17425         as utime and utimens.
17426         * lib/utimens.h (futimens): New decl.
17427
17428 2004-11-23  Jim Meyering  <jim@meyering.net>
17429
17430         * lib/getopt_.h: Remove trailing blanks.
17431
17432 2004-11-23  Jim Meyering  <jim@meyering.net>
17433
17434         * lib/__fpending.c: Add comment.
17435
17436 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
17437
17438         * modules/canonicalize (Depends-on): Add xreadlink.
17439         Problem reported by James Youngman.
17440
17441 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
17442
17443         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
17444         New macros.
17445         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
17446         optopt): Use them instead of invoking ## directly; otherwise, the
17447         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
17448
17449 2004-11-19  Bruno Haible  <bruno@clisp.org>
17450
17451         * lib/strtok_r.c: Move comments from here...
17452         * lib/strtok_r.h: ... to here.
17453
17454 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17455
17456         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
17457         implementations that mishandle size_t overflow.
17458
17459 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
17460
17461         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
17462         might fail.  Problem reported by Yoann Vandoorselaere.
17463         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
17464         implementations that mishandle size_t overflow.
17465
17466 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17467
17468         * modules/canon-host (Depends-on): Add strdup.
17469
17470 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17471
17472         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
17473
17474 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17475
17476         * lib/canon-host.c: Include "strdup.h".
17477         (canon_host): Use getaddrinfo if available, so that IPv6 works.
17478         Use strdup instead of malloc/strcpy to duplicate strings.
17479
17480         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
17481         (human_space_before_unit): New constant.
17482         * lib/human.c (human_readable): Support it.
17483
17484         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
17485         (xgetcwd): Set errno correctly when failing.
17486         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
17487         the failure is actually due to a PATH_MAX problem.
17488
17489         Further getopt changes to make it more likely that glibc will
17490         buy the changes back.
17491         * lib/getopt.c (POSIXLY_CORRECT): New constant.
17492         (getopt): Use it, so to preserve glibc semantic
17493         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
17494         when compiling for libc.
17495         * lib/getopt_.h (__getopt_argv_const): Bring it back.
17496         (getopt_long, getopt_long_only): Use it.
17497
17498         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17499         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
17500         (getopt): Argv is now char * const *, as per standard.
17501         (_getopt_internal_r, _getopt_internal): Argv is now char **,
17502         not char *__getopt_argv_const *.
17503         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17504         _getopt_long_only_r): Likewise.
17505         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
17506         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17507         _getopt_long_r, _getopt_long_only_r): Likewise.
17508         * lib/getopt_.h (__getopt_argv_const): Remove.
17509         (getopt): Argv is now char * const *, as per standard.
17510
17511         * lib/getdate.y (tORDINAL): New token.
17512         (day, relunit): Allow it for relative times.
17513         (relative_time_table): Use tORDINAL for ordinals.
17514
17515 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
17516
17517         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
17518         Document that "second" isn't allowed as an ordinal number.
17519
17520 2004-11-16  Jim Meyering  <jim@meyering.net>
17521
17522         * modules/closeout (Depends-on): Add fpending.
17523
17524 2004-11-15  Jim Meyering  <jim@meyering.net>
17525
17526         * lib/closeout.c: Include "__fpending.h" once again.
17527         Include <stdbool.h>.
17528         (close_stdout): Don't fail just because stdout was closed initially,
17529         since some programs don't write to stdout in the normal course of
17530         operation (other than --version and --help), and we don't want this
17531         function to make e.g. `touch file >&-' fail.
17532         But do fail if it was closed and someone has tried to write to it.
17533         E.g., `printf foo >&-' must fail.
17534
17535 2004-11-13  Jim Meyering  <jim@meyering.net>
17536
17537         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
17538
17539 2004-11-12  Simon Josefsson  <jas@extundo.com>
17540
17541         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
17542         small doc fix is still pending.
17543
17544 2004-11-11  Simon Josefsson  <jas@extundo.com>
17545
17546         * modules/strtok_r: New file.
17547
17548         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17549         strtok_r.
17550
17551 2004-11-11  Simon Josefsson  <jas@extundo.com>
17552
17553         * m4/strtok_r.m4: New file.
17554
17555         * m4/getopt.m4: Replace opterr.
17556
17557 2004-11-11  Simon Josefsson  <jas@extundo.com>
17558
17559         * lib/strtok_r.h, strtok_r.c: New file.
17560
17561 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17562
17563         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
17564         of replacing opterr, getopt, etc.  This should handle the
17565         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
17566
17567 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
17568
17569         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
17570         we can stop lying to compilers about the constness of argv when we
17571         are compiled outside glibc.
17572         (getopt, getopt_long, getopt_long_only): Use it.
17573         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
17574         _getopt_internal, getopt): Likewise.
17575         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
17576         _getopt_long_only_r): Likewise.
17577         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
17578         _getopt_long_r, _getopt_long_only_r): Likewise.
17579
17580         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
17581         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
17582         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
17583         the other external symbols.
17584         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
17585         declaration, since the above renaming now works around collisions.
17586
17587 2004-11-11  Jim Meyering  <jim@meyering.net>
17588
17589         * lib/linebreak.c: Remove trailing blanks.
17590         * lib/alloca_.h: Likewise.
17591         * lib/acosl.c: Likewise.
17592         * lib/euidaccess.c: Likewise.
17593         * lib/allocsa.h: Likewise.
17594
17595 2004-11-10  Simon Josefsson  <jas@extundo.com>
17596
17597         * m4/getaddrinfo.m4: New file.
17598
17599 2004-11-10  Simon Josefsson  <jas@extundo.com>
17600
17601         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
17602
17603 2004-11-10  Simon Josefsson  <jas@extundo.com>
17604
17605         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
17606         getaddrinfo.
17607
17608         * modules/getaddrinfo: New file.
17609
17610 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17611
17612         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
17613
17614 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
17615
17616         * lib/mktime.c (SHR): New macro, which is a portable
17617         substitute for >> that should work even on Crays.
17618         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
17619         Problem reported by Mark D. Baushke in
17620         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
17621         * lib/getdate.y (SHR): Likewise.
17622         (tm_diff): Use it.
17623         * lib/strftime.c (SHR): Likewise.
17624         (tm_diff): Use it.
17625         * lib/quotearg.c (struct quoting_options): Use unsigned int for
17626         quote_these_too, so that right shifts are well defined.  All uses
17627         changed.
17628
17629 2004-11-10  Jim Meyering  <jim@meyering.net>
17630
17631         Ensure that no close failure goes unreported.
17632         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
17633         return early when it seems there's nothing to flush.
17634         Don't include __fpending.h.
17635
17636 2004-11-10  Jim Meyering  <jim@meyering.net>
17637
17638         * modules/closeout (Depends-on): Remove fpending.
17639
17640 2004-11-10  Jim Meyering  <jim@meyering.net>
17641
17642         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
17643
17644 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17645
17646         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
17647         gl_FUNC_STRFTIME.
17648         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
17649         and AC_REQUIRE when possible, to avoid duplicate checks.
17650         Check for <wchar.h>.
17651
17652 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
17653
17654         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
17655
17656 2004-11-09  Bruno Haible  <bruno@clisp.org>
17657
17658         * m4/sockpfaf.m4: New file.
17659
17660 2004-11-05  Bruno Haible  <bruno@clisp.org>
17661
17662         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
17663         Reported by Mark D. Baushke <mdb@cvshome.org>.
17664
17665 2004-11-04  Bruno Haible  <bruno@clisp.org>
17666
17667         2004-09-11  Bruno Haible  <bruno@clisp.org>
17668                 * allocsa.valgrind: New file.
17669         2004-02-06  Bruno Haible  <bruno@clisp.org>
17670                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
17671                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
17672                 Reported by Christopher Seip <chris.seip@hp.com>.
17673
17674 2004-11-04  Bruno Haible  <bruno@clisp.org>
17675
17676         * modules/allocsa (Files): Add lib/allocsa.valgrind.
17677         (Makefile.am): Distribute it.
17678
17679 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
17680
17681         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
17682         with errno == ERANGE if the buffer is too small.
17683         Problem reported by Mark D. Baushke.
17684
17685 2004-11-03  Albert Chin  <china@thewrittenword.com>
17686             Paul Eggert  <eggert@cs.ucla.edu>
17687
17688         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
17689         equivalent, substitute $ac_type for equivalent type rather than
17690         blindly using uint32_t *always* which won't work if uint32_t is not
17691         available.  Define _UINT32_T to work around typedef of uint32_t if
17692         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
17693         2.5.1.
17694
17695 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17696
17697         * m4/jm-macros.m4: Sync from coreutils.
17698         (gl_MACROS): Check for mbrlen, for pathchk.
17699         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
17700
17701 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17702
17703         * lib/xreadlink.c (MAXSIZE): New macro.
17704         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
17705         size does not exceed MAXSIZE.  Avoid cast.
17706         As suggested by Mark D. Baushke in
17707         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
17708         if readlink fails with buffer size just under MAXSIZE, try again
17709         with MAXSIZE.
17710
17711 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
17712
17713         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
17714
17715 2004-11-02  Derek R. Price  <derek@ximbiot.com>
17716         and  Paul Eggert  <eggert@cs.ucla.edu>
17717
17718         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
17719         (get_date): Overparenthesize to avoid GCC warning.
17720
17721 2004-11-02  Bruno Haible  <bruno@clisp.org>
17722
17723         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
17724         returns void.
17725
17726 2004-11-02  Bruno Haible  <bruno@clisp.org>
17727
17728         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
17729         function returns void.
17730
17731 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17732
17733         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
17734         fflush_unlocked, flockfile, funlockfile, funlockfile,
17735         fputs_unlocked, putc_unlocked.
17736
17737 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
17738
17739         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17740         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
17741         already declared.
17742
17743 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17744
17745         * modules/getdate (Files): Add doc/getdate.texi.
17746         (Depends-on): Add setenv, xalloc.
17747
17748 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17749
17750         * lib/getdate.y: Add support for TZ="foo" within a date string.
17751         Fix some bugs near time_t boundaries.  Reject dates with
17752         out-of-range components, e.g., "Sept 31".
17753         Include <stdlib.h>, "setenv.h", "xalloc.h".
17754         (ISDIGIT_LOCALE): Remove; unused.
17755         Note that the TZ and time functions used here are not reentrant.
17756         (mktime_ok, get_tz): New functions.
17757         (TZBUFSIZE): New constant.
17758         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
17759         This requires that we sometimes generate our own TZ="XXX..." setting.
17760
17761 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
17762
17763         * doc/getdate.texi: New file, from coreutils with modifications for
17764         the new TZ parsing.
17765
17766 2004-10-27  Derek R. Price  <derek@ximbiot.com>
17767
17768         * lib/mktime.c (not_equal_tm): Remove redundant check.
17769
17770 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17771
17772         * modules/regex (lib_SOURCES): Add regex.c.
17773         Reported by James Youngman in
17774         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
17775
17776 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
17777
17778         * lib/getdate.y: Use Bison 1.875 features, and some minor
17779         code cleanups.  This change does not affect semantics.
17780         Don't include <stdlib.h>; no longer needed.
17781         Don't include unlocked-io.h; only the "#if TEST" code uses
17782         stdio, and performance isn't crucial there.
17783         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
17784         Bison 1.875 features as described below.
17785         All uses of "PC." replaced by "pc->".
17786         (YYSTYPE): Add a forward declaration.
17787         (yylex, yyerror): Use full prototypes in forward decls.
17788         Use "%pure-parser" rather than obsolescent "%pure_parser".
17789         Use %parse-param and %lex-param instead of obsolescent
17790         YYPARSE_PARAM and YYLEX_PARAM.
17791         (meridian_table, month_and_day_table, time_units_table,
17792         relative_time_table, time_zone_table, military_table,
17793         lookup_zone, lookup_word, get_date):
17794         Use NULL instead of 0 where appropriate.
17795         (to_hour): Avoid abort (), to avoid a dependency on
17796         stdlib.h.
17797         (yyerror, yylex): Now accepts parser_control * arg.
17798         (main) [TEST]: Use '\0' rather than 0 for char.
17799
17800 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17801
17802         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
17803
17804 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
17805
17806         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
17807         It's now the caller's responsibility to handle the case where
17808         !HAVE_GETPAGESIZE && !defined getpagesize.
17809
17810         * lib/mktime.c (leapyear): Arg is long int, not int.
17811
17812 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
17813
17814         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
17815
17816 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
17817
17818         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
17819         missing.  Problem reported by James Youngman.
17820
17821 2004-10-16  Simon Josefsson  <jas@extundo.com>
17822
17823         * gnulib-tool: Fix comments.  Fix parse problem.
17824         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
17825
17826 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
17827
17828         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
17829         implementation of getopt_long.  Problem reported by Alexander Taler in:
17830         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
17831
17832 2004-10-15  Bruno Haible  <bruno@clisp.org>
17833
17834         * gnulib-tool: Untabify. Initialize supplied_libname.
17835         (func_usage): More homogenous output.
17836         (func_modules_transitive_closure, func_modules_to_filelist,
17837         func_emit_lib_Makefile_am): New functions.
17838         (func_import): New function, extracted from big case statement. Use
17839         func_get_license, func_modules_transitive_closure,
17840         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
17841         opt_lgpl. Don't use test -a, as it's not portable.
17842         (func_create_testdir): Use func_modules_transitive_closure,
17843         func_modules_to_filelist, func_emit_lib_Makefile_am.
17844
17845 2004-10-15  Bruno Haible  <bruno@clisp.org>
17846
17847         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
17848
17849 2004-10-15  Bruno Haible  <bruno@clisp.org>
17850
17851         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
17852         the portions belonging to each module.
17853         Suggested by Derek Robert Price <derek@ximbiot.com>.
17854
17855 2004-10-12  Simon Josefsson  <jas@extundo.com>
17856
17857         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
17858         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
17859         to real functions.
17860
17861 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17862
17863         * modules/vsnprintf: New file.
17864
17865 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17866
17867         * m4/vsnprintf.m4: New file.
17868
17869 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
17870
17871         * lib/vsnprintf.h: New file.
17872         * lib/vsnprintf.c: New file.
17873
17874 2004-10-11  Bruno Haible  <bruno@clisp.org>
17875
17876         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
17877         vsnprintf.
17878
17879 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17880
17881         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
17882
17883 2004-10-07  Bruno Haible  <bruno@clisp.org>
17884
17885         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
17886         fits into the provided buffer.
17887
17888 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17889
17890         * lib/diacrit.c, diacrit.h: Add GPL notice.
17891
17892         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
17893         notice.
17894         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
17895         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
17896         This avoids a potential constant-folding bug.
17897
17898 2004-10-05  Bruno Haible  <bruno@clisp.org>
17899
17900         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
17901         for the declaration of strsep.
17902
17903 2004-10-05  Bruno Haible  <bruno@clisp.org>
17904
17905         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
17906
17907 2004-10-04  Simon Josefsson  <jas@extundo.com>
17908
17909         * modules/memmem: New file.
17910         * tests/test-memmem.c: New file.
17911         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
17912
17913 2004-10-04  Simon Josefsson  <jas@extundo.com>
17914
17915         * m4/memmem.m4: New file.
17916
17917 2004-10-04  Simon Josefsson  <jas@extundo.com>
17918
17919         * lib/memmem.h: New file.
17920         * lib/memmem.c: New file, taken from glibc.
17921
17922 2004-10-04  Simon Josefsson  <jas@extundo.com>
17923
17924         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
17925         '#ifdef USE_UNLOCKED_IO'.
17926
17927 2004-10-04  Simon Josefsson  <jas@extundo.com>
17928
17929         * config/srclist.txt: Add memmem from glibc.
17930
17931 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17932
17933         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
17934
17935         * modules/argmatch, modules/argp, modules/closeout, modules/error,
17936         modules/exclude, modules/getdate, modules/getline,
17937         modules/getndelim2, modules/getpass, modules/getpass-gnu,
17938         modules/getusershell, modules/linebuffer, modules/md5,
17939         modules/mountlist, modules/posixtm, modules/readtokens,
17940         modules/readutmp, modules/regex, modules/sha1,
17941         modules/version-etc, modules/yesno:
17942         Remove dependency on unlocked-io.
17943
17944 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17945
17946         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
17947
17948         * m4/unlocked-io.m4: Add copyright notice.
17949         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
17950
17951 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17952
17953         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
17954         * lib/xmalloc.c (xmemdup): Likewise.
17955         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
17956         XFREE): Remove these long-obsolescent macros.
17957         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
17958         * lib/xstrdup.c: Remove.
17959
17960         * lib/regex.c (re_comp): Cast gettext return value to char *,
17961         Problem reported by Martin Neitzel via Mark D. Baushke.
17962
17963 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
17964
17965         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
17966         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
17967         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
17968         regex.c, sha1.c, version-etc.c, yesno.c:
17969         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
17970         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
17971         the includer's responsibility.
17972
17973         Sync from coreutils.
17974
17975         * lib/modechange.c (mode_compile): Don't decrement a pointer that
17976         points to the start of a string, as the C Standard says the
17977         resulting behavior is undefined.
17978
17979         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
17980         simple -> simple_backups, numbered_existing ->
17981         numbered_existing_backups, numbered -> numbered_backups
17982         to avoid shadowing problems.  All uses changed.
17983         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
17984         * lib/backupfile.c (check_extension, numbered_backup):
17985         Rename locals to avoid shadowing 'basename'.
17986         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
17987         once.
17988
17989         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
17990         * lib/.cvsignore: Add getopt.h.
17991
17992 2004-10-04  Bruno Haible  <bruno@clisp.org>
17993
17994         * modules/README: New file.
17995         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
17996         not a module.
17997
17998 2004-10-02  Jim Meyering  <jim@meyering.net>
17999
18000         * lib/dirfd.h, getpagesize.h: Add copyright notice.
18001
18002 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18003
18004         * modules/strsep: New file.
18005
18006 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18007
18008         * m4/strsep.m4: New file.
18009
18010 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
18011
18012         * lib/strsep.h: New file.
18013         * lib/strsep.c: New file.
18014
18015 2004-10-01  Simon Josefsson  <jas@extundo.com>
18016
18017         * lib/snprintf.c (snprintf): Handle size==0.
18018
18019 2004-10-01  Simon Josefsson  <jas@extundo.com>
18020             Bruno Haible  <bruno@clisp.org>
18021
18022         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
18023         (snprintf): Declare 'args'.
18024
18025 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
18026
18027         * lib/snprintf.c: Remove comments as to why each header is needed.
18028
18029 2004-10-01  Bruno Haible  <bruno@clisp.org>
18030
18031         * MODULES.html.sh: Add strsep.
18032
18033 2004-09-30  Simon Josefsson  <jas@extundo.com>
18034
18035         * modules/snprintf: New file.
18036
18037 2004-09-30  Simon Josefsson  <jas@extundo.com>
18038
18039         * m4/snprintf.m4: New file.
18040
18041 2004-09-30  Simon Josefsson  <jas@extundo.com>
18042
18043         * lib/snprintf.h, lib/snprintf.c: New files.
18044
18045 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
18046
18047         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
18048         (hol_entry_help): Never translate an empty string.
18049         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
18050         * lib/argp.h (OPTION_NO_TRANS): New option.
18051
18052 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18053
18054         * modules/argp (Maintainer): Replace Simon Josefsson
18055         by Sergey Poznyakoff.
18056
18057 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18058
18059         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
18060         changes merged back into glibc.
18061
18062 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
18063
18064         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
18065
18066 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18067
18068         * lib/xvasprintf.c: Include xalloc.h.
18069         (xvasprintf): Use xalloc_die, not xmalloc_die.
18070
18071 2004-09-29  Bruno Haible  <bruno@clisp.org>
18072
18073         * modules/alloca-opt: New file, derived from modules/alloca.
18074         * modules/allocsa: Depend on alloca-opt instead of alloca.
18075         * modules/setenv: Likewise.
18076         * modules/vasnprintf: Likewise.
18077         * MODULES.html.sh: Add alloca-opt.
18078
18079 2004-09-28  Simon Josefsson  <jas@extundo.com>
18080
18081         * gnulib-tool: New parameter --lgpl, to asseert that modules are
18082         LGPL, and to replace license template from GPL to LGPL.
18083
18084 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18085
18086         * modules/dummy: Change license to LGPL.
18087
18088 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
18089
18090         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
18091
18092 2004-09-24  Simon Josefsson  <jas@extundo.com>
18093
18094         * modules/minmax (License): Change from GPL to LGPL.
18095
18096 2004-09-23  Simon Josefsson  <jas@extundo.com>
18097
18098         * gnulib-tool (--import): Typo.
18099
18100 2004-09-23  Simon Josefsson  <jas@extundo.com>
18101
18102         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
18103
18104 2004-09-22  Bruno Haible  <bruno@clisp.org>
18105
18106         * modules/*: Add 'License' field.
18107         * gnulib-tool: Accept --extract-license option.
18108         (func_get_license): New function.
18109
18110 2004-09-21  Bruno Haible  <bruno@clisp.org>
18111
18112         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
18113         Reported by Simon Josefsson.
18114
18115 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18116
18117         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
18118         gl_AC_TYPE_LONG_LONG.
18119
18120 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
18121
18122         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
18123
18124 2004-09-18  Simon Josefsson  <jas@extundo.com>
18125         and  Paul Eggert  <eggert@cs.ucla.edu>
18126
18127         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
18128         calls with autoreconf.  Define GL_LIB.
18129
18130 2004-09-14  Karl Berry  <karl@gnu.org>
18131
18132         * config/srclist.txt: unsync setenv.c, sigh.
18133
18134 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18135
18136         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
18137         Problem reported by Bruno Haible in:
18138         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
18139
18140 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
18141
18142         * config/srclist.txt: Comment out argp-pvh.c.
18143
18144 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
18145
18146         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
18147         in case some system header has #define'd it.  Problem reported by
18148         Soeren D. Schulze in
18149         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
18150
18151 2004-09-09  Karl Berry  <karl@gnu.org>
18152
18153         * regex.[ch]: delete from the root.  These were supposed to be
18154                 synced with emacs cvs, but this has not happened for about
18155                 a year, and anyway nothing else uses emacs regex.[ch].
18156                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
18157                 lib/regex[.ch] is untouched.
18158
18159 2004-09-09  Bruno Haible  <bruno@clisp.org>
18160
18161         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
18162
18163 2004-09-09  Bruno Haible  <bruno@clisp.org>
18164
18165         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
18166         modifications.
18167         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
18168
18169 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18170
18171         * modules/xvasprintf: New file.
18172         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
18173
18174 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
18175
18176         * lib/xvasprintf.h: New file.
18177         * lib/xvasprintf.c: New file.
18178         * lib/xasprintf.c: New file.
18179
18180 2004-09-08  Bruno Haible  <bruno@clisp.org>
18181
18182         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
18183
18184 2004-09-08  Bruno Haible  <bruno@clisp.org>
18185
18186         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
18187         length is > INT_MAX.
18188         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
18189         more.
18190
18191 2004-09-08  Bruno Haible  <bruno@clisp.org>
18192
18193         * lib/stdint_.h: New file, taken from GNU clisp.
18194
18195 2004-09-08  Bruno Haible  <bruno@clisp.org>
18196             Oskar Liljeblad  <oskar@osk.mine.nu>
18197
18198         * modules/stdint: New file.
18199         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
18200
18201 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18202
18203         Import from coreutils.
18204         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
18205         strings on unbounded length.  alloca's performance benefits aren't
18206         that important here.
18207         (V_STRDUP): Remove.
18208         (parse_with_separator): New function, with most of the internals
18209         of the old parse_user_spec.  Allow user to omit both user and group,
18210         for compatibility with FreeBSD.
18211         Clone only the user name, not the entire spec.
18212         Do not set *uid, *gid unless entirely successful.
18213         Avoid memory leak in some failing cases.
18214         Fix regression for USER.GROUP reported by Dmitry V. Levin in
18215         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
18216         (parse_user_spec): Rewrite to use parse_with_separator.
18217
18218 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18219
18220         * modules/userspec: Don't depend on alloca.
18221
18222 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
18223
18224         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
18225
18226 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
18227
18228         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
18229         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
18230         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
18231
18232 2004-08-16  Simon Josefsson  <jas@extundo.com>
18233
18234         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
18235         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
18236         Add --dry-run for --import.
18237         Let user provided command line parameters override configure.ac
18238         settings.
18239
18240 2004-08-12  Simon Josefsson  <jas@extundo.com>
18241
18242         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
18243         as discussed with Paul Eggert in threads rooted at
18244         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
18245         and
18246         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
18247         Before, the test was empty, and relied on ELIDE_CODE in source
18248         code.)
18249         (gl_PREREQ_GETOPT): New macro.
18250         (gl_GETOPT): Use them.
18251
18252 2004-08-12  Simon Josefsson  <jas@extundo.com>
18253
18254         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
18255         * lib/getopt_.h: Renamed from getopt.h.
18256
18257 2004-08-12  Simon Josefsson  <jas@extundo.com>
18258
18259         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
18260         Change default library name from libfoo to libgnu.
18261         Now, if you have a configure.ac that says:
18262                 gl_SOURCE_BASE(gl)
18263                 gl_M4_BASE(gl/m4)
18264                 gl_MODULES(error getopt etcetera)
18265                 gl_INIT
18266         you can import all you need by running:
18267                 ../gnulib/gnulib-tool --import
18268
18269         * modules/getopt (Files): Rename getopt.h to getopt_.h.
18270         (Makefile.am): Rewrite, use logic from argz.
18271         (Include): Use <getopt.h> instead of "getopt.h".
18272
18273 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18274
18275         * modules/argp (Files): Add m4/unlocked-io.m4.
18276         (Depends-on): Add extensions.
18277
18278 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18279
18280         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
18281         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
18282         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
18283         Check for program_invocation_name, program_invocation_short_name,
18284         flockfile, funlockfile, features.h, _getopt_long_only_r.
18285
18286 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18287
18288         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
18289         its complicated substitute.
18290         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
18291         and program_invocation_name.
18292         (__argp_basename) [!_LIBC]: Remove; the only use was
18293         replaced by its body.
18294         (__argp_short_program_name): Change condition from
18295         !defined __argp_short_program_name to
18296         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
18297         to match argp-namefrob.h.
18298         (__argp_failure): Don't assume strerror_r returns char *.
18299         * lib/argp-parse.c (N_): Define unconditionally.
18300         (argp_default_options): Fill out initializers with 0 to avoid
18301         gcc warnings.
18302
18303 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
18304
18305         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
18306         getopt1.c.
18307
18308 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18309
18310         Merge from coreutils.
18311
18312         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
18313
18314         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
18315         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
18316
18317 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18318
18319         Merge from coreutils.
18320
18321         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
18322         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
18323         for Reliant Unix 5.43.
18324
18325         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
18326         (union fooround): Use uintmax_t, not long int.
18327         The rest is a merge from libc:
18328         [defined _LIBC]: Include <shlib-compat.h>.
18329         (_obstack) [defined _LIBC]: Remove after 2.3.4.
18330
18331         * lib/settime.c (settime): Recode to avoid warning with
18332         Sun Forte C 6U2.
18333
18334         * lib/strverscmp.c: Convert to UTF-8.
18335
18336 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
18337
18338         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18339         m4/uintmax_t.m4.
18340
18341 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18342
18343         * modules/xalloc-die: New file.
18344         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
18345
18346         * modules/md5 (Files): Add m4/uint32_t.m4.
18347         * modules/sha1: Renamed from modules/sha.
18348         (Files):
18349         Rename lib/sha.h to lib/sha1.h.
18350         Rename lib/sha.c to lib/sha1.c.
18351         Rename m4/sha.m4 to m4/sha1.m4.
18352         (lib_SOURCES): Likewise.
18353         (configure.ac): Rename gl_SHA to gl_SHA1.
18354         (Include): sha.h -> sha1.h.
18355
18356 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18357
18358         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
18359         * m4/sha1.m4: Renamed from sha.m4.
18360         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
18361
18362 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
18363
18364         * lib/obstack.h (obstack_empty_p):
18365         Don't assume that chunk->contents is suitably aligned.
18366         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
18367         Likewise. Problem reported by Benno in
18368         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
18369
18370         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
18371         readable.  This could be improved further but it'd take some work.
18372
18373 2004-08-08  Simon Josefsson  <jas@extundo.com>
18374
18375         * modules/xgethostname (Depends-on): Remove exit and error (not
18376         used).
18377
18378         * modules/getpass-gnu: Add getpass.h.
18379         (Depends-on): Add stdbool.
18380         * modules/getpass: Add getpass.h.
18381
18382 2004-08-08  Simon Josefsson  <jas@extundo.com>
18383
18384         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
18385         Check getpass declaration.
18386
18387 2004-08-08  Simon Josefsson  <jas@extundo.com>
18388
18389         * lib/xgethostname.c: Don't include error.h (not used).
18390
18391         * lib/getpass.h: Add.
18392         * lib/getpass.c: Include getpass.h first.
18393
18394 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
18395
18396         * lib/xalloc-die.c: New file.
18397         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
18398         All uses removed.
18399         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
18400         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
18401         xalloc-die.c.
18402         (_, N_, xalloc_die): Move to xalloc-die.c.
18403         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
18404         so that we needn't mess with xalloc_msg_memory_exhausted.
18405
18406         * lib/sha1.h: Renamed from sha.h.
18407         (SHA1_H): Renamed from _SHA_H.
18408         (sha1_ctx): Renamed from sha_ctx.
18409         (sha1_init_ctx): Renamed from sha_init_ctx.
18410         (sha1_process_block): Renamed from sha_process_block.
18411         (sha1_process_bytes): Renamed from sha_process_bytes.
18412         (sha1_finish_ctx): Renamed from sha_finish_ctx.
18413         (sha1_read_ctx): Renamed from sha_read_ctx.
18414         (sha1_stream): Renamed from sha_stream.
18415         (sha1_buffer): Renamed from sha_buffer.
18416         * lib/sha1.c: Likewise; renamed from sha.c.
18417         Do not include <sys/types.h>.
18418         Include <stddef.h> rather than <stdlib.h>.
18419
18420 2004-08-08  Bruno Haible  <bruno@clisp.org>
18421
18422         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
18423         FILESYSTEM_PREFIX_LEN.
18424         * lib/progreloc.c: Likewise.
18425         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
18426
18427 2004-08-06  Simon Josefsson  <jas@extundo.com>
18428
18429         * modules/progname (Depends-on): Don't depend on stdbool.
18430
18431 2004-08-06  Simon Josefsson  <jas@extundo.com>
18432
18433         * modules/getsubopt: New file.
18434         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
18435         getsubopt.
18436
18437 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18438
18439         More merge from coreutils.
18440
18441         * m4/utimens.m4, m4/utimecmp.m4: New files.
18442         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
18443         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
18444         prereq.m4, sha.m4: Import changes from coreutils.
18445
18446 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18447
18448         More merge from coreutils.
18449         * modules/raise, modules/readtokens0, modules/utimens:
18450         * modules/utimecmp, module/xnanosleep: New files.
18451         * modules/strftime: Add lib/strftime.h.
18452         Change include from <time.h> to "strftime.h".
18453         * modules/yesno: Add lib/yesno.h.
18454         * modules/backupfile: Remove lib/addext.c.
18455         * modules/euidaccess: Add stat-macros.h.
18456         * modules/canonicalize, modules/euidaccess,
18457         modules/filemode, modules/lchown, modules/makepath,
18458         modules/rmdir, modules/stat: Likewise.
18459
18460 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
18461
18462         Merge from tar.
18463         * lib/argp-help.c (make_hol, hol_append): Don't assume that
18464         SIZE_MAX is a valid preprocessor constant.
18465         (__argp_basename): Change from "#ifndef _LIBC"
18466         to "#ifndef __argp_short_program_name", so that
18467         we don't compile these functions for tar.
18468
18469         More merges from coreutils.
18470         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
18471         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
18472         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
18473         * lib/addext.c: Remove; no longer needed.
18474         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
18475         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
18476         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
18477         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
18478         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
18479         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
18480         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
18481         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
18482         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
18483         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
18484         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
18485         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
18486         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
18487         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
18488         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
18489         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
18490         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
18491         Import changes from coreutils.
18492
18493 2004-08-05  Simon Josefsson  <jas@extundo.com>
18494
18495         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
18496
18497 2004-08-05  Simon Josefsson  <jas@extundo.com>
18498
18499         * m4/getsubopt.m4: New file.
18500
18501 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18502
18503         Merge from coreutils.
18504
18505         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
18506         * m4/getcwd-path-max.m4: New files.
18507
18508         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
18509         FILESYSTEM_PREFIX_LEN ->
18510         FILE_SYSTEM_PREFIX_LEN.
18511         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
18512         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
18513         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
18514         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
18515
18516         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
18517         prerequisite modules now handle the DOS stuff.
18518         Don't check for unistd.h.
18519
18520 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18521
18522         Merge from coreutils.
18523
18524         * lib/.gdb-history: Remove; this doesn't belong here.
18525
18526         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
18527         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
18528         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
18529         * lib/getcwd.c: New files.
18530
18531         * lib/dirname.h: Include <stdbool.h>.
18532         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
18533         for consistency with POSIX terminology.  All uses changed.
18534         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
18535         (strip_trailing_slashes): Use bool for booleans.
18536         * lib/stripslash.c (strip_trailing_slashes): Likewise.
18537
18538         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
18539         sometimes returns a positive errno value even when it succeeds.
18540         (print_errno_message) [!LIBC]: Fall back on strerror if
18541         __strerror_r fails.
18542
18543         * lib/path-concat.c (mempcpy): Don't define if a system header defines
18544         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
18545         (longest_relative_suffix): New function.
18546         (path_concat): Use it.  Assume first argument is not NULL.
18547         Port to DOS.  Omit redundant separators.
18548         Report an error instead of returning NULL.
18549         Use mempcpy instead of memcpy.
18550         (xpath_concat): Remove: not declared or used.
18551
18552         * lib/same.h: Include <stdbool.h>
18553         (same_name): Return bool, not int.
18554         * lib/same.c (same_name): Likewise.
18555         (errno): Don't declare; we assume C89 or better now.
18556
18557         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
18558         if not already defined.
18559
18560         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
18561         * lib/dup-safer.c (errno): Likewise.
18562
18563 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
18564
18565         Merge from coreutils.
18566         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
18567         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
18568         * modules/path-concat: Don't depend on strdup.
18569
18570 2004-08-03  Simon Josefsson  <jas@extundo.com>
18571
18572         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
18573         * lib/progname.h: Don't include stdbool.h.
18574
18575 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18576
18577         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
18578         * MODULES.html.sh (func_all_modules): Remove fatal.
18579
18580 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18581
18582         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
18583
18584 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
18585
18586         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
18587         working.
18588
18589 2004-08-02  Simon Josefsson  <jas@extundo.com>
18590
18591         * lib/getsubopt.h: New file, with comments from Bruno Haible.
18592         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
18593         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
18594
18595 2004-08-01  Simon Josefsson  <jas@extundo.com>
18596
18597         * lib/xgetdomainname.c: Include stdlib.h, for free().
18598
18599 2004-07-19  Bruno Haible  <bruno@clisp.org>
18600
18601         * MODULES.html.sh (func_all_modules): Add dummy.
18602
18603 2004-07-16  Simon Josefsson  <jas@extundo.com>
18604
18605         * modules/dummy: New file.
18606
18607 2004-07-16  Simon Josefsson  <jas@extundo.com>
18608
18609         * lib/dummy.c: New file.
18610
18611 2004-07-16  Bruno Haible  <bruno@clisp.org>
18612
18613         * lib/backupfile.h: Add extern "C" for C++.
18614         * lib/closeout.h: Likewise.
18615         * lib/copy-file.h: Likewise.
18616         * lib/findprog.h: Likewise.
18617         * lib/full-write.h: Likewise.
18618         * lib/pathname.h: Likewise.
18619         * lib/progname.h: Likewise.
18620         * lib/stpcpy.h: Likewise.
18621         * lib/stpncpy.h: Likewise.
18622         * lib/strcase.h: Likewise.
18623         * lib/strstr.h: Likewise.
18624         * lib/xalloc.h: Likewise.
18625
18626         * lib/mbswidth.h: Add extern "C" for C++.
18627         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
18628
18629 2004-07-13  Robert Millan  <robertmh@gnu.org>
18630
18631         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
18632
18633 2004-07-09  Simon Josefsson  <jas@extundo.com>
18634
18635         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
18636         failed without this.)
18637
18638 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18639
18640         * modules/chown (Files): Add lib/fchown-stub.c, since
18641         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
18642
18643 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
18644
18645         * lib/fchown-stub.c: New file.
18646
18647 2004-06-24  Jim Meyering  <jim@meyering.net>
18648
18649         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
18650
18651 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18652
18653         * modules/argz: Omit "#include".
18654
18655         * MODULES.html.sh (func_all_modules): Add calloc, to match
18656         2004-06-01 addition of calloc module.
18657
18658 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18659
18660         * m4/argz.m4: New file, which is autoupdated from libtool.
18661
18662 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18663
18664         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
18665         libtool.
18666
18667 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
18668
18669         * config/srclist-update: Don't insist on "USA." before the
18670         close-comment, as libtool omits the period and puts the */ on a
18671         separate line.
18672         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
18673         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
18674
18675 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
18676
18677         * modules/argz: New file.
18678         * MODULES.html.sh (func_all_modules): Add argz.
18679
18680 2004-06-12  Jim Meyering  <jim@meyering.net>
18681         and  Paul Eggert  <eggert@cs.ucla.edu>
18682
18683         * modules/hash (Files): Add lib/xalloc.h.
18684         * modules/pipe (Depends-on): Add wait-process.
18685         * modules/stat (Depends-on): Add xalloc.
18686         * modules/userspec (Files): Add lib/userspec.h.
18687         * modules/xstrto
18688
18689         Upgrade from gettext-0.13.
18690         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
18691         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
18692         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
18693
18694 2004-06-10  Jim Meyering  <jim@meyering.net>
18695
18696         * lib/calloc.c: New file.
18697
18698 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
18699
18700         * lib/getdate.y (yylex): Allow space between sign and number.
18701         Problem reported by Dan Jacobson.
18702
18703 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18704
18705         Merge from coreutils CVS.
18706
18707         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
18708         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
18709         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
18710         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
18711         xstrtol.m4: Fix copyright date and/or serial number.
18712
18713         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
18714         See if we need an fchown replacement.
18715         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
18716         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
18717         and use the replacement function if we detect either defect.
18718
18719         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
18720         gl_UTIMECMP.
18721
18722 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
18723         and  Jim Meyering  <jim@meyering.net>
18724
18725         Merge from coreutils CVS.
18726
18727         * lib/stat-macros.h: New file, with contents from file-type.h
18728         and coreutils' system.h.
18729         * lib/file-type.c: Include "stat-macros.h".
18730         * lib/file-type.h (file_type): Move all macro definitions to new file,
18731         stat-macros.h.
18732
18733         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
18734         Wrap old code with this conditional.
18735         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
18736         function that does not dereference symlinks.
18737         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
18738
18739         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
18740         dependency problems.
18741         (xreadlink): Accept new arg SIZE, for efficiency.
18742         All decls and uses changed.
18743         * lib/xreadlink.h: Include <stddef.h>, for size_t.
18744
18745         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
18746         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
18747
18748         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
18749         sysexits.h.
18750
18751 2004-06-01  Jim Meyering  <jim@meyering.net>
18752
18753         * m4/calloc.m4: New file.
18754
18755 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
18756
18757         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
18758         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
18759         Also, fix a typo in a diagnostic.
18760
18761 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18762
18763         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
18764         or AC_FUNC_REALLOC.
18765
18766 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
18767
18768         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
18769         macros to be defined.
18770         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
18771         the allocator returns NULL because the requested size is zero.
18772
18773 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
18774
18775         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
18776         var.  Add comment explaining why libc still defines it.  This
18777         merges the following patch from glibc:
18778         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
18779
18780 2004-05-20  Andreas Schwab  <schwab@suse.de>
18781
18782         * m4/free.m4: Replace free if it not known to work, not the other
18783         way round.
18784
18785 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
18786
18787         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
18788         present in glibc since revision 1.1 of this file.
18789         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
18790         obstack_alignment_mask, obstack_alloc, obstack_base,
18791         obstack_blank, obstack_blank_fast, obstack_chunk_size,
18792         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
18793         obstack_grow0, obstack_init, obstack_int_grow,
18794         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
18795         obstack_next_free, obstack_object_size, obstack_ptr_grow,
18796         obstack_ptr_grow_fast, obstack_room): Remove declarations of
18797         nonexistent functions.
18798
18799 2004-05-18  Karl Berry  <karl@gnu.org>
18800
18801         * config/srclist.txt: break link for vasnprintf.c.
18802
18803 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18804
18805         Port obstack to the AS/400, where pointers are 16 bytes wide and
18806         you cannot cast an integer to a valid pointer.  This patch is
18807         currently waiting to be integrated into glibc; see
18808         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
18809
18810         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
18811         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
18812         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
18813         (struct obstack): temp member is now a union of a pointer and
18814         an integer, instead of an integer.  All integer uses changed.
18815         This does not affect the physical layout of struct obstack,
18816         except on hosts (like the AS/400) where the size or alignment of
18817         void * is greater than that of ptrdiff_t.
18818         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
18819         __STDC__)]: Store temporary in pointer member of union, not
18820         integer member.
18821         * lib/obstack.c: Include <stddef.h>, for offsetof.
18822         (struct fooalign): Remove; it doesn't need a name.
18823         (union fooround): Change double to long double, and add void *.
18824         (DEFAULT_ALIGNMENT): Use offsetof to compute.
18825         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
18826         not a macro.  Hence the values are always int; so remove all
18827         casts-to-int in uses.
18828
18829 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
18830
18831         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
18832         we can get this patch merged into glibc.
18833
18834 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18835             Paul Eggert  <eggert@cs.ucla.edu>
18836
18837         * m4/argp: Depend on alloca.
18838
18839 2004-05-17  Derek R. Price  <derek@ximbiot.com>
18840             Paul Eggert  <eggert@cs.ucla.edu>
18841
18842         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
18843         freecoding.
18844
18845 2004-05-17  Bruno Haible  <bruno@clisp.org>
18846
18847         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
18848         precision that consists of a '.' followed by an empty digit string.
18849         Patch by Tor Lillqvist <tml@iki.fi>.
18850
18851 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18852
18853         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
18854         for backward compatibility with older code.  We need our own
18855         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
18856         it under some other name, and our alloca.h will define it.
18857
18858 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
18859             Derek Price  <derek@ximbiot.com>
18860
18861         * lib/alloca.c: Include <alloca.h>, to get our interface.
18862         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
18863         include <alloca.h> first.  Use C89 prototype for alloca; this
18864         requires including <stddef.h> for size_t.  Use extern "C" if C++.
18865         Use #elif for simplicity, since we can assume C89 now.
18866         Don't try to source the system alloca.h since it will not be found
18867         and to prevent recursively including its replacement.
18868         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
18869         * lib/regex.c: Likewise.
18870
18871 2004-05-16  Derek Price  <derek@ximbiot.com>
18872             Paul Eggert  <eggert@cs.ucla.edu>
18873
18874         getline cleanup.  This changes the getndelim2 API: both order of
18875         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
18876         no delimiter).
18877
18878         * lib/getline.c: Don't include stddef.h or stdio.h, since our
18879         interface does that.
18880         (getline): Always use getdelim, so that we don't have two
18881         copies of this code.
18882         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
18883         if available.
18884         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
18885         (GETNDELIM2_MAXIMUM): New macro.
18886         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
18887         instead of the old practice of delim2==0.  All callers changed.
18888         Return -1 on overflow, instead of returning junk.
18889         Do not set *linesize unless allocation succeeds.
18890         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
18891         that we include sys/types.h.
18892         * lib/getnline.h: Likewise.
18893         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
18894         (getndelim2): Reorder arguments.
18895         * lib/getnline.c (getnline, getndelim):
18896         Don't discard the NMAX argument.
18897         (getnline): Invoke getndelim, to avoid code duplication.
18898         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
18899         of (size_t) -1 by callers of the getnline family.
18900
18901 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18902
18903         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
18904         Check for gettimeofday.
18905         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
18906         Check for settimeofday, stime.
18907
18908 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
18909
18910         * lib/nanosleep.c (suspended): Change its type from int to
18911         sig_atomic_t volatile.
18912         (first_call): Make it private to rpl_nanosleep, and have it
18913         be zero initially as that's a bit faster.
18914         (my_usleep): Round up fractional times instead of truncating them,
18915         as this is the usual meaning for 'sleep'.
18916
18917         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
18918         doesn't work.
18919         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
18920         (ENOSYS): Define if not defined.
18921         (settime): Fall back on stime if it exists and settimeofday fails.
18922         But don't bother with fallbacks if a method fails with errno == EPERM.
18923
18924 2004-05-11  Jim Meyering  <jim@meyering.net>
18925
18926         Prior to this change, the save_cwd caller required read access to the
18927         current directory on most systems (ones with the fchdir function).
18928
18929         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
18930         fails, try write-only, and finally, resort to using xgetcwd.
18931
18932 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
18933
18934         * lib/obstack.c, obstack.h: Import changes from libc.
18935
18936 2004-04-28  Bruno Haible  <bruno@clisp.org>
18937
18938         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
18939         also implicitly appends .exe to executables.
18940         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
18941         accepts Windows pathnames.
18942         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18943         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18944         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
18945         Treat Cygwin like Windows, since it now accepts Windows pathnames.
18946         Reported by Derek Robert Price <derek@ximbiot.com>.
18947
18948 2004-04-21  Karl Berry  <karl@gnu.org>
18949
18950         * config/srclist.txt (localcharset.c): break sync.
18951
18952 2004-04-20  Paul Eggert  <eggert@twinsun.com>
18953
18954         * m4/host-os.m4: Add a copyright notice.
18955
18956 2004-04-20  Jim Meyering  <jim@meyering.net>
18957
18958         Change UTILS_ to gl_ in AC_DEFINE'd names.
18959         Change utils_- and jm_-prefixed variables, too.
18960         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
18961         UTILS_FUNC_MKDIR_TRAILING_SLASH.
18962         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
18963
18964         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
18965         Don't emit trailing blanks.
18966         Also rename jm_-prefixed variables to have gl_ prefix.
18967
18968         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
18969         Also rename jm_-prefixed variables to have gl_ prefix.
18970
18971         * m4/jm-macros.m4: Reflect the renamings.
18972         * m4/prereq.m4: Likewise.
18973
18974 2004-04-20  Jim Meyering  <jim@meyering.net>
18975
18976         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
18977         memory.
18978
18979 2004-04-20  Jim Meyering  <jim@meyering.net>
18980             Bruno Haible  <bruno@clisp.org>
18981
18982         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
18983         memory when realloc fails.
18984
18985 2004-04-19  Jim Meyering  <jim@meyering.net>
18986
18987         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
18988         now that readutmp.c may call `free (0)'.
18989
18990 2004-04-19  Bruno Haible  <bruno@clisp.org>
18991
18992         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
18993         * m4/inttypes_h.m4: Likewise.
18994         * m4/stdint_h.m4: Likewise.
18995         * m4/intmax_t.m4: Likewise.
18996         * m4/uintmax_t.m4: Likewise.
18997
18998 2004-04-18  Jim Meyering  <jim@meyering.net>
18999
19000         * m4/prereq.m4: Don't forbid jm_ prefix.
19001
19002         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
19003         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
19004         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
19005         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
19006         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
19007         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
19008         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
19009         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
19010         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
19011         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
19012         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
19013         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
19014         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
19015         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
19016         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
19017         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
19018         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
19019         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
19020         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
19021
19022 2004-04-18  Jim Meyering  <jim@meyering.net>
19023
19024         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
19025         failure, don't leak memory and do call END_UTMP_ENT.
19026
19027 2004-04-16  Jim Meyering  <jim@meyering.net>
19028
19029         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
19030         coreutils' stat program.
19031         (gl_PREREQ): Don't require jm_PREREQ_STAT.
19032
19033 2004-04-11  Paul Eggert  <eggert@twinsun.com>
19034
19035         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
19036         C89.
19037         (CHAR_BIT): Remove, since we assume C89.
19038         Include <stdint.h> if available, as per current Autoconf CVS advice.
19039
19040 2004-03-31  Jim Meyering  <jim@meyering.net>
19041
19042         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
19043         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
19044         * m4/xalloc.m4: Likewise.
19045
19046 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19047
19048         Merge from coreutils.
19049
19050         * m4/inttostr.m4: New file.
19051         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
19052         Require AM_STDBOOL_H and gl_TIMESPEC instead.
19053         Require gl_CLOCK_TIME.
19054         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
19055
19056 2004-03-30  Paul Eggert  <eggert@twinsun.com>
19057
19058         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
19059         not bool, to be more consistent with Unix conventions.
19060         Suggested by Bruno Haible.
19061
19062         Merge from coreutils.
19063
19064         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
19065         * lib/umaxtostr.c: New files.
19066
19067         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
19068         the usual <time.h> dance.
19069         (get_date): Change signature to support fractional time stamps.
19070         All callers changed.
19071         * lib/getdate.y: Include "getdate.h" first, as we can now
19072         assume C89 and don't need to worry about 'const'.
19073         Similarly, include "unlocked-io.h" near start, not in middle.
19074         Include <limits.h>.
19075         (textint.value): Use long int rather than int.
19076         (textint.digits): Use size_t rather than int.
19077         (BILLION, LOG10_BILLION): New constants.
19078         (parser_control): New member rel_ns.  Members day_ordinal,
19079         time_zone, month, day, hour, minutes, rel_year, rel_month,
19080         rel_day, rel_hour, rel_minutes, rel_seconds
19081         are now long int, not int.  Member seconds is now struct timespec,
19082         not int.  New member timespec_seen.  Members dates_seen, days_seen,
19083         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
19084         not int.
19085         (%union.intval): Now long int, not int.
19086         New member timespec.
19087         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
19088         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
19089         (spec): Now is a timespec or an item list.
19090         (timespec, items): New nonterminals.
19091         (time, rel, relunit, number, get_date):
19092         Add support for fractional seconds.
19093         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
19094         (gmtime, localtime, mktime): Remove decls; not needed with C89.
19095         (to_hour): First arg is now long int, not int.
19096         (to_year): Returns long int, not int.
19097         Don't treat year -70 like 70.
19098         (tm_diff): Returns long int, not int.
19099         (lookup_word): Use bool instead of int when appropriate.
19100         (yylex): Use size_t for count, not int.
19101         Detect overflow when parsing large integer constants.
19102         Add support for fractions.
19103         (get_date): Make pointers 'const' if possible.
19104         Use more-portable code to detect integer overflow.
19105         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
19106         Don't use ctime; it's not reliable if the year has >4 digits.
19107
19108         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
19109         This is for compatibility with BSD.
19110
19111         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
19112         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
19113         From coreutils' system.h.
19114
19115         * lib/userspec.c: Don't include "posixver.h".
19116         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
19117         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
19118         compatible extension.  Simplify code by removing a boolean int
19119         that was always nonzero if a string was nonnull.
19120
19121 2004-03-30  Jim Meyering  <jim@meyering.net>
19122
19123         Merge from coreutils.
19124
19125         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
19126         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
19127         on some systems one must include <grp.h> before it.
19128         Reported by Christian Krackowizer.
19129
19130 2004-03-30  Jim Meyering  <jim@meyering.net>
19131
19132         Merge from coreutils.
19133
19134         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
19135
19136         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
19137         an empty input stream.
19138
19139         * lib/readtokens.c: Include <stdbool.h>.
19140         (readtoken): Use `size_t' rather than int/long.
19141         All callers adjusted.
19142         Use `bool' rather than `int' where appropriate.
19143         Use memset rather than an explicit loop.
19144         Use x2nrealloc rather than xrealloc.
19145         Allow the use of `\0' as a delimiter.
19146         (readtokens): Likewise.
19147         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
19148
19149 2004-03-30  Jim Meyering  <jim@meyering.net>
19150
19151         * m4/realloc.m4: Remove file, since now it does no more than
19152         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
19153         the `configure.ac' section of module/realloc.
19154         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
19155
19156 2004-03-30  Bruno Haible  <bruno@clisp.org>
19157
19158         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
19159         nonnull.
19160
19161 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19162
19163         Merge changes to getloadavg.c from coreutils and Emacs.
19164
19165         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
19166         Define to an expression, not to the empty string.
19167         Include cloexec.h and xalloc.h.
19168         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
19169         Use set_cloexec_flag rather than rolling our own.
19170         * lib/cloexec.c, lib/cloexec.h: New files.
19171
19172 2004-03-29  Paul Eggert  <eggert@twinsun.com>
19173
19174         * m4/cloexec.m4: New file.
19175
19176 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19177
19178         * lib/getopt.h: Sync with libc CVS.
19179
19180 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19181             Bruno Haible  <bruno@clisp.org>
19182
19183         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
19184         mbswidth.
19185
19186 2004-03-18  Paul Eggert  <eggert@twinsun.com>
19187             Bruno Haible  <bruno@clisp.org>
19188
19189         * lib/mbswidth.h: Include <wchar.h> only if
19190         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
19191         <wchar.h>.
19192         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
19193
19194 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19195
19196         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
19197         Sync with libc CVS.
19198         * lib/getopt_int.h: New file, also synced from libc.
19199
19200 2004-03-09  Paul Eggert  <eggert@twinsun.com>
19201
19202         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
19203         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
19204         Bring back getopt.c, getopt.h, getopt1.c.
19205
19206 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19207
19208         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
19209         All uses changed.  Check for sa_sigaction member; this fixes
19210         a bug first reported by Jason Andrade in
19211         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19212
19213 2004-03-07  Paul Eggert  <eggert@twinsun.com>
19214
19215         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
19216         '#if' expressions.  Unlike the code it replaces, it does not
19217         depend on (defined _SC_PAGESIZE).  However, it does depend on
19218         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
19219         first reported by Jason Andrade in
19220         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
19221
19222 2004-02-25  Simon Josefsson  <jas@extundo.com>
19223
19224         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
19225
19226 2004-02-25  Simon Josefsson  <jas@extundo.com>
19227
19228         * lib/strdup.h: New file.
19229         * lib/strdup.c: Include it.
19230         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
19231         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
19232
19233 2004-02-23  Karl Berry  <karl@gnu.org>
19234
19235         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
19236         (from fencepost.gnu.org:/gd/gnuorg).
19237
19238 2004-02-23  Karl Berry  <karl@gnu.org>
19239
19240         * config/srclistvars.sh (GNUORG) [karl]: redefine.
19241         * config/srclist.txt: add maintain/standards documents.
19242
19243 2004-02-18  Bruno Haible  <bruno@clisp.org>
19244
19245         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
19246         Reported by Derek Robert Price <derek@ximbiot.com>.
19247
19248 2004-02-16  Karl Berry  <karl@gnu.org>
19249
19250         * config/mkinstalldirs, install-sh: update from automake.
19251
19252 2004-02-06  Karl Berry  <karl@gnu.org>
19253
19254         * m4/po.m4: update from gettext 0.14.1.
19255
19256 2004-02-06  Karl Berry  <karl@gnu.org>
19257
19258         * lib/config.charset: update from gettext 0.14.1.
19259
19260 2004-02-05  Paul Eggert  <eggert@twinsun.com>
19261
19262         Add comments and code, prompted by suggestions from Bruno Haible
19263         for sh-quote.
19264         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
19265         describing the enum quoting_style values.
19266         * lib/quotearg.c (quotearg_alloc): New function.
19267         (quotearg_buffer_restyled): Treat lone { and } as special.
19268         Treat = as special.  Work around bug with older shells
19269         that "see" a '\' that is really the 2nd byte of a multibyte char.
19270         Quote empty string with shell_quoting_style.
19271
19272 2004-02-03  Bruno Haible  <bruno@clisp.org>
19273
19274         * m4/pipe.m4: New file, from GNU gettext.
19275
19276 2004-02-03  Bruno Haible  <bruno@clisp.org>
19277
19278         * lib/pipe.h: New file, from GNU gettext.
19279         * lib/pipe.c: New file, from GNU gettext.
19280
19281 2004-01-27  Bruno Haible  <bruno@clisp.org>
19282
19283         * m4/execute.m4: New file, from GNU gettext.
19284
19285 2004-01-27  Bruno Haible  <bruno@clisp.org>
19286
19287         * lib/execute.h: New file, from GNU gettext.
19288         * lib/execute.c: New file, from GNU gettext.
19289         * lib/w32spawn.h: New file, from GNU gettext.
19290
19291 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19292
19293         Merge from diffutils.
19294
19295         * lib/file-type.c (file_type): Add typed memory objects.
19296         * lib/file-type.h (S_TYPEISTMO): New macro.
19297
19298         * lib/c-stack.h (c_stack_action): Remove argv argument.
19299         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
19300         (die): Don't calculate message unless segv_action returns.
19301         (get_stack_location, min_address_from_argv, max_address_from_argv,
19302         volatile stack_base, volatile_stack_size): Remove.
19303         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
19304         that every segmentation violation is a stack overflow.  (Ouch!)
19305         See Debian bug 136249 (still outstanding) for more info about why
19306         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
19307
19308 2004-01-24  Paul Eggert  <eggert@twinsun.com>
19309
19310         Exit-status fix from coreutils.
19311
19312         Use exit_failure consistently in place of EXIT_FAILURE,
19313         so that program exit statuses are consistent on failure.
19314
19315         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
19316         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
19317         * lib/argmatch.h: Comment fix to match the above.
19318         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
19319         Now a macro referring to exit_failure, instead of a separate
19320         variable.  Include "exitfail.h" to get it.
19321         * lib/xstrtol.h: Include "exitfail.h".
19322         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
19323
19324         * lib/long-options.c (parse_long_options): Use prototype
19325         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
19326         for clarity.
19327
19328 2004-01-21  Jim Meyering  <jim@meyering.net>
19329
19330         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
19331         so as not to conflict with a different-sized __mktime_internal
19332         function in GNU libc.
19333         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
19334         Problem building statically-linked `ls' reported by Michael Brunnbauer.
19335
19336 2004-01-20  Karl Berry  <karl@gnu.org>
19337
19338         * config/config.guess: update from config.
19339
19340         * config/srclistvars.sh: GNUWWWLICENSES for karl.
19341
19342 2004-01-20  Bruno Haible  <bruno@clisp.org>
19343
19344         Safer stack allocation.
19345         * lib/setenv.c: Include allocsa.h.
19346         (alloca): Remove fallback definition.
19347         (freea): Remove macro.
19348         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
19349         instead of freea.
19350
19351 2004-01-20  Bruno Haible  <bruno@clisp.org>
19352
19353         * m4/eealloc.m4: New file, from GNU gettext.
19354
19355 2004-01-20  Bruno Haible  <bruno@clisp.org>
19356
19357         * m4/allocsa.m4: New file, from GNU gettext.
19358
19359 2004-01-20  Bruno Haible  <bruno@clisp.org>
19360
19361         * lib/xallocsa.h: New file, from GNU gettext.
19362         * lib/xallocsa.c: New file, from GNU gettext.
19363
19364 2004-01-20  Bruno Haible  <bruno@clisp.org>
19365
19366         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
19367
19368 2004-01-20  Bruno Haible  <bruno@clisp.org>
19369
19370         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
19371         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
19372         specially.
19373
19374 2004-01-20  Bruno Haible  <bruno@clisp.org>
19375
19376         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
19377         patch.
19378
19379 2004-01-20  Bruno Haible  <bruno@clisp.org>
19380
19381         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
19382
19383 2004-01-20  Bruno Haible  <bruno@clisp.org>
19384
19385         * lib/eealloc.h: New file.
19386
19387 2004-01-20  Bruno Haible  <bruno@clisp.org>
19388
19389         * lib/binary-io.h: Avoid warnings on Cygwin.
19390
19391 2004-01-20  Bruno Haible  <bruno@clisp.org>
19392
19393         * lib/allocsa.h: New file, from GNU gettext.
19394         * lib/allocsa.c: New file, from GNU gettext.
19395
19396 2004-01-18  Karl Berry  <karl@gnu.org>
19397
19398         * doc/gpl.texi, doc/lgpl.texi: new files.
19399
19400 2004-01-18  Karl Berry  <karl@gnu.org>
19401
19402         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
19403         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
19404
19405 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19406
19407         Merge from coreutils.
19408
19409         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
19410         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
19411         (gl_DEFAULT_POSIX2_VERSION): Move
19412         the documentation from 'configure' into 'config.hin',
19413         so that 'configure --help' isn't burdened by it and
19414         we don't have to worry about its formatting there.
19415         Reword the documentation so that it's more succinct
19416         and can be run together into a single paragraph.
19417         * m4/same.m4 (gl_SAME): Check for pathconf.
19418
19419 2004-01-15  Paul Eggert  <eggert@twinsun.com>
19420
19421         Merge from coreutils.
19422
19423         * lib/posixver.c: Include posixver.h.
19424
19425         * lib/same.c: Include <stdbool.h>, <limits.h>.
19426         (_POSIX_NAME_MAX): Define if not defined.
19427         (MIN): New macro.
19428         (same_name): If file names are silently truncated, report
19429         that the file names are the same if they are the same after
19430         the silent truncation.
19431
19432         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
19433         conversion function.
19434         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
19435         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
19436         longer needed.
19437
19438 2004-01-15  Jim Meyering  <jim@meyering.net>
19439
19440         Merge from coreutils.
19441
19442         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
19443         if no library is required.
19444         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
19445         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
19446         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
19447         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
19448         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
19449         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
19450         value, $ac_cv_search_crypt, if it's "none required".
19451         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
19452         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
19453         not gl_FUNC_GETLOADAVG.
19454         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
19455         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
19456
19457 2004-01-15  Jim Meyering  <jim@meyering.net>
19458
19459         Merge from coreutils.
19460
19461         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
19462         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
19463         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
19464
19465         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
19466         optional configure-time default.
19467
19468         * lib/version-etc.c (version_etc_copyright): Update copyright date.
19469
19470         * lib/xreadlink.c (xreadlink): Correct outdated comment.
19471
19472 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
19473
19474         Merge from coreutils.
19475
19476         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
19477         value, $ac_cv_search_nanosleep, if it's "none required".
19478
19479 2004-01-14  Paul Eggert  <eggert@twinsun.com>
19480
19481         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
19482         with like-named macro in fnmatch.c.
19483         (EXT): Use an internal constant instead.
19484
19485         Merge fnmatch patches from glibc.
19486         * lib/fnmatch.c (mbsinit): Remove define.
19487         Add libc_hidden_ver (__fnmatch, fnmatch).
19488         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
19489         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
19490
19491 2004-01-14  Karl Berry  <karl@gnu.org>
19492
19493         * config/install-sh: update from automake.
19494
19495 2004-01-13  Karl Berry  <karl@gnu.org>
19496
19497         * config/install-sh: update from automake.
19498
19499 2004-01-09  Karl Berry  <karl@gnu.org>
19500
19501         * config/install-sh: update from automake.
19502
19503 2004-01-05  Karl Berry  <karl@gnu.org>
19504
19505         * config/config.{sub,guess}: update from config.
19506
19507 2003-12-31  Karl Berry  <karl@gnu.org>
19508
19509         * config/depcomp: update from automake.
19510
19511 2003-12-14  Karl Berry  <karl@gnu.org>
19512
19513         * lib/config.charset: update from gettext-runtime.
19514
19515 2003-12-03  Paul Eggert  <eggert@twinsun.com>
19516
19517         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
19518         Bug reported by Alfred M. Szmidt.
19519
19520 2003-12-03  Bruno Haible  <bruno@clisp.org>
19521
19522         * m4/gettext.m4: Upgrade from gettext-0.13.
19523         * m4/po.m4: Upgrade from gettext-0.13.
19524         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
19525         * m4/intmax.m4: New file, from gettext-0.13.
19526         * m4/printf-posix.m4: New file, from gettext-0.13.
19527
19528 2003-11-29  Karl Berry  <karl@gnu.org>
19529
19530         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
19531
19532 2003-11-25  Paul Eggert  <eggert@twinsun.com>
19533             Bruno Haible  <bruno@clisp.org>
19534
19535         * lib/printf-parse.h: Don't include sys/types.h.
19536         (ARG_NONE): New macro.
19537         (char_directive): Change type of *arg_index fields to size_t.
19538         * lib/printf-parse.c: Don't include sys/types.h.
19539         (SSIZE_MAX): Remove macro.
19540         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
19541         Remove unnecessary overflow check.
19542         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
19543         fields.
19544
19545 2003-11-25  Bruno Haible  <bruno@clisp.org>
19546
19547         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
19548
19549 2003-11-25  Bruno Haible  <bruno@clisp.org>
19550
19551         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
19552         gt_TYPE_SSIZE_T.
19553
19554 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19555
19556         * modules/alloca: Remove dependency on xalloc.
19557
19558 2003-11-24  Paul Eggert  <eggert@twinsun.com>
19559
19560         * lib/alloca.c: Remove dependency on xalloc module.
19561         (xalloc_die): Remove.
19562         (memory_full) [!defined emacs]: New macro.
19563         [!defined emacs]: Don't include xalloc.h.
19564         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
19565         address arithmetic overflows.  Change datatypes a bit to avoid
19566         unnecessary casts.
19567
19568 2003-11-22  Jim Meyering  <jim@meyering.net>
19569
19570         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
19571         s/size/size_t/.
19572
19573 2003-11-21  Karl Berry  <karl@gnu.org>
19574
19575         * config/config.{sub,guess}: update from config.
19576
19577 2003-11-18  Karl Berry  <karl@gnu.org>
19578
19579         * config/config.{sub,guess}: update from config.
19580
19581         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
19582
19583 2003-11-17  Paul Eggert  <eggert@twinsun.com>
19584
19585         * README: Mention that S+T cannot overflow if S is the size of
19586         an existing object and T is sufficiently small.
19587
19588 2003-11-17  Jim Meyering  <jim@meyering.net>
19589
19590         On systems without utime and without a utimes function capable of
19591         dealing with a NULL struct utimbuf* argument, this utime replacement
19592         could -- in unusual circumstances -- leak a file descriptor.
19593         * lib/utime.c: Include <unistd.h> and <errno.h>.
19594         (utime_null): Be sure to close `fd' and to preserve errno.
19595         Reported by Geoff Collyer via Arnold Robbins.
19596
19597 2003-11-17  Bruno Haible  <bruno@clisp.org>
19598
19599         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
19600         (Depends-on): Add xsize.
19601
19602 2003-11-17  Bruno Haible  <bruno@clisp.org>
19603
19604         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
19605
19606 2003-11-17  Bruno Haible  <bruno@clisp.org>
19607
19608         * lib/vasnprintf.c (alloca): Remove fallback definition.
19609         (freea): Remove definition.
19610         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
19611         Reported by Paul Eggert.
19612
19613 2003-11-16  Paul Eggert  <eggert@twinsun.com>
19614             Bruno Haible  <bruno@clisp.org>
19615
19616         Protect against address arithmetic overflow.
19617         * lib/printf-args.h: Include stddef.h.
19618         (arguments): Change type of field 'count' to size_t.
19619         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
19620         'unsigned int' where appropriate.
19621         * lib/printf-parse.h: Include sys/types.h.
19622         (char_directive): Change type of *arg_index fields to ssize_t.
19623         (char_directives): Change type of fields 'count', max_*_length to
19624         size_t.
19625         * lib/printf-parse.c: Include sys/types.h and xsize.h.
19626         (SSIZE_MAX): Define fallback value.
19627         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
19628         instead of 'int' where appropriate. Check a_allocated, d_allocated
19629         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
19630         * lib/vasnprintf.c: Include xsize.h.
19631         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
19632         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
19633         overflow. Avoid wraparound when converting a width or precision from
19634         decimal to binary.
19635
19636 2003-11-16  Bruno Haible  <bruno@clisp.org>
19637
19638         Update from GNU gettext.
19639         * lib/printf-parse.c: Generalize to it can be compiled for wide
19640         strings.
19641         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
19642         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
19643         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
19644         SNPRINTF): New macros.
19645         Don't include <alloca.h> if the file is used inside libintl.
19646         (local_wcslen): New function, for Solaris 2.5.1.
19647         (VASNPRINTF): Use it instead of wcslen.
19648
19649 2003-11-16  Bruno Haible  <bruno@clisp.org>
19650
19651         * lib/xsize.h (xmax): New function.
19652         (xsum, xsum3, xsum4): Declare as "pure" functions.
19653
19654 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19655
19656         * modules/xalloc (Files): Undo latest change, since xalloc.h
19657         no longer needs SIZE_MAX or PTRDIFF_MAX.
19658
19659 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19660
19661         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
19662         gl_PTRDIFF_MAX.
19663
19664 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19665
19666         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
19667         "return", to pacify some unknown compiler.  Problem reported
19668         by Joerg Schilling.
19669
19670 2003-11-12  Paul Eggert  <eggert@twinsun.com>
19671
19672         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
19673         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
19674         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
19675         heuristic is just as accurate as far as we know, and it removes a
19676         dependency on size_max.m4 and ptrdiff_max.m4.
19677
19678 2003-11-11  Bruno Haible  <bruno@clisp.org>
19679
19680         * modules/xsize (Files): Add m4/size_max.m4.
19681         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
19682
19683 2003-11-11  Bruno Haible  <bruno@clisp.org>
19684
19685         * m4/size_max.m4: New file.
19686         * m4/ptrdiff_max.m4: New file.
19687         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
19688         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
19689         (gl_XALLOC): Invoke it.
19690
19691 2003-11-11  Bruno Haible  <bruno@clisp.org>
19692
19693         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
19694         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
19695         defined.
19696
19697 2003-11-10  Paul Eggert  <eggert@twinsun.com>
19698
19699         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
19700         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
19701         rejected some allocations of exactly SIZE_MAX - 2 bytes.
19702         From Bruno Haible.
19703         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
19704         not (size_t) -1, since it's defined here.
19705
19706 2003-11-09  Karl Berry  <karl@gnu.org>
19707
19708         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
19709
19710 2003-11-06  Paul Eggert  <eggert@twinsun.com>
19711
19712         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
19713         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
19714         Reject sizes of exactly SIZE_MAX bytes.
19715         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
19716         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
19717
19718 2003-11-05  Bruno Haible  <bruno@clisp.org>
19719
19720         * lib/xsize.h: Include limits.h, to avoid a possible collision with
19721         SIZE_MAX defined in <limits.h> on Solaris.
19722
19723 2003-11-04  Jim Meyering  <jim@meyering.net>
19724
19725         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
19726         variable names, rather than @VAR@.
19727         * modules/poll: Likewise.
19728
19729 2003-11-04  Bruno Haible  <bruno@clisp.org>
19730
19731         * modules/xsize: New file.
19732         * modules/linebreak: Depend on xsize.
19733         * MODULES.html.sh (func_all_modules): Add xsize.
19734
19735 2003-11-04  Bruno Haible  <bruno@clisp.org>
19736
19737         * m4/xsize.m4: New file.
19738
19739 2003-11-04  Bruno Haible  <bruno@clisp.org>
19740
19741         * lib/xsize.h: New file.
19742         * lib/linebreak.c: Include xsize.h.
19743         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
19744         argument for overflow.
19745         Suggested by Paul Eggert.
19746
19747 2003-11-03  Karl Berry  <karl@gnu.org>
19748
19749         * config/config.{guess,sub}: update from config.
19750
19751 2003-11-03  Jim Meyering  <jim@meyering.net>
19752
19753         * modules/userspec (lib_SOURCES): Add userspec.h.
19754         (Include): Add "userspec.h".
19755         Improve description.
19756
19757 2003-11-03  Jim Meyering  <jim@meyering.net>
19758
19759         * lib/userspec.c: Include "userspec.h".
19760         * lib/userspec.h: New file.
19761
19762 2003-11-03  Bruno Haible  <bruno@clisp.org>
19763
19764         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
19765
19766 2003-11-03  Bruno Haible  <bruno@clisp.org>
19767
19768         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
19769         available, to avoid (extremely rare) race condition.
19770         Suggested by Paul Eggert.
19771
19772 2003-11-02  Karl Berry  <karl@gnu.org>
19773
19774         * config/srclist.txt (vasprintf.c): sync broken, sigh.
19775
19776 2003-10-31  Paul Eggert  <eggert@twinsun.com>
19777
19778         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
19779         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
19780         (read_filesystem_list): Set and use me_type_malloced.
19781         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
19782         whatever the type happens to be), for brevity and consistency.
19783         Check for size calculation overflow on Alphas running OSF/1.
19784
19785 2003-10-31  Jim Meyering  <jim@meyering.net>
19786
19787         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
19788
19789         * lib/linebuffer.c: Include <string.h> for declaration of memset.
19790
19791 2003-10-30  Paul Eggert  <eggert@twinsun.com>
19792             Bruno Haible  <bruno@clisp.org>
19793
19794         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
19795         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
19796
19797 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
19798
19799         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
19800         netbsd*-gnu*.  Suggested by Robert Millan.
19801
19802 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19803
19804         * modules/group-member: Depend on stdbool.
19805
19806 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19807
19808         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
19809
19810 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19811
19812         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
19813         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
19814         after the 'gnu' in these cases.  This fixes some bugs in the
19815         previous change, and is based on suggestions by Robert Millan.
19816
19817 2003-10-29  Paul Eggert  <eggert@twinsun.com>
19818
19819         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
19820         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
19821         no longer needed.
19822         * lib/quotearg.c (quotearg_n_options): Use it.
19823         * lib/group-member.c: Include <stdbool.h>.
19824         (free_group_info): Arg is now const *; don't free arg.
19825         (get_group_info): Now returns bool and accepts struct group_info *,
19826         rather than returning a malloc'ed struct group_info *.
19827         All uses changed.  Check for overflow in internal size calculation.
19828
19829         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
19830         rather than xmalloc/xrealloc.
19831         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
19832         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
19833         conformance bug: the old code used a pointer after freeing the
19834         storage that it addressed.
19835         * lib/hash.c (hash_initialize): Simplify the code by using
19836         xalloc_oversized rather than doing it by hand.
19837         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
19838         the buffer preserved.  Use free and xmalloc instead.
19839         * lib/quotearg.c (quotearg_n_options): Likewise.
19840         Use a simpler test for size overflow.  Don't use xalloc_oversized
19841         because unsigned int might be wider than size_t (!); this suggests
19842         that we should switch from unsigned int to size_t for slot numbers.
19843
19844 2003-10-28  Paul Eggert  <eggert@twinsun.com>
19845
19846         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
19847         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
19848         NetBSD kernels.  Requested by Richard Stallman.
19849
19850 2003-10-27  Paul Eggert  <eggert@twinsun.com>
19851
19852         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
19853         to allocate the returned structure.  Do not allocate a subarray,
19854         as x2nrealloc will do that.
19855         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
19856         instead of xnrealloc.
19857         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
19858
19859 2003-10-27  Bruno Haible  <bruno@clisp.org>
19860
19861         * lib/stdbool_.h: Better support for BeOS.
19862
19863 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19864
19865         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
19866         now uses inline.
19867
19868 2003-10-26  Paul Eggert  <eggert@twinsun.com>
19869
19870         * lib/xalloc.h (xalloc_oversized): New static inline function, for
19871         callers that want to do their own size-overflow checking.  Include
19872         <stdbool.h>, since xalloc_oversized returns bool.
19873         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
19874         to use xalloc_oversized.
19875
19876         Add two functions x2realloc, x2nrealloc, for programs that grow
19877         arrays dynamically by doubling their sizes.
19878         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
19879         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
19880         New functions.
19881
19882         Port to C99 semantics for 'inline' of external functions.
19883         Bug reported by Bruno Haible.
19884         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
19885         with the old contents of xnmalloc.
19886         (xnmalloc, xmalloc): Use it.
19887         (xnrealloc_inline): New static inline function,
19888         with the old contents of xnrealloc.
19889         (xnrealloc, xrealloc): Use it.
19890
19891         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
19892         that.
19893
19894 2003-10-26  Karl Berry  <karl@gnu.org>
19895
19896         * config/srclist.txt (COPYING.DOC): no longer available from
19897         /gd/gnuorg; don't know where the ultimate source is.
19898
19899 2003-10-25  Paul Eggert  <eggert@twinsun.com>
19900
19901         Fix several address-calculation bugs in the hash modules,
19902         plus some minor code cleanup.
19903
19904         * lib/hash.h: Include <stdbool.h>, for bool.
19905         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
19906         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
19907         hash_get_n_entries, hash_get_max_bucket_length,
19908         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
19909         hash_rehash): Use size_t rather than unsigned.
19910         * lib/hash.c (struct hash_table, hash_get_n_buckets,
19911         hash_get_n_buckets_used, hash_get_n_entries,
19912         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
19913         hash_get_entries, hash_do_for_each, hash_string, is_prime,
19914         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
19915         Likewise.
19916         (SIZE_MAX): Define if not defined.
19917         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
19918         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
19919         hash_print):
19920         Use const * when possible.
19921         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
19922         (check_tuning): Fix bug: if tuning parameters were very close to
19923         0 or 1, rounding errors could have caused subscript violations.
19924         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
19925         (hash_initialize): Add 'fail:' label
19926         to free table and return NULL, and use it to simplify code.
19927         Use calloc rather than clearing the storage ourself.
19928         (hash_initialize, hash_rehash): Check for arithmetic overflow in
19929         buffer size calculations.
19930         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
19931         Include <stddef.h>, for size_t.
19932         * lib/hash-pjw.c (hash_pjw): Likewise.
19933         Switch to method described by Bruno Haible.
19934         Include <limits.h>, for CHAR_BIT.
19935         (SIZE_BITS): New macro.
19936
19937 2003-10-23  Paul Eggert  <eggert@twinsun.com>
19938
19939         * m4/getline.m4 (AM_FUNC_GETLINE):
19940         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
19941         hosts.  Problem reported by Derek Robert Price in
19942         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
19943         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
19944         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
19945
19946 2003-10-21  Paul Eggert  <eggert@twinsun.com>
19947
19948         * lib/getndelim2.c (getndelim2): When size calculation overflows,
19949         ceiling the allocation at NMAX bytes rather than silently
19950         discarding input bytes before NMAX is reached.  This makes
19951         a difference only if NMAX exceeds SIZE_MAX / 2.
19952
19953         * lib/obstack.c: Merge from glibc.
19954         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
19955         Add libc_hidden_def (_obstack_newchunk).
19956         (_obstack_free) [! defined _LIBC]: Remove.
19957         [defined _LIBC]: Make a strong alias from obstack_free, rather than
19958         a clone of the function body.
19959         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
19960         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
19961
19962         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
19963         glibc.
19964         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
19965         arg to memcpy.
19966
19967         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
19968         (obstack_ptr_grow_fast, obstack_int_grow_fast):
19969         Don't use lvalue casts, as GCC plans to remove support for them
19970         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
19971         was also present in the non-GCC version, indicating that this
19972         code had always been buggy and had never been widely used.
19973         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
19974         Use the fast variant of each macro, rather than copying the
19975         definiens of the fast variant; that way, we'll be more likely to
19976         catch future bugs in the fast variants.
19977
19978 2003-10-20  Bruno Haible  <bruno@clisp.org>
19979
19980         * modules/wait-process: New file.
19981         * MODULES.html.sh (func_all_modules): Add wait-process.
19982
19983 2003-10-20  Bruno Haible  <bruno@clisp.org>
19984
19985         * m4/wait-process.m4: New file.
19986
19987 2003-10-20  Bruno Haible  <bruno@clisp.org>
19988
19989         * lib/wait-process.h: New file, from GNU gettext.
19990         * lib/wait-process.c: New file, from GNU gettext.
19991
19992 2003-10-19  Jim Meyering  <jim@meyering.net>
19993
19994         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
19995         HPUX 10.20.
19996
19997 2003-10-18  Karl Berry  <karl@gnu.org>
19998
19999         * config/config.guess: update from config.
20000
20001 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20002
20003         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
20004         (getgroups): First arg is int, not size_t.
20005         Don't let 'free' mangle errno.
20006
20007 2003-10-16  Paul Eggert  <eggert@twinsun.com>
20008
20009         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
20010
20011 2003-10-16  Karl Berry  <karl@gnu.org>
20012
20013         * config/config.{guess,sub}: update from config.
20014
20015 2003-10-16  Jim Meyering  <jim@meyering.net>
20016
20017         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
20018         memcpy.
20019
20020 2003-10-15  Paul Eggert  <eggert@twinsun.com>
20021
20022         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
20023         (SIZE_MAX): Remove.
20024         (new_exclude, add_exclude_file): Initial size no longer needs to
20025         be a power of 2.
20026         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
20027         our own address arithmetic overflow checking.
20028
20029         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
20030         (fnmatch): Do not alloca more than 2000 wide characters;
20031         instead, use malloc for large buffers.
20032         Check for address arithmetic overflow, and return -1
20033         with errno set to ENOMEM in that case.
20034         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
20035         (NEW_PATTERN): Do not alloca more than 8000 bytes;
20036         instead, return -1.  Check for address arithmetic overflow.
20037
20038 2003-10-14  Paul Eggert  <eggert@twinsun.com>
20039
20040         Handle invalid suffixes and overflow independently, so that
20041         callers can treat them independently as needed.  Fix some bugs in
20042         suffix handling, e.g., "100k@" was not diagnosed as an invalid
20043         suffix for a human-readable blocksize.  The major caller-visible
20044         change is the addition of a new
20045         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
20046         that both overflow and suffix chars were found.
20047
20048         * lib/human.c (humblock): Don't check separately for invalid suffix
20049         char; that is xstrtoumax's job (now that its bug is fixed).
20050         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
20051         INTMAX_MAX]: New macros.
20052         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
20053         TYPE_MAXIMUM): New macros.
20054         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
20055         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
20056         if overflow occurs, as it's what __strtol does and it's more useful
20057         in practice.
20058         (__xstrtol): If __strtol reports some error other than ERANGE,
20059         reflect it to the caller as LONGINT_INVALID.  If it reports
20060         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
20061         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
20062         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
20063         value.
20064         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
20065         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
20066         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
20067         [defined UINTMAX_MAX]: New macros.
20068
20069 2003-10-14  Bruno Haible  <bruno@clisp.org>
20070
20071         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
20072
20073 2003-10-14  Bruno Haible  <bruno@clisp.org>
20074
20075         * m4/sig_atomic_t: New file, from GNU gettext.
20076         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
20077
20078 2003-10-14  Bruno Haible  <bruno@clisp.org>
20079
20080         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
20081         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
20082         Also use volatile where needed.
20083
20084 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20085
20086         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
20087         Change maintainer from Bruno Haible to 'all'.
20088
20089 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20090
20091         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
20092
20093 2003-10-12  Paul Eggert  <eggert@twinsun.com>
20094
20095         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
20096         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
20097         and define in terms of the other primitives.
20098         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
20099         (SIZE_MAX): Define if not already defined.
20100         (array_size_overflow): New function.
20101         (xalloc_die): Abort instead of exiting if 'error' returns.
20102         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
20103         (xmalloc, xrealloc): Use them.
20104         (xcalloc): Check for address arithmetic overflow.
20105         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
20106         a bit faster than strcpy.
20107
20108 2003-10-10  Simon Josefsson  <jas@extundo.com>
20109
20110         * modules/argp (Depends-on): Add restrict and strcase.
20111
20112 2003-10-10  Simon Josefsson  <jas@extundo.com>
20113
20114         * m4/argp.m4: Add AC_C_INLINE.
20115
20116 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20117
20118         Merge getpass from libc, plus a few fixes.
20119
20120         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
20121         Include <stdbool.h>.
20122         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
20123         __fsetlocking to empty.
20124         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
20125         do include <bits/libc-lock.h>.
20126         Do not include <fcntl.h>; not needed.
20127         [_LIBC]: Include <wchar.h>.
20128         (NOTCANCEL_MODE): New macro.
20129         (flockfile, funlockfile) [_LIBC]: New macros.
20130         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
20131         [!_LIBC]: New macros.
20132         (call_fclose): New function.
20133         (getpass): Use it.  Save tty stream separately; this simplifies the
20134         code and makes it more reliable if stdin happens to equal stdout.
20135         Invoke __fsetlocking on tty.
20136         Handle thread cancellation if needed.
20137         Namespace cleanup (use __tcgetattr, __getline).
20138         Use bool for Booleans.
20139         [USE_IN_LIBIO]: Handle wide streams.
20140         [!_LIBC]: Unconditionally do the fseek, since we don't know what
20141         stream might go where.
20142
20143         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
20144         doesn't have to include <stdio.h> before us.
20145         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
20146         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
20147         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
20148         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
20149         if not declared, so that we can use getpass.c code from libc without
20150         rewriting it.
20151         (flockfile, ftrylockfile, funlockfile): New macros.
20152
20153 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20154
20155         * modules/getpass: Depend on stdbool.
20156
20157 2003-10-08  Paul Eggert  <eggert@twinsun.com>
20158
20159         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
20160
20161 2003-10-07  Karl Berry  <karl@gnu.org>
20162
20163         * config/config.{guess,sub}: update from config.
20164
20165 2003-10-06  Jim Meyering  <jim@meyering.net>
20166             Bruno Haible  <bruno@clisp.org>
20167
20168         This lets translators provide better translations for the
20169         "Written by ..." part of --version output.
20170         * lib/version-etc.h: Include stdarg.h.
20171         (version_etc_copyright): Declare as readonly.
20172         (version_etc): Make this function variadic with a NULL-terminated list
20173         of author name strings.
20174         (version_etc_va): New declaration.
20175         * lib/version-etc.c: Include stdarg.h, stdlib.h.
20176         (version_etc_copyright): Declare as readonly.
20177         (version_etc_va): New function. Provide a different translatable string
20178         for each possible number of authors < 10. Abbreviate when there are 10
20179         authors or more.
20180         (version_etc): Make this function variadic. Call version_etc_va.
20181         Suggestion from Gary V. Vaughan.
20182
20183         * lib/long-options.h (parse_long_options): Change prototype: the
20184         authors string is moved to the end and becomes variadic.
20185         * lib/long-options.c: Include stdarg.h.
20186         (parse_long_options): Make this function variadic, too.
20187         Call version_etc_va, not version_etc.
20188
20189 2003-10-06  Bruno Haible  <bruno@clisp.org>
20190
20191         * modules/version-etc-2: Remove file.
20192         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
20193
20194 2003-10-06  Bruno Haible  <bruno@clisp.org>
20195
20196         * modules/fatal-signal: New file.
20197         * MODULES.html.sh (func_all_modules): Add fatal-signal.
20198
20199 2003-10-06  Bruno Haible  <bruno@clisp.org>
20200
20201         * m4/fatal-signal.m4: New file.
20202         * m4/signalblocking.m4: New file, from GNU gettext.
20203
20204 2003-10-06  Bruno Haible  <bruno@clisp.org>
20205
20206         * lib/version-etc-2.h: Remove file.
20207         * lib/version-etc-2.c: Remove file.
20208
20209 2003-10-06  Bruno Haible  <bruno@clisp.org>
20210
20211         * lib/fatal-signal.h: New file, from GNU gettext.
20212         * lib/fatal-signal.c: New file, from GNU gettext.
20213
20214 2003-10-05  Paul Eggert  <eggert@twinsun.com>
20215
20216         * README: Rework advice for preventing empty .o files.
20217         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
20218         not <sys/types.h>.
20219
20220 2003-10-04  Karl Berry  <karl@gnu.org>
20221
20222         * lib/argp*: update from libc.
20223
20224 2003-10-04  Karl Berry  <karl@gnu.org>
20225
20226         * config/config.{guess,sub}: update from config.
20227
20228 2003-10-02  Bruno Haible  <bruno@clisp.org>
20229
20230         * modules/lchown (Include): Add lchown.h.
20231         * modules/time_r (Include): Use "..." syntax.
20232         * modules/xgetdomainname (Include): Add xgetdomainname.h.
20233
20234 2003-10-01  Simon Josefsson  <jas@extundo.com>
20235
20236         * MODULES.html.sh (func_all_modules): Move gethostname from section
20237         'based on' to section 'lacking' POSIX:2001.
20238
20239 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
20240
20241         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
20242         to output mode on the same stream.
20243
20244 2003-09-29  Paul Eggert  <eggert@twinsun.com>
20245
20246         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
20247         Fix arg typo in previous patch.
20248
20249 2003-09-28  Jim Meyering  <jim@meyering.net>
20250
20251         * lib/error.c: Correct cpp indentation.
20252
20253 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20254
20255         * modules/free: New file.
20256
20257 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20258
20259         * m4/free.m4: New file.
20260
20261 2003-09-27  Paul Eggert  <eggert@twinsun.com>
20262
20263         * lib/minmax.h (MIN, MAX)
20264         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
20265         Omit the special code that used __typeof__, since we worry that
20266         it could be more trouble than it's worth.  See:
20267         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
20268         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
20269
20270         * lib/free.c: New file.
20271
20272 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
20273
20274         Trivial fixes to Makefile.am parts of module listings.
20275         * modules/strstr: Append strstr.h to lib_SOURCES.
20276         * modules/strcase: Likewise, for strcase.h.
20277
20278 2003-09-27  Karl Berry  <karl@gnu.org>
20279
20280         * config/mkinstalldirs: update from automake.
20281
20282 2003-09-26  Paul Eggert  <eggert@twinsun.com>
20283
20284         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
20285         (error_tail): Do not loop, reallocating temporary buffer, since
20286         the output cannot contain more wide characters than the input
20287         contains bytes, the size must be big enough already.  This avoids
20288         one potential size overflow calculation.  Check for size overflow
20289         when calculating temporary buffer size.  Free temporary buffer
20290         when done, if it was allocated with malloc; this plugs a memory
20291         leak.  Remove casts from void * to pointers, that are no longer
20292         needed now that we're assuming C89 or better.
20293
20294         Merge error changes from glibc.
20295
20296         * lib/error.c, error.h: Update copyright notice header to match glibc.
20297         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
20298         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
20299         Disable cancellation while printing error.
20300         * lib/error.h: Prepend __ to parameter names.
20301
20302 2003-09-26  Jim Meyering  <jim@meyering.net>
20303
20304         * lib/error.c (error_tail): Move some declarations
20305         into inner scope where the local variables are used.
20306
20307 2003-09-26  Bruno Haible  <bruno@clisp.org>
20308
20309         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
20310         stpncpy().
20311         Don't define stpncpy through config.h; it's now done through stpncpy.h.
20312
20313 2003-09-26  Bruno Haible  <bruno@clisp.org>
20314
20315         * lib/stpncpy.h (gnu_stpncpy): New declaration.
20316         (stpncpy): Define as alias for gnu_stpncpy.
20317         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
20318
20319 2003-09-25  Simon Josefsson  <jas@extundo.com>
20320
20321         * lib/xgetdomainname.h: New file.
20322         * lib/xgetdomainname.c: New file.
20323
20324 2003-09-25  Simon Josefsson  <jas@extundo.com>
20325             Bruno Haible  <bruno@clisp.org>
20326
20327         * modules/getdomainname: New file.
20328         * modules/xgetdomainname: New file.
20329         * MODULES.html.sh (func_all_modules): Add getdomainname,
20330         xgetdomainname.
20331
20332 2003-09-25  Simon Josefsson  <jas@extundo.com>
20333             Bruno Haible  <bruno@clisp.org>
20334
20335         * m4/getdomainname.m4: New file.
20336
20337 2003-09-25  Simon Josefsson  <jas@extundo.com>
20338             Bruno Haible  <bruno@clisp.org>
20339
20340         * lib/getdomainname.h: New file.
20341         * lib/getdomainname.c: New file.
20342
20343 2003-09-25  Karl Berry  <karl@gnu.org>
20344
20345         * lib/argp-fmtstream.c, argp-help.c: update from libc.
20346
20347 2003-09-25  Karl Berry  <karl@gnu.org>
20348
20349         * config/install-sh: update from automake.
20350
20351 2003-09-25  Bruno Haible  <bruno@clisp.org>
20352
20353         * modules/version-etc-2: New file, from modules/version-etc with
20354         modifications.
20355         * MODULES.html.sh (func_all_modules): Add version-etc-2.
20356
20357 2003-09-25  Bruno Haible  <bruno@clisp.org>
20358
20359         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
20360         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
20361
20362 2003-09-24  Simon Josefsson  <jas@extundo.com>
20363
20364         * modules/xgethostname: Add xgethostname.h.
20365
20366 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20367
20368         * lib/linebuffer.c (freebuffer): Don't free the argument, just
20369         the buffer associated with the argument.  Bug reported by
20370         Simon Josefsson.
20371
20372 2003-09-24  Paul Eggert  <eggert@twinsun.com>
20373
20374         * README: Document assumptions that 'int' is at least 32 bits
20375         wide, that integer arithmetic is 2's complement without overflow,
20376         that there are no holes in integer values, that adding sizes of
20377         two nonoverlapping objects can't overflow, and that all-bits-zero
20378         yields scalar zero.  Fix spelling and capitalization typos.
20379
20380 2003-09-19  Karl Berry  <karl@gnu.org>
20381
20382         * lib/argp.h: update from libc.
20383
20384 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20385
20386         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
20387         to avoid spurious warnings like "AC_RUN_IFELSE was called before
20388         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
20389
20390 2003-09-17  Paul Eggert  <eggert@twinsun.com>
20391
20392         * gnulib-tool: Use "test -h", not "test -L", for portability
20393         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
20394         (tags_regexp): Remove, since \| doesn't conform to POSIX.
20395         (sed_extract_prog): Issue s commands one-by-one, rather than
20396         using \| in one s command.
20397
20398 2003-09-16  Paul Eggert  <eggert@twinsun.com>
20399
20400         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
20401         input error, instead of returning NULL the next time we are called
20402         (and therefore losing track of errno).
20403
20404 2003-09-16  Bruno Haible  <bruno@clisp.org>
20405
20406         * gnulib-tool (func_create_testdir): Warn about duplicated
20407         dependencies.
20408
20409 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20410
20411         * modules/argmatch, modules/fatal, modules/obstack,
20412         modules/xalloc, modules/xgethostname: Sort dependencies by
20413         importance, not alphabetically.
20414
20415 2003-09-15  Paul Eggert  <eggert@twinsun.com>
20416
20417         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
20418         fails, so that the caller gets the proper errno.
20419
20420         * lib/readutmp.c (read_utmp): Likewise.
20421         Check for fstat error.  Close stream and free storage
20422         when failing.
20423
20424 2003-09-14  Karl Berry  <karl@gnu.org>
20425
20426         * config/srclist.txt (strdup.c): disable for c89 changes.
20427
20428 2003-09-14  Jim Meyering  <jim@meyering.net>
20429
20430         * lib/getloadavg.c: Correct cpp indentation.
20431         * lib/strdup.c: Likewise.
20432         * lib/vasnprintf.c: Likewise.
20433
20434 2003-09-14  Bruno Haible  <bruno@clisp.org>
20435
20436         * modules/fwriteerror: New file.
20437         * MODULES.html.sh (func_all_modules): Add fwriteerror.
20438
20439 2003-09-14  Bruno Haible  <bruno@clisp.org>
20440
20441         * lib/fwriteerror.h: New file.
20442         * lib/fwriteerror.c: New file.
20443
20444 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20445
20446         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
20447         modules/xgethostname, modules/xalloc: Depend on exit.
20448
20449 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20450
20451         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
20452
20453         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
20454         and AC_MINIX, too, so that their extensions are available.
20455
20456         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
20457         This macro has been superseded by gl_BACKUPFILE.
20458
20459         More patches to assume C89 or better.
20460
20461         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
20462
20463         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
20464         unconditionally.
20465         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
20466         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
20467         Include <string.h>, <stdlib.h> unconditionally.
20468         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
20469         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
20470         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
20471         headers or for string.h.
20472         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
20473         or strtoul.
20474
20475         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
20476         headers.
20477         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
20478         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20479         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
20480         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
20481         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20482         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
20483         memcpy, memset.
20484         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
20485         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
20486         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
20487         strtol.
20488         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
20489         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
20490         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
20491         strtoul.
20492
20493 2003-09-12  Paul Eggert  <eggert@twinsun.com>
20494
20495         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
20496         * lib/obstack.c [!defined _LIBC]: Likewise.
20497         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
20498         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
20499         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
20500
20501         More changes to assume C89 or better.
20502
20503         * lib/error.c (error_tail): Assume vprintf.
20504
20505         * lib/argmatch.c (getenv): Remove decl.
20506         * lib/progreloc.c (get_full_program_name): Define via prototype.
20507         * lib/setenv.c (clearenv): Likewise.
20508         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
20509         needed.
20510         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
20511         (malloc, memcpy): Remove decls.
20512         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
20513         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
20514         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
20515         (memcpy): Remove macro.
20516         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
20517         (__P): Remove.  All uses removed.
20518         (PTR): Remove.  All uses changed to void *.
20519         (CHAR_BIT, NULL): Remove.
20520         (spaces, zeros, memset_space, memset_zero)
20521         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
20522         Remove.
20523         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
20524         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
20525         Define with prototype.
20526         Remove now-unnecessary prototype decl.
20527         (extra_args_spec): Assume ANSI C.  All uses changed.
20528         (extra_args_spec_iso): Remove.
20529         (my_strftime, emacs_strftimeu): Define via prototype.
20530         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
20531         unconditionally.
20532         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
20533         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
20534         (strtoul, strtol): Remove decls.
20535         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
20536         LONG_MAX): Remove.
20537         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
20538         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
20539         (LOCALE_PARAM_PROTO): New macro.
20540         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
20541         (INTERNAL (strtol), strtol): Define with a prototype.
20542         (PARAMS): Remove.  All uses removed.
20543         * lib/tempname.c: Include <string.h> unconditionally.
20544         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
20545         * lib/xgethostname.c (main): Define with a prototype.
20546         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
20547         Include <stdlib.h> unconditionally.
20548         (calloc, malloc, realloc, free): Remove decls.
20549         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
20550         Include <stdlib.h> unconditionally.  Sort include file names.
20551         (strtod): Remove.
20552         (xstrtod): Define with a prototype.
20553         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
20554         (strtol, strtoul): Remove decls.
20555
20556 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20557
20558         More patches to assume C89 or better.
20559         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
20560         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
20561         string.h, memchr, STDC_HEADERS.
20562
20563 2003-09-11  Paul Eggert  <eggert@twinsun.com>
20564
20565         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
20566         Include <stdlib.h>, <string.h> unconditionally.
20567         Remove now-unnecessary cast to char *.
20568         * lib/strnlen.c: Include <string.h> unconditionally.
20569         * lib/yesno.c (yesno): Define with a prototype.
20570
20571 2003-09-11  Bruno Haible  <bruno@clisp.org>
20572
20573         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
20574
20575 2003-09-10  Jim Meyering  <jim@meyering.net>
20576
20577         * lib/error.c: Correct indentation of cpp directives.
20578
20579 2003-09-10  Bruno Haible  <bruno@clisp.org>
20580
20581         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
20582         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
20583         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
20584         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
20585         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
20586         <stdlib.h> and <string.h> checks.
20587         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
20588         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
20589
20590 2003-09-10  Bruno Haible  <bruno@clisp.org>
20591
20592         * lib/strcspn.c: Include <string.h> unconditionally.
20593         * lib/strpbrk.c: Include <string.h> unconditionally.
20594         * lib/strstr.c: Include <string.h> unconditionally.
20595         * lib/unicodeio.c: Include <string.h> unconditionally.
20596         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
20597         * lib/unsetenv.c: Likewise.
20598         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
20599         * lib/yesno.c: Include <stdlib.h> unconditionally.
20600         (rpmatch): Add prototype.
20601
20602 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20603
20604         More patches to assume C89 or better.
20605         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
20606         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
20607         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
20608         or for string.h.
20609         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
20610         stdlib.h.
20611         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
20612         C headers.
20613         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
20614         string.h.
20615         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
20616         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
20617         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
20618         or for string.h.
20619         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
20620         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
20621         C headers.
20622         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
20623         memcpy.
20624         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
20625         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
20626         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
20627         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
20628         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
20629         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
20630         string.h, free.
20631         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
20632         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
20633         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
20634         C headers, or for string.h.
20635         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
20636         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
20637         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
20638         headers, memory.h, stdlib.h, string.h, strings.h.
20639         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
20640         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
20641         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
20642         strchr.
20643         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
20644         headers, memory.h, string.h.
20645         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
20646         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
20647         free.
20648         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
20649         headers.
20650         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
20651         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
20652         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
20653         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
20654         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
20655
20656 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20657
20658         More K&R removal.
20659
20660         * lib/acosl.c (main): Use a prototype.
20661         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
20662         tanl.c: Likewise.
20663
20664         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
20665
20666         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
20667         (getopt, etopt_long, getopt_long_only, _getopt_internal)
20668         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
20669         with a prototype.
20670         * lib/getopt.c (const): Remove macro.
20671         Include <string.h> unconditionally.
20672         (my_index): Remove; all uses changed to strchr.
20673         (strlen): Remove decl.
20674         (exchange): Remove forward decl; no longer needed.
20675         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
20676         Define with prototype.
20677         * lib/getopt1.c (const): Remove macro.
20678         (getopt_long, getopt_long_only, main): Define with prototype.
20679
20680         * lib/getugroups.c: Include <string.h> unconditionally.
20681
20682         * lib/getusershell.c: Include <stdlib.h> unconditionally.
20683         (getusershell, setusershell, endusershell, readname, main):
20684         Define with prototypes.
20685
20686         * lib/group-member.c: Include group-member.h first.
20687         Include <stdlib.h> unconditionally.
20688
20689         * lib/hard-locale.c: Include hard-locale.h first.
20690         Include <stdlib.h>, <string.h> unconditionally.
20691
20692         * lib/hash.c (free, malloc): Remove decls.
20693         Include <stdlib.h> unconditionally.
20694
20695         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
20696         (getenv): Do not declare.
20697
20698         * lib/idcache.c: Include <string.h> unconditionally.
20699
20700         * lib/long-options.c: Include long-options.h first, to test interface.
20701         Include <stdlib.h> unconditionally.
20702
20703         * lib/makepath.c: Include makepath.h first, to test interface.
20704         Include <stdlib.h> and <string.h> unconditionally.
20705
20706         * lib/linebuffer.c: Include <stdlib.h>.
20707         (free): Remove decl.
20708
20709         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
20710         stddef.h. rpl_malloc returns void *, not char *.
20711         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
20712         prototype.
20713
20714         * lib/md5.h: Include <limits.h> unconditionally.
20715         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
20716         (__P): Remove; all uses removed.
20717         * lib/md5.c: Include "md5.h" first.
20718         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
20719         md5_buffer, md5_process_bytes, md5_process_block):
20720         Define with prototypes.
20721         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
20722         * lib/sha.c: Include "sha.h" first.
20723         Include <stdlib.h>, <string.h> unconditionally.
20724
20725         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
20726         * lib/memcmp.c (__ptr_t): Likewise.
20727         * lib/memrchr.c (__ptr_t): Likewise.
20728         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
20729         Include <string.h> unconditionally.
20730         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
20731         * lib/memchr.c: Include <stdlib.h> unconditionally.
20732         * lib/memchr.c (LONG_MAX): Remove.
20733         * lib/memrchr.c (LONG_MAX): Likewise.
20734         * lib/memchr.c (__memchr): Define via a prototype.
20735         * lib/memrchr.c (__memrchr): Likewise.
20736         * lib/memcmp.c (__P): Remove, and remove all uses.
20737         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
20738         Remove forward decls; no longer needed.
20739         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
20740         Use types required by C89 in prototype.
20741
20742         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
20743         * lib/savedir.c: Likewise.
20744         * lib/mkdir.c (free): Remove decl.
20745         * lib/rmdir.c (rmdir): Define with a prototype.
20746         * lib/savedir.c: Include savedir.h first, to test interface.
20747
20748         * lib/mktime.c (STDC_HEADERS): Remove.
20749         Include <stdlib.h>, <string.h> unconditionally.
20750
20751         * lib/modechange.c: Include <stdlib.h> unconditionally.
20752         (malloc): Remove decl.
20753
20754         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
20755         (free): Remove decl.
20756
20757         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
20758         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
20759         (This type really should be intptr_t, but that's a C99ism.)
20760         (_obstack_memcpy): Remove: all uses changed to memcpy.
20761         Include <string.h> unconditionally.
20762         (struct obstack): Assume __STDC__ for types of members
20763         chunkfun, freefun, extra_arg.
20764         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
20765         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
20766         obstack_begin, obstack_specify_allocation,
20767         obstack_specify_allocation_with_arg, obstack_chunkfun,
20768         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
20769         Remove unprototyped decls and the macros that use them.
20770         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
20771         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
20772         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
20773         (defined __STDC__ && __STDC__)]:
20774         Remove nonprototyped code.
20775         Include <stdlib.h> unconditionally.
20776         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
20777         _obstack_allocated_p, _obstack_free, obstack_free,
20778         _obstack_memory_used, print_and_abort):
20779         Define using prototypes.
20780         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
20781         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
20782         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
20783         obstack_next_free, obstack_object_size, obstack_room) [0]:
20784         Remove unused, unprototyped code.
20785
20786         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
20787
20788         * lib/physmem.c (physmem_total, physmem_available, main): Define
20789         with prototypes.
20790
20791         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
20792         (main): Define with a prototype.
20793
20794         * lib/posixver.c (getenv): Remove decl.
20795
20796         * lib/putenv.c (malloc): Returns void *, not char *.
20797         Include <string.h> unconditionally.
20798         (strchr, memcpy, NULL): Do not define.
20799
20800         * lib/readtokens.c: Include readtokens.h first, to test interface.
20801         Include <stdlib.h>, <string.h> unconditionally.
20802         (init_tokenbuffer): Define with a prototype.
20803
20804         * lib/regex.c (PARAMS): Remove.  All uses removed.
20805         All uses of _RE_ARGS removed, too.
20806         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
20807         unconditionally.
20808         (bzero): Assume memset exists.
20809         (memcmp, memcpy, NULL): Remove.
20810         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
20811         char, or assignments to local vars of type signed char.
20812         (init_syntax_once, PREFIX(extract_number_and_incr),
20813         PREFIX(print_partial_compiled_pattern),
20814         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
20815         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
20816         PREFIX(regex_grow_registers), PREFIX(regex_compile),
20817         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
20818         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
20819         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
20820         wcs_compile_range, byte_compile_range, truncate_wchar,
20821         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
20822         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
20823         count_mbs_length, wcs_re_match_2_internal,
20824         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
20825         PREFIX(alt_match_null_string_p),
20826         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
20827         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
20828         regfree, PREFIX(extract_number)): Define with prototype.  Remove
20829         now-unnecessary declaration, if any.
20830         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
20831         regcomp, regexec):
20832         Remove now-unnecessary casts among pointer types.
20833         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
20834
20835         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
20836         (free): Remove decl.
20837
20838         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
20839
20840         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
20841         (free): Remove decl.
20842
20843         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
20844         * lib/xgetcwd.c: Likewise.
20845
20846         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
20847         (free): Remove decl.
20848
20849         * lib/strchrnul.c (strchrnul): Define with a prototype.
20850         Fix bug: c_in was not converted to char before searching.
20851
20852         The following changes are not K&R related:
20853
20854         * lib/group-member.h: Include <sys/types.h>, so that this file is
20855         self-contained.
20856         * lib/makepath.h: Likewise.
20857
20858         * lib/getusershell.c (readname, default_index, line_size, readname):
20859         Use size_t, not int, for sizes.
20860         (readname): If the size overflows, report an error instead of
20861         looping forever.
20862
20863 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20864
20865         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
20866         libc.
20867
20868 2003-09-09  Paul Eggert  <eggert@twinsun.com>
20869
20870         * README: New section: portability guidelines.
20871
20872 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20873
20874         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
20875         C89 spec.
20876
20877 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
20878
20879         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
20880
20881 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20882
20883         Assume C89 or better; remove K&R cruft.
20884         A few of these changes were first proposed by Derek Robert Price
20885         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
20886
20887         * lib/addext.c: Include <string.h> unconditionally.
20888         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
20889         Don't declare getenv or malloc.
20890
20891         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
20892         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
20893         (NULL): Remove.
20894         (find_stack_direction, alloca): Use prototypes.
20895
20896         * lib/atexit.c (atexit): Define using a prototype.
20897
20898         * lib/basename.c, dirname.c, stripslash.c:
20899         Include <string.h> unconditionally.
20900
20901         * lib/bcopy.c: Include <stddef.h>.
20902         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
20903
20904         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
20905
20906         * lib/error.h (error, error_at_line, error_print_progname)
20907         [! (defined (__STDC__) && __STDC__)]: Remove decls.
20908         * lib/error.c: Include error.h first, to check interface.
20909         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20910         (VA_START): Remove; all uses changeed to va_start.
20911         (exit, strerror): Remove decls.
20912         (error_print_progname): Prototype uncondionally.
20913         Don't include <errno.h>; no longer needed.
20914         (private_strerror): Remove.
20915         (error_tail): Always define.
20916         (error, error_at_line): Assume C89 or better; always use prototypes.
20917         * lib/fatal.c: Include "fatal.h" first, to test interface.
20918         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
20919         (VA_START): Remove; all uses changed to va_start.
20920         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
20921         this case.
20922         (exit): Remove decl.
20923         (fatal): Prototype unconditionally.  Assume va_start works.
20924         Abort at end, to pacify gcc.
20925
20926         * lib/euidaccess.c (main): Define with a prototype.
20927
20928         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
20929
20930         * lib/exitfail.c: Include <stdlib.h> unconditionally.
20931
20932         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
20933         prototypes.
20934         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
20935         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
20936         (getenv): Remove decl.
20937         (fnmatch): Define using a prototype.
20938         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
20939         (FCT): Define using a prototype.
20940
20941         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
20942
20943         * lib/gethostname.c: Include <stddef.h>.
20944         (gethostname): Define with prototype.  Length is size_t, not int.
20945
20946 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20947
20948         Assume C89 or better; remove K&R cruft.
20949         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
20950         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
20951         string.h, getenv, malloc.
20952         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
20953         headers.
20954         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
20955         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
20956         do not check for strerror.
20957         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
20958         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
20959         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
20960         do not check for doprnt or vprintf.
20961         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
20962         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
20963
20964 2003-09-08  Paul Eggert  <eggert@twinsun.com>
20965
20966         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
20967         getversion.c should have been removed then, but was accidentally
20968         preserved.
20969
20970         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
20971         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
20972
20973 2003-09-08  Karl Berry  <karl@gnu.org>
20974
20975         * config/config.sub, config.guess, srclistvars.sh: update from savannah
20976                 config, forget about prep.
20977
20978         * config/depcomp, missing: update from automake.
20979
20980 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20981
20982         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
20983         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20984
20985 2003-09-07  Paul Eggert  <eggert@twinsun.com>
20986
20987         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
20988         copy_tm_result.  Bug reported by Simon Josefsson in
20989         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
20990
20991 2003-09-06  Paul Eggert  <eggert@twinsun.com>
20992
20993         * m4/time_r.m4: New file.
20994         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
20995         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
20996         is. Check for timegm declaration.
20997         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
20998         Do not check for gmtime_r.
20999         Replace mktime if __mktime_internal does not exist and if mktime
21000         hasn't been replaced already.
21001
21002 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21003
21004         * lib/time_r.c, lib/time_r.h: New files.
21005
21006         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
21007         __localtime_r.
21008         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
21009         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
21010
21011         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
21012         __gmtime_r.
21013         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
21014         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
21015         Include <time_r.h>.
21016
21017         * lib/timegm.c: Switch to glibc implementation, with the following
21018         changes:
21019         [defined HAVE_CONFIG_H]: Include <config.h>.
21020         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
21021         (__mktime_internal) [!defined _LIBC]: New decl.
21022         (__gmtime_r) [!defined _LIBC]: New macro and function.
21023         (timegm): Use a prototype, since gnulib assumes C89.
21024         Do not bother declaring tmp to be const, as it's not really usefu.
21025         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
21026         (timegm): Declare only if HAVE_DECL_TIMEGM.
21027
21028 2003-09-06  Paul Eggert  <eggert@twinsun.com>
21029
21030         * MODULES.html.sh (func_all_modules): Add time_r.
21031         * modules/time_r: New file.
21032         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
21033         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
21034
21035 2003-09-03  Paul Eggert  <eggert@twinsun.com>
21036
21037         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
21038         Bug reported by Lute Kamstra in
21039         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
21040
21041         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
21042         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
21043         course with correspondingly smaller numbers for tomorrow and
21044         yesterday.  From Tadayoshi Funaba.  Originally installed into
21045         sh-utils on 1999-08-07, but the patch got lost (I guess during the
21046         coreutils merge?).
21047
21048 2003-08-31  Simon Josefsson  <jas@extundo.com>
21049
21050         * modules/timegm: New file.
21051         * MODULES.html.sh (func_all_modules): Add timegm.
21052
21053 2003-08-31  Simon Josefsson  <jas@extundo.com>
21054
21055         * m4/timegm.m4: New file.
21056
21057 2003-08-31  Simon Josefsson  <jas@extundo.com>
21058
21059         * lib/timegm.h: New file.
21060         * lib/timegm.c: New file.  Based on
21061         wget-1.8.2/src/http.c:mktime_from_utc.
21062
21063 2003-08-31  Karl Berry  <karl@gnu.org>
21064
21065         * lib/argp.h: update from libc.
21066
21067 2003-08-28  Bruno Haible  <bruno@clisp.org>
21068
21069         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
21070         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
21071         followed by '#define fnmatch fnmatch_posix' gives an error.
21072
21073 2003-08-28  Bruno Haible  <bruno@clisp.org>
21074
21075         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
21076         warning on QNX, which defines O_BINARY to 000000.
21077
21078 2003-08-27  Jim Meyering  <jim@meyering.net>
21079
21080         * m4/mkstemp.m4: Require that the system mkstemp be able to create
21081         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
21082         would fail after 32.  Reported by Danny Levinson.  Details here:
21083         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
21084
21085 2003-08-24  Bruno Haible  <bruno@clisp.org>
21086
21087         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
21088         MSVC7 <stdio.h> is included later.
21089
21090 2003-08-22  Simon Josefsson  <jas@extundo.com>
21091
21092         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
21093
21094 2003-08-20  Karl Berry  <karl@gnu.org>
21095
21096         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
21097
21098 2003-08-20  Bruno Haible  <bruno@clisp.org>
21099
21100         * modules/progname: New file.
21101         * MODULES.html.sh (func_all_modules): Add progname.
21102
21103 2003-08-20  Bruno Haible  <bruno@clisp.org>
21104
21105         * lib/progname.h: New file, from GNU gettext.
21106         * lib/progname.c: New file, from GNU gettext.
21107         * lib/progreloc.c: New file, from GNU gettext.
21108
21109 2003-08-19  Jim Meyering  <jim@meyering.net>
21110
21111         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
21112         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
21113
21114 2003-08-19  Bruno Haible  <bruno@clisp.org>
21115
21116         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
21117         more.
21118
21119 2003-08-19  Bruno Haible  <bruno@clisp.org>
21120
21121         * lib/xstrdup.c: Assume <string.h> exists.
21122
21123 2003-08-18  Paul Eggert  <eggert@twinsun.com>
21124
21125         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
21126         in makefile rules.
21127
21128 2003-08-18  Jim Meyering  <jim@meyering.net>
21129
21130         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
21131         * m4/lib-ld.m4: Likewise.
21132
21133 2003-08-18  Jim Meyering  <jim@meyering.net>
21134
21135         * lib/setenv.h: Indent nested cpp directive.
21136         * lib/vasnprintf.c: Remove trailing blanks.
21137
21138 2003-08-17  Simon Josefsson  <jas@extundo.com>
21139
21140         * modules/xstrndup: New file.
21141         * MODULES.html.sh (func_all_modules): Add xstrndup.
21142
21143 2003-08-17  Simon Josefsson  <jas@extundo.com>
21144
21145         * modules/argp: Fix autoconf macro name. Add more dependencies.
21146
21147 2003-08-17  Simon Josefsson  <jas@extundo.com>
21148
21149         * m4/xstrndup.m4: New file.
21150
21151 2003-08-17  Simon Josefsson  <jas@extundo.com>
21152
21153         * m4/argp.m4: New file.
21154
21155 2003-08-17  Simon Josefsson  <jas@extundo.com>
21156             Bruno Haible  <bruno@clisp.org>
21157
21158         * lib/xstrndup.h: New file.
21159         * lib/xstrndup.c: New file.
21160
21161 2003-08-17  Bruno Haible  <bruno@clisp.org>
21162
21163         * modules/strndup (Files, Include): Add lib/strndup.h.
21164
21165 2003-08-17  Bruno Haible  <bruno@clisp.org>
21166
21167         * modules/euidaccess (Files): Add lib/euidaccess.h.
21168
21169 2003-08-17  Bruno Haible  <bruno@clisp.org>
21170
21171         * lib/strndup.h: New file.
21172
21173 2003-08-17  Bruno Haible  <bruno@clisp.org>
21174
21175         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
21176         like AC_GNU_SOURCE.
21177         * modules/extensions (configure.ac): Comment out the invocation of
21178         gl_USE_SYSTEM_EXTENSIONS.
21179
21180 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21181
21182         Merges from coreutils, etc.
21183         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
21184         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
21185         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
21186         fixing a typo.
21187         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
21188         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
21189
21190 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21191
21192         Document merge from coreutils.
21193         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
21194         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
21195         * modules/utime: Add m4/utimes-null.m4.
21196
21197 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21198
21199         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
21200         space, undoing this 2003-08-12 change:
21201         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21202
21203 2003-08-16  Paul Eggert  <eggert@twinsun.com>
21204
21205         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
21206         strtoul.c from libc, undoing this 2003-08-12 change:
21207         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
21208
21209 2003-08-16  Jim Meyering  <jim@meyering.net>
21210
21211         Merges from coreutils.
21212         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
21213         prefix.  Adjust cache variables similarly.  Create 500 rather than
21214         just 300 files, to exercise bug on Darwin6.5, too.
21215         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
21216         $missing_dir.
21217         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
21218         AM_SYS_POSIX_TERMIOS.
21219         Reported by mkc@mathdogs.com.
21220         Also change use of $am_cv_sys_posix_termios
21221         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
21222         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
21223         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
21224         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
21225         in /proc/mounts until it finds one with matching device number.  This
21226         is unnecessary when the FILE argument *is* a mount point.  No stat call
21227         is necessary in that case.  So, disable the statvfs-testing code on
21228         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
21229         as RedHat bug# 84846.
21230         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21231         to 1MB, so as not to render systems with no stack size limit (e.g.,
21232         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21233         Include <unistd.h>.  On some systems,
21234         it is required for the definition of _SC_PAGESIZE.
21235
21236 2003-08-16  Jim Meyering  <jim@meyering.net>
21237
21238         Merge from coreutils.
21239         * lib/xstrtoimax.c: #else #if -> #elif.
21240         * lib/xstrtoumax.c: Likewise.
21241
21242 2003-08-16  Jim Meyering  <jim@meyering.net>
21243
21244         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
21245         * m4/utimes.m4: Removed.
21246         * m4/utimes-null.m4: Renamed from utimes.m4.
21247
21248         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
21249         to 1MB, so as not to render systems with no stack size limit (e.g.,
21250         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
21251         Include <unistd.h>.  On some systems,
21252         it is required for the definition of _SC_PAGESIZE.
21253
21254 2003-08-16  Jim Meyering  <jim@meyering.net>
21255         and Paul Eggert  <eggert@cs.ucla.edu>
21256
21257         Merges from coreutils, etc.
21258
21259         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
21260         using the latest version from cvs.  This avoids problems with #line
21261         directives using a vendor (Sun) compiler.
21262         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
21263         Don't set GETGROUPS_LIB here; now it's
21264         done via getgroups.m4's wrapper function.
21265         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
21266         rather than just in sh-util/configure.in, so that the
21267         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
21268         same.
21269         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
21270         AC_FUNC_GETLOADAVG where to find getloadavg.c.
21271         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
21272         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
21273         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
21274         Remove code that is now done by the newly-required macros.
21275         Append $(EXEEXT) to DF_PROG.
21276         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
21277         Do not invoke or require the following here,
21278         since prereq.m4 or some gnulib .m4 now does this for us:
21279         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
21280         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
21281         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
21282         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
21283         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
21284         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
21285         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
21286         AC_FUNC_OBSTACK.
21287         Do not replace the following functions, as this is now the job
21288         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
21289         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
21290         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
21291         atexit getpass, strdup, getpagesize.
21292         Replace 'raise'.
21293         Do not check for the following functions, as this is now the job
21294         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
21295         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
21296         setregid.
21297         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
21298         Check for sys/sysctl.h.
21299         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
21300         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
21301         of checking for ssize_t ourselves.
21302
21303         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
21304         Require every macro that gnulib/modules/* suggests for us.
21305         (jm_PREREQ_ADDEXT): New macro.
21306         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
21307         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
21308
21309         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
21310         (gl_PHYSMEM): Use it.
21311         Also check for `table' function.
21312         Check for new headers and functions.
21313         Add check for sys/sysmp.h.
21314         With suggestions from Kaveh Ghazi.
21315         Ignore headers that are present but cannot be compiled.  This
21316         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
21317         C 5.4.
21318
21319 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21320
21321         Document merge from coreutils.
21322         * modules/userspec: Depend on posixver.
21323         * modules/strftime: Depend on tzset.
21324
21325 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21326
21327         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
21328         rather than tab, after '#' in shell-script copyright notices.
21329         Suggested by Bruno Haible.
21330
21331 2003-08-15  Paul Eggert  <eggert@twinsun.com>
21332
21333         * config/srclist-update: Use three spaces, rather than tab, after '#'
21334         in shell-script copyright notices.  Suggested by Bruno Haible.
21335         Remove unnecessary parenthesization in regular expression.
21336
21337 2003-08-15  Jim Meyering  <jim@meyering.net>
21338
21339         Merge from coreutils.
21340         * lib/xgethostname.c: Include <stdlib.h>.
21341         (xghostname): Don't exit for anything other than memory-related
21342         failure; just return NULL.
21343         * lib/userspec.c: Include "posixver.h".
21344         (parse_user_spec): Accept `.' as a separator only
21345         in pre-POSIX-200112 mode.
21346         * lib/strtoimax.c: Use #elif rather than #else #if.
21347         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
21348         Remove function, now that we can rely on a working tzset function.
21349         [!_LIBC]: Ensure that the required autoconf test has been run.
21350         [!defined _NL_CURRENT && HAVE_STRFTIME]:
21351         Use underlying_strftime for %r.
21352         * lib/sha.c: Merge in some clean-up and optimization changes from
21353         glibc.
21354         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
21355         Ensure that it is a multiple of 64.
21356         Rearrange loop exit tests so as to avoid performing an
21357         additional fread after encountering an error or EOF.
21358         * lib/realloc.c: Update copyright date.
21359
21360 2003-08-15  Jim Meyering  <jim@meyering.net>
21361         and Paul Eggert  <eggert@twinsun.com>
21362
21363         Merge from coreutils.
21364         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
21365         member but strut utmpx does not.  Needed for AIX 4.3.3.
21366         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
21367
21368 2003-08-15  Jim Meyering  <jim@meyering.net>
21369         and Paul Eggert  <eggert@cs.ucla.edu>
21370
21371         Merges from coreutils, etc.
21372         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
21373         Require gl_FUNC_TZSET_CLOBBER.
21374         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
21375         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
21376         members.
21377
21378 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21379
21380         Help the merge from coreutils.
21381         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
21382         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
21383         * m4/tzset.m4: Use it too.
21384
21385 2003-08-14  Paul Eggert  <eggert@twinsun.com>
21386
21387         * modules/tzset: New file.
21388
21389 2003-08-14  Jim Meyering  <jim@meyering.net>
21390
21391         Merges from coreutils.
21392         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
21393         variable names, rather than @FNMATCH_H@.
21394         * modules/alloca: Likewise for $(ALLOCA_H).
21395
21396         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
21397         the three copies of the literal target, `fnmatch.h'.
21398         * modules/alloca (alloca.h): Likewise.
21399
21400 2003-08-14  Jim Meyering  <jim@meyering.net>
21401
21402         Merge from coreutils.
21403         * m4/tzset.m4: New file.
21404         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
21405         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
21406         otherwise, AIX 5.1 systems would end up using the latter.
21407         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
21408         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
21409         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
21410         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
21411
21412 2003-08-14  Jim Meyering  <jim@meyering.net>
21413
21414         Merge from coreutils.
21415         * lib/obstack.h: Whitespace changes.
21416         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
21417         and xcalloc return values.
21418         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
21419         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
21420         hang on OSF/1 5.1 for DIR on both local and remote file systems.
21421         Reported by (and fix confirmed by) Nelson H. F. Beebe.
21422         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
21423         error from mntctl.
21424         Use mntctl's return value to drive the entry-processing loop, since
21425         we can't rely on the value of the vmt_length member in the last
21426         entry.  On some systems doing so could result in exhausting
21427         virtual memory.  Based in part on a patch from Mike Jetzer.
21428
21429 2003-08-14  Jim Meyering  <jim@meyering.net>
21430         and Paul Eggert  <eggert@twinsun.com>
21431
21432         Merges from coreutils, plus other fixes.
21433         * lib/physmem.c: Merge in portability changes from gcc/libiberty
21434         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
21435         for credits and details.  Thanks to Kaveh Ghazi for helping
21436         to keep these files in sync.
21437         (ARRAY_SIZE): Define it.
21438         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
21439         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
21440         (memcasecmp): Don't assume size_t fits in unsigned int.
21441         Remove casts and duplicate code.
21442         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
21443         (memcpy): Remove definition.
21444         Merge in some clean-up and optimization changes from glibc.
21445         [BLOCKSIZE]: Move definition to top of file.
21446         Ensure that it is a multiple of 64.
21447         Rearrange loop exit tests so as to avoid performing an
21448         additional fread after encountering an error or EOF.
21449         * lib/md5.h (md5_uintptr): Define.
21450         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
21451         return to the initial working directory.  Preserve errno
21452         for caller.
21453         * lib/idcache.c: Include "xalloc.h".
21454         (xmalloc, xrealloc): Remove decls.
21455         (getuser): Remove casts no longer required in C89.
21456         * lib/human.c: Include stdio.h, for sprintf.
21457         * lib/group-member.c: Include "xalloc.h".
21458         (xmalloc, xrealloc): Remove decls.
21459         (get_group_info): Remove casts no longer required in C89.
21460         * lib/getusershell.c (readname): Remove casts no longer required in
21461         C89.
21462         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
21463         * lib/getline.c: Whitespace fix, from coreutils.
21464
21465 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21466
21467         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
21468         Check for isascii.
21469
21470         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21471         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21472         Undo previous (whitespace-only) change.
21473
21474 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21475
21476         * lib/exclude.c: Include <ctype.h>
21477         (IN_CTYPE_DOMAIN): New macro.
21478         (is_space): New fn.
21479         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
21480         and empty lines.
21481
21482         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21483         Undo previous (whitespace-only) change.
21484
21485 2003-08-13  Paul Eggert  <eggert@twinsun.com>
21486
21487         * config/srclist-update: Change update back to the old behavior,
21488         leaving whitespace alone.  Use one 'sed' command rather than a
21489         pipeline.
21490         (fixlicense): Now a variable, not a function.
21491         (remove_trailing_blanks): Remove.
21492         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
21493         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21494         Undo previous (whitespace-only) change.
21495
21496 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21497
21498         Merge from coreutils.
21499         * modules/euidaccess: Add lib_SOURCES, include for new
21500         file euidaccess.h
21501
21502 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21503
21504         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
21505         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
21506         Normalize leading white space and remove trailing white space.
21507
21508         Merge from coreutils
21509         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
21510
21511         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
21512         0.12.1.  These files are now being upgraded automatically by
21513         ../config/srclist-update.
21514
21515 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21516
21517         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
21518         Normalize leading white space and remove trailing white space.
21519         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
21520         notice, as per ../config/srclist-update.
21521
21522         Merge from coreutils.
21523         * lib/euidaccess.h: New file.
21524         * lib/euidaccess.c: Include it.
21525         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
21526         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
21527         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
21528
21529 2003-08-12  Paul Eggert  <eggert@twinsun.com>
21530
21531         * config/srclist-update: Add copyright notice.
21532         (remove_id_lines, remove_trailing_blanks): New constants.
21533         (fixfile): Use them to normalize spacing a bit in copied files.
21534         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
21535         Normalize leading white space and remove trailing white space.
21536
21537         * config/texinfo.tex: Sync with texinfo.
21538
21539         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
21540         strtoul.c from libc, to merge coreutils whitespace changes.
21541
21542         * config/srclist.txt: Get the following m4 files from gettext:
21543         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
21544         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
21545         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
21546         wint_t.m4.
21547
21548 2003-08-12  Karl Berry  <karl@gnu.org>
21549
21550         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
21551         been made.
21552
21553 2003-08-11  Paul Eggert  <eggert@twinsun.com>
21554
21555         * modules/gnu-source, m4/gnu-source.m4:
21556         Remove; we're assuming Autoconf 2.54 or later now.
21557         Suggested by Bruno Haible.
21558         * MODULES.html.sh (func_all_modules): Remove gnu-source.
21559
21560 2003-08-11  Bruno Haible  <bruno@clisp.org>
21561
21562         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
21563
21564 2003-08-11  Bruno Haible  <bruno@clisp.org>
21565
21566         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
21567         (vasnprintf): Use it instead of wcslen.
21568
21569 2003-08-11  Bruno Haible  <bruno@clisp.org>
21570
21571         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
21572         value to ensure that _Bool promotes to int. Use #define for _Bool when
21573         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
21574
21575 2003-08-10  Karl Berry  <karl@gnu.org>
21576
21577         * lib/regex.h: update from libc (whitespace fix).
21578
21579 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21580
21581         Merge some files from coreutils.  These changes were
21582         originally made by Jim Meyering.
21583         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
21584         many older Unixes require this.
21585         * lib/alloca.c (alloca): Remove cast to argument of free;
21586         no longer needed in C89.
21587         * lib/alloca_.h, regex.h: Fix white space to match
21588         what GNU indent does.
21589
21590 2003-08-09  Paul Eggert  <eggert@twinsun.com>
21591
21592         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
21593         apparently Emacs's Unicode mode got confused before my 2003-08-05
21594         checkin.
21595
21596 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21597
21598         * m4/extensions.m4: New file.
21599         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
21600         Require gl_USE_SYSTEM_EXTENSIONS.
21601         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
21602         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
21603
21604 2003-08-08  Paul Eggert  <eggert@twinsun.com>
21605
21606         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
21607         * modules/extensions, modules/gnu-source: New files.
21608         * modules/timespec, modules/unlocked-io: Depend on extensions.
21609
21610 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21611
21612         * modules/restrict: New file.
21613         * MODULES.html.sh (func_all_modules): Add restrict.
21614         * modules/regex: Depend on restrict.
21615
21616 2003-08-07  Paul Eggert  <eggert@twinsun.com>
21617
21618         * m4/restrict.m4: New file.
21619         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
21620
21621 2003-08-07  Bruno Haible  <bruno@clisp.org>
21622
21623         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
21624         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
21625
21626 2003-08-07  Bruno Haible  <bruno@clisp.org>
21627
21628         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
21629         makes the module 'getndelim2' compatible with the module 'getline'.
21630
21631 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21632
21633         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
21634         byte with "\201" to avoid glitches when editing that source file
21635         with multi-gnome-terminal.
21636
21637 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21638
21639         * lib/bumpalloc.h: Remove.
21640
21641 2003-08-05  Paul Eggert  <eggert@twinsun.com>
21642
21643         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
21644         * modules/bumpalloc: Remove.
21645
21646 2003-08-04  Paul Eggert  <eggert@twinsun.com>
21647
21648         * lib/getloadavg.c: Change copyright notice and spacing to conform to
21649         GNU coding style.
21650
21651         Merge from coreutils.
21652         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
21653         1. From glibc.
21654         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
21655         from Karl Berry, implemented by Jim Meyering.
21656         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
21657         from Dmitry V. Levin.
21658         Remove anachronistic cast of xrealloc.
21659         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
21660         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
21661         type. Otherwise, it wouldn't compile with at least /bin/cc on
21662         ymp-cray-unicos9.0.2.X.
21663         Combine two mostly-identical uses of alloca into one.
21664         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
21665
21666 2003-08-04  Dave Love  <d.love@dl.ac.uk>
21667
21668         [From Emacs.]
21669
21670         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
21671         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
21672         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
21673         obsolete NLIST_NAME_UNION.
21674         [__GNU__]: Undef BSD and FSCALE.
21675         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
21676
21677 2003-08-03  Paul Eggert  <eggert@twinsun.com>
21678
21679         * lib/stdbool_.h (_Bool): Make it signed char, instead of
21680         an enum type, so that it's guaranteed to promote to int.  See:
21681         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
21682
21683 2003-08-03  Karl Berry  <karl@gnu.org>
21684
21685         * config/depcomp: update from automake.
21686
21687 2003-07-31  Paul Eggert  <eggert@twinsun.com>
21688
21689         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
21690         (strerror): Don't assume that a printable int fits in 14 bytes.
21691
21692 2003-07-31  Bruno Haible  <bruno@clisp.org>
21693
21694         * modules/getpass-gnu: New file.
21695         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
21696
21697 2003-07-31  Bruno Haible  <bruno@clisp.org>
21698
21699         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
21700
21701 2003-07-24  Karl Berry  <karl@gnu.org>
21702
21703         * config/missing: update from automake.
21704
21705 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
21706             Bruno Haible  <bruno@clisp.org>
21707
21708         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
21709         * lib/getline.c (getline, getdelim): Likewise.
21710         Remove _GNU_SOURCE define; now it's defined in config.h through
21711         m4/getline.m4.
21712
21713 2003-07-23  Karl Berry  <karl@gnu.org>
21714
21715         * config/config.sub: update from prep.
21716
21717 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21718
21719         * modules/xalloc (Depends-on): Add exitfail.
21720         * modules/xmemcoll: Likewise.
21721
21722 2003-07-22  Paul Eggert  <eggert@twinsun.com>
21723
21724         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
21725         over-parenthesization in macros.
21726
21727         Sync with coreutils.
21728
21729         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
21730         required by C99.
21731
21732         Use `exit_failure' for xalloc and xmemcoll instead of their own
21733         private exit-failure variables.
21734         * lib/xalloc.h (xalloc_exit_failure): Remove.
21735         * lib/xmalloc.c: Likewise.  Include exitfail.h.
21736         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
21737         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
21738         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
21739         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
21740
21741 2003-07-20  Jim Meyering  <jim@meyering.net>
21742
21743         * modules/closeout (Depends-on): Add exitfail.
21744         Suggestion from Bruno Haible.
21745
21746 2003-07-19  Karl Berry  <karl@gnu.org>
21747
21748         * config/config.sub: update from prep.
21749
21750 2003-07-18  Paul Eggert  <eggert@twinsun.com>
21751
21752         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
21753         Remove.
21754         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
21755         to test that it can stand by itself.  Include "exitfail.h".
21756         Clients should set exit_failure instead.
21757         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
21758
21759 2003-07-18  Bruno Haible  <bruno@clisp.org>
21760
21761         * modules/getndelim2: New file.
21762         * modules/getline: Share files with module getndelim2.
21763         * modules/getnline: Depend on getndelim2 instead of sharing files with
21764         it. Add getnline.c to lib_SOURCES.
21765         * MODULES.html.sh (func_all_modules): Add getndelim2.
21766
21767 2003-07-18  Bruno Haible  <bruno@clisp.org>
21768
21769         * m4/getndelim2.m4: New file.
21770         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
21771         invoke gl_PREREQ_GETNDELIM2.
21772         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
21773         gl_PREREQ_GETNDELIM2.
21774         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
21775         gl_GETNDELIM2.
21776
21777 2003-07-18  Bruno Haible  <bruno@clisp.org>
21778
21779         * lib/getndelim2.h: New file.
21780         * lib/getndelim2.c: Make into a module of its own. Include config.h,
21781         getndelim2.h.
21782         (getndelim2): Make non-static. Change return type to ssize_t.
21783         * lib/getline.h: Change argument names.
21784         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
21785         * lib/getnline.c: Include getndelim2.h.
21786
21787 2003-07-18  Andreas Schwab  <schwab@suse.de>
21788
21789         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
21790
21791 2003-07-17  Karl Berry  <karl@gnu.org>
21792
21793         * config/config.sub: update from prep.
21794
21795 2003-07-17  Bruno Haible  <bruno@clisp.org>
21796
21797         * modules/getnline: New file.
21798         * modules/getline: Add lib/getndelim2.c to source file list.
21799         * MODULES.html.sh (func_all_modules): Add getnline.
21800
21801 2003-07-17  Bruno Haible  <bruno@clisp.org>
21802
21803         * m4/getnline.m4: New file.
21804
21805 2003-07-17  Bruno Haible  <bruno@clisp.org>
21806
21807         * m4/Makefile.am.in: Remove file.
21808         * m4/Makefile.am: Remove file.
21809         * m4/Makefile.in: Remove file.
21810
21811 2003-07-17  Bruno Haible  <bruno@clisp.org>
21812
21813         * lib/getnline.h: New file.
21814         * lib/getnline.c: New file.
21815         * lib/getndelim2.c: New file, extracted from getline.c.
21816         (getndelim2): Renamed from getdelim2, with added nmax argument.
21817         * lib/getline.c: Include getndelim2.c.
21818         (getdelim2): Moved out to getndelim2.c.
21819         (getline, getdelim): Update.
21820
21821 2003-07-17  Bruno Haible  <bruno@clisp.org>
21822
21823         * lib/Makefile.am: Remove file.
21824         * lib/Makefile.in: Remove file.
21825
21826 2003-07-17  Bruno Haible  <bruno@clisp.org>
21827
21828         * configure.in: Remove file.
21829         * Makefile.in: Remove file.
21830
21831 2003-07-17  Bruno Haible  <bruno@clisp.org>
21832
21833         * MODULES.html.sh: Put the </BODY> right before </HTML>.
21834
21835 2003-07-16  Karl Berry  <karl@gnu.org>
21836
21837         * config/srclist-update: was running fixlicense twice, which caused
21838                 texinfo.tex to be nullified for some reason.  Simplify,
21839                 $gplsrc is no longer needed as far as I can see?
21840
21841 2003-07-16  Jim Meyering  <jim@meyering.net>
21842
21843         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
21844
21845 2003-07-15  Paul Eggert  <eggert@twinsun.com>
21846
21847         * config/srclist.txt: Get the following files from gettext-runtime/intl
21848         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
21849         ref-del.sin.  From Bruno Haible.
21850         * config/srclist-update (fixfile): Change grep pattern again, since the
21851         previous fix didn't work (there was another trailing $).  Use
21852         '[$]' to escape the $s.
21853
21854 2003-07-15  Karl Berry  <karl@gnu.org>
21855
21856         * lib/vasnprintf.c: update from gettext.
21857
21858 2003-07-15  Karl Berry  <karl@gnu.org>
21859
21860         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
21861         gets expanded when surrounded by '$'.
21862
21863 2003-07-15  Jim Meyering  <jim@meyering.net>
21864
21865         * modules/save-cwd: Don't depend on error.  From Derek Price.
21866
21867 2003-07-15  Jim Meyering  <jim@meyering.net>
21868
21869         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
21870
21871 2003-07-14  Simon Josefsson  <jas@extundo.com>
21872
21873         * modules/mempcpy: New file.
21874         * MODULES.html.sh (func_all_modules): Add mempcpy.
21875
21876 2003-07-14  Simon Josefsson  <jas@extundo.com>
21877
21878         * m4/mempcpy.m4: New file.
21879
21880 2003-07-14  Simon Josefsson  <jas@extundo.com>
21881
21882         * lib/mempcpy.h: New file.
21883         * lib/mempcpy.c: New file.
21884
21885 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21886
21887         * modules/getdate, modules/posixtm: Depend on mktime.
21888
21889 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21890
21891         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
21892         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
21893         unicodeio.c, unicodeio.h, unlocked-io.h:
21894         Switch from LGPL to GPL.
21895
21896 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21897
21898         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
21899         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
21900         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
21901         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
21902         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
21903         updated automatically by ../config/srclist-update.  This changes
21904         their license from LPGL to GPL.
21905
21906 2003-07-14  Paul Eggert  <eggert@twinsun.com>
21907
21908         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
21909         assumed to refer to the root of the most recent stable gettext version.
21910         * config/srclistvars.sh: Add defaults for eggert.
21911         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
21912         Match "This program" as well as "The program".  This is needed
21913         for gettext.
21914
21915 2003-07-14  Jim Meyering  <jim@meyering.net>
21916
21917         Don't emit diagnostics.  Let callers do that.
21918         * lib/save-cwd.c: Don't include "error.h".
21919         (save_cwd): Don't call error.  Ensure that errno is valid
21920         when returning nonzero.
21921
21922         * lib/save-cwd.h (restore_cwd): Update prototype.
21923         * lib/save-cwd.c (restore_cwd): Remove two parameters.
21924         Simplify.  Don't call error upon failure.  Let callers do that.
21925         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
21926         when auditing is enabled.  But don't bother updating the #if.
21927
21928 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
21929
21930         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
21931         it breaks C++ compilation.
21932         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
21933
21934 2003-07-10  Simon Josefsson  <jas@extundo.com>
21935
21936         * modules/strchrnul (Makefile.am): Add strchrnul.h.
21937
21938 2003-07-10  Jim Meyering  <jim@meyering.net>
21939
21940         * m4/clock_time.m4: Remove trailing blank.
21941         * m4/intmax_t.m4: Likewise.
21942
21943 2003-07-10  Jim Meyering  <jim@meyering.net>
21944
21945         * lib/vasnprintf.c: Remove trailing blanks.
21946         Make cpp indentation consistent.
21947
21948 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21949
21950         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
21951         posixver.c, strftime.c, strnlen.c, strverscmp.c:
21952         Switch from LGPL to GPL.
21953
21954 2003-07-09  Paul Eggert  <eggert@twinsun.com>
21955
21956         * config/srclist.txt: Sort sublists.  Add
21957         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
21958         that differ from gnulib for one reason or another; we'd like this list
21959         to be smaller but for now let's document what we have.
21960
21961 2003-07-08  Paul Eggert  <eggert@twinsun.com>
21962
21963         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
21964         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
21965         and sweeter "eval x=$x".
21966         * config/srclist.txt: Get lib/argp* from glibc.
21967
21968 2003-07-07  Paul Eggert  <eggert@twinsun.com>
21969
21970         * lib/mktime.c: Fix some boundary cases and remove need for floating
21971         point.
21972
21973         Issue a compile-time diagnostic if time_t is floating point, or if
21974         two's complement arithmetic is not in effect, or if arithmetic
21975         right shift does not propagate the sign.  These assumptions were
21976         all in the original code but they weren't checked.
21977
21978         (TIME_T_MIDPOINT, verify): New macros.
21979         (__isleap): Remove; it has integer overflow problems.
21980         (leapyear): New function, without those problems.
21981         (ydhms_tm_diff): Remove; splitting into two parts.
21982         (ydhms_diff): New function, containing the arithmetic part of
21983         the old ydhms_tm_diff function.  Issue a compile-time
21984         diagnostic if we are not using C99 integer division.
21985         Avoid casts when possible.
21986         (guess_time_tm): New function, containing the checking part of
21987         the old ydhms_tm_diff function.  Return the new value, rather than
21988         the difference between it and the old.  Accept a new argument T
21989         so that *T specifies the old value.  Check for overflow in the result.
21990
21991         (__mktime_internal): Use a time_t offset, not a long int offset.
21992         This undoes the 2003-06-04 change, which is no longer needed now
21993         that we have better overflow checking.
21994         (localtime_offset): Likewise.
21995
21996         (__mktime_internal): Avoid harmful overflow on hosts where time_t
21997         and long are 64-bit but int is only 32-bit.
21998         (ydhms_diff): Use long int to store year1 and yday1.
21999         Issue a compile-time diagnostic if long int is not wide enough.
22000
22001         (__mktime_internal): Use long int to store adjusted year and yday.
22002         Use plain C rather than preprocessor commands, if that doesn't
22003         affect efficiency.
22004         Check for overflow (and try to repair) after each probe
22005         rather than checking only at the very end.  This avoids some bugs
22006         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
22007         does not equal GMT offset at maximum time).
22008         Use integer to check for overflow rather than floating point; this
22009         is more portable to non-IEEE hosts, and is a tad faster.
22010         When we detect that we are oscillating between two values,
22011         don't check whether tm_isdst has the requested value, since
22012         we already know the answer.  When tm_isdst has the wrong value,
22013         use a different heuristic to find the right one, based on the
22014         extreme values actually observed in practice in tz2003a,
22015         rather than the (overly optimistic) "previous 3 calendar quarters".
22016
22017         (not_equal_tm, print_tm, check_result): Use "const T" rather than
22018         "T const" to accommodate glibc style.
22019         (check_result): Use less-confusing report format.  "long" -> "long int.
22020         (main): Likewise.
22021         Don't loop if the iteration overflows time_t.
22022         Allow a negative step in the iteration.
22023
22024 2003-07-06  Karl Berry  <karl@gnu.org>
22025
22026         * config/depcomp: update from automake.
22027         * config/config.sub: update from prep.
22028
22029 2003-07-03  Karl Berry  <karl@gnu.org>
22030
22031         * config/config.guess: update from prep.
22032
22033 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22034
22035         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
22036         xreadlink.c now includes it unconditionally.
22037
22038 2003-07-01  Paul Eggert  <eggert@twinsun.com>
22039
22040         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
22041         having it depend on HAVE_SYS_TYPES_H.
22042
22043 2003-07-01  Bruno Haible  <bruno@clisp.org>
22044
22045         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
22046         <sys/types.h> should be sufficient.
22047         Reported by Paul Eggert.
22048
22049 2003-06-26  Karl Berry  <karl@gnu.org>
22050
22051         * config/depcomp: update from automake.
22052
22053 2003-06-26  Bruno Haible  <bruno@clisp.org>
22054
22055         * modules/human: Depend on module stdbool.
22056
22057 2003-06-25  Bruno Haible  <bruno@clisp.org>
22058
22059         * modules/readlink: New file.
22060         * modules/xreadlink: Depend on it.
22061         * MODULES.html.sh (func_all_modules): Add readlink.
22062
22063 2003-06-25  Bruno Haible  <bruno@clisp.org>
22064
22065         * m4/readlink.m4: New file.
22066
22067 2003-06-25  Bruno Haible  <bruno@clisp.org>
22068
22069         * lib/readlink.c: New file.
22070
22071 2003-06-22  Karl Berry  <karl@gnu.org>
22072
22073         * config/srclist.txt: update mkinstalldirs from automake.
22074         * config/mkinstalldirs: update.
22075
22076 2003-06-22  Bruno Haible  <bruno@clisp.org>
22077
22078         Portability to mingw32.
22079         * m4/ssize_t.m4: New file, from GNU gettext.
22080         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
22081         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
22082
22083 2003-06-22  Bruno Haible  <bruno@clisp.org>
22084
22085         * modules/safe-read: Add m4/ssize_t.m4.
22086         * modules/xreadlink: Add m4/ssize_t.m4.
22087
22088 2003-06-20  Bruno Haible  <bruno@clisp.org>
22089
22090         Assume C89, so PARAMS isn't needed.
22091         * lib/unicodeio.h (PARAMS): Remove.
22092         * lib/unicodeio.c: Don't use PARAMS.
22093
22094 2003-06-18  Karl Berry  <karl@gnu.org>
22095
22096         * config/config.{guess,sub}: update from prep.
22097
22098 2003-06-18  Jim Meyering  <jim@meyering.net>
22099
22100         Merge changes from coreutils.
22101         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
22102         Remove explicit declarations of xmalloc and realloc.
22103         Include xalloc.h.
22104         (read_utmp): Remove anachronistic cast of xmalloc.
22105
22106 2003-06-17  Paul Eggert  <eggert@twinsun.com>
22107
22108         Assume C89, so PARAMS isn't needed.
22109         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
22110         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
22111         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
22112         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
22113         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
22114         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
22115         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
22116         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
22117         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
22118         lib/xstrtod.h, lib/xstrtol.h: Likewise.
22119         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
22120         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
22121         no longer needed. Anyway, config.h should always be included before any
22122         other file.
22123
22124 2003-06-11  Simon Josefsson  <jas@extundo.com>
22125
22126         * modules/sysexits: New file.
22127         * MODULES.html.sh (func_all_modules): Add sysexits.
22128
22129 2003-06-11  Simon Josefsson  <jas@extundo.com>
22130
22131         * lib/sysexit_.h: New file.
22132
22133 2003-06-11  Derek Price  <derek@ximbiot.com>
22134
22135         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
22136         necessary.
22137
22138 2003-06-11  Bruno Haible  <bruno@clisp.org>
22139
22140         * m4/sysexits.m4: New file.
22141
22142 2003-06-10  Simon Josefsson  <jas@extundo.com>
22143
22144         * lib/argp.h: New file, from glibc.
22145         * lib/argp-ba.c: New file, from glibc.
22146         * lib/argp-eexst.c: New file, from glibc.
22147         * lib/argp-fmtstream.c: New file, from glibc.
22148         * lib/argp-fmtstream.h: New file, from glibc.
22149         * lib/argp-fs-xinl.c: New file, from glibc.
22150         * lib/argp-help.c: New file, from glibc.
22151         * lib/argp-namefrob.h: New file, from glibc.
22152         * lib/argp-parse.c: New file, from glibc.
22153         * lib/argp-pv.c: New file, from glibc.
22154         * lib/argp-pvh.c: New file, from glibc.
22155         * lib/argp-xinl.c: New file, from glibc.
22156
22157 2003-06-10  Simon Josefsson  <jas@extundo.com>
22158
22159         * modules/strchrnul: New file.
22160
22161 2003-06-10  Simon Josefsson  <jas@extundo.com>
22162
22163         * modules/argp: New file.
22164
22165 2003-06-10  Simon Josefsson  <jas@extundo.com>
22166
22167         * m4/strchrnul.m4: New file.
22168
22169 2003-06-10  Simon Josefsson  <jas@extundo.com>
22170
22171         * lib/strchrnul.h: New file.
22172         * lib/strchrnul.c: New file.
22173
22174 2003-06-10  Bruno Haible  <bruno@clisp.org>
22175
22176         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
22177
22178 2003-06-07  Karl Berry  <karl@gnu.org>
22179
22180         * config/config.{guess,sub}: update from prep.
22181
22182 2003-06-07  Jim Meyering  <jim@meyering.net>
22183
22184         * modules/strtod: Use $(...) notation, not @...@ for
22185         AC_REPLACE'd variables.
22186         * modules/localcharset: Likewise.
22187
22188 2003-06-07  Jim Meyering  <jim@meyering.net>
22189
22190         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
22191         in place of my name in the copyright comment.
22192         Remove definition and uses of __P.
22193
22194         From coreutils.
22195         * lib/stat.c: Don't declare xmalloc explicitly.
22196         Instead, include "xalloc.h".
22197         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
22198         xrealloc, and xcalloc return values.
22199         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
22200         Improve comment.
22201         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
22202
22203 2003-06-07  Bruno Haible  <bruno@clisp.org>
22204
22205         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
22206         avoid AC_CONFIG_LINKS.
22207         * modules/fnmatch (Makefile.am): Use explicit creation rule for
22208         fnmatch.h, to avoid AC_CONFIG_LINKS.
22209         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
22210
22211 2003-06-07  Bruno Haible  <bruno@clisp.org>
22212
22213         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
22214         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
22215         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22216         directory.
22217         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
22218         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
22219         directory.
22220
22221 2003-06-06  Jim Meyering  <jim@meyering.net>
22222
22223         Merge from coreutils.
22224         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
22225         Consolidate declarations and initializations of *_base* locals.
22226
22227         Merge from coreutils.
22228         This avoids a core dump on systems without GNU putenv,
22229         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
22230         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
22231         (unsetenv): New static function, from GNU libc.
22232         (rpl_putenv): Use it.
22233
22234         * lib/modechange.c: Remove trailing blanks.
22235
22236         Merge from coreutils.
22237         * lib/fsusage.c: Remove declaration of statfs.
22238         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
22239
22240         * lib/posixtm.c: Include <stdbool.h> unconditionally.
22241
22242 2003-06-06  Jim Meyering  <jim@meyering.net>
22243
22244         * lib/stdbool_.h: Renamed from stdbool.h.in.
22245
22246 2003-06-06  Jim Meyering  <jim@meyering.net>
22247             Bruno Haible  <bruno@clisp.org>
22248
22249         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
22250         Adjust Makefile.am snippet not to redirect directly to target.
22251         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
22252
22253 2003-06-05  Paul Eggert  <eggert@twinsun.com>
22254
22255         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
22256         mismatch, look in future quarters as well as past.  This fixes a
22257         bug when processing fall-backwards gaps immediately after a long
22258         period of daylight-saving time.
22259
22260         * lib/mktime.c: Assume freestanding C89 or better.
22261         (HAVE_LIMITS_H): Remove.  Assume it's 1.
22262         (__P): Remove; not used.
22263         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
22264         (mktime, not_equal_tm, print_tm, check_result,
22265         main): Use prototypes.  Use const * where appropriate.
22266         (main): Fix typo in testing code that uncovered by above changes.
22267         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
22268
22269 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22270
22271         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
22272         locale.h, localeconv.  This merges changes from coreutils.
22273
22274         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
22275         It can be removed after the next Autoconf is released.
22276         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
22277         needed.
22278
22279 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22280
22281         * lib/mktime.c: Fix Debian bug 177940
22282         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
22283         (localtime_offset): Now long int, not time_t, because we want it
22284         to be guaranteed to be signed.  All uses changed.
22285         (__mktime_internal): If overflow would occur when adding offset,
22286         don't add it.
22287
22288         Merge 'human' changes from coreutils.  Rewrite to support
22289         locale-specific notations like thousands separators.
22290         * lib/human.c: Simplify authorship notice.
22291         Include human.h immediately after config.h.
22292         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
22293         <limits.h>: Do not include, since human.h does.
22294         (SIZE_MAX, UINTMAX_MAX): New macros.
22295         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
22296         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
22297         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
22298         (power_letter): Renamed from suffixes.
22299         (generate_suffix_backwards): Remove.
22300         (adjust_value): Now takes int style (because of human.h changes)
22301         and long double value (for greater precision on some platforms).
22302         (group_number): New function.
22303         (human_readable): Use it.  Use integer options, not enum.
22304         Put the options before the sizes in the arg list.
22305         Support all the new options.
22306         The old human_readable function has been removed;
22307         use inttostr.h instead.
22308         (human_readable, default_block_size, humblock):
22309         Use uintmax_t, not int, for block sizes.
22310         (human_readable_inexact, block_size_types): Remove.
22311         (block_size_opts): New constant.
22312         (human_options): Renamed from human_block_size, with new signature
22313         that allows block sizes up to UINTMAX_MAX.  All callers changed.
22314         * lib/human.h: Add copyright and authorship notice.
22315         Include <limits.h> and <stdbool.h> unconditionally.
22316         (PARAMS): Remove.  All uses removed.
22317         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
22318         (enum human_inexact_style): Remove tag; now a nameless enum.
22319         (human_floor, human_ceiling, human_round_to_even): Now have
22320         values 2, 0, 1 rather than -1, 1, 0.
22321         (human_group_digits, human_suppress_point_zero, human_autoscale,
22322         human_base_1024, human_SI, human_B): New constants.
22323         (human_readable_inexact, human_block_size): Remove.
22324         (human_readable): Size args are now uintmax_t, not int.
22325         (human_options): New decl.
22326
22327         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
22328         unnecessary now that we assume C89 or better.  This change
22329         imported from coreutils.
22330
22331         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22332         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
22333         in the 2003-05-30 sync from glibc.
22334
22335         .h files should stand alone, but we shouldn't include <sys/types.h>
22336         if we can get away with just <stddef.h>.
22337
22338         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
22339         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
22340         rather than <sys/types.h>, as we merely need size_t.
22341         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
22342         to get size_t.
22343         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
22344         Include <stdio.h>, to get FILE.
22345         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
22346         memcasecmp.h has included <stddef.h> and all we need is size_t.
22347         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
22348         our interface, instead of including <sys/types.h>
22349
22350 2003-06-04  Paul Eggert  <eggert@twinsun.com>
22351
22352         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
22353         now, as glibc mktime is buggy on non-glibc systems.
22354
22355 2003-06-03  Karl Berry  <karl@gnu.org>
22356
22357         * config/config.sub: update from prep.
22358
22359 2003-06-02  Paul Eggert  <eggert@twinsun.com>
22360
22361         [from coreutils]
22362         Fix some minor time-related bugs with POSIX time arguments.
22363         Some valid time stamps were being rejected (notably -1, and
22364         time stamps before 1900 on 64-bit hosts).  And some invalid
22365         time stamps were being accepted, e.g. September 31.
22366
22367         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
22368         that we can return (time_t) -1 successfully.
22369         * lib/posixtm.c: Likewise.
22370         [HAVE_STDBOOL_H]: Include <stdbool.h>.
22371         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
22372         (t): Remove static var.
22373         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
22374         of static var.  All uses changed.
22375         (year): Do not reject years before 1900; they can occur with
22376         64-bit time_t.
22377         (posix_time_parse): Do not check for out-of-range components;
22378         that is now the caller's responsibility, since our checks were
22379         only approximations.
22380         (posixtime): Use mktime to check for out-of-range components,
22381         since it knows them exactly.
22382         If mktime returns (time_t) -1, check whether an error actually occurred
22383         by invoking localtime on -1.
22384         (main) [TEST_POSIXTIME]: Check for input data errors, and report
22385         posixtime failures better.
22386         Improve the test data (in comments only).
22387
22388 2003-06-02  Karl Berry  <karl@gnu.org>
22389
22390         * config/mkinstalldirs (version): new variable.
22391         (--version): new option.
22392         (usage): improve message.
22393
22394 2003-05-30  Karl Berry  <karl@gnu.org>
22395
22396         * lib/mktime.c: update from libc.
22397
22398 2003-05-30  Bruno Haible  <bruno@clisp.org>
22399
22400         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
22401         * config/config.rpath: Upgrade to gettext-0.12.1.
22402
22403 2003-05-30  Bruno Haible  <bruno@clisp.org>
22404
22405         * m4/gettext.m4: Upgrade to gettext-0.12.1.
22406         * m4/nls.m4: New file, from gettext-0.12.1.
22407         * m4/po.m4: New file, from gettext-0.12.1.
22408         * m4/progtest.m4: Upgrade to gettext-0.12.1.
22409
22410 2003-05-30  Bruno Haible  <bruno@clisp.org>
22411
22412         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
22413         * lib/localcharset.h: Likewise.
22414         * lib/localcharset.c: Likewise.
22415
22416 2003-05-29  Karl Berry  <karl@gnu.org>
22417
22418         * config/config.rpath: update from gettext.
22419
22420 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22421
22422         Assume the headers required for C89 freestanding compilers.
22423         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
22424         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
22425         * m4/human.m4 (gl_HUMAN): Likewise.
22426         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
22427         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
22428         * m4/userspec.m4 (gl_USERSPEC): Likewise.
22429         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
22430         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
22431         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
22432
22433 2003-05-28  Paul Eggert  <eggert@twinsun.com>
22434
22435         Assume the headers required for C89 freestanding compilers.
22436         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
22437         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
22438         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
22439         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
22440         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
22441         define, since <limits.h> is guaranteed to do that.
22442         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
22443         * lib/exclude.c: Include <stdbool.h> unconditionally.
22444         * lib/tempname.c: Include <stddef.h> unconditionally.
22445         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
22446         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
22447         <stddef.h> does that.
22448         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
22449         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
22450         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
22451         needed.
22452         * lib/xstrtol.c: Likewise.
22453         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
22454         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
22455
22456         * lib/addext.c (addext): Use assignment rather than cast, to avoid
22457         warnings on some platforms.
22458
22459         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
22460         arbitrarily.
22461
22462 2003-05-26  Jim Meyering  <jim@meyering.net>
22463
22464         Merge in a change from coreutils:
22465         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
22466         that is guaranteed to be `no'.  Use `no_such_member' to indicate
22467         that condition, rather than `-1' which is slightly misleading.
22468         Change the name of the cache variable to have the gl_ prefix.
22469         Prompted by a patch from Richard Dawe for DJGPP.
22470
22471 2003-05-24  Karl Berry  <karl@gnu.org>
22472
22473         * config/config.guess: update from prep.
22474
22475 2003-05-22  Karl Berry  <karl@gnu.org>
22476
22477         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
22478
22479 2003-05-20  Karl Berry  <karl@gnu.org>
22480
22481         * config/config.guess: update from prep.
22482
22483 2003-05-18  Karl Berry  <karl@gnu.org>
22484
22485         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
22486         might actually be set by the user.
22487
22488         * config/depcomp, install-sh, mdate-sh: update from automake.
22489
22490 2003-05-17  Bruno Haible  <bruno@clisp.org>
22491
22492         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
22493         invalid expansion for AC_EGREP_CPP.
22494         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
22495         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
22496         Suggested by Akim Demaille <akim@epita.fr> in
22497         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
22498
22499 2003-05-12  Jim Meyering  <jim@meyering.net>
22500
22501         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
22502         the space-padded-by-default conversion specifiers, %e, %k, %l.
22503
22504 2003-05-12  Bruno Haible  <bruno@clisp.org>
22505
22506         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
22507         the string is longer than 4 KB.
22508
22509 2003-05-11  Karl Berry  <karl@gnu.org>
22510
22511         * config/config.{guess,sub}: update from prep.
22512
22513 2003-05-09  Bruno Haible  <bruno@clisp.org>
22514
22515         * modules/error: Add m4/strerror_r.m4 to file list.
22516
22517 2003-05-03  Bruno Haible  <bruno@clisp.org>
22518
22519         Upgrade to Unicode-4.0.
22520         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
22521         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
22522         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
22523         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
22524         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
22525         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
22526         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
22527         Change width of U+E0100..U+E01EF from 1 to 0.
22528
22529 2003-04-25  Jim Meyering  <jim@meyering.net>
22530
22531         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
22532         of type size_t, not int.
22533
22534 2003-04-25  Bruno Haible  <bruno@clisp.org>
22535
22536         * lib/copy-file.c: Include <stddef.h>, for size_t.
22537
22538 2003-04-21  Paul Eggert  <eggert@twinsun.com>
22539
22540         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
22541         code which expansion is under static control.  Patch imported from
22542         Akim Demaille's patch to Bison; see
22543         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
22544
22545 2003-04-14  Bruno Haible  <bruno@clisp.org>
22546
22547         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
22548
22549 2003-04-11  Jim Meyering  <jim@meyering.net>
22550
22551         Merge changes from Coreutils.
22552
22553         2003-03-22  Jim Meyering  <jim@meyering.net>
22554
22555         * lib/strftime.c (widen): Cast alloca return value to proper type.
22556
22557         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
22558
22559         From GNU libc.
22560         * lib/strftime.c (my_strftime): Handle very large width
22561         specifications for numeric values correctly.  Improve checks for
22562         overflow.
22563
22564         2003-01-19  Jim Meyering  <jim@meyering.net>
22565
22566         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
22567         definitions.
22568         (nl_get_alt_digit) [! defined my_strftime]: Define.
22569         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
22570         _nl_get_alt_digit and _nl_get_walt_digit.
22571
22572         * lib/strftime.c (my_strftime): Merge in locale-related changes from
22573         libc. These changes have no effect outside of _LIBC.
22574
22575 2003-04-10  Bruno Haible  <bruno@clisp.org>
22576
22577         * modules/findprog: New file.
22578         * MODULES.html.sh (func_all_modules): Add it.
22579
22580 2003-04-10  Bruno Haible  <bruno@clisp.org>
22581
22582         * m4/findprog.m4: New file.
22583         * m4/eaccess.m4: New file.
22584
22585 2003-04-10  Bruno Haible  <bruno@clisp.org>
22586
22587         * lib/findprog.h: New file, from GNU gettext.
22588         * lib/findprog.c: New file, from GNU gettext.
22589
22590 2003-04-05  Jim Meyering  <jim@meyering.net>
22591
22592         Merge changes from Coreutils.
22593
22594         * lib/exclude.h (PARAMS): Remove definition and uses.
22595         * lib/exclude.c: Remove uses of `PARAMS'.
22596
22597         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
22598         Add test-cases for DOS filenames. Declare program_name.
22599         (main): Set up program_name.  Patch by Rich Dawe.
22600
22601         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
22602         error from mntctl.
22603         Use mntctl's return value to drive the entry-processing loop, since
22604         we can't rely on the value of the vmt_length member in the last
22605         entry.  On some systems doing so could result in exhausting
22606         virtual memory.  Based in part on a patch from Mike Jetzer.
22607
22608 2003-04-04  Bruno Haible  <bruno@clisp.org>
22609
22610         * modules/linebreak: New file.
22611         * MODULES.html.sh (func_all_modules): Add it.
22612
22613 2003-04-04  Bruno Haible  <bruno@clisp.org>
22614
22615         * m4/linebreak.m4: New file.
22616
22617 2003-04-04  Bruno Haible  <bruno@clisp.org>
22618
22619         * lib/linebreak.h: New file, from GNU gettext.
22620         * lib/linebreak.c: New file, from GNU gettext with slight
22621         modifications.
22622         * lib/lbrkprop.h: New file, from GNU gettext.
22623
22624 2003-04-03  Bruno Haible  <bruno@clisp.org>
22625
22626         * modules/utf8-ucs4: New file.
22627         * modules/utf16-ucs4: New file.
22628         * modules/ucs4-utf8: New file.
22629         * modules/ucs4-utf16: New file.
22630         * MODULES.html.sh (func_all_modules): Add them.
22631
22632 2003-04-03  Bruno Haible  <bruno@clisp.org>
22633
22634         * m4/utf-ucs4.m4: New file.
22635         * m4/ucs4-utf.m4: New file.
22636
22637 2003-04-03  Bruno Haible  <bruno@clisp.org>
22638
22639         * lib/utf8-ucs4.h: New file, from GNU gettext.
22640         * lib/utf16-ucs4.h: New file, from GNU gettext.
22641         * lib/ucs4-utf8.h: New file, from GNU gettext.
22642         * lib/ucs4-utf16.h: New file, from GNU gettext.
22643
22644 2003-04-02  Bruno Haible  <bruno@clisp.org>
22645
22646         * modules/binary-io: New file.
22647         * MODULES.html.sh (func_all_modules): Add it.
22648
22649 2003-04-02  Bruno Haible  <bruno@clisp.org>
22650
22651         * lib/binary-io.h: New file, from GNU gettext.
22652
22653 2003-04-01  Bruno Haible  <bruno@clisp.org>
22654
22655         * modules/pathname: New file.
22656         * MODULES.html.sh (func_all_modules): Add it.
22657
22658 2003-04-01  Bruno Haible  <bruno@clisp.org>
22659
22660         * lib/pathname.h: New file, from GNU gettext.
22661         * lib/concatpath.c: New file, from GNU gettext.
22662
22663 2003-03-30  Bruno Haible  <bruno@clisp.org>
22664
22665         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
22666
22667 2003-03-30  Bruno Haible  <bruno@clisp.org>
22668
22669         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
22670         function chown() doesn't exist.
22671
22672 2003-03-28  Bruno Haible  <bruno@clisp.org>
22673
22674         * modules/copy-file: New file.
22675         * MODULES.html.sh (func_all_modules): Add it.
22676
22677 2003-03-28  Bruno Haible  <bruno@clisp.org>
22678
22679         * m4/copy-file.m4: New file.
22680
22681 2003-03-28  Bruno Haible  <bruno@clisp.org>
22682
22683         * lib/copy-file.h: New file, from GNU gettext.
22684         * lib/copy-file.c: New file, from GNU gettext.
22685
22686 2003-03-18  Jim Meyering  <jim@meyering.net>
22687
22688         * lib/quote.c (quote_n): Fix typo in comment.
22689
22690 2003-03-18  Bruno Haible  <bruno@clisp.org>
22691
22692         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
22693         checking.
22694         * m4/onceonly_2_57.m4: Likewise.
22695
22696 2003-03-17  Bruno Haible  <bruno@clisp.org>
22697
22698         * m4/onceonly.m4: Require autoconf 2.54 or newer.
22699         (m4_quote): Remove macro.
22700         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
22701
22702 2003-03-14  Jim Meyering  <jim@meyering.net>
22703
22704         Merge changes from Coreutils.
22705         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
22706         to be const, in order to avoid warnings.
22707         (obstack_room): Likewise.
22708         (obstack_empty_p): Likewise.
22709
22710 2003-03-14  Bruno Haible  <bruno@clisp.org>
22711
22712         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
22713         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
22714
22715 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22716
22717         Merge changes from Bison.
22718         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
22719         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
22720         when compiling Bison 1.875's `bitset bset = obstack_alloc
22721         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
22722         * lib/hash.c: Include <stdbool.h> unconditionally.
22723
22724 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22725
22726         * m4/onceonly.m4 (m4_quote): New macro.
22727         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
22728         Quote AC_FOREACH variable-expansions properly.
22729
22730 2003-03-13  Paul Eggert  <eggert@twinsun.com>
22731
22732         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
22733
22734 2003-03-09  Paul Eggert  <eggert@twinsun.com>
22735
22736         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
22737         Reported by Bruce Becker; see:
22738         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
22739
22740 2003-03-03  Paul Eggert  <eggert@twinsun.com>
22741             Bruno Haible  <bruno@clisp.org>
22742
22743         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
22744         Reported by John Hughes, see
22745         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
22746
22747 2003-02-20  Bruno Haible  <bruno@clisp.org>
22748
22749         * MODULES.html.sh (func_all_modules): Add poll.
22750
22751 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22752
22753         * modules/poll: New file.
22754
22755 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22756
22757         * lib/poll_.h: New file.
22758         * lib/poll.c: New file.
22759
22760 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
22761
22762         * m4/poll.m4: New file.
22763
22764 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22765
22766         * modules/mathl: New file.
22767
22768 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22769
22770         * lib/mathl.h: New file.
22771         * lib/acosl.c: New file.
22772         * lib/asinl.c: New file.
22773         * lib/atanl.c: New file.
22774         * lib/ceill.c: New file.
22775         * lib/cosl.c: New file.
22776         * lib/expl.c: New file.
22777         * lib/floorl.c: New file.
22778         * lib/frexpl.c: New file.
22779         * lib/ldexpl.c: New file.
22780         * lib/logl.c: New file.
22781         * lib/sincosl.c: New file.
22782         * lib/sinl.c: New file.
22783         * lib/sqrtl.c: New file.
22784         * lib/tanl.c: New file.
22785         * lib/trigl.c: New file.
22786         * lib/trigl.h: New file.
22787
22788 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
22789
22790         * m4/mathl.m4: New file.
22791
22792 2003-02-18  Bruno Haible  <bruno@clisp.org>
22793
22794         * MODULES.html.sh (func_all_modules): Add mathl.
22795
22796 2003-02-17  Bruno Haible  <bruno@clisp.org>
22797
22798         * modules/mkdtemp: New module.
22799         * MODULES.html.sh (func_all_modules): Add it.
22800
22801 2003-02-17  Bruno Haible  <bruno@clisp.org>
22802
22803         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
22804
22805 2003-02-17  Bruno Haible  <bruno@clisp.org>
22806
22807         * lib/mkdtemp.h: New file, from GNU gettext.
22808         * lib/mkdtemp.c: New file, from GNU gettext.
22809
22810 2003-02-02  Jim Meyering  <jim@meyering.net>
22811
22812         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
22813         e.g. glibc-2.2.93.
22814
22815 2003-01-31  Bruno Haible  <bruno@clisp.org>
22816
22817         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
22818         'rpl_rename'.
22819         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
22820         'rpl_strnlen'.
22821         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
22822         'rpl_strtod'.
22823         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
22824         'rpl_utime'.
22825
22826 2003-01-31  Bruno Haible  <bruno@clisp.org>
22827
22828         * lib/rename.c: #undef rename before defining rpl_rename.
22829         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
22830
22831 2003-01-30  Bruno Haible  <bruno@clisp.org>
22832
22833         * modules/vasnprintf, modules/vasprintf: New modules.
22834         * MODULES.html.sh (func_all_modules): Add them.
22835
22836 2003-01-30  Bruno Haible  <bruno@clisp.org>
22837
22838         * m4/signed.m4: New file, from GNU gettext.
22839         * m4/longdouble.m4: New file, from GNU gettext.
22840         * m4/wchar_t.m4: New file, from GNU gettext.
22841         * m4/wint_t.m4: New file, from GNU gettext.
22842         * m4/vasnprintf.m4: New file.
22843         * m4/vasprintf.m4: New file.
22844
22845 2003-01-30  Bruno Haible  <bruno@clisp.org>
22846
22847         * lib/printf-args.h: New file, from GNU gettext.
22848         * lib/printf-args.c: New file, from GNU gettext.
22849         * lib/printf-parse.h: New file, from GNU gettext.
22850         * lib/printf-parse.c: New file, from GNU gettext.
22851         * lib/vasnprintf.h: New file, from GNU gettext.
22852         * lib/vasnprintf.c: New file, from GNU gettext.
22853         * lib/asnprintf.c: New file, from GNU gettext.
22854         * lib/vasprintf.h: New file, from GNU gettext with modifications.
22855         * lib/vasprintf.c: New file, from GNU gettext.
22856         * lib/asprintf.c: New file, from GNU gettext.
22857
22858 2003-01-29  Bruno Haible  <bruno@clisp.org>
22859
22860         * modules/stpncpy: New module.
22861         * MODULES.html.sh (func_all_modules): Add it.
22862
22863 2003-01-29  Bruno Haible  <bruno@clisp.org>
22864
22865         * m4/stpncpy.m4: New file.
22866
22867 2003-01-29  Bruno Haible  <bruno@clisp.org>
22868
22869         * lib/stpncpy.h: New file, from GNU gettext with modifications.
22870         * lib/stpncpy.c: New file, from GNU gettext with modifications.
22871
22872 2003-01-28  Bruno Haible  <bruno@clisp.org>
22873
22874         * modules/c-ctype: New module.
22875         * MODULES.html.sh (func_all_modules): Add it.
22876
22877 2003-01-28  Bruno Haible  <bruno@clisp.org>
22878
22879         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
22880         Paul Eggert.
22881         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
22882         Paul Eggert.
22883
22884 2003-01-27  Bruno Haible  <bruno@clisp.org>
22885
22886         * modules/xsetenv: New module.
22887         * MODULES.html.sh (func_all_modules): Add it.
22888
22889 2003-01-27  Bruno Haible  <bruno@clisp.org>
22890
22891         * lib/xsetenv.h: New file, from GNU gettext.
22892         * lib/xsetenv.c: New file, from GNU gettext.
22893
22894 2003-01-23  Jim Meyering  <jim@meyering.net>
22895
22896         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
22897         from working on systems without dirfd (at least Irix and OSF1/Tru64).
22898
22899 2003-01-23  Bruno Haible  <bruno@clisp.org>
22900
22901         * modules/minmax: New module.
22902         * MODULES.html.sh (func_all_modules): Add it.
22903
22904 2003-01-23  Bruno Haible  <bruno@clisp.org>
22905
22906         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
22907         Eggert.
22908
22909 2003-01-22  Bruno Haible  <bruno@clisp.org>
22910
22911         * modules/exit: New module.
22912         * MODULES.html.sh (func_all_modules): Add it.
22913
22914 2003-01-22  Bruno Haible  <bruno@clisp.org>
22915
22916         * lib/exit.h: New file, from GNU gettext.
22917
22918 2003-01-19  Bruno Haible  <bruno@clisp.org>
22919
22920         * gnulib-tool: Recognize option --extract-maintainer.
22921         (func_get_maintainer): New function.
22922         * modules/*: Add Maintainer entry.
22923
22924 2003-01-16  Jim Meyering  <jim@meyering.net>
22925
22926         * m4/regex.m4: The `regex' struct is both input and output.
22927         Initialize it before each use.  Patch by Tim Waugh.
22928
22929 2003-01-16  Bruno Haible  <bruno@clisp.org>
22930
22931         * MODULES.html.sh: Add a table of contents. Add the module name as
22932         leftmost column. Add hyperlinks.
22933
22934 2003-01-15  Bruno Haible  <bruno@clisp.org>
22935
22936         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
22937
22938 2003-01-15  Bruno Haible  <bruno@clisp.org>
22939
22940         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
22941         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
22942         suffix.
22943
22944 2003-01-15  Bruno Haible  <bruno@clisp.org>
22945
22946         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
22947
22948 2003-01-15  Bruno Haible  <bruno@clisp.org>
22949
22950         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
22951         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
22952
22953 2003-01-14  Jim Meyering  <jim@meyering.net>
22954
22955         * lib/same.c (same_name): Tweak a comment.
22956
22957 2003-01-14  Bruno Haible  <bruno@clisp.org>
22958
22959         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
22960         when a string comparison is sufficient.
22961
22962 2003-01-14  Bruno Haible  <bruno@clisp.org>
22963
22964         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
22965         'unsigned int'.
22966
22967 2003-01-14  Bruno Haible  <bruno@clisp.org>
22968
22969         * lib/hash-pjw.c: Add comment about low quality of this function.
22970
22971 2003-01-13  Bruno Haible  <bruno@clisp.org>
22972
22973         * modules/stpcpy: Distribute lib/stpcpy.h.
22974         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
22975
22976 2003-01-13  Bruno Haible  <bruno@clisp.org>
22977
22978         * modules/*: Add a description.
22979         * modules/strpbrk: Fix Makefile.am snippet.
22980         * modules/strtoimax: Fix dependencies.
22981         * modules/strtoumax: Likewise.
22982
22983 2003-01-13  Bruno Haible  <bruno@clisp.org>
22984
22985         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
22986         * modules/alloca (Makefile.am): All object files depend on alloca.h.
22987         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
22988
22989 2003-01-13  Bruno Haible  <bruno@clisp.org>
22990
22991         * gnulib-tool (func_create_testdir): Store config/* files in the main
22992         directory.
22993         * config.rpath: Move to ...
22994         * config/config.rpath: ... here.
22995         * modules/gettext: Contains config/config.rpath, not config.rpath.
22996         * modules/iconv: Likewise.
22997
22998 2003-01-12  Paul Eggert  <eggert@twinsun.com>
22999
23000         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23001         to avoid collisions with libcurses and libreadline.
23002
23003         * m4/getstr.m4: Remove.
23004         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
23005
23006 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23007
23008         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23009         to avoid collisions with libcurses and libreadline.
23010
23011         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
23012         * lib/getstr.h, getstr.c: Remove.
23013         * lib/getline.c: Include "getline.h", to check interface.
23014         Move body of old getstr.c here: this defines MIN_CHUNK and
23015         declares getdelim2, which is renamed from getstr.
23016         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
23017
23018         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
23019         All uses changed.
23020         * lib/linebuffer.h: Likewise.
23021         (readline): Remove backward-compatibility macro.
23022
23023 2003-01-12  Paul Eggert  <eggert@twinsun.com>
23024
23025         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
23026         to avoid collisions with libcurses and libreadline.
23027         * getstr: Remove.
23028         * MODULES.html.sh: Remove getstr.
23029         * modules/getline: Depend on unlocked-io, not getstr.
23030
23031 2003-01-12  Jim Meyering  <jim@meyering.net>
23032
23033         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
23034
23035 2003-01-10  Bruno Haible  <bruno@clisp.org>
23036
23037         * modules/alloca: Change Makefile.am requirements. Simplify Include
23038         requirements. Add lib/alloca_.h to file list.
23039
23040 2003-01-10  Bruno Haible  <bruno@clisp.org>
23041
23042         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
23043
23044 2003-01-10  Bruno Haible  <bruno@clisp.org>
23045
23046         * lib/alloca_.h: New file.
23047         * lib/getdate.y: Unconditionally include alloca.h.
23048         * lib/makepath.c: Likewise.
23049         * lib/setenv.c: Likewise.
23050         * lib/userspec.c: Likewise.
23051
23052 2003-01-09  Karl Berry  <karl@gnu.org>
23053
23054         * MODULES.html.sh: include `dirname $0` in PATH, to find
23055         gnulib-tool.
23056
23057 2003-01-09  Bruno Haible  <bruno@clisp.org>
23058
23059         * modules/stdbool: Change configure.ac, Makefile.am requirements.
23060         Simplify Include requirements. Add lib/stdbool.h.in to file list.
23061
23062 2003-01-09  Bruno Haible  <bruno@clisp.org>
23063
23064         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
23065
23066 2003-01-09  Bruno Haible  <bruno@clisp.org>
23067
23068         * lib/stdbool.h.in: New file.
23069
23070 2003-01-09  Bruno Haible  <bruno@clisp.org>
23071
23072         * gnulib-tool (func_all_modules): Ignore files ending in ~.
23073         * MODULES.html.sh: Likewise.
23074
23075 2003-01-08  Jim Meyering  <jim@meyering.net>
23076
23077         * lib/full-write.c: Undefine and define-away `const' after inclusion
23078         of errno.h, not before.  Suggestion from Bruno Haible.
23079
23080 2003-01-08  Bruno Haible  <bruno@clisp.org>
23081
23082         * modules/full-read: Depend on full-write.
23083
23084 2003-01-08  Bruno Haible  <bruno@clisp.org>
23085
23086         * lib/safe-read.c: Include specification header first, to ensure its
23087         selfcontainedness.
23088         * lib/full-write.c: Likewise.
23089
23090 2003-01-07  Jim Meyering  <jim@meyering.net>
23091
23092         * lib/full-write.c: Rework so that it may serve to define full_read,
23093         too.
23094         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
23095
23096 2003-01-07  Bruno Haible  <bruno@clisp.org>
23097
23098         * lib/strtoimax.c: Include <stdint.h> as an alternative to
23099         <inttypes.h>.
23100         * lib/xstrtol.h: Likewise.
23101         * lib/xstrtoimax.c: Likewise.
23102         * lib/xstrtoumax.c: Likewise.
23103         * lib/human.h: Likewise.
23104
23105         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
23106         on systems that have <inttypes.h> but not <stdint.h>.
23107
23108 2003-01-07  Bruno Haible  <bruno@clisp.org>
23109
23110         * MODULES.html.sh: Add copyright notice.
23111         (missed_files): Omit CVS directory entries.
23112         (func_module): Make it work with sed-3.02.
23113         * MODULES.txt: Remove file.
23114
23115 2003-01-06  Jim Meyering  <jim@meyering.net>
23116
23117         * lib/version-etc.c: Update year in translatable copyright string.
23118
23119 2003-01-03  Karl Berry  <karl@gnu.org>
23120
23121         * config/config.{guess,sub}: update from prep.
23122
23123 2003-01-02  Karl Berry  <karl@gnu.org>
23124
23125         * doc/COPYING.DOC: belatedly updated to 1.2.
23126
23127 2003-01-01  Karl Berry  <karl@gnu.org>
23128
23129         * gnulib-tool (func_verify_module): report module name $module in
23130         error message, not $1.
23131         * gnulib-tool (create-testdir): don't complain if destdir couldn't
23132         be created, only if it doesn't exist.
23133         * gnulib-tool (last_checkin_date): don't expand the $Date here.
23134
23135 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23136
23137         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
23138
23139 2002-12-31  Paul Eggert  <eggert@twinsun.com>
23140
23141         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
23142         memcmp if strcoll doesn't work.
23143
23144 2002-12-31  Bruno Haible  <bruno@clisp.org>
23145
23146         * lib/utime.c (utime_null): No need to call ftruncate if the file was
23147         nonempty.
23148
23149 2002-12-31  Bruno Haible  <bruno@clisp.org>
23150
23151         * lib/memcoll.c (STRCOLL): New macro.
23152         (memcoll): Use it.
23153
23154 2002-12-31  Bruno Haible  <bruno@clisp.org>
23155
23156         * lib/localcharset.h: New file.
23157         * lib/localcharset.c: Include it.
23158         * lib/unicodeio.c: Likewise.
23159
23160 2002-12-31  Bruno Haible  <bruno@clisp.org>
23161
23162         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
23163         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
23164
23165 2002-12-31  Bruno Haible  <bruno@clisp.org>
23166
23167         * lib/getline.h: Include <stddef.h>, for size_t.
23168
23169         * lib/unicodeio.h: Include <stddef.h>, for size_t.
23170         * lib/unicodeio.c: Don't include <stddef.h>.
23171
23172 2002-12-31  Bruno Haible  <bruno@clisp.org>
23173
23174         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
23175         HAVE_TM_ZONE.
23176
23177 2002-12-24  Karl Berry  <karl@gnu.org>
23178
23179         * config/config.guess: update from prep.
23180
23181 2002-12-24  Bruno Haible  <bruno@clisp.org>
23182
23183         General infrasructure.
23184         * m4/README: Rewritten.
23185         * m4/onceonly.m4: New file.
23186         * m4/onceonly_2_57.m4: New file.
23187
23188         Module atexit.
23189         * m4/atexit.m4: New file.
23190
23191         Module strtod.
23192         * m4/strtod.m4: New file.
23193
23194         Module strtol.
23195         * m4/strtol.m4: New file.
23196
23197         Module strtoul.
23198         * m4/strtoul.m4: New file.
23199
23200         Module memchr.
23201         * m4/memchr.m4: New file.
23202
23203         Module memcmp.
23204         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
23205         (jm_FUNC_MEMCMP): Invoke it.
23206
23207         Module memcpy.
23208         * m4/memcpy.m4: New file.
23209
23210         Module memmove.
23211         * m4/memmove.m4: New file.
23212
23213         Module memset.
23214         * m4/memset.m4: New file.
23215
23216         Module strcspn.
23217         * m4/strcspn.m4: New file.
23218
23219         Module strpbrk.
23220         * m4/strpbrk.m4: New file.
23221
23222         Module strstr.
23223         * m4/strstr.m4: New file.
23224
23225         Module strerror.
23226         * m4/strerror.m4: New file.
23227
23228         Module mktime.
23229         * m4/mktime.m4: Renamed from jm-mktime.m4.
23230         (gl_PREREQ_MKTIME): New macro.
23231         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
23232
23233         Module malloc.
23234         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
23235         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
23236         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
23237
23238         Module realloc.
23239         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
23240         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
23241         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
23242
23243         Module strftime.
23244         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
23245         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
23246         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
23247         gl_TM_GMTOFF.
23248         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
23249
23250         Module xalloc.
23251         * m4/xalloc.m4: New file.
23252
23253         Module alloca.
23254         * m4/alloca.m4: New file.
23255
23256         Module putenv.
23257         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
23258         (jm_FUNC_PUTENV): Invoke it.
23259
23260         Module setenv.
23261         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
23262         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
23263         when invoked twice.
23264         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
23265         gt_FUNC_SETENV.
23266
23267         Module memrchr.
23268         * m4/memrchr.m4: New file.
23269
23270         Module stpcpy.
23271         * m4/stpcpy.m4: New file.
23272
23273         Module strcase.
23274         * m4/strcase.m4: New file.
23275
23276         Module strdup.
23277         * m4/strdup.m4: New file.
23278
23279         Module strnlen.
23280         * m4/strnlen.m4: New file.
23281
23282         Module strndup.
23283         * m4/strndup.m4: New file.
23284
23285         Module xstrtod.
23286         * m4/xstrtod.m4: New file.
23287
23288         Module xstrtol.
23289         * m4/xstrtol.m4: New file.
23290
23291         Module getdate.
23292         * m4/getdate.m4: New file.
23293
23294         Module unlocked-io.
23295         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
23296         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
23297         * m4/jm-glibc-io.m4n: Remove file.
23298
23299         Module long-options.
23300         * m4/long-options.m4: New file.
23301
23302         Module md5.
23303         * m4/md5.m4: New file.
23304
23305         Module sha.
23306         * m4/sha.m4: New file.
23307
23308         Module getstr.
23309         * m4/getstr.m4: New file.
23310
23311         Module getline.
23312         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
23313         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
23314         <sys/types.h>, for size_t. Use the function name gnu_getline, not
23315         simply getline. Infoke gl_PREREQ_GETLINE.
23316
23317         Module obstack.
23318         * m4/obstack.m4: New file.
23319
23320         Module hash.
23321         * m4/hash.m4: New file.
23322
23323         Module readtokens.
23324         * m4/readtokens.m4: New file.
23325
23326         Module strverscmp.
23327         * m4/strverscmp.m4: New file.
23328
23329         Module stdbool.
23330         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
23331         OSF/1.
23332
23333         Module strtoll.
23334         * m4/strtoll.m4: New file.
23335
23336         Module strtoull.
23337         * m4/strtoull.m4: New file.
23338
23339         Module strtoimax.
23340         * m4/strtoimax.m4: New file.
23341
23342         Module strtoumax.
23343         * m4/strtoumax.m4: New file.
23344
23345         Module xstrtoimax.
23346         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
23347         jm_AC_PREREQ_XSTRTOIMAX.
23348         Moved the strtol prerequisites to strtol.m4.
23349         Moved the strtoll prerequisites to strtoll.m4.
23350         Moved the strtoimax prerequisites to strtoimax.m4.
23351
23352         Module xstrtoumax.
23353         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
23354         jm_AC_PREREQ_XSTRTOUMAX.
23355         Moved the strtoul prerequisites to strtoul.m4.
23356         Moved the strtoull prerequisites to strtoull.m4.
23357         Moved the strtoumax prerequisites to strtoumax.m4.
23358
23359         Module chown.
23360         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
23361         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
23362
23363         Module dup2.
23364         * m4/dup2.m4: New file.
23365
23366         Module ftruncate.
23367         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
23368         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
23369
23370         Module getgroups.
23371         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
23372         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
23373
23374         Module gettimeofday.
23375         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
23376         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
23377         gl_PREREQ_GETTIMEOFDAY.
23378
23379         Module mkdir.
23380         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
23381         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
23382
23383         Module mkstemp.
23384         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
23385         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
23386         jm_AC_TYPE_UINTMAX_T.
23387         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
23388
23389         Module stat.
23390         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
23391         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
23392
23393         Module lstat.
23394         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
23395         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
23396
23397         Module timespec.
23398         * m4/timespec.m4 (gl_TIMESPEC): New macro.
23399         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
23400         * m4/st_mtim.m4: Indentation.
23401
23402         Module nanosleep.
23403         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
23404         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
23405         gl_PREREQ_NANOSLEEP.
23406
23407         Module regex.
23408         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
23409         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
23410         (gl_REGEX): New macro.
23411
23412         Module rename.
23413         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
23414         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
23415
23416         Module rmdir.
23417         * m4/rmdir.m4: New file.
23418
23419         Module utime.
23420         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
23421         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
23422         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
23423
23424         Module dirname.
23425         * m4/dirname.m4: New file.
23426
23427         Module getopt.
23428         * m4/getopt.m4: New file.
23429
23430         Module unistd-safer.
23431         * m4/unistd-safer.m4: New file.
23432
23433         Module fnmatch.
23434         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
23435         declaration.
23436         (gl_PREREQ_FNMATCH_EXTRA): New macro.
23437         (gl_FUNC_FNMATCH_POSIX): New macro.
23438         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
23439         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
23440         simply fnmatch.
23441
23442         Module exclude.
23443         * m4/exclude.m4: New file.
23444
23445         Module human.
23446         * m4/human.m4: New file.
23447
23448         Module acl.
23449         * m4/acl.m4: Nop.
23450
23451         Module backupfile.
23452         * m4/backupfile.m4: New file.
23453         * m4/d-ino.m4: Indentation.
23454
23455         Module fsusage.
23456         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
23457         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
23458         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
23459
23460         Module dirfd.
23461         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
23462         requirements.
23463
23464         Module euidaccess.
23465         * m4/euidaccess.m4: New file.
23466
23467         Module file-type.
23468         * m4/file-type.m4: New file.
23469
23470         Module fileblocks.
23471         * m4/fileblocks.m4: New file.
23472
23473         Module filemode.
23474         * m4/filemode.m4: New file.
23475
23476         Module isdir.
23477         * m4/isdir.m4: New file.
23478
23479         Module lchown.
23480         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
23481         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
23482
23483         Module makepath.
23484         * m4/makepath.m4: New file.
23485
23486         Module modechange.
23487         * m4/modechange.m4: New file.
23488
23489         Module mountlist.
23490         * m4/mountlist.m4: New file.
23491         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
23492         Indentation.
23493
23494         Module path-concat.
23495         * m4/path-concat.m4: New file.
23496
23497         Module pathmax.
23498         * m4/pathmax.m4: New file.
23499
23500         Module same.
23501         * m4/same.m4: New file.
23502
23503         Module save-cwd.
23504         * m4/save-cwd.m4: New file.
23505
23506         Module savedir.
23507         * m4/savedir.m4: New file.
23508
23509         Module xgetcwd.
23510         * m4/xgetcwd.m4: New file.
23511         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
23512
23513         Module xreadlink.
23514         * m4/xreadlink.m4: New file.
23515
23516         Module safe-read.
23517         * m4/safe-read.m4: New file.
23518
23519         Module safe-write.
23520         * m4/safe-write.m4: New file.
23521
23522         Module closeout.
23523         * m4/closeout.m4: New file.
23524
23525         Module stdio-safer.
23526         * m4/stdio-safer.m4: New file.
23527
23528         Module getpass.
23529         * m4/getpass.m4: New file.
23530
23531         Module getugroups.
23532         * m4/getugroups.m4: New file.
23533
23534         Module group-member.
23535         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
23536         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
23537
23538         Module idcache.
23539         * m4/idcache.m4: New file.
23540
23541         Module userspec.
23542         * m4/userspec.m4: New file.
23543
23544         Module gettime.
23545         * m4/clock_time.m4: New file.
23546         * m4/gettime.m4: New file.
23547
23548         Module settime.
23549         * m4/settime.m4: New file.
23550
23551         Module posixtm.
23552         * m4/posixtm.m4: New file.
23553
23554         Module gethostname.
23555         * m4/gethostname.m4: New file.
23556
23557         Module canon-host.
23558         * m4/canon-host.m4: New file.
23559
23560         Module gettext.
23561         * m4/codeset.m4: New file, from gettext-0.11.5.
23562         * m4/gettext.m4: New file, from gettext-0.11.5.
23563         * m4/glibc21.m4: New file, from gettext-0.11.5.
23564         * m4/iconv.m4: New file, from gettext-0.11.5.
23565         * m4/intdiv0.m4: New file, from gettext-0.11.5.
23566         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
23567         * m4/inttypes.m4: New file, from gettext-0.11.5.
23568         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
23569         * m4/isc-posix.m4: New file, from gettext-0.11.5.
23570         * m4/lcmessage.m4: New file, from gettext-0.11.5.
23571         * m4/lib-ld.m4: New file, from gettext-0.11.5.
23572         * m4/lib-link.m4: New file, from gettext-0.11.5.
23573         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
23574         * m4/progtest.m4: New file, from gettext-0.11.5.
23575         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
23576         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
23577         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
23578
23579         Module localcharset.
23580         * m4/localcharset.m4: New file.
23581
23582         Module hard-locale.
23583         * m4/hard-locale.m4: New file.
23584
23585         Module mbswidth.
23586         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
23587         onceonly macros.
23588         * m4/mbrtowc.m4: Add comment.
23589
23590         Module memcasecmp.
23591         * m4/memcasecmp.m4: New file.
23592
23593         Module memcoll.
23594         * m4/memcoll.m4: New file.
23595
23596         Module unicodeio.
23597         * m4/unicodeio.m4: New file.
23598
23599         Module rpmatch.
23600         * m4/rpmatch.m4: New file.
23601
23602         Module yesno.
23603         * m4/yesno.m4: New file.
23604
23605         Module exitfail.
23606         * m4/exitfail.m4: New file.
23607
23608         Module c-stack.
23609         * m4/c-stack.m4 (gl_C_STACK): New macro.
23610         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
23611
23612         Module error.
23613         * m4/error.m4 (gl_ERROR): New macro.
23614         (jm_PREREQ_ERROR): Use onceonly macros.
23615
23616         Module fatal.
23617         * m4/fatal.m4: New file.
23618
23619         Module getloadavg.
23620         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
23621         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
23622
23623         Module getpagesize.
23624         * m4/getpagesize.m4: New file.
23625
23626         Module getusershell.
23627         * m4/getusershell.m4: New file.
23628
23629         Module physmem.
23630         * m4/physmem.m4: New file.
23631
23632         Module posixver.
23633         * m4/posixver.m4: New file.
23634
23635         Module quotearg.
23636         * m4/quotearg.m4: New file.
23637
23638         Module quote.
23639         * m4/quote.m4: New file.
23640
23641         Module readutmp.
23642         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
23643
23644         Module sig2str.
23645         * m4/sig2str.m4: New file.
23646
23647         Other.
23648         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
23649         ulonglong.m4.
23650         * m4/intmax_t.m4: New file.
23651         * m4/d-type.m4: Indentation.
23652         * m4/jm-macros.m4: Update.
23653         * m4/prereq.m4 (jm_PREREQ): Update.
23654         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
23655         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
23656         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
23657         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
23658         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
23659         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
23660         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
23661         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
23662         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
23663         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
23664         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
23665         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
23666         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
23667         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
23668         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
23669         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
23670         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
23671         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
23672         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
23673
23674 2002-12-24  Bruno Haible  <bruno@clisp.org>
23675
23676         * MODULES.txt: Update according to m4/ changes.
23677
23678         Module gettext.
23679         * config.rpath: New file, from gettext-0.11.5.
23680
23681         * modules/*: New module descriptions.
23682         * gnulib-tool: New file.
23683         * MODULES.html.sh: New file.
23684
23685 2002-12-21  Karl Berry  <karl@gnu.org>
23686
23687         * doc/fdl.texi: update to version 1.2.
23688
23689 2002-12-19  Karl Berry  <karl@gnu.org>
23690
23691         * config/config.guess: update from prep.
23692
23693 2002-12-18  Bruno Haible  <bruno@clisp.org>
23694
23695         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
23696         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
23697
23698 2002-12-17  Bruno Haible  <bruno@clisp.org>
23699
23700         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
23701         stdlib.h, string.h.
23702
23703 2002-12-17  Bruno Haible  <bruno@clisp.org>
23704
23705         * lib/canon-host.c (strdup): Remove unused declaration.
23706
23707         * lib/fsusage.c: Include full_read.h.
23708         (get_fs_usage): Use full_read instead of safe_read.
23709
23710         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
23711
23712 2002-12-12  Karl Berry  <karl@gnu.org>
23713
23714         * config/config.guess: update from prep.
23715
23716 2002-12-11  Bruno Haible  <bruno@clisp.org>
23717
23718         * m4/setenv.m4: New file, from gettext-0.11.5.
23719
23720 2002-12-11  Bruno Haible  <bruno@clisp.org>
23721
23722         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
23723         not unsetenv().
23724         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
23725         modifications:
23726
23727         2002-12-11  Bruno Haible  <bruno@clisp.org>
23728
23729                 * setenv.c (alloca): Fall back to malloc.
23730                 (freea): New macro.
23731                 (setenv): Use freea() to free memory allocated with alloca().
23732
23733         2002-11-13  Bruno Haible  <bruno@clisp.org>
23734
23735                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
23736                 function declarations.
23737                 * unsetenv.c (unsetenv): Likewise.
23738
23739         2002-03-04  Bruno Haible  <bruno@clisp.org>
23740
23741                 Portability to AIX 4.3.3.
23742                 * unsetenv.c: New file, extracted from setenv.c.
23743                 * setenv.c: Move the unsetenv() function to unsetenv.c.
23744
23745         2001-12-20  Bruno Haible  <bruno@clisp.org>
23746
23747                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
23748                 use malloc instead. For SunOS 4.
23749
23750         2001-12-11  Bruno Haible  <bruno@clisp.org>
23751
23752                 * setenv.c: Declare alloca.
23753                 (compar_fn_t): New typedef.
23754                 (KNOWN_VALUE, STORE_VALUE): Use it.
23755
23756         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
23757         setenv.h.
23758
23759 2002-12-10  Paul Eggert  <eggert@twinsun.com>
23760
23761         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
23762         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
23763         Choose values that are less likely to collide with system fnmatch
23764         options.
23765         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
23766         defined (e.g., a pure POSIX system).
23767         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
23768         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
23769
23770 2002-12-06  Paul Eggert  <eggert@twinsun.com>
23771
23772         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
23773         a pain in practice to deal with generated m4 files.  This change
23774         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
23775
23776         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
23777         and jm-glibc-io.m4, as they are no longer a special case.
23778         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
23779         kludge and the auto-generation stuff.  Check only whether the
23780         functions are declared, not whether they exist, since older hosts
23781         that don't declare the functions can't use the optimization anyway.
23782
23783 2002-12-06  Jim Meyering  <jim@meyering.net>
23784
23785         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
23786
23787         Merge in changes from libc's misc/error.c, in preparation
23788         for the merge of gnulib's changes back into libc.
23789
23790         * lib/error.c (_): Define only if not already defined.
23791         Move definition to follow all #include directives.
23792         Include unlocked-io.h only if !_LIBC.
23793         [_LIBC]: Include <libio/libioP.h>.
23794         [USE_IN_LIBIO]: Include <libio/iolibio.h>
23795         (fflush): Tweak definition to use INTUSE.
23796         (putc): Define.
23797
23798 2002-12-05  Paul Eggert  <eggert@twinsun.com>
23799
23800         * lib/alloca.c [defined emacs]: Include "lisp.h".
23801         (xalloc_die) [defined emacs]: New macro.
23802         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
23803         [! defined emacs]: Include <xalloc.h>.
23804         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
23805         (pointer): Typedef to POINTER_TYPE *.
23806         (malloc): Remove decl; we now always use xmalloc.
23807         (alloca): Use old-style definition, since Emacs needs this.
23808         Check for arithmetic overflow when computing combined size.
23809
23810 2002-12-04  Paul Eggert  <eggert@twinsun.com>
23811
23812         Do not generate unlocked-io.h automatically, since it's easier to
23813         maintain it by hand.
23814
23815         * lib/unlocked-io.h: New file, from GNU diffutils,
23816         but with proper copyright notice and attribution.
23817         * lib/gen-uio: Remove.
23818         * lib/Makefile.am: Add copyright notice.
23819         (libfetish_a_SOURCES): Add unlocked-io.h.
23820         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
23821         (DISTCLEANFILES, io_functions): Remove macros.
23822         (EXTRA_DIST): Remove gen_uio.
23823         (unlocked-io.h): Remove rule.
23824
23825 2002-12-04  Jim Meyering  <jim@meyering.net>
23826
23827         Reflect the fact that stat.c and lstat.c are no longer generated.
23828         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
23829         (DISTCLEANFILES): Likewise.
23830         (EXTRA_DIST): Likewise.
23831         (all_local): Don't depend on stat.c or lstat.c.
23832         (stat.c, lstat.c): Remove rules.
23833         (EXTRA_DIST): Remove xstat.in.
23834
23835         * lib/xstat.in: Remove file.  Contents moved into stat.c.
23836         * lib/stat.c: New file.  Contents mostly from xstat.in.
23837         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
23838         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
23839
23840         * lib/safe-read.c: Rework so that it may serve to define safe_write,
23841         too.
23842         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
23843
23844 2002-12-03  Jim Meyering  <jim@meyering.net>
23845
23846         * lib/safe-read.c, safe-write.c: Change variable names and comments,
23847         but not semantics, to minimize the differences between these two files.
23848         (safe_read): Change comment to mention SAFE_READ_ERROR.
23849
23850         * lib/safe-read.c (IS_EINTR): Define.
23851         (safe_read): Use IS_EINTR in place of in-function cpp directives.
23852
23853 2002-12-02  Jim Meyering  <jim@meyering.net>
23854
23855         * lib/safe-read.c (EINTR): Define.
23856         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
23857         (INT_MAX): Provide fallback.
23858         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
23859
23860         * lib/safe-read.h (SAFE_READ_ERROR): Define.
23861
23862 2002-12-02  Bruno Haible  <bruno@clisp.org>
23863
23864         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
23865         Define, taken from safe-read.c.
23866         (INT_MAX): Provide fallback.
23867         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
23868         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
23869
23870         * lib/safe-read.c (EINTR): Remove definition.
23871         (safe_read): Don't use EINTR if it is absent.
23872
23873 2002-12-01  Jim Meyering  <jim@meyering.net>
23874
23875         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
23876         zero.
23877         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
23878
23879 2002-11-27  Paul Eggert  <eggert@twinsun.com>
23880
23881         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
23882         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
23883         with `if (! (value < limit)) abort ();', for readability.
23884
23885 2002-11-26  Karl Berry  <karl@gnu.org>
23886
23887         * lib/strdup.c: copy from libc again, with jim's ok.
23888         * lib/.cppi-disable: re-add strdup.c
23889
23890 2002-11-25  Karl Berry  <karl@gnu.org>
23891
23892         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
23893         instead of "strtol.c".
23894
23895 2002-11-25  Karl Berry  <karl@gnu.org>
23896
23897         * config/install-sh: update from automake for variable quoting, $0 in
23898         error msgs, etc.
23899
23900         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
23901         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
23902         entry.
23903
23904 2002-11-25  Jim Meyering  <jim@meyering.net>
23905
23906         * lib/mktime.c: Sync from libc, now that it has the latest fix.
23907
23908 2002-11-24  Karl Berry  <karl@gnu.org>
23909
23910         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
23911         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
23912
23913 2002-11-24  Jim Meyering  <jim@meyering.net>
23914
23915         Update from coreutils:
23916
23917         * lib/mktime.c: Merge in changes from libc.
23918
23919         Avoid a link-time failure on some Linux systems.
23920         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
23921         (otherwise).
23922         (__mon_yday): Declare with the STATIC attribute.
23923         (__mktime_internal): Likewise.
23924         Based on a report from Greg Schafer.
23925
23926 2002-11-23  Jim Meyering  <jim@meyering.net>
23927
23928         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
23929         Use `unsigned', not `int', as type of index.
23930
23931         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
23932
23933         * lib/fsusage.c: Remove unneeded parentheses around operands of
23934         `defined'.
23935
23936 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23937
23938         * lib/quotearg.h: Allow multiple inclusion by surrounding with
23939         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
23940         so that we can be included first.
23941         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
23942         * lib/quotearg.c: Include quotearg.h immediately after config.h.
23943         No need to include stddef.h or sys/types.h any more.
23944         Surround local include files with "", not "<>".
23945         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
23946         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
23947         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
23948         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
23949         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
23950         (ISPRINT): Remove; no longer needed now that we assume C89.
23951
23952         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
23953         Preserve errno.
23954
23955         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
23956         quotearg_char): Use SIZE_MAX rather than
23957         (size_t) -1 when we are talking about "infinity".
23958
23959         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
23960
23961 2002-11-22  Paul Eggert  <eggert@twinsun.com>
23962
23963         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
23964         hint that one should use `if (! x) abort ();' rather than `assert
23965         (x);', and anyway it's one less thing to worry about configuring.
23966         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
23967         hash_rehash, hash_insert): Use abort rather than assert.
23968
23969 2002-11-22  Bruno Haible  <bruno@clisp.org>
23970
23971         * lib/safe-read.h: Assume C89. Add comments.
23972         (safe_read): Change return type to size_t.
23973         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
23974         byte counts > SSIZE_MAX correctly.
23975         * lib/safe-write.h: New file.
23976         * lib/safe-write.c: New file.
23977         * lib/full-read.h: New file.
23978         * lib/full-read.c: New file.
23979         * lib/full-write.h: Assume C89. Add comments.
23980         * lib/full-write.c: Include safe-write.h.
23981         (full_write): Rewritten to use safe_write.
23982         Suggested by Jim Meyering and Paul Eggert.
23983
23984 2002-11-21  Jim Meyering  <jim@meyering.net>
23985
23986         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
23987
23988         Merge in changes from the coreutils.
23989
23990         2002-09-25  Paul Eggert  <eggert@twinsun.com>
23991         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
23992         <stdint.h>.
23993         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
23994         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
23995         int.  Work more efficiently if X is the same width as uintmax_t.
23996         Do not compare X to -1, to avoid bogus compiler warning.
23997         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
23998         Don't assume that f_frsize and f_bsize are the same type.
23999
24000         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
24001         warning on FreeBSD.
24002
24003         * lib/makepath.c (make_path): Restore umask *before* creating the final
24004         component.
24005         (make_path): Minor reformatting.
24006
24007         * lib/xmalloc.c: Adjust to work with new autoconf macros,
24008         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
24009         HAVE_MALLOC/HAVE_REALLOC.
24010
24011         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
24012         dummy ones.  At least on GNU/Linux systems, `auto' means something
24013         else.
24014         From Michael Stone.
24015
24016 2002-11-21  Bruno Haible  <bruno@clisp.org>
24017
24018         Remove case insensitive option matching.
24019         * lib/argmatch.h (argcasematch): Remove declaration.
24020         (ARGCASEMATCH): Remove macro.
24021         (__xargmatch_internal): Remove case_sensitive argument.
24022         (XARGMATCH): Update.
24023         (XARGCASEMATCH): Remove macro.
24024         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
24025         case_sensitive argument.
24026         (argcasematch): Remove function.
24027         (__xargmatch_internal): Remove case_sensitive argument.
24028         (main): Use XARGMATCH instead of XARGCASEMATCH.
24029
24030         * lib/xmalloc.c: Change compile-time error message. Add comment about
24031         required autoconf version.
24032
24033 2002-11-20  Paul Eggert  <eggert@twinsun.com>
24034
24035         Merge argmatch cleanups from Bison.  Assume C89.
24036
24037         * lib/argmatch.c: Include config.h here, not in argmatch.h.
24038         Include stdlib.h, for EXIT_FAILURE.
24039         Always include <string.h>, since we assume C89.
24040         (EXIT_FAILURE): Remove pre-C89 bug workaround.
24041         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
24042         Include <stddef.h> instead, since it's all we need for size_t.
24043         (PARAMS): Remove.  All uses removed.
24044         (ARRAY_CARDINALITY): Do not bother to #undef.
24045         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
24046         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24047         Remove unnecessary parentheses.
24048         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
24049         Insert necessary parentheses.
24050         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
24051         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
24052
24053 2002-11-19  Bruno Haible  <bruno@clisp.org>
24054
24055         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
24056         * lib/mbswidth.h: Include <stddef.h>, for size_t.
24057
24058         * lib/mbswidth.h (PARAMS): Remove macro.
24059         (mbswidth, mbsnwidth): Use ANSI C function declarations.
24060         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
24061
24062         * lib/gcd.h (PARAMS): Remove macro.
24063         (gcd): Use ANSI C function declarations.
24064         * lib/gcd.c (gcd): Likewise.
24065
24066 2002-11-15  Bruno Haible  <bruno@clisp.org>
24067
24068         * lib/strcspn.c: Include <stddef.h>.
24069         (strcspn): Use ANSI C function declaration. Change return type to
24070         size_t. Use NULL.
24071         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
24072         (strpbrk): Use NULL.
24073         * lib/strpbrk.h (PARAMS): Remove macro.
24074         (strpbrk): Use ANSI C function declaration.
24075         * lib/strstr.c: Don't include <sys/types.h>.
24076         * lib/strstr.h (PARAMS): Remove macro.
24077         (strstr): Use ANSI C function declarations.
24078
24079 2002-11-14  Karl Berry  <karl@gnu.org>
24080
24081         * config/mkinstalldirs: `do' on separate line, instead of
24082         `for var; do'.
24083
24084 2002-11-06  Bruno Haible  <bruno@clisp.org>
24085
24086         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
24087         * lib/gcd.c (gcd): Likewise.
24088
24089 2002-11-05  Bruno Haible  <bruno@clisp.org>
24090
24091         * lib/gcd.h: New file, from gettext-0.11.5.
24092         * lib/gcd.c: New file, from gettext-0.11.5.
24093
24094 2002-11-05  Bruno Haible  <bruno@clisp.org>
24095
24096         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24097         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24098         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24099         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
24100
24101         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
24102         <libintl.h>.
24103         * lib/makepath.c: Include gettext.h instead of <locale.h> and
24104         <libintl.h>.
24105
24106         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
24107         * lib/human.c: Include gettext.h instead of <libintl.h>.
24108         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
24109         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
24110         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
24111         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
24112         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
24113         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
24114         (textdomain): Remove definition.
24115         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
24116
24117         * lib/long-options.c: Remove include of <libintl.h> and definition of
24118         _.
24119         * lib/same.c: Remove include of <libintl.h> and definition of _.
24120
24121 2002-11-04  Owen Taylor  <otaylor@redhat.com>
24122
24123         * lib/config.charset: A few additions for Solaris.
24124
24125 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24126
24127         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
24128         * lib/localcharset.c (locale_charset): Declare as extern "C".
24129
24130 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
24131
24132         * lib/config.charset: msdos in uk_UA uses CP1125.
24133
24134 2002-11-04  Bruno Haible  <bruno@clisp.org>
24135
24136         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
24137         * lib/strcase.h: New file, from GNU gettext-0.11.5.
24138         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
24139         * lib/strstr.h: New file, from GNU gettext-0.11.5.
24140         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
24141
24142 2002-11-04  Bruno Haible  <bruno@clisp.org>
24143
24144         * lib/localcharset.c (locale_charset): Don't return an empty string.
24145
24146 2002-11-04  Bruno Haible  <bruno@clisp.org>
24147
24148         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
24149         aliases.
24150
24151 2002-11-04  Bruno Haible  <bruno@clisp.org>
24152
24153         * lib/config.charset: Update for newest glibc. Add canonical names
24154         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
24155
24156 2002-11-04  Bruno Haible  <bruno@clisp.org>
24157
24158         * lib/config.charset: Add support for NetBSD.
24159
24160 2002-11-04  Bruno Haible  <bruno@clisp.org>
24161
24162         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
24163
24164 2002-11-01  Bruno Haible  <bruno@clisp.org>
24165
24166         * configure.in: Add AC_CONFIG_AUX_DIR call.
24167         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
24168         test/Makefile.
24169         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
24170
24171 2002-09-28  Karl Berry  <karl@gnu.org>
24172
24173         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
24174         installed automake until the next release, since changes have been
24175         made.
24176
24177 2002-09-25  Karl Berry  <karl@gnu.org>
24178
24179         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
24180         * lib/getopt*: copy from libc/posix.
24181         * lib/gettext.h: copy from gettext.
24182         * lib/.cppi-disable: add strdup.c, gettext.h.
24183
24184 2002-09-25  Karl Berry  <karl@gnu.org>
24185
24186         * config/srclist.txt: enable gettext.h check.
24187         * config/config.{guess,sub}: update from prep.
24188         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
24189                 from automake 1.6.3.
24190         See srclist*.
24191
24192 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
24193
24194         * regex.c (PATFETCH): Remove the translating fetch.
24195         (PATFETCH_RAW): Rename to PATFETCH.
24196         (set_image_of_range): New fun.
24197         (SET_RANGE_TABLE_WORK_AREA): Use it.
24198         (regex_compile): Don't translate the pattern chars so eagerly.
24199         Only do it when inserting an `exactn' bytecode or when handling
24200         a char-range.
24201         (mutually_exclusive_p): Avoid empty statement.
24202
24203 2002-07-06  Jim Meyering  <meyering@lucent.com>
24204
24205         * m4/README: Don't mention Makefile.am.in.
24206         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
24207
24208 2002-07-01  Jim Meyering  <meyering@lucent.com>
24209
24210         * lib/c-stack.c: Include sys/time.h.
24211         From Volker Borchert.
24212
24213 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24214
24215         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
24216
24217 2002-06-26  Paul Eggert  <eggert@twinsun.com>
24218
24219         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
24220         New macro.  Use it uniformly instead of
24221         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
24222         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
24223         reported by Vin Shelton.
24224
24225 2002-06-22  Paul Eggert  <eggert@twinsun.com>
24226
24227         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
24228         Do not assume SA_SIGINFO behavior.
24229         Bug reported by Jim Meyering on NetBSD 1.5.2.
24230
24231 2002-06-22  Jim Meyering  <meyering@lucent.com>
24232
24233         * m4/c-stack.m4: New file, from diffutils-2.8.2.
24234         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
24235
24236         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
24237         now that configure.ac uses AC_GNU_SOURCE.
24238         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
24239         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
24240
24241         Update to latest tools.  Suggestions from Paul Eggert.
24242         * m4/stdbool.m4: New file, from diffutils-2.8.2.
24243         * m4/gnu-source.m4: Update from diffutils-2.8.2.
24244         * m4/fnmatch.m4: Likewise.
24245         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
24246         to AC_HEADER_STDBOOL
24247
24248 2002-06-22  Jim Meyering  <meyering@lucent.com>
24249
24250         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
24251         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
24252
24253 2002-06-22  Jim Meyering  <meyering@lucent.com>
24254
24255         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
24256
24257         * lib/exitfail.c, exitfail.h: Likewise.
24258         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
24259
24260         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
24261         of fnmatch.h.
24262         (EXTRA_DIST): Add fnmatch_loop.c.
24263         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
24264
24265         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
24266         * lib/fnmatch.c: Update from diffutils-2.8.2.
24267         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
24268         * lib/fnmatch.h: Remove file.
24269
24270 2002-06-21  Jim Meyering  <meyering@lucent.com>
24271
24272         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
24273         * m4/mbrtowc.m4: Likewise.
24274
24275         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
24276         * m4/mbswidth.m4: Reflect name change:
24277         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
24278         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
24279
24280         * m4/lib-link.m4: Update from gettext-0.11.2.
24281         * m4/gettext.m4: Likewise.
24282
24283         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
24284         From Alfred M. Szmidt.
24285
24286 2002-06-18  Paul Eggert  <eggert@twinsun.com>
24287
24288         * lib/file-type.h: Report an error if neither S_ISREG nor
24289         S_IFREG is defined, instead of using a test specific to glibc
24290         2.2.  This should be safe, since POSIX requires S_ISREG and
24291         Unix Version 7 had S_IFREG.  We don't need to check for
24292         <sys/types.h> since we don't use any symbols that it defines.
24293
24294 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
24295
24296         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
24297         $@-t, so that each temporary file name is unique and valid in the first
24298         8 characters, for operation under DOS.
24299
24300 2002-06-15  Paul Eggert  <eggert@twinsun.com>
24301
24302         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
24303
24304 2002-06-15  Jim Meyering  <meyering@lucent.com>
24305
24306         Work even with DJGPP 2.03, which lacks support for symlinks.
24307         From Richard Dawe.
24308         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
24309         is defined.
24310         * lib/lchown.c (S_ISLNK): Likewise.
24311
24312 2002-06-15  Jim Meyering  <meyering@lucent.com>
24313
24314         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
24315         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
24316         have been included before this file.
24317
24318 2002-06-14  Jim Meyering  <meyering@lucent.com>
24319
24320         * lib/file-type.h: Use the version from diffutils-2.8.2.
24321         * lib/file-type.c: Likewise.
24322
24323 2002-06-07  Jim Meyering  <meyering@lucent.com>
24324
24325         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
24326         They're needed at least for NetBSD 1.5.2.
24327         ($statxfs_includes): Include those same headers.
24328         ($statxfs_includes): Include sys/vfs.h if available.
24329         ($statxfs_includes): Likewise for sys/statvfs.h.
24330         Check for the following members in both structs statfs and statvfs:
24331         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
24332
24333 2002-06-01  Jim Meyering  <meyering@lucent.com>
24334
24335         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
24336         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
24337
24338 2002-05-28  Jim Meyering  <meyering@lucent.com>
24339
24340         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
24341         Reported by Volker Borchert.
24342
24343 2002-05-27  Jim Meyering  <meyering@lucent.com>
24344
24345         Fix a problem seen only on nonconforming systems whereby ls.c's
24346         use of localtime, and then of gettimeofday would cause trouble:
24347         the localtime call used to initialize rpl_gettimeofday's save
24348         mechanism would clobber ls's current local time information so
24349         that in any long listing the first file would always be listed
24350         with date 1970-01-01.  Analysis by Volker Borchert.
24351
24352         * lib/gettimeofday.c (localtime): Undefine.
24353         (rpl_localtime): New function.
24354
24355 2002-05-27  Jim Meyering  <meyering@lucent.com>
24356
24357         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
24358         localtime.
24359
24360         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
24361         use the replacement function; it wouldn't resolve at link time.
24362         Reported by Volker Borchert.
24363
24364 2002-05-22  Jim Meyering  <meyering@lucent.com>
24365
24366         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
24367         file-type.h.
24368         * lib/file-type.h: New file.
24369         * lib/file-type.c (file_type): New file/function.  Extracted from
24370         diffutils.
24371
24372 2002-04-30  Jim Meyering  <meyering@lucent.com>
24373
24374         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
24375
24376 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24377
24378         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
24379
24380 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24381
24382         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
24383         Do not check for alloca.h (no longer used) or stdbool.h (was never
24384         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
24385
24386 2002-04-29  Paul Eggert  <eggert@twinsun.com>
24387
24388         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
24389
24390 2002-04-29  Jim Meyering  <meyering@lucent.com>
24391
24392         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
24393         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
24394         Use AC_FUNC_STRNLEN here instead.
24395
24396         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
24397         With autoconf-2.53a, it's part of AC_PROG_CC.
24398
24399 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24400
24401         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
24402         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
24403
24404 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24405
24406         * lib/sig2str.h, lib/sig2str.c: New files.
24407         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
24408
24409 2002-04-28  Paul Eggert  <eggert@twinsun.com>
24410
24411         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
24412         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
24413         of 127, since 64 is the largest conceivable number for ancient
24414         nonstandard hosts.
24415         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
24416
24417 2002-04-28  Jim Meyering  <meyering@lucent.com>
24418
24419         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
24420
24421 2002-04-24  Jim Meyering  <meyering@lucent.com>
24422
24423         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
24424         (jm_PREREQ): Use it.
24425
24426         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
24427         mach/mach.h fcntl.h.
24428         Check for this function: setlocale.
24429
24430 2002-04-24  Jim Meyering  <meyering@lucent.com>
24431
24432         * lib/gettext.h: New file, from Gettext.
24433         * lib/Makefile.am (INCLUDES): Remove -I../intl.
24434         (libfetish_a_SOURCES): Add gettext.h.
24435
24436 2002-04-16  Jim Meyering  <meyering@lucent.com>
24437
24438         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
24439         ut_pid, ut_id, ut_exit.
24440
24441 2002-04-16  Jim Meyering  <meyering@lucent.com>
24442
24443         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
24444         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
24445         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
24446
24447 2002-04-12  Jim Meyering  <meyering@lucent.com>
24448
24449         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
24450         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
24451         existence of the getmntinfo function.  Needed for Darwin 5.3.
24452
24453         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
24454         This is necessary at least on Darwin 5.3.
24455
24456         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
24457         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
24458         strnlen.o in the library, and that makes some versions of ranlib
24459         object.
24460
24461 2002-04-12  Jim Meyering  <meyering@lucent.com>
24462
24463         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
24464
24465 2002-04-09  Jim Meyering  <meyering@lucent.com>
24466
24467         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
24468         to be more precise.  Rather than saying we're checking whether the
24469         function `works', say what we're testing.
24470         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
24471         Reported by Bruno Haible.
24472
24473 2002-03-10  Jim Meyering  <meyering@lucent.com>
24474
24475         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
24476         Suggestion from Santiago Vila.
24477
24478 2002-03-08  Jim Meyering  <meyering@lucent.com>
24479
24480         * lib/rename.c: Mention that this wrapper is needed also on
24481         mips-dec-ultrix4.4 systems.
24482
24483 2002-03-02  Jim Meyering  <meyering@lucent.com>
24484
24485         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
24486         not HAVE_CLOCK_SETTIME.
24487
24488 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24489
24490         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
24491         Check for clock_settime.
24492
24493 2002-02-27  Paul Eggert  <eggert@twinsun.com>
24494
24495         * lib/nanosleep.h: Rename to....
24496         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
24497
24498         * lib/gettime.c: New file.
24499         * lib/settime.c: New file.
24500         * lib/stime.c: Remove.
24501
24502         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
24503         timespec.h.  Remove nanosleep.h.
24504
24505 2002-02-25  Paul Eggert  <eggert@twinsun.com>
24506
24507         * m4/acl.m4: New file.
24508         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
24509         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
24510
24511 2002-02-25  Paul Eggert  <eggert@twinsun.com>
24512
24513         * lib/acl.c, lib/acl.h: New files.
24514         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
24515
24516 2002-02-24  Jim Meyering  <meyering@lucent.com>
24517
24518         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
24519         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
24520         cause trouble.  Reported by Nelson Beebe.
24521
24522 2002-02-23  Paul Eggert  <eggert@twinsun.com>
24523
24524         * lib/path-concat.c (xpath_concat): Reorder code to pacify
24525         compilers that don't know that xalloc_die never returns.
24526
24527 2002-02-20  Jim Meyering  <meyering@lucent.com>
24528
24529         * lib/getdate.c: Regenerate using bison-1.33.
24530
24531 2002-02-17  Jim Meyering  <meyering@lucent.com>
24532
24533         * config/config.guess (main): Don't use `head -1'; it's no longer
24534         portable. Use `sed 1q' instead.
24535
24536 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
24537
24538         * m4/codeset.m4: Upgrade to gettext-0.11.
24539         * m4/gettext.m4: Upgrade to gettext-0.11.
24540         * m4/glibc21.m4: Upgrade to gettext-0.11.
24541         * m4/iconv.m4: Upgrade to gettext-0.11.
24542         * m4/isc-posix.m4: Upgrade to gettext-0.11.
24543         * m4/lcmessage.m4: Upgrade to gettext-0.11.
24544         * m4/lib-ld.m4: New file, from gettext-0.11.
24545         * m4/lib-link.m4: New file, from gettext-0.11.
24546         * m4/lib-prefix.m4: New file, from gettext-0.11.
24547         * m4/progtest.m4: Upgrade to gettext-0.11.
24548
24549 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24550
24551         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
24552         (jm_PREREQ): Use it.
24553
24554 2002-02-15  Paul Eggert  <eggert@twinsun.com>
24555
24556         * lib/posixver.c, lib/posixver.h: New files.
24557         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24558
24559 2002-02-02  Paul Eggert  <eggert@twinsun.com>
24560             Bruno Haible  <bruno@clisp.org>
24561
24562         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
24563         (fwrite_success_callback): New declaration.
24564         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
24565         print_unicode_char. Call failure callback instead of error.
24566         (fwrite_success_callback): New function.
24567         (exit_failure_callback): New function.
24568         (fallback_failure_callback): New function.
24569         (print_unicode_char): Call unicode_to_mb.
24570
24571 2002-01-26  Jim Meyering  <meyering@lucent.com>
24572
24573         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
24574         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
24575
24576 2002-01-26  Jim Meyering  <meyering@lucent.com>
24577
24578         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
24579
24580 2002-01-22  Paul Eggert  <eggert@twinsun.com>
24581
24582         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
24583
24584 2002-01-22  Jim Meyering  <meyering@lucent.com>
24585
24586         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
24587         Otherwise, some versions of automake would omit the rule that makes
24588         Makefile from Makefile.in.
24589
24590 2002-01-21  Paul Eggert  <eggert@twinsun.com>
24591
24592         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
24593         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
24594         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
24595         (memcoll): Set errno to zero if there is no error.
24596
24597         * lib/quotearg.c (quotearg_buffer_restyled):
24598         Fix bug with quoting buffers containing NUL when backslashing escapes.
24599         This bug was exposed by the other changes in this patch.
24600         (quotearg_n_options): New arg ARGSIZE.
24601         All callers changed.
24602         (quoting_options_from_style): New function.
24603         (quotearg_n_style): Use it.
24604         (quotearg_n_style_mem): New function.
24605
24606         * lib/quotearg.h (quotearg_n_style_mem): New function.
24607
24608 2002-01-19  Jim Meyering  <meyering@lucent.com>
24609
24610         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
24611         Remove useless quotes: DF_PROG="df".
24612         * m4/strnlen.m4: New file.
24613
24614 2002-01-16  Paul Eggert  <eggert@twinsun.com>
24615
24616         * lib/backupfile.c (ISDIGIT): Comment fix.
24617         * lib/getdate.y (ISDIGIT): Likewise.
24618         * lib/posixtm.c (ISDIGIT, year): Likewise.
24619         * lib/strverscmp.c (ISDIGIT): Likewise.
24620         * lib/userspec.c (ISDIGIT): Likewise.
24621
24622 2002-01-16  Jim Meyering  <meyering@lucent.com>
24623
24624         * lib/getdate.y: Add three semicolons, each just before a closing
24625         brace. Bison (as of version 1.31) no longer papers over that mistake.
24626
24627 2002-01-05  Jim Meyering  <meyering@lucent.com>
24628
24629         * lib/version-etc.c (version_etc_copyright): Update copyright year.
24630
24631 2001-12-19  Paul Eggert  <eggert@twinsun.com>
24632
24633         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
24634         not silently exit merely because the output buffer happens to
24635         have nothing pending.
24636
24637 2001-12-18  Paul Eggert  <eggert@twinsun.com>
24638
24639         See the big note in ../ChangeLog.
24640         * lib/human.c (suffixes): Prefer K to k for 1024.
24641         (generate_suffix_backwards): New function.
24642         (human_readable_inexact): Use it.
24643         * lib/xstrtol.c (__xstrtol): If there is no number but there
24644         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
24645         Accept 'K' as well as 'k'.
24646
24647 2001-12-15  Jim Meyering  <meyering@lucent.com>
24648
24649         * lib/regex.h (__restrict_arr): Update from libc.
24650
24651         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
24652         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
24653         (STREQ): Define.
24654
24655 2001-12-14  Jim Meyering  <meyering@lucent.com>
24656
24657         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
24658         Suggestion from Bruno Haible.
24659
24660 2001-12-10  Jim Meyering  <meyering@lucent.com>
24661
24662         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
24663         xrealloc, Instead, include "xalloc.h".
24664         (initbuffer): Don't cast xmalloc return value to char*.
24665         (readline): Reword comment.
24666         Don't cast xrealloc return value to char*
24667         Return NULL, not 0.
24668
24669 2001-12-09  Jim Meyering  <meyering@lucent.com>
24670
24671         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
24672         about `signed and unsigned type in conditional expression'.
24673         * lib/posixtm.c (posix_time_parse): Likewise.
24674
24675         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
24676
24677         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
24678         to avoid a pedantic warning.
24679
24680         * lib/getstr.c: Don't include assert.h.
24681         (getstr): Remove warning-evoking assertions.
24682         Return -1 if offset parameter is out of bounds.
24683         Change the type of a local from int to size_t.
24684
24685         * lib/strftime.c (my_strftime_localtime_r): Include this function
24686         definition in the `#if ! HAVE_TM_GMTOFF' block.
24687
24688         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
24689         Include xalloc.h instead.
24690
24691 2001-12-02  Jim Meyering  <meyering@lucent.com>
24692
24693         * lib/tempname.c: Don't declare getenv, thus reverting the change of
24694         2001-11-18.  It's no longer necessary, now that stdlib.h is always
24695         included.
24696
24697         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
24698         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
24699
24700 2001-11-30  Akim Demaille  <akim@epita.fr>
24701
24702         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
24703         before being defined.
24704
24705 2001-11-27  Paul Eggert  <eggert@twinsun.com>
24706
24707         * lib/quotearg.h (quotearg_n, quotearg_n_style):
24708         First arg is int, not unsigned.
24709         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
24710         (SIZE_MAX, UINT_MAX): New macros.
24711         (quotearg_n_options): Abort if N is negative.
24712         Avoid overflow check on hosts where size_t is 64 bits and int
24713         is 32 bits, as overflow is impossible there.
24714         Fix off-by-one typo that caused unnecessary reallocation.
24715
24716 2001-11-27  Jim Meyering  <meyering@lucent.com>
24717
24718         * lib/tempname.c: Merge with version from libc.
24719         * lib/regex.c: Likewise.
24720
24721         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
24722         systems for which STDC_HEADERS is 0, it was not included, resulting in
24723         a warning about an integer-to-pointer conversion problem with getenv.
24724         Reported by Volker Borchert.
24725
24726 2001-11-26  Jim Meyering  <meyering@lucent.com>
24727
24728         * lib/gtod.h: Remove file.
24729         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
24730         * lib/gettimeofday.c: Don't include gtod.h.
24731         (GTOD_init): Remove function.
24732         (rpl_gettimeofday): Do its job here instead, rather than aborting.
24733         Suggestion from Volker Borchert.
24734
24735 2001-11-23  Jim Meyering  <meyering@lucent.com>
24736
24737         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
24738         it.
24739         * lib/hash.c (struct hash_table): Define it here instead.
24740
24741 2001-11-22  Jim Meyering  <meyering@lucent.com>
24742
24743         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
24744
24745 2001-11-20  Jim Meyering  <meyering@lucent.com>
24746
24747         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
24748         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
24749
24750 2001-11-19  Jim Meyering  <meyering@lucent.com>
24751
24752         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
24753         directory.  Use "conftestXXXXXX" as the template.
24754         Suggestion from Paul Eggert.
24755
24756         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
24757         immediately, so the test doesn't mistakenly hit the max-open-files
24758         limit.
24759
24760 2001-11-18  Paul Eggert  <eggert@twinsun.com>
24761
24762         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
24763         (TEMPORARIES): New macro.
24764         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
24765         removes an artificial limitation (e.g. HP-UX 10.20, where
24766         TMP_MAX is 17576).
24767
24768 2001-11-18  Jim Meyering  <meyering@lucent.com>
24769
24770         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
24771
24772 2001-11-18  Jim Meyering  <meyering@lucent.com>
24773
24774         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
24775         on SunOS 4.
24776
24777         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
24778         files will be created before anything else.
24779
24780 2001-11-17  Paul Eggert  <eggert@twinsun.com>
24781
24782         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
24783         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
24784
24785 2001-11-17  Jim Meyering  <meyering@lucent.com>
24786
24787         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
24788         Prompted by a report from Bob Proulx.
24789
24790         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
24791         Instead, require UTILS_FUNC_MKSTEMP.
24792
24793 2001-11-17  Jim Meyering  <meyering@lucent.com>
24794
24795         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
24796         Now, that's done as part of AC_FUNC_STRTOD.
24797
24798 2001-11-17  Jim Meyering  <meyering@lucent.com>
24799
24800         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
24801         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
24802         rather than group writable.  Patch by Juan F. Codagnone.
24803
24804         * lib/readtokens.c: Remove explicit declarations of xmalloc and
24805         xrealloc, Instead, include "xalloc.h".
24806
24807         * lib/mountlist.c: Include unlocked-io.h after all system headers.
24808         Remove explicit declarations of xmalloc, xrealloc,
24809         and xstrdup.  Instead, include "xalloc.h".
24810
24811         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
24812         unlocked-io.h.
24813         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
24814         Likewise.
24815         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
24816
24817         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
24818         Reported by Padraig Brady.
24819
24820         * lib/mkstemp.c: #undef mkstemp.
24821         Include config.h.
24822         (rpl_mkstemp): Rename from mkstemp.
24823         Protoize.
24824
24825 2001-11-16  Jim Meyering  <meyering@lucent.com>
24826
24827         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
24828         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
24829         determine the amount of total physical memory, use pstat_getstatic.
24830         HPUX-11 doesn't define _SC_PHYS_PAGES.
24831         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
24832         If sysconf couldn't be used to determine the amount of available
24833         physical memory, use both pstat_getstatic and pstat_getdynamic.
24834         Based on a patch from Bob Proulx.
24835
24836 2001-11-10  Jim Meyering  <meyering@lucent.com>
24837
24838         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
24839         (jm_PREREQ): Use it.
24840
24841 2001-11-09  Jim Meyering  <meyering@lucent.com>
24842
24843         * m4/jm-macros.m4: Require autoconf-2.52f.
24844         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
24845         Use these AC_-prefixed names, not the AM_-prefixed ones.
24846
24847         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
24848
24849 2001-11-05  Jim Meyering  <meyering@lucent.com>
24850
24851         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
24852
24853 2001-11-04  Jim Meyering  <meyering@lucent.com>
24854
24855         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
24856         $DEFS.
24857
24858 2001-11-03  Jim Meyering  <meyering@lucent.com>
24859
24860         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
24861         of AC_DEFUN.
24862
24863         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
24864         know the name of the variable in the macro definition.
24865
24866 2001-11-03  Jim Meyering  <meyering@lucent.com>
24867
24868         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
24869         in argmatch_to_argument call.
24870
24871         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
24872         argument.
24873
24874         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
24875         e.g., a fault due to an attempt to free a NULL pointer.
24876
24877 2001-11-01  Jim Meyering  <meyering@lucent.com>
24878
24879         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
24880         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
24881
24882 2001-11-01  Jim Meyering  <meyering@lucent.com>
24883
24884         * lib/dirfd.c, lib/dirfd.h: New files.
24885         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
24886
24887         * lib/hash.c (hash_print) [TESTING]: Clean up.
24888
24889 2001-10-22  Paul Eggert  <eggert@twinsun.com>
24890
24891         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
24892         to avoid a warning if -Wall.
24893
24894 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
24895
24896         * README: New file
24897         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
24898         (per RMS's instructions, this is now the canonical source)
24899         * lgpl/, gpl/: New directories.
24900
24901 2001-10-21  Paul Eggert  <eggert@twinsun.com>
24902
24903         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
24904
24905 2001-10-21  Jim Meyering  <meyering@lucent.com>
24906
24907         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
24908         this code would end up calling gettext even in packages built
24909         with --disable-nls.
24910         * lib/getopt.c (_): Likewise.
24911         * lib/regex.c (_): Likewise.
24912
24913 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24914
24915         * m4/error.m4 (jm_PREREQ_ERROR):
24916         Do not invoke AC_CHECK_FUNCS with strerror_r, as
24917         AC_FUNC_STRERROR_R does that.
24918         Check for strerror declaration.
24919
24920         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
24921         are supposed to have them these days.
24922         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
24923         Merge changes from latest Autoconf CVS.
24924         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
24925         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
24926         POSIX decided to standardize on the int flavor of strerror_r.
24927
24928 2001-10-20  Paul Eggert  <eggert@twinsun.com>
24929
24930         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
24931         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
24932         Use strerror_r that is only a macro, even if it is not a function.
24933         (strerror): Check for HAVE_DECL_STRERROR before declaring.
24934         (private_strerror): Use prototypes, not old-style function definition.
24935         (print_errno_message): New function.
24936         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
24937         char*-flavored one.
24938         (error_tail, error, error_at_line): Use it.
24939
24940 2001-10-11  Jim Meyering  <meyering@lucent.com>
24941
24942         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
24943         and quote_n (1, ... to avoid clobbering a buffer.
24944
24945 2001-10-05  Jim Meyering  <meyering@lucent.com>
24946
24947         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
24948         hash-pjw.h.
24949         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
24950         * lib/hash-pjw.h: New file.
24951
24952 2001-09-30  Jim Meyering  <meyering@lucent.com>
24953
24954         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
24955         `struct fsstat' has the `f_fstypename' member.
24956         Use that to define FS_TYPE, which is now used to make
24957         the getfsstat link test tighter.
24958
24959 2001-09-30  Jim Meyering  <meyering@lucent.com>
24960
24961         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
24962         Include <sys/ucred.h>, for Apple Darwin.
24963         Include sys/mount.h and sys/fs_types.h only if available.
24964         (FS_TYPE): Define.
24965         (read_filesystem_list): Use FS_TYPE.
24966
24967 2001-09-29  Paul Eggert  <eggert@twinsun.com>
24968
24969         * lib/exclude.c (excluded_filename): 0 -> false, since it's
24970         a boolean context.
24971
24972 2001-09-29  Jim Meyering  <meyering@lucent.com>
24973
24974         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24975         [one-argument getmntent function]): Include stdio.h before mntent.h.
24976         SunOS 4.1.x needs it for the declaration of `FILE'.
24977         Patch by Volker Borchert.
24978
24979         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
24980         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
24981         sys/fs_types.h, and make the link-test for getfsstat guard #include
24982         directives with appropriate #if HAVE_*_H tests so that we can
24983         detect getfsstat on Apple Darwin1.3.7 systems.
24984         Reported by Nelson Beebe.
24985         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
24986
24987 2001-09-28  Paul Eggert  <eggert@twinsun.com>
24988
24989         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
24990         #defines strtoimax.  Also treat the other strto* functions
24991         like strtoimax.
24992
24993         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
24994         Check for strtoul and strtoumax,
24995         as those declarations are made even in the signed case.
24996         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
24997         Likewise, for strtol and strtoimax.
24998
24999 2001-09-28  Paul Eggert  <eggert@twinsun.com>
25000
25001         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
25002         #defines strtoimax.  Also treat the other strto* functions
25003         like strtoimax.
25004
25005         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
25006         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
25007         (strtoimax, strtoumax): Do not declare if already defined as a macro.
25008
25009 2001-09-26  Jim Meyering  <meyering@lucent.com>
25010
25011         Most macros in unlocked-io.h had the wrong number of arguments.
25012         * lib/gen-uio: New script.
25013         (USE_UNLOCKED_IO): Define to 1 if not already defined.
25014         * lib/unlocked-io.hin: Remove file.
25015         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
25016         rather than trying to embed it here.
25017         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
25018         Reported by Padraig Brady.
25019
25020 2001-09-25  Volker Borchert  <bt@teknon.de>
25021
25022         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
25023         `result'.
25024
25025 2001-09-24  Jim Meyering  <meyering@lucent.com>
25026
25027         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
25028
25029 2001-09-23  Jim Meyering  <meyering@lucent.com>
25030
25031         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
25032         instead of the mere test for existence of mntent.h.  The latter
25033         would get a false-positive on AIX 3.4 systems.
25034         In the outer getmntent if-block, don't die if neither of the getmntent
25035         tests succeeds.  Instead, just fall through and continue with the
25036         remaining tests.
25037
25038 2001-09-23  Jim Meyering  <meyering@lucent.com>
25039
25040         * lib/mountlist.c: Remove useless parentheses in #if directives.
25041         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
25042         the deprecated MOUNTED symbol is no longer defined in mntent.h.
25043
25044 2001-09-22  Jim Meyering  <meyering@lucent.com>
25045
25046         * m4/gettext.m4: New file.  From gettext.
25047         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
25048         * m4/progtest.m4: Likewise
25049         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
25050         * m4/glibc21.m4: Likewise.
25051
25052         * m4/libintl.m4: Remove.  No longer used.
25053
25054 2001-09-22  Jim Meyering  <meyering@lucent.com>
25055
25056         * lib/localcharset.c: Update from latest gettext.
25057         * lib/config.charset: Likewise.
25058
25059 2001-09-20  Jim Meyering  <meyering@lucent.com>
25060
25061         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
25062         strtoimax.
25063         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
25064         strtoumax.
25065
25066 2001-09-20  Jim Meyering  <meyering@lucent.com>
25067
25068         * lib/xstrtol.c (strtoimax): Guard declaration with
25069         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
25070         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
25071         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
25072         (strtoumax): Likewise, for completeness (it wasn't necessary).
25073
25074 2001-09-17  Paul Eggert  <eggert@twinsun.com>
25075
25076         * lib/strtoimax.c (HAVE_LONG_LONG):
25077         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
25078         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
25079         to work around bug in IBM C compiler.
25080
25081 2001-09-17  Jim Meyering  <meyering@lucent.com>
25082
25083         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
25084         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
25085         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
25086         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
25087         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
25088         whenever the right hand side need not be expanded by the shell.
25089
25090 2001-09-16  Paul Eggert  <eggert@twinsun.com>
25091
25092         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
25093         library.  It's not correct, as some older glibcs are buggy.
25094         fnmatch wasn't fixed until glibc 2.2.
25095
25096         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
25097         special shell magic here.
25098
25099 2001-09-16  Jim Meyering  <meyering@lucent.com>
25100
25101         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
25102         * m4/jm-macros.m4: Require it.
25103
25104 2001-09-16  Jim Meyering  <meyering@lucent.com>
25105
25106         * lib/mkdir.c: New file.
25107
25108 2001-09-15  Jim Meyering  <meyering@lucent.com>
25109
25110         * m4/jm-macros.m4: Check for help2man.
25111
25112 2001-09-11  Jim Meyering  <meyering@lucent.com>
25113
25114         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
25115         The body, by Paul Eggert, was moved here from configure.in.
25116         * m4/jm-macros.m4: Require UTILS_HOST_OS.
25117
25118 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25119
25120         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
25121         (jm_PREREQ): Use it.
25122
25123 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25124
25125         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
25126         Use ssize_t, not int, to store result of readlink.
25127         Check for ssize_t overflow as well as size_t overflow,
25128         as POSIX says the result of readlink is implementation-defined
25129         when ssize_t overflows.
25130         Remove unnecessary cast to char*.
25131         Use free+malloc instead of realloc, as the storage doesn't need
25132         to be preserved and it's clearer and can be more efficient that way.
25133         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
25134         * lib/xreadlink.h (xreadlink): Update prototype.
25135
25136 2001-09-04  Paul Eggert  <eggert@twinsun.com>
25137
25138         * lib/xgetcwd.c: Revert some of the previous change; intead,
25139         fix the HAVE_GETCWD_NULL code to behave more like the
25140         !HAVE_GETCWD_NULL code used to.
25141
25142         Include "xalloc.h".
25143         (xgetcwd): Do not return NULL when memory is exhausted; instead,
25144         invoke xalloc_die.
25145
25146 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25147
25148         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
25149         sys/param.h, as pathmax.h includes them.
25150
25151 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25152
25153         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
25154         (jm_PREREQ_XGETCWD): New macro.
25155
25156         * m4/getcwd.m4: New file.
25157
25158 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25159
25160         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
25161         like the HAVE_GETCWD_NULL code.
25162         Include pathmax.h if not HAVE_GETCWD.
25163         Do not include xalloc.h.
25164         (INITIAL_BUFFER_SIZE): New symbol.
25165         Do not use xmalloc / xrealloc, since the caller is responsible for
25166         handling errors.  Preserve errno around `free' during failure.
25167         Do not overrun buffer when using getwd.
25168
25169 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25170
25171         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
25172         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
25173         getcwd (NULL, 0).
25174
25175 2001-09-03  Paul Eggert  <eggert@twinsun.com>
25176
25177         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
25178         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
25179         spotted by Jim Meyering.
25180
25181 2001-09-03  Jim Meyering  <meyering@lucent.com>
25182
25183         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
25184         failure.
25185
25186 2001-09-02  Jim Meyering  <meyering@lucent.com>
25187
25188         * lib/error.c: Update from GNU libc.
25189
25190 2001-09-01  Jim Meyering  <meyering@lucent.com>
25191
25192         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
25193         Used by df.
25194
25195 2001-09-01  Jim Meyering  <meyering@lucent.com>
25196
25197         * lib/xreadlink.c: New file.
25198         * lib/xreadlink.h: New file.
25199         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
25200         xreadlink.h.
25201
25202         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
25203         doesn't conflict with sparc Solaris 7's definition in
25204         /usr/include/sys/int_types.h.
25205
25206         * lib/exclude.c: Use `""', not `<>' to #include non-system header
25207         files.
25208         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
25209         and strncasecmp as r-values.  Unixware didn't have declarations.
25210
25211 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25212
25213         * lib/xstrtol.h: Add copyright notice.
25214         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
25215         LONGINT_INVALID_SUFFIX_CHAR.
25216
25217 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25218
25219         * lib/xstrtol.c (strtoimax): New decl.
25220
25221 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25222
25223         * lib/xgetcwd.c: Don't include pathmax.h.
25224         Include stdlib.h and unistd.h if available.
25225         Include xalloc.h.
25226         (xmalloc, xstrdup, free): Remove decls.
25227         (xgetcwd): Don't assume sizes fit in unsigned.
25228         Check for overflow when computing sizes.
25229         Simplify reallocation code.
25230
25231 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25232
25233         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
25234         a directory's st_size can have an arbitrary value, so the old
25235         usage could waste an arbitrary amount of memory.  All uses
25236         changed.
25237         * lib/savedir.h: Update prototype.
25238
25239 2001-08-31  Paul Eggert  <eggert@twinsun.com>
25240
25241         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
25242
25243         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
25244         old strtoimax.c.
25245
25246         Also, make the following further changes to make this file's
25247         configuration more similar to that of strtol.c:
25248         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
25249         (strtoumax, uintmax_t, strtoull, strtol): Remove.
25250         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
25251         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
25252         changed to signed values.
25253
25254         And make the following changes as well:
25255         Fix copyright notice, as 1999 was missing.
25256         (verify): New macro.
25257         (strtoimax): Check sizes at compile-time, not run-time.
25258         Prefer strtol to strtoll if both work.
25259         (main): Remove; it was not that useful and was a pain to maintain.
25260
25261         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
25262
25263 2001-08-31  Jim Meyering  <meyering@lucent.com>
25264
25265         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
25266         Use an initial, malloc'd, buffer of length 128 rather than
25267         a statically allocated one of length 1024.
25268
25269 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25270
25271         Simplify code, partly by assuming autoconf 2.52 semantics.
25272
25273         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
25274
25275         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
25276         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
25277         All uses removed.
25278         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
25279         Move AC_REQUIRE to next-to-top level, to avoid confusion.
25280         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
25281         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
25282         jm_AC_HEADER_INTTYPES_H.
25283         * m4/jm-macros.m4 (jm_MACROS): Likewise.
25284
25285         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
25286
25287         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
25288         Quote first arg of AC_DEFUN.
25289         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
25290         since they are needed to parse the include file even if we need
25291         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
25292         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
25293         but with opposite signedness.
25294
25295 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25296
25297         Merge 'exclude' changes from tar 1.13.22.
25298         This fixes one or two unlikely storage allocation overflow bugs,
25299         but doesn't change user-visible behavior otherwise.
25300
25301 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25302
25303         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
25304         (jm_PREREQ_EXCLUDE): New macro.
25305
25306 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25307
25308         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
25309         tm to be declared.
25310
25311 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25312
25313         * lib/hash.c: Remove '2001' from copyright notice.
25314
25315 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25316
25317         * lib/full-write.h: New file.
25318         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
25319         * lib/full-write.c: Correct credits, as cccp.c no longer
25320         exists and anyway it was so heavily changed from the old cccp
25321         code as to be unrecognizable.  Include full-write.h.
25322         (full_write) Return size_t, with short writes meaning failure.
25323         All callers changed.  This fixes a bug with large buffers
25324         on 64-bit hosts.
25325         * lib/utime.c: Include full-write.h.
25326
25327 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25328
25329         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
25330         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
25331         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
25332         Include if available.
25333         (<xalloc.h>): Include
25334         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
25335         (verify): New macro.  Use it to verify that EXCLUDE macros do not
25336         collide with FNM macros.
25337         (struct patopts): New struct.
25338         (struct exclude): Use it, as exclude patterns now come with options.
25339         (new_exclude): Support above changes.
25340         (new_exclude, add_exclude_file):
25341         Initial size must now be a power of two to simplify overflow checking.
25342         (free_exclude, fnmatch_no_wildcards): New function.
25343         (excluded_filename): No longer requires options arg, as the options
25344         are determined by add_exclude.  Now returns bool, not int.
25345         (excluded_filename, add_exclude):
25346         Add support for the fancy new exclusion options.
25347         (add_exclude, add_exclude_file): Now takes int options arg.
25348         Check for arithmetic overflow when computing sizes.
25349         (add_exclude_file): xrealloc might modify errno, so don't
25350         realloc until after errno might be used.
25351
25352         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
25353         New macros.
25354         (free_exclude): New decl.
25355         (add_exclude, add_exclude_file): Now takes int options arg.
25356         (excluded_filename): No longer requires options arg, as the options
25357         are determined by add_exclude.  Now returns bool, not int.
25358
25359 2001-08-30  Paul Eggert  <eggert@twinsun.com>
25360
25361         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
25362
25363 2001-08-27  Jim Meyering  <meyering@lucent.com>
25364
25365         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
25366
25367         * lib/version-etc.c (N_): Remove definition.
25368         Revert most of last change.
25369         Instead, simply don't mark the `Copyright...' string for translation.
25370         Based on advice from Paul Eggert.
25371
25372         * lib/strtoxmax.c: Tweak comment.
25373
25374 2001-08-26  Jim Meyering  <meyering@lucent.com>
25375
25376         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
25377
25378         * m4/xstrtoimax.m4: New file.
25379         * m4/xstrtoumax.m4: Add comments explaining why we
25380         AC_REPLACE_FUNCS(strtol).
25381
25382 2001-08-26  Jim Meyering  <meyering@lucent.com>
25383
25384         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
25385         of copyright with `%s' so translators don't get an untranslated
25386         message in 2002.
25387         (COPYRIGHT_YEAR): Define.
25388         (version_etc): Use fprintf rather than fputs.
25389         Suggestion from Ulrich Drepper.
25390
25391         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
25392
25393         * lib/strtoll.c: New file, from GNU libc.
25394         * lib/xstrtoimax.c: New file.
25395
25396         * lib/xstrtol.h: Add xstrtoimax.
25397         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
25398         * lib/strtoimax.c: New file.  Likewise, but first define
25399         STRTOUXMAX_SIGNED.
25400
25401         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
25402         ...
25403         * lib/strtoxmax.c: ... then renamed to this.
25404
25405 2001-08-18  Paul Eggert  <eggert@twinsun.com>
25406
25407         * m4/inttypes.m4: Add AC_PREREQ(2.13).
25408         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
25409         (jm_AC_TYPE_INTMAX_T): New macro.
25410         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
25411
25412         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
25413
25414         * m4/longlong.m4: Renamed from ulonglong.m4.
25415         * m4/inttypes.m4: Renamed from inttypes_h.m4.
25416         * m4/uintmax_t.m4: Removed.
25417
25418 2001-08-13  Paul Eggert  <eggert@twinsun.com>
25419
25420         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
25421         Port to Solaris 8, where 'sed' requires a space after the 'r'
25422         command, and where sh dislikes "$/".  Clean up the spacing a bit.
25423         Redirect output to $tmp just once.
25424
25425 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
25426
25427         * lib/addext.c (<errno.h>): Include.
25428         (errno): Declare if not defined.
25429         (addext): Work correctly when pathconf returns -1 and leaves
25430         errno alone because there is no limit.  Also, work even if
25431         pathconf returns a value greater than SIZE_MAX.
25432
25433 2001-08-12  Jim Meyering  <meyering@lucent.com>
25434
25435         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
25436         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
25437         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
25438         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
25439         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
25440         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
25441         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
25442         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
25443         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
25444         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
25445         utime.m4, utimes.m4, xstrtoumax.m4:
25446         Quote the first argument in each use of AC_DEFUN.
25447
25448 2001-08-12  Jim Meyering  <meyering@lucent.com>
25449
25450         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
25451         Simply `return getcwd (NULL, 0);'.
25452         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
25453         Use 1300 as initial value for length, not PATH_MAX.
25454
25455         * lib/pathmax.h: Clean up cpp syntax.
25456
25457 2001-08-12  Jim Meyering  <meyering@lucent.com>
25458
25459         * lib/gettimeofday.c: New file.
25460         * lib/gtod.h: New file.
25461         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
25462
25463 2001-08-05  Jim Meyering  <meyering@lucent.com>
25464
25465         * m4/jm-macros.m4: Require autoconf-2.52.
25466
25467 2001-08-04  Jim Meyering  <meyering@lucent.com>
25468
25469         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
25470         stmt, to get in sync with glibc.
25471
25472 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25473
25474         The following changes are from gettext 0.10.39 as maintained by
25475         Bruno Haible.
25476
25477         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
25478         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
25479         with inverted sense.  All uses changed.
25480
25481         * lib/mbswidth.c: Don't include <limits.h>.
25482         Include <stdlib.h> and <string.h> unconditionally.
25483         (iswcntrl, mbsinit, ISCNTRL): New macros.
25484         (mbsnwidth): Use K&R style function declarations.
25485         Don't bother checking for MB_LEN_MAX == 1, since the compiler
25486         can optimize it when MB_CUR_MAX == 1.
25487         The width of control characters is zero, not 1.
25488
25489 2001-08-03  Paul Eggert  <eggert@twinsun.com>
25490
25491         The following changes are from gettext 0.10.39 as maintained by
25492         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
25493
25494         * m4/codeset.m4: Upgrade to serial AM1.
25495         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
25496         all uses changed.  Quote first arg of AC_DEFUN.
25497         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
25498
25499         * m4/iconv.m4: Upgrade to serial AM2.
25500         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
25501         Add --with-libconv-prefix.
25502         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
25503         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
25504         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
25505         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
25506         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
25507
25508         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
25509         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
25510         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
25511         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
25512         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
25513         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
25514         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
25515         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
25516         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
25517
25518         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
25519         string.h any more.
25520
25521         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
25522         not the default value.
25523
25524         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
25525         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
25526         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
25527         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
25528         Also check for iswcntrl, used for wcwidth fallback.
25529         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
25530         to Autoconf 2.13.
25531
25532 2001-08-03  Jim Meyering  <meyering@lucent.com>
25533
25534         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
25535         as it was in the original.  Reported by Paul Eggert.
25536
25537 2001-07-16  Jim Meyering  <meyering@lucent.com>
25538
25539         * m4/gettimeofday.m4: New file.
25540         Prompted by a report from Bernhard Baehr.
25541
25542 2001-07-15  Jim Meyering  <meyering@lucent.com>
25543
25544         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
25545         stuff. Now it's in ../Makefile.cfg.
25546
25547 2001-07-15  Jim Meyering  <meyering@lucent.com>
25548
25549         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
25550         (BUILT_SOURCES): Add unlocked-io.h.
25551         (io_functions): Define.
25552         (unlocked-io.h): New rule.
25553         (DISTCLEANFILES): Add unlocked-io.h.
25554         (all-local): Depend on unlocked-io.h, to ensure it is created.
25555
25556         * lib/unlocked-io.hin: New file
25557
25558         * lib/regex.c: Update from glibc.
25559
25560 2001-07-05  Jim Meyering  <meyering@lucent.com>
25561
25562         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
25563         recommendation.
25564         (libfetish_a_SOURCES): Put all .h files here instead.
25565         Remove a thus-exposed (better checks in automake) duplicate and
25566         two unnecessary .h files.
25567
25568 2001-07-04  Jim Meyering  <meyering@lucent.com>
25569
25570         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
25571         that generates jm-glibc-io.m4 so that it doesn't trigger any make
25572         distcheck failure.
25573
25574 2001-07-02  Jim Meyering  <meyering@lucent.com>
25575
25576         The following changes were prompted by suggestions from Bruno Haible.
25577
25578         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
25579         is now generated.
25580         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
25581         definition of EXTRA_DIST.
25582         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
25583         ensure that the generated file is created/updated whenever the list
25584         of $(unlocked_functions) is changed.
25585         (jm-glibc-io.m4): New rule.
25586         (unlocked-io.h): New rule -- currently unused.
25587
25588 2001-06-24  Jim Meyering  <meyering@lucent.com>
25589
25590         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
25591         unmatched right bracket, rather than kludging it with an extra,
25592         falsely-matching quote in a comment.  Patch by Akim Demaille.
25593
25594 2001-06-11  Jim Meyering  <meyering@lucent.com>
25595
25596         * lib/regex.c: Update from GNU libc.
25597
25598 2001-05-27  Jim Meyering  <meyering@lucent.com>
25599
25600         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
25601         Check for ut_type in struct utmp.
25602
25603 2001-05-27  Jim Meyering  <meyering@lucent.com>
25604
25605         * lib/readutmp.h (UT_TYPE): Define.
25606
25607 2001-05-24  Jim Meyering  <meyering@lucent.com>
25608
25609         * lib/argmatch.c: Include "quote.h".
25610         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
25611         quote function.  Reported by Göran Uddeborg.
25612
25613 2001-05-22  Jim Meyering  <meyering@lucent.com>
25614
25615         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
25616         now that we use the package-supplied version unconditionally.
25617         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
25618
25619 2001-05-21  Jim Meyering  <meyering@lucent.com>
25620
25621         * m4/regex.m4: Change a couple backticks to single quotes to avoid
25622         shell syntax errors.
25623
25624 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25625
25626         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
25627
25628 2001-05-20  Paul Eggert  <eggert@twinsun.com>
25629
25630         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
25631         Don't bother to check library strftime, since
25632         we'll be using our own my_strftime function anyway.
25633         Define my_strftime instead of strftime.
25634
25635 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
25636
25637         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
25638         which is not yet declared.
25639
25640 2001-05-15  Jim Meyering  <meyering@lucent.com>
25641
25642         * m4/regex.m4: Use proper quoting so brackets appear in the test
25643         program.
25644         Reported by, and with help from, Bruno Haible.
25645
25646 2001-05-13  Jim Meyering  <meyering@lucent.com>
25647
25648         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
25649         undefined.
25650
25651 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25652
25653         dirname code cleanup.  base_name now behaves more compatibly
25654         with POSIX basename when given file names that have trailing
25655         slashes, and similarly for dir_name.  Add new primitives
25656         base_len and dir_len.  Put the directory-name-related decls
25657         into dirname.h.
25658
25659         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
25660         * lib/backupfile.c (base_name): Likewise.
25661         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
25662         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
25663         * lib/makepath.c (strip_trailing_slashes): Likewise.
25664         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
25665         ISSLASH): Likewise.
25666         * lib/rename.c (strip_trailing_slashes): Likewise.
25667         * lib/same.c (base_name): Likewise.
25668         * lib/stripslash.c (ISSLASH): Likewise.
25669
25670         * lib/addext.c: Include <dirname.h> after size_t is defined.
25671         * lib/backupfile.c: Likewise.
25672
25673         * lib/addext.c (addext): Use base_len to trim redundant
25674         trailing slashes instead of doing it ourselves.
25675         But do not trim the last slash if it is not redundant.
25676
25677         * lib/backupfile.c (find_backup_file_name,
25678         max_backup_version): Use base_len instead of rolling it ourselves.
25679         Handle the case of "" and (on DOS) "C:" correctly.
25680
25681         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
25682         needed. Include <string.h>, <dirname.h>.
25683         (base_name): Allow file names ending in slashes, other than names
25684         that are all slashes.  In this case, return the basename followed
25685         by the slashes.  This is more general, and can be used in places
25686         where the original base_name purposely had an assertion failure.
25687         (base_len): New function.
25688
25689         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
25690         Do not include <assert.h>; no longer needed.
25691         Include xalloc.h.
25692         (memrchr): Remove decl.
25693         (dir_name_r): Remove.
25694         (dir_len): Renamed from dirlen.  All callers changed.
25695         Rewrite in terms of base_name, for simplicity and consistency.
25696         (dir_name): Never return NULL.  All callers changed.
25697         Do not include <stdlib.h> in test program; no longer needed.
25698         return 0; is fine for test program.
25699
25700         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
25701         New macros.
25702         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
25703
25704         * lib/path-concat.c (path_concat): Use base_len to compute
25705         base length, not strlen; this means we cannot rely on memcpy
25706         to null-terminate.
25707
25708         * lib/same.c (STREQ): Remove.
25709         (same_name): Handle the case where the basename ends in trailing '/'.
25710
25711         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
25712         a slash was stripped.  Do not strip the last slash after a
25713         file system prefix.
25714
25715 2001-05-11  Paul Eggert  <eggert@twinsun.com>
25716
25717         * lib/Makefile.am (libfetish_a_SOURCES):
25718         Add strftime.c, since we now compile it on all hosts.
25719
25720         * lib/strftime.c (my_strftime):
25721         Define to nstrftime if emacs, but only if my_strftime is not defined.
25722         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
25723         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
25724         Add one more extra argument: a nanoseconds value.
25725         All uses changed.
25726         (ns): New macro.
25727         (my_strftime function): Add %N format.
25728         (emacs_strftimeu): Renamed from emacs_strftime,
25729         with extra ut argument.
25730
25731 2001-05-09  Paul Eggert  <eggert@twinsun.com>
25732
25733         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
25734
25735 2001-04-21  Jim Meyering  <meyering@lucent.com>
25736
25737         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
25738         doesn't interfere.
25739
25740 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
25741
25742         * m4/ftruncate.m4: Check for chsize.
25743         Link with ftruncate.o unconditionally if ftruncate is missing.
25744         This was required when cross-compiling to i586-mingw32msvc.
25745
25746 2001-04-08  Jim Meyering  <meyering@lucent.com>
25747
25748         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
25749         recomputed; that's necessary when the offset spans a DST transition.
25750         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
25751
25752 2001-04-02  Jim Meyering  <meyering@lucent.com>
25753
25754         * lib/regex.h, regex.c: Update from GNU libc.
25755
25756 2001-03-24  Jim Meyering  <meyering@lucent.com>
25757
25758         * m4/jm-macros.m4: Require autoconf-2.49d.
25759
25760 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
25761
25762         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
25763
25764 2001-03-19  Paul Eggert  <eggert@twinsun.com>
25765
25766         * lib/version-etc.c (version_etc_copyright): Update to 2001.
25767
25768 2001-03-17  Jim Meyering  <meyering@lucent.com>
25769
25770         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
25771         now that the version in autoconf is equivalent.
25772         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
25773
25774         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
25775         Suggestion from Akim Demaille.
25776
25777         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
25778         (jm_PREREQ_TEMPNAME): New function.
25779
25780 2001-03-16  Paul Eggert  <eggert@twinsun.com>
25781
25782         * lib/tempname.c (uint64_t): Define to uintmax_t if
25783         not defined, and if UINT64_MAX is not defined.
25784         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
25785         Reported by John David Anglin.
25786
25787 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
25788
25789         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
25790         resolve alias if codeset is empty.
25791         * lib/config.charset (BeOS): Use wildcard syntax.
25792
25793 2001-03-13  Jim Meyering  <meyering@lucent.com>
25794
25795         * lib/path-concat.c (path_concat)
25796         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
25797         concatenating e.g., `C:' and `foo'.
25798         From Bruno Haible.
25799
25800 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25801
25802         * lib/localcharset.c (locale_charset): Don't use
25803         setlocale(LC_CTYPE,NULL). Don't return NULL.
25804         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
25805
25806 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
25807
25808         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
25809         support for DOS/DJGPP.
25810
25811 2001-03-01  Paul Eggert  <eggert@twinsun.com>
25812
25813         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
25814         lacks mkstemp.  Compile our own tempname.c if we compile our own
25815         mkstemp.c, as mkstemp relies on tempname.
25816
25817 2001-03-01  Jim Meyering  <meyering@lucent.com>
25818
25819         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
25820         AH_VERBATIM really does output its argument verbatim.
25821
25822 2001-02-28  Paul Eggert  <eggert@twinsun.com>
25823
25824         * lib/Makefile.am (libfetish_a_SOURCES):
25825         Add dup-safer.c, fopen-safer.c.
25826         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
25827
25828         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
25829         * lib/unistd-safer.h: New files.
25830
25831 2001-02-25  Paul Eggert  <eggert@twinsun.com>
25832
25833         The mkstemp replacement is taken from glibc 2.2.2, with some
25834         portability fixes for use outside glibc, as follows:
25835
25836         * lib/tempname.c (struct_stat64): New macro.
25837         (direxists, __gen_tempname): Use it.
25838         This avoids a portability problem with Solaris 8.
25839
25840         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
25841         (<stddef.h>, <stdint.h>, <string.h>):
25842         Include only if STDC_HEADERS || _LIBC.
25843         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
25844         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
25845         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
25846         (__set_errno): Define this macro if <errno.h> doesn't.
25847         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
25848         Define these macros if <stdio.h> doesn't.
25849         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
25850         Define these macros if <sys/stat.h>
25851         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
25852         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
25853         __xstat64): Define if not _LIBC.
25854         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
25855         (__gen_tempname): Invoke gettimeofday only if
25856         HAVE_GETTIMEOFDAY || _LIBC;
25857         otherwise, fall back on plain "time".
25858         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
25859
25860         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
25861
25862         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
25863
25864 2001-02-18  Paul Eggert  <eggert@twinsun.com>
25865
25866         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
25867
25868 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25869
25870         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
25871         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
25872         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
25873         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
25874
25875 2001-02-17  Paul Eggert  <eggert@twinsun.com>
25876
25877         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
25878         Remove workaround macros for hosts that have mbrtowc but not
25879         mbstate_t, as we now insist on proper declarations for both
25880         before using mbrtowc.
25881
25882 2001-02-17  Jim Meyering  <meyering@lucent.com>
25883
25884         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
25885         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
25886         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
25887         UnixWare 7.1.1.
25888
25889         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
25890         rather than AC_CACHE_VAL.
25891
25892 2001-02-17  Jim Meyering  <meyering@lucent.com>
25893
25894         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
25895         around included file name.
25896
25897         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
25898
25899         * lib/strftime.c: Update from GNU libc (the only changes were to
25900         comments).
25901
25902 2001-02-17  Jim Meyering  <meyering@lucent.com>
25903
25904         * lib/regex.c: Update from libc.
25905
25906 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
25907
25908         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
25909         clash.
25910
25911 2001-02-16  Paul Eggert  <eggert@twinsun.com>
25912
25913         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
25914         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
25915         Reported by Mark Hounschell via Paul Eggert.
25916
25917 2001-02-07  Jim Meyering  <meyering@lucent.com>
25918
25919         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
25920
25921 2001-02-05  Jim Meyering  <meyering@lucent.com>
25922
25923         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
25924         it includes the patch required for `large file' support with at least
25925         HP-UX's 10.20 /bin/cc.
25926
25927 2001-02-03  Jim Meyering  <meyering@lucent.com>
25928
25929         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
25930         AS_IF, now that it works once again (mysteriously).
25931         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25932
25933 2001-01-30  Jim Meyering  <meyering@lucent.com>
25934
25935         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
25936         * m4/chown.m4: Rename conftestchown to conftest.chown.
25937         * m4/rename.m4: s/conftestdir/conftest.d1/ and
25938         s/conftestdir2/conftest.d2/.
25939         * m4/utimes.m4: s/conftestdata/conftest.data/
25940         Inspired by Pavel Roskin's change in autoconf.
25941
25942 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
25943
25944         * lib/config.charset: Update for FreeBSD 4.2.
25945
25946 2001-01-27  Jim Meyering  <meyering@lucent.com>
25947
25948         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
25949         a use of AS_IF.
25950         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
25951
25952 2001-01-26  Jim Meyering  <meyering@lucent.com>
25953
25954         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
25955         quotearg.c includes it.
25956
25957 2001-01-26  Jim Meyering  <meyering@lucent.com>
25958
25959         * lib/quotearg.c: Include stddef.h.
25960         * lib/quote.c: Include stddef.h.
25961         Reported by Axel Kittenberger.
25962
25963         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
25964         line in double quotes so that it evokes a better diagnostic.
25965         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
25966         Reported by Axel Kittenberger.
25967
25968 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
25969
25970         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
25971         as if it was a `charset'.
25972
25973 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25974
25975         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
25976         has const.
25977
25978 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
25979
25980         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
25981         to avoid a warning.  Add back 'const' to inptr.
25982
25983 2001-01-20  Jim Meyering  <meyering@lucent.com>
25984
25985         Be sure that headers are checked before used in code compiled
25986         for the type checks.
25987         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
25988         In place of that, invoke jm_CHECK_ALL_TYPES.
25989         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
25990         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
25991         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
25992         The check for ssize_t was mistakenly run before the test for unistd.h.
25993
25994         The configure-time check for stdbool.h was missing.
25995         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
25996         (jm_PREREQ_HASH): New function.
25997
25998 2001-01-17  Jim Meyering  <meyering@lucent.com>
25999
26000         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
26001         for autoconf-2.49c.
26002         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
26003
26004 2001-01-16  Jim Meyering  <meyering@lucent.com>
26005
26006         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
26007         From Bruno Haible.
26008
26009 2001-01-14  Jim Meyering  <meyering@lucent.com>
26010
26011         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
26012         foo and bar.  Create conftestdir/ in the script, not in the C code.
26013         Remove directories in the script, not in the C code.
26014         Remove conftestdir{,2} before trying to create the directory.
26015         Make the entire configure script fail if the mkdir fails.
26016
26017 2001-01-14  Jim Meyering  <meyering@lucent.com>
26018
26019         * lib/rename.c: New file.  From Volker Borchert.
26020         Include stdlib.h, string.h or strings.h, and xalloc.h.
26021         Use strip_trailing_slashes rather than open-coding it.
26022
26023 2001-01-03  Paul Eggert  <eggert@twinsun.com>
26024
26025         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
26026
26027 2001-01-03  Jim Meyering  <meyering@lucent.com>
26028
26029         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
26030         of local `inptr' to avoid warning with some system declarations of
26031         iconv.
26032
26033 2001-01-02  Volker Borchert  <bt@teknon.de>
26034
26035         * m4/rename.m4: New file.
26036         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
26037
26038 2001-01-01  Jim Meyering  <meyering@lucent.com>
26039
26040         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
26041         even on systems with utmpx.h.  It's necessary for the declaration of
26042         utmp's ut_user member.  Reported by Andreas Jaeger.
26043
26044         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
26045         available. They are required for the declarations of getgrgid and
26046         getpwuid resp.
26047         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
26048         Reported by Andreas Jaeger.
26049
26050 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
26051
26052         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
26053         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
26054         so `make install' also works in VPATH builds.
26055
26056 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
26057
26058         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
26059         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
26060         can be used in subdirectories.
26061
26062 2000-12-29  Paul Eggert  <eggert@twinsun.com>
26063
26064         * lib/modechange.c: Do not assume that mode_t uses the
26065         traditional octal encoding.  E.g. "chmod 1 FOO" should set
26066         the other-execute bit of FOO even if S_IXOTH != 1.
26067
26068         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
26069         WOTH, XOTH, ALLM): New macros.
26070         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
26071          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
26072         Use them.
26073         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
26074         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
26075         (mode_compile):
26076         No need to use uintmax_t; unsigned long is long enough.
26077         Don't bother to get suffix since we don't use it.
26078
26079 2000-12-26  Jim Meyering  <meyering@lucent.com>
26080
26081         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
26082         better with autoheader.
26083
26084 2000-12-24  Jim Meyering  <meyering@lucent.com>
26085
26086         * lib/hash.c (is_prime): Return explicit boolean values.
26087         (hash_get_first): Return NULL to appease Irix5.6's 89.
26088         Reported by Nelson Beebe.
26089
26090 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
26091
26092         * lib/localcharset.c (locale_charset): Add support for Win32.
26093
26094 2000-12-18  Paul Eggert  <eggert@twinsun.com>
26095
26096         * lib/physmem.h, lib/physmem.c: New files.
26097
26098         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
26099         (noinst_HEADERS): Add physmem.h.
26100
26101         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
26102         't' for compatibility with Solaris 8 sort.
26103
26104 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
26105
26106         * lib/config.charset: Add support for BeOS.
26107
26108 2000-12-17  Jim Meyering  <meyering@lucent.com>
26109
26110         * m4/dos.m4 (jm_AC_DOS): New file and macro.
26111         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
26112
26113 2000-12-16  Jim Meyering  <meyering@lucent.com>
26114
26115         This bug had a serious impact on chown: `chown N:M FILE' (for integer
26116         N and M) would have treated it like `chown N:N FILE'.
26117
26118         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
26119
26120 2000-12-16  Jim Meyering  <meyering@lucent.com>
26121
26122         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
26123         SHELLS_FILE to a file name that's useful on djgpp systems.
26124         Include stdlib.h.
26125         (ADDITIONAL_DEFAULT_SHELLS): Define.
26126         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
26127         Based mostly on a patch from Prashant TR.
26128
26129 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
26130
26131         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
26132         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
26133         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
26134
26135 2000-12-08  Andreas Schwab  <schwab@suse.de>
26136
26137         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
26138         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
26139
26140 2000-12-07  Jim Meyering  <meyering@lucent.com>
26141
26142         * lib/stripslash.c (ISSLASH): Define.
26143         (strip_trailing_slashes): Use ISSLASH rather than comparing against
26144         `/'.
26145         From Prashant TR.
26146
26147         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
26148         (dir_name_r): Declare this function as static.
26149         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
26150         manifest itself on a name containing a mix of slashes and
26151         backslashes.
26152         Make this function work with names starting with a DOS-style
26153         drive letter and colon prefix.
26154         (dir_name): Append `.' if necessary.
26155         Based mostly on patches from Prashant TR and Eli Zaretskii.
26156
26157         * lib/dirname.h (dir_name_r): Remove prototype.
26158
26159 2000-12-06  Paul Eggert  <eggert@twinsun.com>
26160
26161         * m4/off_t-format.m4: Remove this file.
26162         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
26163
26164 2000-12-06  Jim Meyering  <meyering@lucent.com>
26165
26166         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
26167         replacement strtoull, we may well need the replacement strtoul, too.
26168         Check for declarations of strtoul and strtoull.
26169         Check for strtol.  Mainly as a cue to cause automake to include
26170         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
26171         Check for limits.h -- strtol.c needs it.
26172
26173 2000-12-05  Jim Meyering  <meyering@lucent.com>
26174
26175         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
26176
26177 2000-12-04  Jim Meyering  <meyering@lucent.com>
26178
26179         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
26180         Also include memory.h, stdlib.h, unistd.h if appropriate.
26181         Reported by Andreas Jaeger (conflicting declaration of malloc).
26182
26183 2000-12-02  Jim Meyering  <meyering@lucent.com>
26184
26185         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
26186         * m4/jm-macros.m4 (jm_MACROS): require it.
26187
26188 2000-12-02  Jim Meyering  <meyering@lucent.com>
26189
26190         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
26191
26192 2000-12-01  Paul Eggert  <eggert@twinsun.com>
26193
26194         * lib/memrchr.c: Include <config.h> before any system include file.
26195
26196 2000-11-30  Jim Meyering  <meyering@lucent.com>
26197
26198         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
26199
26200 2000-11-30  Jim Meyering  <meyering@lucent.com>
26201
26202         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
26203
26204 2000-11-29  Paul Eggert  <eggert@twinsun.com>
26205
26206         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
26207
26208 2000-11-26  Jim Meyering  <meyering@lucent.com>
26209
26210         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
26211
26212 2000-11-22  Paul Eggert  <eggert@twinsun.com>
26213
26214         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
26215         size of (size_t) -1; it's not portable.
26216
26217 2000-11-17  Jim Meyering  <meyering@lucent.com>
26218
26219         * lib/strstr.c: Update from GNU libc.
26220
26221 2000-11-17  Akim Demaille  <akim@epita.fr>
26222
26223         * lib/obstack.h: Formatting changes.
26224         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
26225         prevent type checking.
26226         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
26227         cast the value to (void *): assigning a `foo *' to a `void *'
26228         variable is valid.
26229         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
26230
26231 2000-11-16  Jim Meyering  <meyering@lucent.com>
26232
26233         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
26234
26235 2000-11-11  Jim Meyering  <meyering@lucent.com>
26236
26237         * lib/error.c: Add a couple #includes, merging from GNU libc version.
26238
26239 2000-11-10  Jim Meyering  <meyering@lucent.com>
26240
26241         * lib/obstack.h: Update from GNU libc.
26242         * lib/obstack.c: Likewise.
26243
26244 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
26245
26246         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
26247
26248 2000-11-06  Paul Eggert  <eggert@twinsun.com>
26249
26250         * lib/getusershell.c (setusershell): Use rewind rather than
26251         fseek/fseeko, to avoid configuration hassles with fseeko.
26252         Don't bother opening SHELLS_FILE if shellstream is NULL;
26253         it's not necessary.
26254
26255 2000-11-05  Jim Meyering  <meyering@lucent.com>
26256
26257         * lib/makepath.h (make_dir): Declare.
26258         * lib/makepath.c (make_dir): Remove `static' attribute.
26259         Tweak a comment.
26260
26261 2000-11-04  Jim Meyering  <meyering@lucent.com>
26262
26263         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
26264
26265 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
26266
26267         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
26268         last one in a bucket, advance to the next bucket.
26269
26270 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
26271
26272         * lib/fnmatch.c: Do not comment out all the code if we are using
26273         the GNU C library, because in some cases we are replacing buggy
26274         code in the GNU C library itself.
26275
26276 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
26277
26278         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
26279         (regex_compile): Catch bogus \(\1\).
26280
26281 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26282
26283         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
26284         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
26285         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
26286
26287 2000-10-30  Paul Eggert  <eggert@twinsun.com>
26288
26289         * lib/error.h, getline.h, modechange.h:
26290         Remove "2000" from Copyright line, as the file hasn't been
26291         changed this year other than in the copyright notice.
26292
26293         * lib/xalloc.h: Add "2000" to Copyright line, as this file
26294         was changed this year.
26295
26296 2000-10-29  Jim Meyering  <meyering@lucent.com>
26297
26298         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
26299         renaming.
26300         * m4/ls-mntd-fs.m4: Likewise
26301
26302 2000-10-29  Jim Meyering  <meyering@lucent.com>
26303
26304         * lib/xstat.in: Fix grammar in comment.
26305
26306 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
26307
26308         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
26309         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
26310         doesn't define __restrict_arr.
26311
26312 2000-10-28  Jim Meyering  <meyering@lucent.com>
26313
26314         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
26315         (jm_PREREQ_MEMCHR): New function.
26316
26317 2000-10-28  Jim Meyering  <meyering@lucent.com>
26318
26319         * lib/memchr.c: Update from libc.
26320         Adjust for portability:
26321         [HAVE_STDLIB_H]: Include stdlib.h.
26322         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
26323         Undef __memchr, too.
26324         [!weak_alias]: Define __memchr to memchr.
26325
26326         * lib/regex.c: Update from libc.
26327         * lib/regex.h: Likewise.
26328         * lib/getopt1.c: Likewise.
26329         * lib/memcmp.c: Likewise.
26330
26331         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
26332         Avoid using fseek, when possible -- it's broken by design.
26333         Patch by Ulrich Drepper.
26334
26335 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
26336
26337         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
26338         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
26339         Giving in to popular pressure to shut up the compiler with casts.
26340
26341 2000-10-26  Jim Meyering  <meyering@lucent.com>
26342
26343         * lib/strftime.c: Update from libc.
26344
26345 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
26346
26347         * regex.c: More `unsigned char' -> `re_char' changes.
26348         Also change several `int' into `re_wchar_t'.
26349         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
26350         (PUSH_FAILURE_POINTER): Don't cast any more.
26351         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
26352         We want GCC to complain, since this piece of code makes
26353         re_match non-reentrant, which *should* be fixed.
26354         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
26355         (EXTEND_BUFFER): Use RETALLOC.
26356         (SET_LIST_BIT): Don't cast.
26357         (re_wchar_t): New type.
26358         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
26359         that those two functions will always properly return.
26360         (IMMEDIATE_QUIT_CHECK): Cast to void.
26361         (analyse_first): Use recursion rather than an explicit stack.
26362         (re_compile_fastmap): Can't fail anymore.
26363         (re_search_2): Don't check re_compile_fastmap for failure.
26364         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
26365         Now also sets the new value (passed in a new argument).
26366         (re_match_2_internal): Use it.
26367         Also, use a new var `reg' of type size_t when looping through regs
26368         rather than reuse the inappropriate `mcnt'.
26369
26370 2000-10-25  Jim Meyering  <meyering@lucent.com>
26371
26372         * lib/obstack.c: Update from libc.
26373
26374 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
26375
26376         * regex.c (regex_compile): Change the way of handling a range from
26377         a char less than 256 to a char not less than 256.
26378
26379 2000-10-24  Andrew Innes  <andrewi@gnu.org>
26380
26381         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
26382         NT-Emacs only.
26383         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
26384         so that re_search functions only quit when callers expect them to.
26385
26386 2000-10-23  Jim Meyering  <meyering@lucent.com>
26387
26388         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
26389         wrong.  That set_locale call must not have any side effects.
26390         From Paul Eggert.
26391
26392 2000-10-22  Jim Meyering  <meyering@lucent.com>
26393
26394         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
26395         [CYCLIC]: Remove now-unused definition.
26396
26397         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
26398         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
26399         Suggestion from Ulrich Drepper.
26400
26401 2000-10-21  Jim Meyering  <meyering@lucent.com>
26402
26403         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
26404         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
26405         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
26406
26407 2000-10-21  Jim Meyering  <meyering@lucent.com>
26408
26409         * lib/dirname.c (memrchr): Declare if necessary.
26410         (dir_name): Remove the restriction that there be no
26411         trailing slashes.  Now, this code skips past them, effectively
26412         ignoring them.
26413         [TEST_DIRNAME] (main): New unit tests.
26414
26415         * lib/memrchr.c: New file from GNU libc.
26416         Undef __memrchr, too.
26417         [!weak_alias]: Define __memrchr to memrchr.
26418         Guard weak_alias use with `#ifdef weak_alias'.
26419
26420 2000-10-21  Jim Meyering  <meyering@lucent.com>
26421
26422         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
26423         (dir_name): Use dir_name_r.
26424         * lib/dirname.h (dir_name_r): Declare it.
26425
26426 2000-10-17  Jim Meyering  <meyering@lucent.com>
26427
26428         * lib/quote.h (PARAMS): Define and use.
26429         Reported by Akim Demaille.
26430
26431         * lib/getopt.c: Update from libc.
26432
26433 2000-10-16  Jim Meyering  <meyering@lucent.com>
26434
26435         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
26436         setlocale.
26437         From Jan Fedak.
26438
26439 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
26440
26441         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
26442
26443 2000-09-25  Jim Meyering  <meyering@lucent.com>
26444
26445         * lib/md5.h (rol): Define (from GnuPG).
26446
26447         * lib/sha.c: Give credit (GnuPG) where due.
26448         (M): Use rol rather than open-coding it.
26449         Add a FIXME comment.
26450
26451 2000-09-21  Jim Meyering  <meyering@lucent.com>
26452
26453         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
26454         Reported by Michael Stone.
26455
26456 2000-09-20  Jim Meyering  <meyering@lucent.com>
26457
26458         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
26459         (noinst_HEADERS): Add sha.h.
26460         Based on code from Scott G. Miller and from GnuPG.
26461
26462 2000-09-18  Jim Meyering  <meyering@lucent.com>
26463
26464         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
26465         LIBS. Otherwise, everyone ends up linking with -lelf for some
26466         configurations.
26467         Reported by Mike Stone.
26468
26469 2000-09-15  Jim Meyering  <meyering@lucent.com>
26470
26471         * lib/regex.c: Update from libc.
26472
26473 2000-09-10  Jim Meyering  <meyering@lucent.com>
26474
26475         * lib/getopt.c (_getopt_internal): Update from glibc.
26476
26477 2000-09-09  Jim Meyering  <meyering@lucent.com>
26478
26479         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
26480         think it should be used as a general replacement for isascii.
26481         * lib/fnmatch.c: Likewise.
26482         * lib/mbswidth.c: Likewise
26483         * lib/regex.c: Likewise.
26484
26485         Don't use atoi.
26486         * lib/userspec.c: Include sys/param.h and limits.h.
26487         Include xstrtol.h.
26488         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
26489         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
26490         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
26491         UID, GID.  Check range.
26492
26493 2000-09-06  Jim Meyering  <meyering@lucent.com>
26494
26495         * lib/getopt.c (_getopt_internal): Update from glibc.
26496
26497 2000-08-30  Jim Meyering  <meyering@lucent.com>
26498
26499         * lib/strftime.c: Merge in changes from GNU libc.
26500
26501 2000-08-26  Jim Meyering  <meyering@lucent.com>
26502
26503         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
26504         * m4/fpending.m4: New file.
26505
26506 2000-08-26  Jim Meyering  <meyering@lucent.com>
26507
26508         * lib/closeout.c: Include "__fpending.h".
26509         (close_stdout_status): Return right away if there's nothing to flush.
26510
26511         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
26512         * lib/__fpending.c: New file.
26513         * lib/__fpending.h: New file.
26514
26515 2000-08-20  Jim Meyering  <meyering@lucent.com>
26516
26517         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
26518         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
26519         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
26520
26521 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
26522
26523         Improve fileutils installation on systems where running
26524         programs (like install) can't be unlinked.
26525         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
26526         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
26527
26528 2000-08-07  Paul Eggert  <eggert@twinsun.com>
26529
26530         Standardize on "memory exhausted" instead of "Memory exhausted"
26531         or "virtual memory exhausted".
26532         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
26533         "virtual memory exhausted".
26534         * lib/same.c (same_name): Invoke xalloc_die instead of printing
26535         our own message.
26536         * lib/userspec.c (parse_user_spec): Likewise.
26537         * lib/bumpalloc.h: comment fix
26538         * lib/same.c, userspec.c: Include xalloc.h.
26539
26540         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
26541         not char *const and pointing to a constant array.
26542         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
26543         (xrealloc): Comment fix.
26544
26545         * lib/userspec.c (parse_user_spec):
26546         Don't translate a message until just before returning,
26547         to avoid unnecessary translation.
26548
26549 2000-08-07  Jim Meyering  <meyering@lucent.com>
26550
26551         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
26552         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
26553         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
26554         getgroups.c, gethostname.c, getopt.h, group-member.c,
26555         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
26556         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
26557         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
26558         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
26559         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
26560         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
26561         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
26562         yesno.c: Back out Copyright date changes for each file with no change
26563         this year.  This eases coordination with other programs using the same
26564         source code modules.  From Paul Eggert.
26565
26566 2000-08-06  Paul Eggert  <eggert@twinsun.com>
26567
26568         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
26569         not char, for compatibility with glibc 2.1.3 strftime.c.
26570
26571 2000-08-03  Greg McGary  <greg@mcgary.org>
26572
26573         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
26574         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
26575         (EXTEND_BUFFER): Use them.
26576
26577 2000-08-01  Jim Meyering  <meyering@lucent.com>
26578
26579         * lib/dirname.c (ISSLASH): Define.
26580         (BACKSLASH_IS_PATH_SEPARATOR): Define.
26581         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
26582         both `\' and `/' may be use as path separators.
26583         Based on a patch from Prashant TR.
26584
26585 2000-07-31  Paul Eggert  <eggert@twinsun.com>
26586
26587         * lib/quotearg.c (quotearg_n_options): Don't make the initial
26588         slot vector a constant, since it might get modified.
26589
26590 2000-07-31  Jim Meyering  <meyering@lucent.com>
26591
26592         * lib/xmalloc.c: Use `virtual memory exhausted', not
26593         `Memory exhausted'.
26594         * lib/obstack.c (print_and_abort): Likewise.
26595
26596 2000-07-30  Paul Eggert  <eggert@twinsun.com>
26597
26598         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
26599         buffer, so that the caller can always quote one small
26600         component of a "memory exhausted" message in slot 0.
26601         From a suggestion by Jim Meyering.
26602
26603 2000-07-30  Jim Meyering  <meyering@lucent.com>
26604
26605         * lib/makepath.c (make_path): Quote the other instance, too.
26606
26607         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
26608         (STATIC_BUF_SIZE): Define.
26609         (quotearg_n_options): Use only statically allocated storage when
26610         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
26611         than STATIC_BUF_SIZE.
26612
26613 2000-07-29  Jim Meyering  <meyering@lucent.com>
26614
26615         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
26616         * lib/dirname.c (dir_name): Likewise.
26617
26618         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
26619         `/'.
26620
26621         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
26622         (dir_name): Assert that there are no trailing slashes.
26623
26624 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
26625
26626         * lib/mbswidth.h (mbswidth): Add a flags argument.
26627         (mbswidth): New declaration.
26628         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
26629         * lib/mbswidth.c (mbswidth): Add a flags argument.
26630         (mbsnwidth): New function.
26631
26632 2000-07-24  Jim Meyering  <meyering@lucent.com>
26633
26634         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
26635
26636 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26637
26638         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
26639
26640 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26641
26642         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
26643         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
26644         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
26645         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
26646         invoke multibyte primitives.
26647
26648 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26649
26650         * lib/quotearg.c:
26651         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
26652         so that mbstate_t is always defined.
26653
26654         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
26655         be 1 in at least one GCC installation, and this configuration
26656         error is likely to be common.  Ignoring MB_LEN_MAX hurts
26657         performance on hosts that have mbrtowc but have only unibyte
26658         locales, but I assume these hosts are rare.
26659
26660 2000-07-23  Paul Eggert  <eggert@twinsun.com>
26661
26662         * lib/mbswidth.c (_XOPEN_SOURCE):
26663         Don't define; this causes problems on Solaris 7.
26664         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
26665
26666 2000-07-23  Jim Meyering  <meyering@lucent.com>
26667
26668         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
26669         too: getgrgid, getpwuid, getuid.
26670
26671 2000-07-23  Jim Meyering  <meyering@lucent.com>
26672
26673         * lib/basename.c (base_name): Add an assertion.
26674
26675 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
26676
26677         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
26678         shadow its mbsinit function.
26679
26680 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26681
26682         * lib/mbswidth.h: New file.
26683         * lib/mbswidth.c: New file.
26684         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
26685         (noinst_HEADERS): Add mbswidth.h.
26686
26687 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
26688
26689         * lib/config.charset: Add support for FreeBSD. Improve support for
26690         HP-UX and IRIX 6.
26691
26692 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
26693
26694         * m4/mbswidth.m4: New file.
26695         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
26696
26697 2000-07-15  Jim Meyering  <meyering@lucent.com>
26698
26699         * lib/makepath.c: Include quote.h.
26700         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
26701         corresponding argument in a `quote (...)' call.
26702         Give better diagnostics.
26703
26704         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
26705         (noinst_HEADERS): Add quote.h.
26706
26707         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
26708         from tar's src/misc.c.
26709         * lib/quote.h: New file.  Prototypes for same.
26710
26711 2000-07-14  Paul Eggert  <eggert@twinsun.com>
26712
26713         From a suggestion by Bruno Haible.
26714         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
26715         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
26716         to decide whether to define the BeOS workaround macro;
26717         this adjusts to the change to AC_MBSTATE_T.
26718
26719 2000-07-14  Jim Meyering  <meyering@lucent.com>
26720
26721         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
26722         jm_AC_TYPE_UINTMAX_T.
26723
26724 2000-07-13  Paul Eggert  <eggert@twinsun.com>
26725
26726         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
26727
26728         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
26729         quotearg_buffer_restyled): Add support for
26730         clocale_quoting_style.  Undo previous change to
26731         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
26732         and "{RIGHT QUOTATION MARK}" msgids.
26733
26734 2000-07-10  Paul Eggert  <eggert@twinsun.com>
26735
26736         From a suggestion by Bruno Haible.
26737         * m4/mbstate_t.m4 (AC_MBSTATE_T):
26738         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
26739         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
26740         and mbstate_t, to a single-part test that simply defines mbstate_t.
26741         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
26742         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
26743
26744 2000-07-10  Jim Meyering  <meyering@lucent.com>
26745
26746         * m4/strerror_r.m4: Mirror the correction made in autoconf.
26747
26748         * m4/gnu-source.m4: Output to confdefs.h directly.
26749         Suggestion from Akim Demaille.
26750
26751 2000-07-09  Paul Eggert  <eggert@twinsun.com>
26752
26753         The old behavior of quoting `like this' doesn't look good with
26754         newer, ISO-style fonts.  See:
26755         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
26756
26757         Instead, quote "like this" by default.  Let the translator
26758         tailor the locale-specific quoting behavior by providing
26759         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
26760
26761         * lib/quotearg.c (N_): New macro.
26762         (gettext_default): New function.
26763         (quotearg_buffer_restyled): Use
26764         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
26765         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
26766
26767 2000-07-09  Jim Meyering  <meyering@lucent.com>
26768
26769         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
26770         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
26771
26772         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
26773         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
26774
26775 2000-07-09  Jim Meyering  <meyering@lucent.com>
26776
26777         * lib/Most files: Update copyright dates to include 2000.
26778
26779 2000-07-08  Jim Meyering  <meyering@lucent.com>
26780
26781         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
26782         if not defined.
26783         (xgethostname): Remove now-unnecessary #ifdef.
26784         Move declaration of `err' into loop where it's used.
26785
26786 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26787         and Bruno Haible  <haible@clisp.cons.org>
26788
26789         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
26790         only if the test for an object-type mbstate_t fails.  This
26791         prevents us from mistakenly reporting that mbstate_t is a
26792         system object type after we "#define mbstate_t int" to work
26793         around its lack.
26794
26795 2000-07-05  Paul Eggert  <eggert@twinsun.com>
26796         and Bruno Haible  <haible@clisp.cons.org>
26797
26798         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
26799
26800 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26801
26802         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
26803         to strerror_r.
26804         Include <ctype.h> for use of isalpha.
26805
26806 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26807
26808         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
26809         by allocating a larger buffer. Test the gethostname return value for
26810         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
26811         returns an error and ENAMETOOLONG isn't defined.
26812
26813 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
26814
26815         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
26816         dimension.
26817
26818 2000-07-04  Jim Meyering  <meyering@lucent.com>
26819
26820         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
26821         of the deprecated AC_CHECKING.
26822
26823 2000-07-04  Jim Meyering  <meyering@lucent.com>
26824
26825         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
26826         Reported by Bruno Haible.
26827
26828 2000-07-04  Jim Meyering  <meyering@lucent.com>
26829
26830         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
26831         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
26832         lacks mbrtowc.
26833
26834 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26835
26836         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
26837         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
26838
26839 2000-07-03  Paul Eggert  <eggert@twinsun.com>
26840         and Bruno Haible  <haible@clisp.cons.org>
26841
26842         * lib/quotearg.c (mbrtowc):
26843         Assign to *pwc, and return 1 only if result is nonzero.
26844         (iswprint): Use ISPRINT when substituting our own mbrtowc.
26845
26846 2000-07-03  Jim Meyering  <meyering@lucent.com>
26847
26848         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
26849
26850 2000-07-03  Jim Meyering  <meyering@lucent.com>
26851
26852         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
26853         This is necessary to get a definition of e.g., UTMP_FILE on
26854         HP-UX 10.20.
26855         From Bob Proulx.
26856
26857 2000-07-02  Jim Meyering  <meyering@lucent.com>
26858
26859         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
26860
26861         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
26862         AC_LIBOBJ(function_name).
26863         * m4/chown.m4: Likewise.
26864         * m4/fnmatch.m4: Likewise.
26865         * m4/ftruncate.m4: Likewise.
26866         * m4/getgroups.m4: Likewise.
26867         * m4/getline.m4: Likewise.
26868         * m4/group-member.m4: Likewise.
26869         * m4/jm-macros.m4: Likewise.
26870         * m4/lstat.m4: Likewise.
26871         * m4/malloc.m4: Likewise.
26872         * m4/memcmp.m4: Likewise.
26873         * m4/nanosleep.m4: Likewise.
26874         * m4/putenv.m4: Likewise.
26875         * m4/realloc.m4: Likewise.
26876         * m4/regex.m4: Likewise.
26877         * m4/stat.m4: Likewise.
26878         * m4/strftime.m4: Likewise.
26879
26880 2000-07-02  Jim Meyering  <meyering@lucent.com>
26881
26882         * lib/quotearg.c (mbstate_t): Don't define here.
26883
26884 2000-07-02  Jim Meyering  <meyering@lucent.com>
26885
26886         * lib/nanosleep.c (SIGCONT): Define if not already defined.
26887
26888 2000-07-01  Jim Meyering  <meyering@lucent.com>
26889
26890         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
26891
26892 2000-07-01  Jim Meyering  <meyering@lucent.com>
26893
26894         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
26895         problem.
26896
26897 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26898
26899         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
26900         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
26901
26902 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
26903
26904         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
26905         per change in ../m4/ls-mntd-fs.m4.
26906         (read_filesystem_list): Ignore symbolic links.
26907
26908 2000-06-29  Jim Meyering  <meyering@lucent.com>
26909
26910         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
26911         for declaration of strcmp.
26912
26913         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
26914
26915         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
26916         Avoid warning by casting result to `char *' to remove `const'.
26917
26918 2000-06-28  Jim Meyering  <meyering@lucent.com>
26919
26920         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
26921         included by quotearg.c, for which we perform this test.  From
26922         Bruno Haible.
26923
26924 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26925
26926         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
26927         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
26928         <utmpx.h> exists, put readutmp.o into LIBOBJS.
26929
26930 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
26931
26932         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
26933
26934 2000-06-26  Paul Eggert  <eggert@twinsun.com>
26935
26936         savedir now sets errno on failure and invokes xmalloc to get memory.
26937         Fix a couple of other minor bugs while we're at it.
26938
26939         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
26940         (NAMLEN): Remove macro.
26941         (malloc, realloc): Remove decls.
26942         (stpcpy): Likewise.
26943         ("xalloc.h"): Include.
26944         (NAME_SIZE_DEFAULT): New macro.
26945         (savedir): Use xmalloc / xrealloc to allocate memory.
26946         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
26947         Skip "" directory entries.
26948         Use strlen to calculate directory entry length, since the old method
26949         is rarely used these days and isn't worth supporting.
26950         Don't use a pointer after freeing it.
26951         Check for integer overflow when calculating allocation size.
26952         Use memcpy to copy entries, instead of stpcpy.
26953         Set errno properly when returning NULL.
26954         Check for readdir error.
26955
26956 2000-06-26  Jim Meyering  <meyering@lucent.com>
26957
26958         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
26959
26960 2000-06-25  Jim Meyering  <meyering@lucent.com>
26961
26962         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
26963         Linux header bug when _XOPEN_SOURCE is defined to 500.
26964
26965 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26966
26967         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
26968         deficiency.
26969
26970 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
26971
26972         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
26973         Include xalloc.h.
26974         Don't include <stdlib.h>.  Don't declare malloc, realloc.
26975
26976 2000-06-24  Jim Meyering  <meyering@lucent.com>
26977
26978         * m4/strerror_r.m4: Revive this file -- to try out an experimental
26979         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
26980         for which strerror does return char*, but which lacks a conveniently
26981         accessible declaration of the function.  If the compile-test says
26982         strerror_r doesn't work, then resort to a `run'-test that works on
26983         BeOS and segfaults on DEC Unix.
26984
26985 2000-06-24  Jim Meyering  <meyering@lucent.com>
26986
26987         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
26988
26989 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26990
26991         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
26992         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
26993
26994 2000-06-23  Paul Eggert  <eggert@twinsun.com>
26995
26996         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
26997         (mbrtowc, mbstate_t): Define substitutes if
26998         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
26999         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
27000         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
27001
27002 2000-06-23  Jim Meyering  <meyering@lucent.com>
27003
27004         * m4/afs.m4: Add missing AC_MSG_RESULT.
27005         Reported by Bruno Haible.
27006
27007         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
27008         Suggestion from Bruno Haible.
27009
27010 2000-06-23  Jim Meyering  <meyering@lucent.com>
27011
27012         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
27013
27014 2000-06-21  Jim Meyering  <meyering@lucent.com>
27015
27016         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
27017
27018 2000-06-21  Jim Meyering  <meyering@lucent.com>
27019
27020         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
27021         (noinst_HEADERS): Add getstr.h.
27022
27023         * lib/getline.c (getstr): Move into a separate file.
27024         * lib/getstr.c (getstr): New file, extracted from getline.c, with
27025         the following changes: new parameter, delim2; both delim[12]
27026         parameters have type `int', not `char'.  The latter would lose
27027         with 8-bit delimiters.
27028         * lib/getstr.h: New file.
27029
27030 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27031
27032         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
27033         than 1024, return a memory chunk of least possible size, instead
27034         of size PATH_MAX + 2. In the loop, increment the size proportionally.
27035         Use free/xmalloc instead of xrealloc to avoid copying for very long
27036         paths.
27037
27038 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27039
27040         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
27041         the empty string.
27042
27043 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
27044
27045         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
27046         address, not strdup.  Include <stdlib.h> and don't declare free().
27047
27048 2000-06-19  Jim Meyering  <meyering@lucent.com>
27049
27050         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
27051
27052 2000-06-18  Jim Meyering  <meyering@lucent.com>
27053
27054         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
27055
27056         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
27057         `checking whether...' message to be consistent with that of the
27058         lstat test.
27059
27060 2000-06-18  Jim Meyering  <meyering@lucent.com>
27061
27062         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
27063         Besides, these days every porting target provides a mkdir function.
27064
27065         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
27066         needed. (this snippet comes from src/system.h).
27067
27068 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
27069
27070         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
27071
27072 2000-06-15  Paul Eggert  <eggert@twinsun.com>
27073
27074         * lib/human.c (adjust_value): New function.
27075         (human_readable_inexact): Apply rounding style even when
27076         printing approximate values.
27077
27078 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27079
27080         * lib/human.c (human_readable_inexact): Allow an input block
27081         size that is not a multiple of the output block size, and vice versa.
27082         Reported by Piergiorgio Sartor.
27083
27084 2000-06-14  Paul Eggert  <eggert@twinsun.com>
27085
27086         * lib/getdate.y (get_date): Apply relative times after time
27087         zone indicator, not before.  Reported by Todd A. Jacobs.
27088
27089 2000-06-13  Jim Meyering  <meyering@lucent.com>
27090
27091         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
27092
27093         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
27094
27095 2000-06-12  Paul Eggert  <eggert@twinsun.com>
27096
27097         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
27098
27099 2000-06-12  Jim Meyering  <meyering@lucent.com>
27100
27101         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
27102         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
27103         optional argument.
27104         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
27105         the optional argument, `lib'.
27106
27107 2000-06-08  Jim Meyering  <meyering@lucent.com>
27108
27109         * m4/largefile.m4: Remove file (now that it's part of autoconf).
27110
27111 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27112
27113         Rewrite largefile configuration so that we don't need to run
27114         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
27115         AC_CANONICAL_HOST in configure.in -- jmm]
27116
27117         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
27118         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
27119         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
27120         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
27121         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
27122         All uses changed.
27123         Instead of inspecting the output of getconf, try to compile the
27124         test program without and with the macro definition.
27125         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
27126         for getconf.  Instead, check for the needed flags by compiling
27127         test programs.
27128
27129 2000-06-04  Paul Eggert  <eggert@twinsun.com>
27130
27131         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
27132
27133 2000-06-04  Jim Meyering  <meyering@lucent.com>
27134
27135         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
27136         SunOS 4.1.4 for which gid_t is an unsigned type.
27137
27138 2000-06-03  Jim Meyering  <meyering@lucent.com>
27139
27140         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
27141         now that autoconf requires that.
27142
27143         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
27144         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
27145         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
27146
27147 2000-06-03  Jim Meyering  <meyering@lucent.com>
27148
27149         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
27150
27151 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27152
27153         * m4/glibc21.m4: New file.
27154         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
27155
27156 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
27157
27158         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
27159         newer, don't install charset.alias.
27160         * lib/config.charset: Change the Linux/glibc rules so they become empty
27161         on glibc-2.1 or newer.
27162
27163 2000-06-02  Jim Meyering  <meyering@lucent.com>
27164
27165         * lib/mountlist.c: Back out last change.  Instead, do this...
27166         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
27167         me_dummy member using the same `ignore'-testing code.
27168         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
27169         fs_type strings.
27170         From Mark D. Roth.
27171
27172 2000-05-29  Jim Meyering  <meyering@lucent.com>
27173
27174         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
27175         mounts with the `ignore' attribute.  Based on a patch from
27176         Mark D. Roth.
27177
27178 2000-05-28  Jim Meyering  <meyering@lucent.com>
27179
27180         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
27181         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27182         * m4/stat.m4: Likewise.
27183         * m4/lstat.m4: Likewise.
27184         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
27185
27186         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
27187         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
27188
27189 2000-05-26  Jim Meyering  <meyering@lucent.com>
27190
27191         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
27192
27193 2000-05-24  Jim Meyering  <meyering@lucent.com>
27194
27195         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
27196         autoconf requires that.
27197         * m4/lib-check.m4: Likewise.
27198         * m4/jm-macros.m4: Likewise.
27199         * m4/strftime.m4: Likewise.
27200
27201         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
27202         AC_CHECK_DECLS, now that autoconf requires that.
27203
27204 2000-05-22  Jim Meyering  <meyering@lucent.com>
27205
27206         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
27207         * m4/lstat.m4: Likewise.
27208
27209 2000-05-22  Jim Meyering  <meyering@lucent.com>
27210
27211         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
27212
27213 2000-05-20  Jim Meyering  <meyering@lucent.com>
27214
27215         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
27216         (jm_PREREQ): Use it.
27217
27218 2000-05-18  Jim Meyering  <meyering@lucent.com>
27219
27220         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
27221         back, too, since it may have been modified by allocate_entry.
27222         (hash_delete): Rewrite to use neither the assignment operator
27223         nor the comma operator in an if-expression.
27224
27225 2000-05-15  Paul Eggert  <eggert@twinsun.com>
27226
27227         * lib/closeout.c:
27228         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
27229         Remove; no longer needed.
27230         "quotearg.h": Add include.
27231         (file_name): Do not bother to explicitly initialize to NULL; it's less
27232         efficient on some hosts.
27233         (close_stdout_status): Remove test as to whether stdout was already
27234         closed; it breaks for the case "echo x | sort >&-".
27235         Quote file name colons.
27236         Do not assume that _("write error") lacks format strings.
27237
27238 2000-05-15  Jim Meyering  <meyering@lucent.com>
27239
27240         * lib/version-etc.c (version_etc_copyright): Update the copyright
27241         string used in all --version output.
27242
27243 2000-05-14  Jim Meyering  <meyering@lucent.com>
27244
27245         * lib/closeout.c (close_stdout_set_file_name): New function.
27246         (close_stdout_status): Use new file-scoped global.
27247         Return right away if fstat says the stdout file descriptor is invalid.
27248         * lib/closeout.h (close_stdout_set_file_name): Declare.
27249
27250 2000-05-10  Jim Meyering  <meyering@lucent.com>
27251
27252         * lib/closeout.c [default_exit_status]: New file-scoped variable.
27253         (close_stdout_set_status): New function.
27254         * lib/closeout.h (close_stdout_set_status): Declare.
27255
27256 2000-05-09  Jim Meyering  <meyering@lucent.com>
27257
27258         * m4/gettext.m4: Rename this...
27259         * m4/libintl.m4: ...to this.
27260
27261 2000-05-08  Jim Meyering  <meyering@lucent.com>
27262
27263         * lib/long-options.c: Don't include closeout.h.
27264         (parse_long_options): Don't call close_stdout for --version.
27265
27266 2000-05-06  Paul Eggert  <eggert@twinsun.com>
27267
27268         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
27269         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
27270         2.1.3 bug.  This avoids a clash when files like regex.c define
27271         _GNU_SOURCE.
27272
27273 2000-05-06  Jim Meyering  <meyering@lucent.com>
27274
27275         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
27276         (AC_REPLACE_FUNCS): Add strnlen.
27277
27278         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
27279         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
27280
27281         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
27282         AC_SEARCH_LIBS call for nanosleep.
27283         (LIB_NANOSLEEP): Set and AC_SUBST.
27284
27285 2000-05-06  Jim Meyering  <meyering@lucent.com>
27286
27287         * lib/strnlen.c: Undefine __strnlen and strnlen.
27288         [!weak_alias]: Define __strnlen to strnlen.
27289
27290         * lib/atexit.c: New file, from libiberty.
27291
27292 2000-05-06  Jim Meyering  <meyering@lucent.com>
27293
27294         * lib/closeout.c (close_stdout_status): Also check for errors on the
27295         stderr stream.
27296
27297 2000-05-05  Jim Meyering  <meyering@lucent.com>
27298
27299         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
27300         AC_SEARCH_LIBS call for clock_gettime.
27301         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
27302
27303         * m4/search-libs.m4: Update from autoconf.
27304
27305         su doesn't work on Solaris 2.6.
27306         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
27307         <shadow.h>.  Reported by Dragos Harabor.
27308
27309 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
27310
27311         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
27312         memcpy instead of xmalloc, xrealloc, path_concat.
27313         (locale_charset): Treat empty environment variables as absent.
27314         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
27315
27316 2000-05-04  Jim Meyering  <meyering@lucent.com>
27317
27318         * lib/getopt.c: Update from glibc.
27319         * lib/obstack.c: Likewise.
27320         * lib/obstack.h: Likewise.
27321         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
27322         file
27323
27324         * lib/regex.h: Likewise.
27325         * lib/strndup.c: Likewise.
27326         * lib/strnlen.c: New file, from glibc.
27327
27328 2000-05-03  Jim Meyering  <meyering@lucent.com>
27329
27330         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
27331
27332 2000-05-02  Paul Eggert  <eggert@twinsun.com>
27333
27334         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
27335         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
27336         compile-time test, rather than inspecting host and OS, to
27337         decide whether to define _LARGEFILE_SOURCE.
27338
27339 2000-05-01  Jim Meyering  <meyering@lucent.com>
27340
27341         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
27342
27343         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
27344         Based on a patch from Bruno Haible.
27345
27346 2000-05-01  Jim Meyering  <meyering@lucent.com>
27347
27348         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
27349
27350 2000-04-29  Jim Meyering  <meyering@lucent.com>
27351
27352         * lib/path-concat.c: Declare strdup only if it's not defined.
27353         * lib/canon-host.c: Likewise.
27354
27355 2000-04-28  Jim Meyering  <meyering@lucent.com>
27356
27357         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
27358         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
27359         is included first, then limits.h is included by locale.h by libintl.h.
27360         From John David Anglin.
27361
27362 2000-04-25  Jim Meyering  <meyering@lucent.com>
27363
27364         * lib/makepath.c (S_IRWXUGO): Define.
27365         (make_path): Always perform explicit chmod if MODE specifies any
27366         of the `special' permission bits.  Prompted by a bug report against
27367         install from Mate Wierdl and Joost van Baal.
27368
27369 2000-04-18  Jim Meyering  <meyering@lucent.com>
27370
27371         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
27372         (jm_PREREQ): Use it.
27373
27374 2000-04-18  Jim Meyering  <meyering@lucent.com>
27375
27376         * lib/README: New file.
27377
27378         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
27379         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
27380
27381 2000-04-17  Jim Meyering  <meyering@lucent.com>
27382
27383         Get it right :-)
27384         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
27385         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
27386         Suggestion from Akim Demaille.
27387
27388 2000-04-17  Jim Meyering  <meyering@lucent.com>
27389
27390         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
27391         the definition of it to rpl_strftime also defined-away the system's
27392         declaration.
27393
27394 2000-04-15  Jim Meyering  <meyering@lucent.com>
27395
27396         Use `C' to denote so-called `contiguous' files, the same way
27397         that tar does.
27398         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
27399         (ftypelet): Use S_ISCTG.
27400         From Michael Deutschmann.
27401
27402 2000-04-14  Jim Meyering  <meyering@lucent.com>
27403
27404         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
27405         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
27406         clobbered.
27407
27408 2000-04-14  Jim Meyering  <meyering@lucent.com>
27409
27410         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
27411
27412 2000-04-13  Jim Meyering  <meyering@lucent.com>
27413
27414         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
27415         AH_VERBATIM to insert required #ifndef into config.h.in.
27416         Suggestion from Akim Demaille.
27417
27418 2000-04-12  Jim Meyering  <meyering@lucent.com>
27419
27420         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
27421         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
27422         Christian Krackowizer.
27423
27424         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
27425         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
27426         (AC_SYS_LARGEFILE): Require.
27427         (AM_C_PROTOTYPES): Require.
27428
27429 2000-04-08  Jim Meyering  <meyering@lucent.com>
27430
27431         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
27432         names don't conflict.  Reported by Eli Zaretskii.
27433
27434 2000-04-07  Jim Meyering  <meyering@lucent.com>
27435
27436         * lib/putenv.c: Move inclusion of errno.h so it follows that of
27437         sys/types.h, to work around system header problems on AIX 3.2.5.
27438         From Bruno Haible.
27439
27440 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
27441
27442         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
27443         bug.  Deal with the different error behavior of Irix iconv.
27444
27445 2000-04-05  Paul Eggert  <eggert@twinsun.com>
27446
27447         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
27448         IRIX if the installer said otherwise.
27449
27450 2000-04-05  Jim Meyering  <meyering@lucent.com>
27451
27452         Portability tweaks required for ultrix4.3.
27453         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
27454         (jm_CHECK_DECLS): Add getutent to the list of functions.
27455         (_jm_DECL_HEADERS): Add utmpx.h.
27456         From John David Anglin.
27457
27458         * m4/strftime.m4: Back out the 2000-04-02 change.
27459         Instead of that change, simply undefine putenv in the test program.
27460
27461 2000-04-05  Jim Meyering  <meyering@lucent.com>
27462
27463         Portability tweaks required for ultrix4.3.
27464         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
27465         getutent.
27466         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
27467         * lib/canon-host.c: Declare strdup.
27468         * lib/path-concat.c: Likewise.
27469         From John David Anglin.
27470
27471 2000-04-04  Jim Meyering  <meyering@lucent.com>
27472
27473         Be more DOS 8.3-friendly.
27474         * lib/ref-add.sin: Renamed from ref-add.sed.in.
27475         * lib/ref-del.sin: Renamed from ref-del.sed.in.
27476         * lib/Makefile.am: Reflect renaming.
27477         Reported by Eli Zaretskii.
27478
27479         Use a temporary file name that won't clash with `charset.alias'
27480         in the DOS 8.3 name space.
27481         * lib/Makefile.am (charset_tmp): Define.
27482         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
27483         (uninstall-local): Likewise.
27484         Reported by Eli Zaretskii.
27485
27486 2000-04-03  Jim Meyering  <meyering@lucent.com>
27487
27488         * m4/gettext.m4: Fix typo in comment.
27489
27490         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
27491         textutils/configure.in).  Suggestion from Paul Eggert.
27492         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
27493
27494 2000-04-02  Paul Eggert  <eggert@twinsun.com>
27495
27496         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
27497         variable in the shell rather than using putenv, which isn't
27498         portable.  This avoids the configure-time inter-test dependency
27499         on the potentially-renamed putenv function.
27500
27501 2000-03-30  Paul Eggert  <eggert@twinsun.com>
27502
27503         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
27504         before checking struct stat.st_blksize, so that
27505         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
27506
27507 2000-03-29  Paul Eggert  <eggert@twinsun.com>
27508
27509         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
27510         since strftime.c uses HAVE_STRFTIME to decide whether to use
27511         the underlying strftime.
27512
27513 2000-03-29  Paul Eggert  <eggert@twinsun.com>
27514
27515         * lib/time/strftime.c (my_strftime): Make sure we call the system
27516         strftime, not ourselves, when invoking the underlying strftime.
27517
27518 2000-03-24  Jim Meyering  <meyering@lucent.com>
27519
27520         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
27521         (charset_alias): Define.
27522         (install-exec-local): Factor out common code.
27523         (uninstall-local): Split lines longer than 80.
27524         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
27525         (SUFFIXES): Define.
27526         (.sed.in.sed): New rule.  Don't redirect directly to $@.
27527         (CLEANFILES): Add ref-add.sed and ref-del.sed.
27528
27529 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
27530
27531         * lib/config.charset: Output a line containing "Packages using this
27532         file".
27533         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
27534         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
27535         ref-del.sed): New rules.
27536
27537 2000-03-17  Jim Meyering  <meyering@lucent.com>
27538
27539         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
27540         Otherwise, include <strings.h>
27541
27542 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
27543
27544         * lib/unicodeio.c (utf8_wctomb): New function.
27545         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
27546         format instead of in UCS-4 with platform dependent endianness.
27547
27548 2000-03-10  Jim Meyering  <meyering@lucent.com>
27549
27550         * m4/lib-check.m4: Look for getspnam in -lgen, too.
27551         From Marco Franzen.
27552
27553 2000-03-07  Paul Eggert  <eggert@twinsun.com>
27554
27555         * lib/savedir.c (savedir): Work even if directory size is
27556         negative; this can happen with some screwy NFS configurations.
27557
27558 2000-03-06  Jim Meyering  <meyering@lucent.com>
27559
27560         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
27561         if it's NULL (because we ran out of memory).  From Bruno Haible.
27562
27563 2000-03-05  Jim Meyering  <meyering@lucent.com>
27564
27565         * lib/localcharset.c ("path-concat.h"): Include.
27566         (get_charset_aliases): Use path_concat instead of ANSI string
27567         concatenation.
27568
27569         * lib/unicodeio.h (PARAMS): Define.
27570         Use it to guard prototype.
27571
27572 2000-03-04  Jim Meyering  <meyering@lucent.com>
27573
27574         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
27575         for lib/localcharset.c.
27576
27577 2000-03-04  Jim Meyering  <meyering@lucent.com>
27578
27579         * lib/Makefile.am (install-exec-local): Create $(libdir) before
27580         installing into it.
27581         (uninstall-local): Uncomment this rule so `make distcheck' works
27582         once again.
27583
27584         * lib/unicodeio.c (<errno.h>): Include it.
27585         (errno): Declare if not defined.
27586
27587         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
27588
27589         * lib/config.charset: New version, incorporating remarks from a linux
27590         i18n mailing list.  From Bruno Haible.
27591
27592 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
27593
27594         * m4/codeset.m4: New file.
27595         * m4/iconv.m4: New file.
27596         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
27597
27598 2000-03-03  Jim Meyering  <meyering@lucent.com>
27599
27600         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
27601
27602 2000-03-02  Jim Meyering  <meyering@lucent.com>
27603
27604         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
27605         the messages come out on separate lines.
27606
27607         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
27608         rather than jm_CHECK_DECLARATIONS.
27609         * m4/decl.m4: Remove now-unused file.
27610
27611         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
27612         geteuid.
27613
27614 2000-03-02  Jim Meyering  <meyering@lucent.com>
27615
27616         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
27617
27618 2000-03-01  Jim Meyering  <meyering@lucent.com>
27619
27620         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
27621         * lib/unicodeio.c: Likewise.
27622
27623 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
27624
27625         * lib/config.charset: New file.
27626         * lib/localcharset.c: New file.
27627         * lib/unicodeio.h, lib/unicodeio.c: New files.
27628         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
27629         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
27630         (noinst_HEADERS): Add unicodeio.h.
27631         (all-local, install-exec-local, charset.alias): New targets.
27632
27633 2000-02-28  Paul Eggert  <eggert@twinsun.com>
27634
27635         * lib/quotearg.c (ALERT_CHAR): New macro.
27636         (quotearg_buffer_restyled): Use it.
27637
27638 2000-02-27  Jim Meyering  <meyering@lucent.com>
27639
27640         * m4/check-decl.m4: Add getenv to the list.
27641
27642 2000-02-27  Jim Meyering  <meyering@lucent.com>
27643
27644         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
27645         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
27646
27647         * lib/backupfile.c: Guard inclusion of stdlib.h with
27648         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
27649         Declare malloc if needed.
27650
27651         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
27652         `#ifndef HAVE_DECL..'
27653         now that autoconf always defines the HAVE_DECL_ symbols.
27654         * lib/human.c: Likewise.
27655         * lib/same.c: Likewise.
27656         * lib/strtoumax.c: Likewise.
27657
27658         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
27659         declaration check was not run.
27660         * lib/hash.c: Likewise.
27661         * lib/human.c: Likewise.
27662         * lib/same.c: Likewise.
27663         * lib/strtoumax.c: Likewise.
27664
27665         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
27666         `.', then first look up the entire `.'-containing string as a login
27667         name.
27668
27669 2000-02-23  Jim Meyering  <meyering@lucent.com>
27670
27671         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
27672         in place of my hack.
27673
27674 2000-02-18  Paul Eggert  <eggert@twinsun.com>
27675
27676         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
27677         (textint): New typedef.
27678         (parser_control): Member year changed from int to textint.
27679         All uses changed.
27680         (YYSTYPE): Removed; replaced by %union with int and textint members.
27681         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
27682         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
27683         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
27684         (tSNUMBER, tUNUMBER): Now of type <textintval>.
27685         (date, number, to_year): Use width of number in digits, not its value,
27686         to determine whether it's a 2-digit year, or a 2-digit time.
27687         (yylex): Store number of digits of numeric tokens.
27688         Reported by John Kendall.
27689
27690         (parser_control): Changed from struct parser_control to typedef (for
27691         consistency).  All uses changed.
27692
27693         (tID): Removed; not used.
27694         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
27695
27696 2000-02-14  Paul Eggert  <eggert@twinsun.com>
27697
27698         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
27699         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
27700
27701 2000-02-12  Jim Meyering  <meyering@lucent.com>
27702
27703         * lib/userspec.c (ISDIGIT): Define it.
27704         (isdigit): Remove definition.
27705         (is_number): Use ISDIGIT, not isdigit.
27706         <libintl.h>: Include.
27707         (_ and N_): Define.
27708         (parse_user_spec): Mark translatable strings.
27709
27710 2000-02-10  Jim Meyering  <meyering@lucent.com>
27711
27712         With these changes, nanosleep.[ch] are finally enough like the other
27713         lib/* replacement files to compile on a few more losing systems.
27714
27715         * lib/nanosleep.h: Don't include config.h.
27716         Remove prototype from declaration of nanosleep.
27717         (PARAMS): Remove now-unneeded definition.
27718         * lib/nanosleep.c: #undef nanosleep.
27719         (rpl_nanosleep): Rename from nanosleep.
27720
27721 2000-02-10  Jim Meyering  <meyering@lucent.com>
27722
27723         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
27724         gnu_nanosleep to rpl_nanosleep.
27725
27726 2000-02-09  Jim Meyering  <meyering@lucent.com>
27727
27728         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
27729         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
27730
27731 2000-02-08  Akim Demaille  <akim@epita.fr>
27732
27733         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
27734         `[' and `]' and remove uses of `changequote'.
27735         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
27736         (AC_SYS_LARGEFILE): Likewise.
27737         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
27738         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
27739         of changequote.
27740         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
27741         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
27742         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
27743         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
27744
27745 2000-02-05  Jim Meyering  <meyering@lucent.com>
27746
27747         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
27748         Remove explicit use of AC_HEADER_TIME.  It is required by
27749         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
27750         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
27751         in autoconf whereby the expansion of the latter ended up preceding
27752         the expansion of its prerequisite, AC_HEADER_TIME.
27753         Reported by Volker Borchert.
27754
27755 2000-02-03  Jim Meyering  <meyering@lucent.com>
27756
27757         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
27758
27759 2000-02-03  Jim Meyering  <meyering@lucent.com>
27760
27761         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
27762         rather than with `#if HAVE_UTMPNAME'.
27763
27764 2000-02-02  Jim Meyering  <meyering@lucent.com>
27765
27766         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
27767         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
27768         Reported by Eli Zaretskii.
27769
27770 2000-02-01  Jim Meyering  <meyering@lucent.com>
27771
27772         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
27773
27774 2000-01-31  Jim Meyering  <meyering@lucent.com>
27775
27776         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
27777         functions.  Add the time.h and sys/time.h headers along with the
27778         AC_REQUIRE'ment of AC_HEADER_TIME.
27779
27780 2000-01-31  Jim Meyering  <meyering@lucent.com>
27781
27782         * lib/nanosleep.h (nanosleep): Guard declaration with
27783         `#if ! HAVE_DECL_NANOSLEEP'.
27784         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
27785         the declaration in that vendor's sys/timers.h.
27786         Reported by Christian Krackowizer.
27787
27788         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
27789         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
27790         (ISPRINT): Likewise.
27791         Reported by Tom Tromey.
27792
27793 2000-01-30  Jim Meyering  <meyering@lucent.com>
27794
27795         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
27796
27797         * m4/prereq.m4 (utmp_includes): Define.
27798         Check for ut_user and ut_name members in both struct utmpx
27799         and struct utmp.
27800
27801 2000-01-30  Jim Meyering  <meyering@lucent.com>
27802
27803         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
27804         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
27805         header files where only utmpx.ut_user is declared.
27806
27807         * lib/readutmp.h (UT_USER): Define.
27808
27809 2000-01-29  Jim Meyering  <meyering@lucent.com>
27810
27811         * m4/lib-check.m4: New file containing library-related checks from
27812         fileutils and sh-utils (textutils had none).
27813
27814 2000-01-28  Jim Meyering  <meyering@lucent.com>
27815
27816         * m4/perl.m4: Change format of warning message to look more like that
27817         from the missing script.  Suggestion from François Pinard.
27818
27819 2000-01-25  Jim Meyering  <meyering@lucent.com>
27820
27821         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
27822         well as time.h in the compile check.
27823         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
27824         Fix typo in cross-compiling case: s/yes/no/.
27825
27826 2000-01-23  Jim Meyering  <meyering@lucent.com>
27827
27828         * m4/jm-macros.m4: Move df-related tests here from
27829         fileutils/configure.in
27830
27831         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
27832         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
27833
27834         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
27835         s/space/ac_fsusage_space/.
27836         (jm_FILE_SYSTEM_USAGE): Take two parameters.
27837
27838         * m4/ftruncate.m4: New file (derived from part of
27839         fileutils/configure.in).
27840         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
27841         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
27842
27843         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
27844         AC_SUBST these here, rather than just in sh-util/configure.in, so
27845         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
27846         all the same.
27847         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
27848         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
27849         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
27850         (AC_SUBST(POW_LIBM)): Likewise.
27851         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
27852
27853 2000-01-23  Jim Meyering  <meyering@lucent.com>
27854
27855         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
27856         obstack.c.
27857
27858 2000-01-22  Jim Meyering  <meyering@lucent.com>
27859
27860         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
27861
27862         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
27863
27864         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
27865         configure.in
27866         (AC_CHECK_HEADERS): Likewise for sh-utils.
27867         (AC_CHECK_HEADERS): Likewise for textutils.
27868         Merge the three lists of headers.
27869
27870         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
27871         from fileutils' configure.in.
27872
27873         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
27874         code. Moved tests into their own function (_jm_DECL_HEADERS) in
27875         check-decl.m4.
27876
27877         * m4/check-decl.m4: Use #if rather than #ifdef.
27878         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
27879         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
27880         (_jm_DECL_HEADERS): Define new function.
27881         (jm_CHECK_DECLARATIONS): Require it.
27882
27883 2000-01-22  Jim Meyering  <meyering@lucent.com>
27884
27885         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
27886         [! HAVE_DECL_STRTOULL]: Declare strtoull.
27887         Required for some AIX systems.  Reported by Christian Krackowizer.
27888         [TESTING] (main): New function.
27889
27890         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
27891         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
27892         letters.
27893
27894         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
27895         iswprint.
27896
27897         * lib/strverscmp.c (ISDIGIT): Define.
27898         (strverscmp): Use ISDIGIT, not isdigit.
27899
27900 2000-01-19  Jim Meyering  <meyering@lucent.com>
27901
27902         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
27903         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
27904         defines `struct timespec' in <sys/time.h>
27905
27906         * m4/c-bs-a.m4: Remove uses of changequote altogether.
27907         Thanks to Akim for explaining.
27908
27909 2000-01-17  Paul Eggert  <eggert@twinsun.com>
27910
27911         * lib/nanosleep.c (nanosleep):
27912         Don't use SA_INTERRUPT to decide whether to call sigaction, as
27913         POSIX.1 doesn't require SA_INTERRUPT and some systems
27914         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
27915         it's been part of POSIX.1 since day 1 (in 1988).
27916
27917 2000-01-17  Jim Meyering  <meyering@lucent.com>
27918
27919         * lib/interlock: Remove unused file.  Reported by François Pinard.
27920
27921 2000-01-16  Paul Eggert  <eggert@twinsun.com>
27922
27923         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
27924         alert, backslash, formfeed, and vertical tab unnecessarily in
27925         shell quoting style.
27926
27927 2000-01-16  Jim Meyering  <meyering@lucent.com>
27928
27929         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
27930         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
27931         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
27932         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
27933
27934 2000-01-16  Jim Meyering  <meyering@lucent.com>
27935
27936         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
27937         because the latter didn't work.
27938
27939 2000-01-15  Jim Meyering  <meyering@lucent.com>
27940
27941         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
27942         (AC_REPLACE_FUNCS): Add memcpy and memset.
27943         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
27944         Add strpbrk.
27945         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
27946
27947 2000-01-12  Jim Meyering  <meyering@lucent.com>
27948
27949         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
27950         (jm_PREREQ): Use it.
27951         (jm_PREREQ_READUTMP): New macro.
27952         (jm_PREREQ): Use it.
27953
27954 2000-01-11  Paul Eggert  <eggert@twinsun.com>
27955
27956         Quote multibyte characters correctly.
27957         * m4/c-bs-a.m4: New file.
27958         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
27959         (jm_PREREQ): Use it.
27960
27961 2000-01-11  Paul Eggert  <eggert@twinsun.com>
27962
27963         * m4/uintmax_t.m4: Port to autoconf 2.13.
27964
27965 2000-01-08  Jim Meyering  <meyering@ascend.com>
27966
27967         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
27968         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
27969
27970 2000-01-04  Jim Meyering  <meyering@ascend.com>
27971
27972         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
27973         jm_STRUCT_DIRENT_D_TYPE.
27974         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
27975         jm_STRUCT_DIRENT_D_INO.
27976         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
27977         jm_STRUCT_UTIMBUF.
27978         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
27979         renamings.
27980         * m4/utime.m4: Likewise.
27981
27982         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
27983         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
27984
27985 2000-01-03  Paul Eggert  <eggert@twinsun.com>
27986
27987         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
27988         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
27989
27990 2000-01-02  Jim Meyering  <meyering@ascend.com>
27991
27992         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
27993         remember if this is necessary.
27994
27995 1999-12-26  Jim Meyering  <meyering@ascend.com>
27996
27997         * m4/jm-macros.m4: Use it here.
27998         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
27999
28000 1999-12-23  Jim Meyering  <meyering@ascend.com>
28001
28002         * m4/jm-macros.m4: Check for clock_gettime (moved from
28003         fileutils/configure.in)
28004         Check for gettimeofday.
28005
28006 1999-12-20  Jim Meyering  <meyering@ascend.com>
28007
28008         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
28009         autoconf-2.14a-1999-12-20.
28010
28011 1999-12-19  Jim Meyering  <meyering@ascend.com>
28012
28013         * m4/lstat-slash.m4: New file.
28014         * m4/jm-macros.m4: Use the new macro:
28015         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
28016
28017 1999-12-07  Jim Meyering  <meyering@ascend.com>
28018
28019         * m4/perl.m4: Require that File::Compare be available, too.
28020         Too many systems seem to lack it.
28021
28022         * m4/strftime.m4: Add checks for most of the cpp macros tested in
28023         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
28024
28025 1999-11-18  Paul Eggert  <eggert@twinsun.com>
28026
28027         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
28028         problem with the QNX 4.25 shell, which doesn't propagate exit
28029         status of failed commands inside shell assignments.
28030
28031 1999-11-17  Jim Meyering  <meyering@ascend.com>
28032
28033         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
28034
28035 1999-11-07  Jim Meyering  <meyering@ascend.com>
28036
28037         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
28038
28039 1999-11-06  Jim Meyering  <meyering@ascend.com>
28040
28041         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
28042         * m4/jm-macros.m4 (jm_MACROS): Use it here.
28043
28044 1999-11-05  Jim Meyering  <meyering@ascend.com>
28045
28046         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
28047         configure.in of textutils, fileutils, and sh-utils into this one
28048         (shared between those packages) file.
28049         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
28050         AC_STRUCT_ST_BLKSIZE.
28051
28052 1999-11-03  Jim Meyering  <meyering@ascend.com>
28053
28054         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
28055         of AC_CHECK_TYPE checks includes unistd.h.
28056         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
28057         Suggestion from Akim Demaille.
28058
28059 1999-10-30  Jim Meyering  <meyering@ascend.com>
28060
28061         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
28062         m4-quoted string.
28063         * m4/ls-mntd-fs.m4: Likewise.
28064         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
28065         * m4/jm-winsz1.m4: Likewise.
28066
28067         * m4/const.m4: Remove file, since the fix made it into the experimental
28068         version of autoconf.
28069         * m4/mktime.m4: Likewise.
28070
28071         * m4/check-type.m4: Remove file, now that the latest version of
28072         AC_CHECK_TYPE takes a third arg to specify additional #includes.
28073
28074         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
28075         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
28076         AC_CHECK_TYPE.
28077
28078 1999-10-04  Jim Meyering  <meyering@ascend.com>
28079
28080         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
28081
28082 1999-09-22  Paul Eggert  <eggert@twinsun.com>
28083
28084         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
28085         2.95.1 bug with HP-UX 10.20.
28086
28087 1999-09-17  Jim Meyering  <meyering@ascend.com>
28088
28089         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
28090         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
28091         due to missing strdup (against sh-utils-2.0).
28092
28093 1999-08-29  Jim Meyering  <meyering@ascend.com>
28094
28095         * m4/jm-macros.m4: Require jm_BISON.
28096         * m4/bison.m4: New file.
28097
28098 1999-08-17  Paul Eggert  <eggert@twinsun.com>
28099
28100         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
28101         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
28102
28103 1999-08-05  Jim Meyering  <meyering@ascend.com>
28104
28105         * m4/getline.m4: Rename test file from conftestdata to conftest.data
28106         to avoid conflicts with `conftest' on 8+3 filesystems.
28107         Suggestion from Eli Zaretskii.
28108
28109 1999-08-04  Jim Meyering  <meyering@ascend.com>
28110
28111         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
28112         fileutils and sh-utils (textutils's getline test was inadequate).
28113         (AM_FUNC_GETLINE): Run this test.
28114         (AC_CHECK_FUNCS): Check for getdelim.
28115         Reported by Bob Proulx.
28116
28117 1999-08-02  Jim Meyering  <meyering@ascend.com>
28118
28119         * m4/jm-macros.m4: Add a comment.
28120
28121 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28122
28123         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
28124         <inttypes.h> defines strtoumax as a macro (and not as a
28125         function).
28126
28127 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28128
28129         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
28130         that we can shift, multiply and divide unsigned long long
28131         values; Ultrix cc can't do it.
28132
28133 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28134
28135         * m4/mktime.m4: New file, which is a preview of what should appear
28136         in the next public autoconf release.
28137
28138 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28139
28140         * m4/lfs.m4: Remove this file.
28141         * m4/largefile.m4: New file.  It contains the old contents of
28142         lfs.m4, except that all names with prefix AC_LFS have been
28143         changed to use the prefix AC_SYS_LARGEFILE instead, to be
28144         compatible with future autoconf versions.  Also, some minor m4
28145         quoting problems have been fixed.
28146
28147 1999-08-01  Paul Eggert  <eggert@twinsun.com>
28148
28149         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
28150         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
28151         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
28152         and simplify the shell code.
28153
28154 1999-08-01  Jim Meyering  <meyering@ascend.com>
28155
28156         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
28157         m4.
28158
28159 1999-07-20  Jim Meyering  <meyering@ascend.com>
28160
28161         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
28162
28163 1999-07-15  Jim Meyering  <meyering@ascend.com>
28164
28165         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
28166
28167 1999-05-22  Jim Meyering  <meyering@ascend.com>
28168
28169         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
28170
28171 1999-05-20  Jim Meyering  <meyering@ascend.com>
28172
28173         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
28174         Add a colon after each `then' in case $4 is empty.
28175
28176 1999-05-16  Jim Meyering  <meyering@ascend.com>
28177
28178         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
28179
28180 1999-05-10  Jim Meyering  <meyering@ascend.com>
28181
28182         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
28183
28184         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
28185         AC_FUNC_MKTIME.
28186
28187 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
28188
28189         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
28190
28191 1999-05-04  Paul Eggert  <eggert@twinsun.com>
28192
28193         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
28194         not CPPFLAGS, so that linking works correctly in IRIX.
28195
28196 1999-04-30  Paul Eggert  <eggert@twinsun.com>
28197
28198         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
28199
28200 1999-04-20  Paul Eggert  <eggert@twinsun.com>
28201
28202         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
28203         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
28204         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
28205         jm_AC_TYPE_UNSIGNED_LONG_LONG.
28206         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
28207
28208         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
28209
28210 1999-04-20  Jim Meyering  <meyering@ascend.com>
28211
28212         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
28213         AC_REPLACE xstroull if necessary.  From Paul Eggert.
28214         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
28215
28216 1999-04-18  Jim Meyering  <meyering@ascend.com>
28217
28218         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
28219         * m4/jm-macros.m4: Use it.
28220
28221 1999-04-06  Jim Meyering  <meyering@ascend.com>
28222
28223         * m4/strftime.m4: Remove test for %f.
28224
28225 1999-03-29  Jim Meyering  <meyering@ascend.com>
28226
28227         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
28228         superset of the AC_TYPE_* checks in the textutils, fileutils,
28229         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
28230         AC_TYPE_PID_T.
28231
28232 1999-03-28  Jim Meyering  <meyering@ascend.com>
28233
28234         * m4/jm-macros.m4: Define GNU_PACKAGE here.
28235         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
28236         replaced e.g., in the *.sh files of the sh-utils.
28237
28238 1999-03-20  Jim Meyering  <meyering@ascend.com>
28239
28240         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
28241         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
28242         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
28243
28244 1999-03-19  Jim Meyering  <meyering@ascend.com>
28245
28246         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
28247
28248 1999-03-12  Jim Meyering  <meyering@ascend.com>
28249
28250         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
28251
28252 1999-03-07  Jim Meyering  <meyering@ascend.com>
28253
28254         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
28255         declared.
28256
28257 1999-02-17  Jim Meyering  <meyering@ascend.com>
28258
28259         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
28260         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
28261
28262 1999-02-07  Jim Meyering  <meyering@ascend.com>
28263
28264         * m4/group-member.m4: New file -- extracted from sh-utils'
28265         configure.in.
28266
28267         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
28268         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
28269
28270 1999-02-06  Jim Meyering  <meyering@ascend.com>
28271
28272         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
28273         * m4/fnmatch.m4: Likewise.
28274         * m4/getgroups.m4: Likewise.
28275         * m4/lstat.m4: Likewise.
28276         * m4/malloc.m4: Likewise.
28277         * m4/putenv.m4: Likewise.
28278         * m4/realloc.m4: Likewise.
28279         * m4/regex.m4: Likewise.
28280         * m4/stat.m4: Likewise.
28281         * m4/strftime.m4: Likewise.
28282         Suggestion from Alain Magloire.
28283
28284         * m4/chown.m4: Use `.$ac_objext', not `.o'.
28285         * m4/fnmatch.m4: Likewise.
28286         * m4/getgroups.m4: Likewise.
28287         * m4/getline.m4: Likewise.
28288         * m4/lstat.m4: Likewise.
28289         * m4/malloc.m4: Likewise.
28290         * m4/memcmp.m4: Likewise.
28291         * m4/putenv.m4: Likewise.
28292         * m4/realloc.m4: Likewise.
28293         * m4/regex.m4: Likewise.
28294         * m4/stat.m4: Likewise.
28295         * m4/strftime.m4: Likewise.
28296         Suggestion from Alain Magloire.
28297
28298         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
28299         an argument.
28300
28301         * m4/regex.m4: Add a run-time Test for proper operation of
28302         re_compile_pattern.
28303
28304 1999-01-31  Jim Meyering  <meyering@ascend.com>
28305
28306         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
28307
28308 1999-01-30  Jim Meyering  <meyering@ascend.com>
28309
28310         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
28311
28312         * m4/jm-mktime.m4: Make this a wrapper around the official
28313         AM_FUNC_MKTIME rather than my private copy, now that the official one
28314         is up to date.
28315         * m4/mktime.m4: Remove file.
28316
28317         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
28318         * m4/uptime.m4: Likewise.
28319         * m4/uintmax_t.m4: Likewise.
28320
28321 1999-01-28  Jim Meyering  <meyering@ascend.com>
28322
28323         * m4/jm-macros.m4: Use jm_AFS.
28324         * m4/afs.m4: New file (from fileutils' configure.in).
28325
28326         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
28327         * m4/chown.m4: Likewise.
28328         * m4/d-ino.m4: Likewise.
28329         * m4/d-type.m4: Likewise.
28330         * m4/fnmatch.m4: Likewise.
28331         * m4/getgroups.m4: Likewise.
28332         * m4/gettext.m4: Likewise.
28333         * m4/jm-mktime.m4: Likewise.
28334         * m4/jm-winsz2.m4: Likewise.
28335         * m4/lcmessage.m4: Likewise.
28336         * m4/ls-mntd-fs.m4: Likewise.
28337         * m4/malloc.m4: Likewise.
28338         * m4/memcmp.m4: Likewise.
28339         * m4/putenv.m4: Likewise.
28340         * m4/realloc.m4: Likewise.
28341         * m4/st_mtim.m4: Likewise.
28342         * m4/strftime.m4: Likewise.
28343
28344 1999-01-16  Jim Meyering  <meyering@ascend.com>
28345
28346         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
28347         (ARGMATCH_DIE_DECL): Define.
28348
28349 1999-01-12  Jim Meyering  <meyering@ascend.com>
28350
28351         * m4/Makefile.am.in: Rewrite to avoid using fmt.
28352         Reported by Lars Hecking.
28353
28354 1999-01-10  Jim Meyering  <meyering@ascend.com>
28355
28356         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
28357         gross kludge.
28358         * m4/inttypes_h.m4: Likewise.
28359         * m4/lstat.m4: Likewise.
28360         * m4/malloc.m4: Likewise.
28361         * m4/readdir.m4: Likewise.
28362         * m4/realloc.m4: Likewise.
28363         * m4/st_dm_mode.m4: Likewise.
28364         * m4/stat.m4: Likewise.
28365         * m4/utimbuf.m4: Likewise.
28366         * m4/utimes.m4: Likewise.
28367
28368         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
28369         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
28370         comments in config.h.in are meaningful.
28371
28372         * m4/jm-macros.m4: Require autoconf-2.13 here.
28373
28374         * m4/regex.m4: By default, don't use the included regex.c on systems
28375         with glibc 2.  Suggestion from Uli Drepper.
28376
28377 1999-01-02  Jim Meyering  <meyering@ascend.com>
28378
28379         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
28380
28381 1998-12-18  Jim Meyering  <meyering@ascend.com>
28382
28383         * m4/Makefile.am.in (Makefile.am): Simplify rule.
28384         Based on a suggestion from Lars Hecking.
28385
28386 1998-11-16  Paul Eggert  <eggert@twinsun.com>
28387
28388         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
28389
28390 1998-11-16  Jim Meyering  <meyering@ascend.com>
28391
28392         * m4/lfs.m4: Double-quote the `uname...` expression.
28393
28394 1998-11-14  Jim Meyering  <meyering@ascend.com>
28395
28396         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
28397         * m4/stat.m4: Likewise.
28398
28399 1998-11-03  Jim Meyering  <meyering@ascend.com>
28400
28401         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
28402         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
28403
28404 1998-10-18  Jim Meyering  <meyering@ascend.com>
28405
28406         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
28407
28408 1998-10-17  Jim Meyering  <meyering@ascend.com>
28409
28410         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
28411         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
28412         calls for those previously hard-coded headers.  Instead, take a new
28413         parameter.
28414         (jm_CHECK_DECLARATIONS): Reflect interface change.
28415         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
28416         (jm_CHECK_DECL_LOCALTIME_R): New macro.
28417
28418         * m4/mktime.m4: Test for spring-forward gap before long-running test.
28419
28420 1998-10-14  Jim Meyering  <meyering@ascend.com>
28421
28422         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
28423         instead of "TZ=America/Vancouver".  From Paul Eggert.
28424
28425 1998-10-11  Jim Meyering  <meyering@ascend.com>
28426
28427         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
28428         This adds a test for a recently added compatibility fix for mktime.c.
28429         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
28430
28431 1998-09-27  Jim Meyering  <meyering@ascend.com>
28432
28433         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
28434
28435         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
28436         ../configure.in, including a change from Gordon Matzigkeit to allow
28437         cross-compiling for the Hurd.
28438
28439         * m4/glibc.m4: New file/macro to test for the GNU C Library
28440         versions 1 and 2.  From Gordon Matzigkeit.
28441         Indent.
28442
28443 1998-09-21  Jim Meyering  <meyering@ascend.com>
28444
28445         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
28446
28447 1998-08-18  Paul Eggert  <eggert@twinsun.com>
28448
28449         Port nanosecond-resolution times to UnixWare 2.1.2 and
28450         pedantic Solaris 2.6.
28451
28452         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
28453         AC_STRUCT_ST_MTIM.
28454         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
28455         Generate name of ns member, instead of just 1 or undef.
28456         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
28457
28458 1998-08-15  Jim Meyering  <meyering@ascend.com>
28459
28460         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
28461         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
28462         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
28463         instead of jm_TYPE_SSIZE_T.
28464
28465 1998-08-12  Jim Meyering  <meyering@ascend.com>
28466
28467         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
28468
28469 1998-08-02  Jim Meyering  <meyering@ascend.com>
28470
28471         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
28472         in acconfig.h manually.
28473
28474 1998-07-31  Paul Eggert  <eggert@twinsun.com>
28475
28476         * m4/st_mtim.m4: New file.
28477
28478 1998-07-28  Jim Meyering  <meyering@ascend.com>
28479
28480         * m4/utimes.m4: Undef stat.
28481
28482 1998-07-25  Jim Meyering  <meyering@ascend.com>
28483
28484         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
28485         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
28486
28487 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
28488
28489         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
28490         uid and gid actually remain unchanged.
28491
28492 1998-07-07  Jim Meyering  <meyering@ascend.com>
28493
28494         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
28495
28496 1998-07-04  Jim Meyering  <meyering@ascend.com>
28497
28498         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
28499         to prove that this macro can be used in packages without regex.c.
28500
28501 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
28502
28503         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
28504         is to be used.
28505
28506 1998-07-03  Jim Meyering  <meyering@ascend.com>
28507
28508         * m4/gettext.m4: Add -lintl if it's found to be necessary.
28509
28510         * m4/gettext.m4: New file -- from gettext-0.10.35.
28511         * m4/lcmessage.m4: Likewise.
28512         * m4/progtest.m4: Likewise.
28513
28514         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
28515         * m4/jm-macros.m4: Require the new macro.
28516
28517 1998-06-29  Jim Meyering  <meyering@ascend.com>
28518
28519         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
28520         for the definition of NGROUPS (used in a system header included
28521         by sys/mount.h).
28522
28523 1998-06-28  Jim Meyering  <meyering@ascend.com>
28524
28525         * m4/ls-mntd-fs.m4: New file.
28526         * m4/fstypename.m4: New file.
28527
28528         * m4/jm-macros.m4: Require the new macro.
28529         * m4/jm-glibc-io.m4: New file.
28530
28531 1998-05-19  Jim Meyering  <meyering@ascend.com>
28532
28533         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
28534         * m4/lchown.m4: New file.
28535
28536         * m4/Makefile.am.in: New file.
28537         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
28538
28539 1998-05-14  Jim Meyering  <meyering@ascend.com>
28540
28541         * m4/Makefile.am (EXTRA_DIST): Add them.
28542         * m4/jm-macros.m4: New file.
28543         * m4/utimbuf.m4: New file.
28544
28545 1998-05-12  Jim Meyering  <meyering@ascend.com>
28546
28547         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
28548
28549 1998-05-11  Jim Meyering  <meyering@ascend.com>
28550
28551         * m4/isc-posix.m4: New file.
28552
28553 1998-05-10  Jim Meyering  <meyering@ascend.com>
28554
28555         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
28556
28557 1998-05-09  Jim Meyering  <meyering@ascend.com>
28558
28559         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
28560         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
28561         with automake.
28562
28563         * m4/ssize_t.m4: New file.
28564         * m4/mktime.m4: Remove file -- the new automake has this now.
28565
28566 1998-04-26  Jim Meyering  <meyering@ascend.com>
28567
28568         * m4/assert.m4: New file.
28569         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
28570
28571 1998-04-05  Jim Meyering  <meyering@ascend.com>
28572
28573         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
28574         (jm_PREREQ): Use it here.
28575
28576 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
28577
28578         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
28579         in acconfig.h.
28580
28581 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
28582
28583         * m4/prereq.m4: New file.
28584         * m4/error.m4: New file.
28585         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
28586
28587 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
28588
28589         * m4/getline.m4: Don't set am_cv_func_working_getline before the
28590         cache-check for the same variable -- that defeated the purpose of
28591         the test; the test program was never run.  This was a problem only
28592         on systems with losing getline functions -- HP-UX 10.20 is one.
28593         Reported by Bjorn Helgaas.
28594
28595 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
28596
28597         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
28598
28599 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
28600
28601         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
28602
28603         * m4/const.m4: New file.  Use an initializer in this declaration
28604         typedef int charset[2]; const charset x;
28605         Reported by Bob Glickstein.
28606
28607 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
28608
28609         * m4/chown.m4: Fix reversed types on -1 args to chown.
28610         From Kaveh Ghazi.
28611
28612 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
28613
28614         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
28615         Add lseek and memchr.
28616
28617         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
28618         T.E.Dickey <dickey@clark.net> said that some older preprocessors
28619         have a 20-character limit on names.
28620
28621 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
28622
28623         * m4/inttypes_h.m4: New file.
28624         * m4/uintmax_t.m4: New file.
28625         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
28626
28627 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
28628   Free Software Foundation, Inc.
28629 Copying and distribution of this file, with or without modification,
28630 are permitted provided the copyright notice and this notice are preserved.