Handle mismatch between latest gettext release and current gnulib.
[pspp] / ChangeLog
1 2006-10-11  Bruno Haible  <bruno@clisp.org>
2
3         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
4         (func_create_testdir): Don't create po/Makefile.am, don't invoke
5         autoreconf. Instead, invoke autopoint explicitly but move back the
6         *.m4 files from gnulib.
7
8 2006-10-11  Bruno Haible  <bruno@clisp.org>
9
10         * gnulib-tool (func_usage): Make module names after --create-testdir
11         optional.
12         (func_create_testdir): If no module was specified, use nearly all
13         modules.
14
15 2006-10-12  Jim Meyering  <jim@meyering.net>
16
17         Big performance improvement for fts-based tools that use FTS_NOSTAT.
18         Avoid spurious inode-mismatch problems on non-POSIX file systems.
19         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
20         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
21         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
22         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
23         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
24         (fts_set_stat_required): New function.
25         (fts_open): Defer the calls to fts_stat, if possible or requested.
26         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
27         into fts_stat itself.
28         (fts_read): Perform any required (deferred) fts_stat call.
29         (fts_build): Likewise, for the directory we're about to open and read.
30         In the readdir loop, carefully decide whether each entry will require
31         an eventual call to fts_stat, using dirent.d_type info if available.
32         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
33         a command line argument into this function.  Update all callers.
34         Map a return value of FTS_DOT to FTS_D for a command line argument.
35         * modules/fts (Depends-on): Add d-type.  Alphabetize.
36         Thanks to Miklos Szeredi for his tenacity and for the initial
37         bug report about "find" failing on a FUSE-based file system.
38
39         * lib/fts.c (fts_open): Use consistent indentation.
40
41 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
42
43         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
44         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
45         reported by Jim Meyering.  All uses of cache variables renamed
46         to match Autoconf's.
47         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
48         the other one.
49
50         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
51         Fix misspelling in diagnostic.
52
53 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
54
55         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
56         defined.  Problem reported by Matthew Woehlke.
57
58         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
59         Add support for Tandem NonStop R series.
60         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
61         Use new macro.
62
63         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
64         (has_trailing_slash): Omit size arg; all callers changed.
65         Omit 'inline', since it doesn't help performance and we'd
66         need to configure it.
67         Don't count //, ///, etc. as having a trailing slash.
68         As a side effect, this removes a C99ism reported by Matthew Woehlke.
69         (rpl_rename_dest_slash): On failure, use rename's errno rather
70         than (in some cases) an incorrect or junk errno.
71         Simplify code by removing need to compute length; this does
72         cause it to make two passes instead of one over the file name,
73         but it's worth it.
74
75         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
76         change, since Autoconf's version may no longer be appropriate now
77         that we are using CVS Autoconf's version.  Add support for Tandem.
78
79 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
80             Bruno Haible  <bruno@clisp.org>
81
82         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
83         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
84         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
85         gl_AC_TYPE_LONG_LONG.
86
87         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
88         instead of HAVE_LONG_LONG.
89         * lib/printf-args.c (printf_fetchargs): Likewise.
90         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
91         * lib/vasnprintf.c (VASNPRINTF): Likewise.
92         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
93         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
94         gl_AC_TYPE_LONG_LONG.
95
96 2006-10-11  Bruno Haible  <bruno@clisp.org>
97
98         * m4/longlong.m4: Add comments.
99         * m4/ulonglong.m4: Likewise.
100
101 2006-10-10  Bruno Haible  <bruno@clisp.org>
102
103         Make it possible to #define stpcpy, strdup to aliases.
104         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
105         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
106
107 2006-10-10  Bruno Haible  <bruno@clisp.org>
108
109         Make it possible to #define gcd to an alias.
110         * lib/gcd.c: Include config.h.
111
112 2006-10-10  Bruno Haible  <bruno@clisp.org>
113
114         Make it possible to #define c_isascii to an alias.
115         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
116         defined. Undefine the macros before defining them, to avoid gcc
117         warnings.
118         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
119         define NO_C_CTYPE_MACROS early.
120
121 2006-10-10  Bruno Haible  <bruno@clisp.org>
122
123         Make it possible to #define set_program_name to an alias.
124         * lib/progname.c: Don't undefine set_program_name; instead, undefine
125         ENABLE_RELOCATABLE early.
126
127 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
128
129         Port to Tandem NSK OSS, which has 64-bit signed int but at most
130         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
131         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
132         More generally, don't assume that 64-bit signed int is available
133         if unsigned int is, and vice versa.
134         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
135         unsigned symbols, not on their signed counterparts.
136         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
137         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
138         (UINT64_C, UINTMAX_C):
139         Likewise.
140         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
141         unsigned counterparts.
142         (Have_long_long, Unsigned): New macros.
143         (Int): Renamed from INT.
144         (strtoimax): Use the new macros.
145         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
146         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
147         * modules/inttypes (inttypes.h): Substitute
148         HAVE_UNSIGNED_LONG_LONG_INT.
149         * modules/stdint (stdint.h): Likewise.
150         (Files): Add m4/ulonglong.m4.
151
152 2006-10-10  Bruno Haible  <bruno@clisp.org>
153
154         Fix a gcc -Wshadow warning.
155         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
156         to 'bucket'.
157         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
158         gl_linked_indexof_from_to): Likewise.
159         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
160         Likewise.
161         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
162         Likewise.
163         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
164         Reported by Eric Blake.
165
166 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
167
168         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
169         for NetBSD.  Problem reported by Bruno Haible.
170
171 2006-10-09  Jim Meyering  <jim@meyering.net>
172
173         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
174         Patch from Bruno Haible.
175
176 2006-10-09  Jim Meyering  <jim@meyering.net>
177
178         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
179         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
180         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
181
182 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
183
184         Don't include <config.h> twice; this doesn't work in some cases,
185         e.g., when config.h has "#define intmax_t long long int" and
186         we include <config.h>, <inttypes.h>, <config.h> in that order.
187         Problem reported by Matthew Woehlke in:
188         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
189         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
190         * lib/fts-cycle.c: Don't include config.h.
191         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
192         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
193         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
194         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
195         inttypes.h.
196         * lib/xstrtoumax.c: Likewise.
197         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
198         __strtol and the like, so that this module is more like its siblings.
199         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
200         Remove; no longer needed now that we assume gnulib inttypes.h.
201
202 2006-10-08  Bruno Haible  <bruno@clisp.org>
203
204         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
205         option.
206
207 2006-10-07  Jim Meyering  <jim@meyering.net>
208
209         * modules/inttypes (inttypes.h): Revert what seems to have been
210         an inadvertent part of today's change: use "|", not "/" in the
211         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
212
213 2006-10-07  Bruno Haible  <bruno@clisp.org>
214
215         * modules/sublist: New file.
216
217 2006-10-07  Bruno Haible  <bruno@clisp.org>
218
219         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
220         * modules/argz (argz.h): Likewise.
221         * modules/arpa_inet (arpa/inet.h): Likewise.
222         * modules/byteswap (byteswap.h): Likewise.
223         * modules/configmake (configmake.h): Likewise.
224         * modules/fcntl (fcntl.h): Likewise.
225         * modules/fnmatch (fnmatch.h): Likewise.
226         * modules/getopt (getopt.h): Likewise.
227         * modules/glob (glob.h): Likewise.
228         * modules/inttypes (inttypes.h): Likewise.
229         * modules/netinet_in (netinet/in.h): Likewise.
230         * modules/poll (poll.h): Likewise.
231         * modules/stdbool (stdbool.h): Likewise.
232         * modules/stdint (stdint.h): Likewise.
233         * modules/sys_select (sys/select.h): Likewise.
234         * modules/sys_socket (sys/socket.h): Likewise.
235         * modules/sys_stat (sys/stat.h): Likewise.
236         * modules/sysexits (sysexits.h): Likewise.
237         * modules/unistd (unistd.h): Likewise.
238         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
239         Add a "DO NOT EDIT" comment to the generated file.
240         (func_import): Likewise for gnulib-comp.m4.
241
242 2006-10-07  Bruno Haible  <bruno@clisp.org>
243
244         * lib/gl_sublist.h: New file.
245         * lib/gl_sublist.c: New file.
246
247 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
248
249         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
250         name (relative to the original working directory) and the file
251         name component (relative to the temporary working directory).  All
252         callers changed.
253         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
254         * lib/mkdir-p.c (make_dir_parents): Likewise.
255         * lib/mkdir-p.h (make_dir_parents): Likewise.
256
257 2006-10-06  Eric Blake  <ebb9@byu.net>
258
259         Define several macros for use by the clean-temp module.
260         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
261         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
262         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
263
264         * lib/clean-temp.h (close_stream_temp): New declaration.
265         * lib/clean-temp.c (includes): Pull in headers according to what
266         other modules are in use.
267         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
268
269 2006-10-06  Bruno Haible  <bruno@clisp.org>
270
271         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
272         instead of fopen, fwriteerror.
273
274 2006-10-06  Bruno Haible  <bruno@clisp.org>
275
276         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
277         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
278         int.
279         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
280         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
281         Return an error indicator.
282         Suggested by Eric Blake.
283
284 2006-10-06  Bruno Haible  <bruno@clisp.org>
285
286         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
287         Reported by Eric Blake.
288
289 2006-10-06  Bruno Haible  <bruno@clisp.org>
290
291         * modules/closeout (Description): Mention stderr too.
292
293 2006-10-06  Bruno Haible  <bruno@clisp.org>
294         and Paul Eggert  <eggert@cs.ucla.edu>
295
296         * lib/closeout.c (close_stdout): Also close stderr.
297         * lib/closeout.h: Update comment.
298
299 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
300
301         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
302         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
303         * lib/dirchownmod.c: Include lchown.h.
304         * lib/lchown.c: Don't include files that lchown.h now includes.
305         Don't declare chown, since lchown.h now does that.
306         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
307         (lchown): Define to rpl_chown if lchown is declared but
308         does not exist.  Declare using a prototype if lchown is not
309         declared.  Add a copyright notice.
310         * lib/mkstemp.h: Include <unistd.h>.
311         * lib/openat.c: Include lchown.h.
312
313         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
314         we now test for that separately.
315         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
316         rather than O_NOFOLLOW, when testing whether it's possible to
317         avoid a race condition reliably.
318         * lib/savewd.c (savewd_chdir): Likewise.
319
320         Remove macros that are no longer needed now that stdint.h is
321         reliable.
322         * lib/fsusage.c (UINTMAX_MAX): Remove.
323         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
324         * lib/utimecmp.c (SIZE_MAX): Remove.
325
326         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
327
328         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
329         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
330         O_NOATIME works.
331
332 2006-10-05  Bruno Haible  <bruno@clisp.org>
333
334         * lib/gl_list.h (gl_sortedlist_search_from_to,
335         gl_sortedlist_indexof_from_to): New declarations.
336         (gl_list_implementation): New fields sortedlist_search_from_to,
337         sortedlist_indexof_from_to.
338         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
339         inline functions.
340         * lib/gl_list.c (gl_sortedlist_search_from_to,
341         gl_sortedlist_indexof_from_to): New functions.
342         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
343         function.
344         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
345         (gl_array_sortedlist_search_from_to): New function.
346         (gl_array_list_implementation): Update.
347         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
348         function.
349         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
350         (gl_carray_sortedlist_search_from_to): New function.
351         (gl_carray_list_implementation): Update.
352         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
353         gl_linked_sortedlist_indexof_from_to): New functions.
354         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
355         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
356         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
357         gl_tree_sortedlist_indexof_from_to): New functions.
358         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
359         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
360         Update.
361         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
362         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
363         Update.
364
365 2006-10-05  Bruno Haible  <bruno@clisp.org>
366
367         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
368         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
369         (struct gl_list_implementation): Add fields search_from_to,
370         indexof_from_to. Remove fields search, indexof.
371         (gl_list_search): Use the search_from_to method.
372         (gl_list_search_from, gl_list_search_from_to): New functions.
373         (gl_list_indexof): Use the indexof_from_to method.
374         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
375         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
376         (gl_list_search_from, gl_list_search_from_to): New functions.
377         (gl_list_indexof): Use the indexof_from_to method.
378         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
379         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
380         gl_array_indexof. Add start_index, end_index arguments.
381         (gl_array_search_from_to): Renamed from gl_array_search. Add
382         start_index, end_index arguments.
383         (gl_array_remove, gl_array_list_implementation): Update.
384         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
385         gl_carray_indexof. Add start_index, end_index arguments.
386         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
387         start_index, end_index arguments.
388         (gl_carray_remove, gl_carray_list_implementation): Update.
389         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
390         gl_linked_search. Add start_index, end_index arguments.
391         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
392         start_index, end_index arguments.
393         (gl_linked_remove): Update.
394         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
395         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
396         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
397         field to 'size_t'.
398         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
399         gl_tree_search. Add start_index, end_index arguments.
400         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
401         start_index, end_index arguments.
402         (gl_tree_remove): Update.
403         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
404         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
405         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
406         function.
407         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
408         gl_tree_search. Add start_index, end_index arguments.
409         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
410         start_index, end_index arguments.
411         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
412         Update.
413         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
414
415 2006-10-05  Bruno Haible  <bruno@clisp.org>
416
417         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
418
419         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
420         fwriteerror_temp): New declarations.
421         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
422         (descriptors): New variable.
423         (cleanup): First, close the descriptors.
424         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
425         fclose_temp, fwriteerror_temp): New functions.
426
427 2006-10-04  Jim Meyering  <jim@meyering.net>
428
429         * lib/fts.c (fts_open): Tiny comment change.
430
431 2006-10-04  Bruno Haible  <bruno@clisp.org>
432
433         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
434         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
435         gl_LOCK_BODY.
436         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
437         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
438         gl_LOCK_EARLY_BODY.
439         (gl_LOCK): Require gl_LOCK_BODY.
440
441 2006-10-04  Bruno Haible  <bruno@clisp.org>
442
443         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
444         (gl_oset_search_atleast): New declaration.
445         (struct gl_oset_implementation): Add field 'search_atleast'.
446         (gl_oset_search_atleast): New inline function.
447         * lib/gl_oset.c (gl_oset_search_atleast): New function.
448         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
449         (gl_array_oset_implementation): Update.
450         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
451         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
452         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
453
454 2006-10-04  Bruno Haible  <bruno@clisp.org>
455
456         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
457
458 2006-10-03  Bruno Haible  <bruno@clisp.org>
459
460         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
461         from gl_avltreehash_list_implementation.
462
463 2006-10-03  Bruno Haible  <bruno@clisp.org>
464
465         * lib/gl_oset.c (gl_oset_add): Fix return type.
466
467 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
468
469         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
470
471 2006-10-02  Eric Blake  <ebb9@byu.net>
472
473         * modules/strnlen (Depends-on): Add extensions.
474
475 2006-10-02  Eric Blake  <ebb9@byu.net>
476
477         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
478         definition in 2.60+.
479
480 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
481
482         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
483         checks.
484
485 2006-10-02  Bruno Haible  <bruno@clisp.org>
486
487         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
488         to the AUTOMAKE_OPTIONS.
489         Reported by Jim Meyering.
490
491 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
492
493         Work around bug in Solaris 10 /proc file system:
494         /proc/self/fd/NNN/.. isn't the parent directory of
495         the directory whose file descriptor is NNN.  This needs to
496         be worked around at run time, not compile time, since a
497         program might be built on Solaris 8, where things work, and
498         run on Solaris 10.
499         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
500         to use the following interface instead:
501         (OPENAT_BUFFER_SIZE): New macro.
502         (openat_proc_name): New function.
503         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
504         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
505         Likewise.
506         * lib/openat-proc.c: New file.
507         * modules/openat (Files): Add lib/openat-proc.c.
508         (Depends-on): Add same-inode, stdbool.
509         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
510
511 2006-09-29  Bruno Haible  <bruno@clisp.org>
512
513         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
514         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
515         argument. Set stdout_closed before testing for ferror, not after.
516         (fwriteerror, fwriteerror_no_ebadf): New functions.
517
518 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
519
520         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
521
522 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
523
524         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
525         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
526
527 2006-09-28  Jim Meyering  <jim@meyering.net>
528
529         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
530         Include <unistd.h>.
531
532 2006-09-28  Bruno Haible  <bruno@clisp.org>
533
534         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
535         * modules/linkedhash-list (Depends-on): Likewise.
536         * modules/rbtreehash-list (Depends-on): Likewise.
537
538 2006-09-28  Bruno Haible  <bruno@clisp.org>
539
540         * lib/strndup.h: Simplify the redefinition of strndup.
541         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
542         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
543
544 2006-09-28  Bruno Haible  <bruno@clisp.org>
545
546         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
547         * lib/gl_linkedhash_list.c: Likewise.
548         * lib/gl_rbtreehash_list.c: Likewise.
549
550 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
551
552         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
553         getaddrinfo.
554
555         * lib/__fpending.h: Don't include <stdio_ext.h> unless
556         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
557         it causes <stdio_ext.h> to cause a compile-time error.
558         Problem reported by Nelson H. F. Beebe.
559         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
560         of HAVE_DECL___PENDING.
561
562         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
563         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
564         declaration.
565
566 2006-09-27  Jim Meyering  <jim@meyering.net>
567
568         This file could end up with a definition for a function
569         named __strndup, rather than rpl_strndup on a system with
570         incomplete weak_alias support.
571         * lib/strndup.c (strndup): Rename from __strndup.
572         Remove #defines that used to map __strndup to strndup.
573         Don't use K&R prototypes.
574         Remove LIBC-related code, since this file is not sync'd with glibc.
575         * lib/strndup.h: Revamp, accordingly.
576         * m4/strndup.m4: Modernize.
577
578 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
579
580         * modules/savewd (Depends-on): Add 'raise'.
581         * lib/savewd.c: Include <signal.h>, for 'raise'.
582
583 2006-09-26  Jim Meyering  <jim@meyering.net>
584
585         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
586         when we detect Darwin 8.7.0's acl_get_file bug.
587         Rearrange to perform the new (below) run-test while $LIBS
588         contains any acl-related library.  Set USE_ACL at the end.
589         (gl_ACL_GET_FILE): New function.
590
591 2006-09-26  Eric Blake  <ebb9@byu.net>
592
593         * lib/verror.c: Include <config.h> unconditionally.
594
595 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
596
597         * modules/clock-time (Maintainer): Add self.
598         * modules/getlogin_r (Depends-on): Add extensions.
599
600 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
601
602         * modules/clock-time: New module.
603         * modules/nanosleep (Depends-on): Add clock-time.
604         * modules/gethrxtime (Depends-on): Likewise.
605         * modules/gettime (Depends-on): Likewise.
606         * modules/settime (Depends-on): Likewise.
607
608         * modules/fts-lgpl: Depend on openat.
609         * modules/mkancesdirs: Depend on savewd.
610         * modules/mkdir-p: Likewise.
611
612 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
613
614         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
615
616         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
617         `gl_have_arbitrary_file_name_length_limit' to
618         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
619         actually works between configure runs.
620
621 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
622             Bruno Haible  <bruno@clisp.org>
623
624         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
625
626 2006-09-25  Jim Meyering  <jim@meyering.net>
627
628         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
629         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
630
631 2006-09-25  Eric Blake  <ebb9@byu.net>
632
633         * gnulib-tool (func_import, func_create_testdir): Fix typos in
634         exec's in 2006-09-18 patch when shuffling fds.
635
636 2006-09-25  Bruno Haible  <bruno@clisp.org>
637
638         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
639         Reported by Jim Meyering.
640
641 2006-09-24  Jim Meyering  <jim@meyering.net>
642
643         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
644         compare a pointer against a literal "0".  That caused failures with
645         at least HP-UX's hpcc.
646
647 2006-09-22  Simon Josefsson  <jas@extundo.com>
648
649         * modules/gc-sha1:
650         * modules/gc-md4:
651         * modules/gc-hmac-sha1:
652         * modules/gc-hmac-md5:
653         * modules/gc-des:
654         * modules/gc-arcfour: Distribute more files.
655
656 2006-09-22  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
657
658         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
659         (gl_linked_iterator_from_to): Initialize struct completely.
660         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
661         (gl_tree_iterator_from_to): Likewise
662         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
663         * lib/gl_array_list.c [lint] (gl_array_iterator)
664         (gl_array_iterator_from_to): Likewise.
665         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
666         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
667         (gl_carray_iterator_from_to): Likewise.
668
669         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
670         * lib/md4.c (md4_process_block): Remove unused variable.
671         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
672         parentheses for clarity.
673
674 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
675
676         * modules/bison-i18n (Depends-on): Add gettext.
677
678 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
679
680         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
681         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
682         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
683         also add missing comma that caused broken test.
684         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
685         stdlib.h, for `abort'.
686         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
687         variables.
688         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
689         include unistd.h if present, for `rmdir'.
690         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
691         variables.
692         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
693         in the process include standard headers for prototypes.
694         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
695         gets declared on GNU/Linux.
696         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
697         unistd.h, for `rmdir'.
698         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
699
700         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
701         always true.
702         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
703
704         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
705
706 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
707
708         * gnulib-tool (func_version): Create output all at once.  This
709         may help avoid triggering unnecessary SIGPIPEs, and at any
710         rate it doesn't hurt.
711
712 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
713             Bruno Haible  <bruno@clisp.org>
714
715         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
716         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
717         * m4/signed.m4 (bh_C_SIGNED): Likewise.
718
719         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
720         (gl_FUNC_VASPRINTF): Invoke it.
721
722 2006-09-22  Bruno Haible  <bruno@clisp.org>
723
724         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
725         getloadavg.c as first argument.
726
727 2006-09-22  Bruno Haible  <bruno@clisp.org>
728
729         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
730         at the beginning of the gl_INIT macro.
731         * modules/getloadavg (configure.ac): Pass $gl_source_base to
732         gl_GETLOADAVG.
733
734 2006-09-22  Bruno Haible  <bruno@clisp.org>
735
736         * gnulib-tool (func_create_megatestdir): Don't include the config-h
737         module.
738         Suggested by Ralf Wildenhues.
739
740 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
741
742         Import this patch from libc:
743
744         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
745
746         * lib/regex_internal.c (re_string_reconstruct): Handle
747         offset < pstr->valid_raw_len && pstr->offsets_needed case.
748         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
749         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
750         re_string_context_at.
751
752         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
753         now requires it.
754         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
755         gl_REGEX now does it for us.
756         (gl_REGEX): Add test taken from
757         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
758
759         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
760         Check that large offsets work.  Modernize Autoconf usages.
761         Prefer "yes" to mean a good thing rather than a bad.
762         Don't put "#define mkstemp" in config.h, as this might interfere
763         with standard system headers that "#define mkstemp mkstemp64".
764
765         * modules/mkstemp (Depends-on): Add extensions, so that
766         mkstemp is visible on some platforms.
767         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
768         (Include): Change to "mkstemp.h" from <stdlib.h>.
769         (Files): Add mkstemp.h.
770
771         * lib/mkstemp.h: New file, since some standard headers
772         #define mkstemp.
773         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
774         Include "mkstemp.h".
775         Make the _LIBC code resemble glibc original more,
776         e.g., use K&R style.
777         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
778         (mkstemp): Remove, since mkstemp.h does this for us.
779         * lib/stdlib--.h: Include mkstemp.h.
780
781         Import this patch from libc:
782
783         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
784
785         * lib/tempname.c (__gen_tempname): Change attempts_min
786         into a macro.  Use preprocessor to decide how to initialize
787         attempts [Coverity CID 67].
788
789 2006-09-20  Bruno Haible  <bruno@clisp.org>
790
791         * lib/mkdtemp.c: Import from libc.
792         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
793                 * sysdeps/posix/tempname.c (__gen_tempname): Change
794                 attempts_min into a macro.  Use preprocessor to decide how to
795                 initialize attempts [Coverity CID 67].
796         2001-11-27  Paul Eggert  <eggert@twinsun.com>
797                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
798                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
799
800 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
801
802         * gnulib-tool (func_exit): New function, to allow to pass the
803         exit status portably through the trap.  Use everywhere.
804         (--help, --version): Signal a write error.
805         (trap): catch SIGPIPE, for write errors.
806         Exit at the end of the trap, with the correct exit status.
807
808 2006-09-19  Karl Berry  <karl@gnu.org>
809
810         * doc/gnulib.texi: note about the license texinfo files.
811
812 2006-09-19  Eric Blake  <ebb9@byu.net>
813
814         * gnulib-tool: Avoid space-tab.
815
816 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
817
818         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
819         that prevented coreutils 6.1 from building.  Problem reported
820         by Petter Reinholdtsen.
821
822 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
823
824         * gnulib-tool (avoidlist): Fix typo that broke options like
825         --avoid=lock that are used by coreutils bootstrap.
826
827 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
828
829         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
830         more systematically.
831
832 2006-09-18  Jim Meyering  <jim@meyering.net>
833
834         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
835
836 2006-09-18  Bruno Haible  <bruno@clisp.org>
837
838         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
839
840 2006-09-18  Bruno Haible  <bruno@clisp.org>
841
842         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
843         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
844         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
845         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
846         * m4/gettext.m4: Require autoconf >= 2.52.
847         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
848         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
849         of gl_cv_header_inttypes_h.
850
851 2006-09-18  Bruno Haible  <bruno@clisp.org>
852
853         * lib/javaversion.c: Include configmake.h.
854
855 2006-09-18  Bruno Haible  <bruno@clisp.org>
856
857         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
858         avoid that the while loops be executed in a subshell.
859
860 2006-09-18  Bruno Haible  <bruno@clisp.org>
861
862         * MODULES.html.sh (func_module): Break long lines.
863         Suggested by Bruce Korb <bkorb@gnu.org>.
864
865 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
866
867         Speed up by a factor of 1.12.
868         * gnulib-tool (nl): New variable.
869         (func_import): Rewrite include directive extraction to only read each
870         directive once.
871
872 2006-09-17  Bruno Haible  <bruno@clisp.org>
873
874         * modules/javaversion (Makefile.am): Remove DEFS setting.
875         (Depends-on): Add configmake, for PKGDATADIR definition.
876
877 2006-09-17  Bruno Haible  <bruno@clisp.org>
878
879         * gnulib-tool (func_create_testdir): Rewrite all files at once.
880
881 2006-09-17  Bruno Haible  <bruno@clisp.org>
882
883         * gnulib-tool (func_append): New function, stolen from libtool.m4.
884         (func_modules_transitive_closure, func_modules_add_dummy,
885         func_modules_to_filelist, func_import, func_create_testdir,
886         func_create_megatestdir, ...): Use it wherever possible.
887         Suggested by Ralf Wildenhues.
888
889 2006-09-16  Karl Berry  <karl@gnu.org>
890
891         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
892         to avoid sectioning errors.
893         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
894         [ifinfo]: blank line after @center-ed titles.
895         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
896         Spell FSF address consistently with others.
897         (These changes approved by rms.)
898
899 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
900
901         Speed up by a factor of 1.61.
902         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
903         already checked module names again.
904
905 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
906
907         Speed up by a factor of 1.13.
908         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
909         for new_files, and the input to func_add_or_update.
910
911 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
912
913         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
914         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
915
916 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
917
918         * modules/mkancesdirs (Depends-on): Add fcntl.
919         * modules/savewd: New file.
920         * MODULES.html.sh (File system functions): Add savewd.
921
922         * modules/configmake (Makefile.am): Add support for the
923         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
924
925 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
926
927         * m4/savewd.m4: New file.
928
929 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
930
931         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
932         (dirchownmod): New arg FD.  All callers changed.
933         Use FD rather than opening the directory ourself, as opening is
934         now the caller's responsibility.
935         * lib/dirchownmod.h: Likewise.
936         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
937         hosts that require <sys/types.h> before <sys/stat.h>.  Include
938         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
939         (test_dir): Remove.
940         (mkancesdirs): Return length of prefix of FILE that has already
941         been made, or -2 if there is a child doing the work.  Redo
942         algorithm so that it is O(N) rather than O(N**2).  Optimize away
943         ".", and treat ".." specially since it might stray back into
944         already-created areas.  Use a subprocess if necessary.  New arg
945         WD; all users changed.  MAKE_DIR function should now return 1
946         if it creates a directory that is not readable.  Return -2 if
947         a child process is spun off.
948         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
949         Adjust signature to match code.
950         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
951         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
952         all users changed.
953         * lib/savewd.c, savewd.h: New files.
954
955 2006-09-15  Jim Meyering  <jim@meyering.net>
956
957         * modules/rename-dest-slash: New module.
958         * MODULES.html.sh (posix_compat): Add it here.
959
960         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
961
962 2006-09-15  Jim Meyering  <jim@meyering.net>
963
964         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
965         file.
966
967         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
968
969 2006-09-15  Jim Meyering  <jim@meyering.net>
970
971         * lib/rename-dest-slash.c (has_trailing_slash): Use
972         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
973         (rpl_rename_dest_slash): Perform the cheaper trailing slash
974         test before testing whether SRC is a directory.
975         Suggestions from Bruno Haible.
976
977         Avoid a warning about an unused variable.
978         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
979         into the #ifdef block where it's used.
980
981         * lib/rename-dest-slash.c: New file.
982
983 2006-09-14  Bruno Haible  <bruno@clisp.org>
984
985         * lib/allocsa.c: Include <config.h> unconditionally.
986         * lib/asnprintf.c: Likewise.
987         * lib/asprintf.c: Likewise.
988         * lib/c-strcasecmp.c: Likewise.
989         * lib/c-strcasestr.c: Likewise.
990         * lib/c-strncasecmp.c: Likewise.
991         * lib/c-strstr.c: Likewise.
992         * lib/classpath.c: Likewise.
993         * lib/clean-temp.c: Likewise.
994         * lib/concatpath.c: Likewise.
995         * lib/copy-file.c: Likewise.
996         * lib/csharpcomp.c: Likewise.
997         * lib/csharpexec.c: Likewise.
998         * lib/execute.c: Likewise.
999         * lib/fatal-signal.c: Likewise.
1000         * lib/findprog.c: Likewise.
1001         * lib/fwriteerror.c: Likewise.
1002         * lib/gl_array_list.c: Likewise.
1003         * lib/gl_array_oset.c: Likewise.
1004         * lib/gl_avltree_list.c: Likewise.
1005         * lib/gl_avltree_oset.c: Likewise.
1006         * lib/gl_avltreehash_list.c: Likewise.
1007         * lib/gl_carray_list.c: Likewise.
1008         * lib/gl_linked_list.c: Likewise.
1009         * lib/gl_linkedhash_list.c: Likewise.
1010         * lib/gl_list.c: Likewise.
1011         * lib/gl_oset.c: Likewise.
1012         * lib/gl_rbtree_list.c: Likewise.
1013         * lib/gl_rbtree_oset.c: Likewise.
1014         * lib/gl_rbtreehash_list.c: Likewise.
1015         * lib/imaxabs.c: Likewise.
1016         * lib/imaxdiv.c: Likewise.
1017         * lib/javacomp.c: Likewise.
1018         * lib/javaexec.c: Likewise.
1019         * lib/javaversion.c: Likewise.
1020         * lib/linebreak.c: Likewise.
1021         * lib/localcharset.c: Likewise.
1022         * lib/lock.c: Likewise.
1023         * lib/mbchar.c: Likewise.
1024         * lib/mbswidth.c: Likewise.
1025         * lib/mkdtemp.c: Likewise.
1026         * lib/pipe.c: Likewise.
1027         * lib/printf-args.c: Likewise.
1028         * lib/printf-parse.c: Likewise.
1029         * lib/progname.c: Likewise.
1030         * lib/progreloc.c: Likewise.
1031         * lib/readlink.c: Likewise.
1032         * lib/sh-quote.c: Likewise.
1033         * lib/stpcpy.c: Likewise.
1034         * lib/stpncpy.c: Likewise.
1035         * lib/strcasecmp.c: Likewise.
1036         * lib/strcasestr.c: Likewise.
1037         * lib/strcspn.c: Likewise.
1038         * lib/striconv.c: Likewise.
1039         * lib/strncasecmp.c: Likewise.
1040         * lib/strnlen1.c: Likewise.
1041         * lib/strstr.c: Likewise.
1042         * lib/strtok_r.c: Likewise.
1043         * lib/tls.c: Likewise.
1044         * lib/tmpdir.c: Likewise.
1045         * lib/unicodeio.c: Likewise.
1046         * lib/unsetenv.c: Likewise.
1047         * lib/vasnprintf.c: Likewise.
1048         * lib/vasprintf.c: Likewise.
1049         * lib/wait-process.c: Likewise.
1050         * lib/xallocsa.c: Likewise.
1051         * lib/xsetenv.c: Likewise.
1052         * lib/xstriconv.c: Likewise.
1053
1054 2006-09-13  Simon Josefsson  <jas@extundo.com>
1055
1056         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
1057         that internally, suggested by Ralf Wildenhues
1058         <Ralf.Wildenhues@gmx.de>.
1059
1060 2006-09-13  Simon Josefsson  <jas@extundo.com>
1061
1062         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
1063         @LIBOBJS@.
1064         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
1065
1066 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
1067
1068         * lib/_fpending.c: Include <config.h> unconditionally, since we no
1069         longer worry about uses that don't define HAVE_CONFIG_H.
1070         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
1071         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
1072         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
1073         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
1074         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
1075         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
1076         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
1077         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
1078         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
1079         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
1080         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
1081         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
1082         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
1083         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
1084         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
1085         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
1086         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
1087         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
1088         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
1089         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
1090         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
1091         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
1092         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
1093         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
1094         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
1095         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
1096         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
1097         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
1098         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
1099         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
1100         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
1101         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
1102         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
1103         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
1104         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
1105         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
1106         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
1107         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
1108         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
1109         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
1110         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
1111         Likewise.
1112
1113 2006-09-13  Eric Blake  <ebb9@byu.net>
1114
1115         * lib/getopt.c: Fix typo in last commit.
1116
1117 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
1118
1119         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
1120         dgettext.
1121
1122 2006-09-12  Jim Meyering  <jim@meyering.net>
1123
1124         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
1125         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
1126         Reported by Nelson H. F. Beebe.
1127
1128 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1129
1130         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
1131         program_invocation_name and program_invocation_short_name are
1132         initialized.
1133         * lib/argp-namefrob.h: Move declarations of program_invocation_name
1134         and program_invocation_short_name to argp.h, so they are visible
1135         to user programs.
1136         * lib/argp.h: Likewise
1137
1138 2006-09-10  Bruno Haible  <bruno@clisp.org>
1139
1140         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
1141         m4/inttypes_h.m4, m4/uintmax_t.m4.
1142
1143 2006-09-10  Bruno Haible  <bruno@clisp.org>
1144
1145         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
1146         gl_AC_TYPE_UINTMAX_T.
1147
1148 2006-09-10  Bruno Haible  <bruno@clisp.org>
1149
1150         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
1151
1152 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
1153
1154         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
1155         convention.  Text proposed by Bruno Haible.
1156         (struct argp_option): Document the use of N_() wrappers.
1157
1158         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
1159         '\v', and translate the two parts separately, instead of feeding
1160         the whole string to gettext.  This allows to exclude
1161         '\v' from the strings visible to the translator by writing doc
1162         strings as N_("..") "\v" N_("..").
1163
1164 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
1165
1166         * config/srclist.txt: Undo latest change; the bug was fixed.
1167
1168 2006-09-09  Bruno Haible  <bruno@clisp.org>
1169
1170         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
1171         assignments if building a library without libtool.
1172         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
1173         in func_emit_lib_Makefile_am.
1174         (func_import): When building a static library libfoo.a, arrange to
1175         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
1176         (func_create_testdir): Likewise.
1177         * modules/gc (configure.ac, Makefile.am): If building statically,
1178         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
1179         * modules/iconvme (configure.ac, Makefile.am): Likewise.
1180         * modules/striconv (configure.ac, Makefile.am): Likewise.
1181         Based on a suggestion by Ralf Wildenhues.
1182
1183 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1184
1185         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1186         Check for unistd.h too, since Autoconf doesn't assume POSIX.
1187         Also:
1188
1189         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1190         Add year_2050_test to catch glibc bug 2821
1191         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
1192
1193         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
1194         Prefer #ifdef to #if.
1195
1196         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
1197         Return from 'main' instead of calling 'exit'.
1198
1199 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1200
1201         * lib/mktime.c (guess_time_tm): Fix bug where mktime
1202         returned the maximum time_t value rather than (time_t) -1.
1203         Problem originally reported by William Bardwell
1204         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
1205
1206         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
1207         Moved to here ...
1208         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
1209         ... from here.
1210
1211 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
1212
1213         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
1214         2821 is fixed.
1215
1216 2006-09-08  Jim Meyering  <jim@meyering.net>
1217
1218         Don't make generated files read-only.  That would bother too many
1219         people.  However, do retain the ability to work when targets are
1220         read-only: remove the destination and temporary files before writing
1221         them (when generated via sed or echo), or by using the -f option for
1222         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
1223         * modules/alloca-opt, modules/argz, modules/arpa_inet:
1224         * modules/byteswap, modules/configmake, modules/fcntl:
1225         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
1226         * modules/localcharset, modules/netinet_in, modules/poll:
1227         * modules/stdbool, modules/stdint, modules/sys_select:
1228         * modules/sys_socket, modules/sys_stat, modules/sysexits:
1229
1230 2006-09-08  Jim Meyering  <jim@meyering.net>
1231
1232         Avoid new build failure on FreeBSD 6.0.
1233         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
1234         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
1235         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
1236
1237 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1238
1239         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
1240
1241 2006-09-07  Jim Meyering  <jim@meyering.net>
1242
1243         Fix global typo in last change: use chmod u-w, not chmod u-x.
1244         Spotted by Paul Eggert and Bruce Korb.
1245         * modules/alloca-opt, modules/argz, modules/arpa_inet:
1246         * modules/byteswap, modules/configmake, modules/fcntl:
1247         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
1248         * modules/localcharset, modules/netinet_in, modules/poll:
1249         * modules/stdbool, modules/stdint, modules/sys_select:
1250         * modules/sys_socket, modules/sys_stat, modules/sysexits:
1251
1252 2006-09-06  Jim Meyering  <jim@meyering.net>
1253
1254         Make generated files be read-only.
1255         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
1256         Ensure that each generated file is now read-only.
1257         * modules/argz: Likewise.
1258         * modules/arpa_inet: Likewise.
1259         * modules/byteswap: Likewise.
1260         * modules/configmake: Likewise.
1261         * modules/fcntl: Likewise.
1262         * modules/fnmatch: Likewise.
1263         * modules/getopt: Likewise.
1264         * modules/glob: Likewise.
1265         * modules/inttypes: Likewise.
1266         * modules/netinet_in: Likewise.
1267         * modules/poll: Likewise.
1268         * modules/stdbool: Likewise.
1269         * modules/stdint: Likewise.
1270         * modules/sys_select: Likewise.
1271         * modules/sys_socket: Likewise.
1272         * modules/sys_stat: Likewise.
1273         * modules/sysexits: Likewise.
1274         * modules/localcharset: Same as above, but continue using temporary
1275         file named "t-$@" (why different?) rather than the "$@-t" used
1276         everywhere else.
1277
1278         * modules/sysexits (Makefile.am): Replace literal occurrences
1279         of "sysexit.h" more readable, and more consistent, "$@".
1280
1281 2006-09-06  Bruno Haible  <bruno@clisp.org>
1282
1283         * modules/striconv: New file.
1284         * modules/xstriconv: New file.
1285         * MODULES.html.sh (Internationalization functions): Add striconv,
1286         xstriconv.
1287
1288 2006-09-06  Bruno Haible  <bruno@clisp.org>
1289
1290         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
1291         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
1292         not using libtool correctly.
1293
1294 2006-09-06  Bruno Haible  <bruno@clisp.org>
1295
1296         * lib/striconv.h: New file.
1297         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
1298         iconvstring.c.
1299         * lib/xstriconv.h: New file.
1300         * lib/xstriconv.c: New file.
1301
1302 2006-09-06  Bruno Haible  <bruno@clisp.org>
1303
1304         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1305         lib_..._LDFLAGS.
1306
1307 2006-09-05  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1308
1309         * lib/argz_.h: Sync from Libtool.
1310
1311         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
1312                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1313
1314         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
1315
1316 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
1317
1318         * modules/trim: New file.
1319
1320 2006-09-05  Davide Angelocola <davide.angelocola@tiscali.it>
1321
1322         * lib/trim.h: New file.
1323         * lib/trim.c: New file.
1324
1325 2006-09-05  Bruno Haible  <bruno@clisp.org>
1326
1327         * MODULES.html.sh (String handling): Add trim.
1328
1329 2006-09-04  Karl Berry  <karl@gnu.org>
1330
1331         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
1332         until next release.
1333
1334 2006-09-03  Bruno Haible  <bruno@clisp.org>
1335
1336         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
1337         correctly.
1338
1339 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
1340
1341         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
1342         not gl_GETLOADAVG.  Omit unneeded semicolons.
1343         Problems reported by Ralf Wildenhues in
1344         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
1345         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
1346         at the end, which is the usual gnulib style.
1347
1348         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
1349         of doing all the work ourselves.
1350         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
1351         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
1352
1353 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
1354
1355         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
1356         Problem reported by Ralf Wildenhues in
1357         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
1358
1359         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
1360         HAVE_STRUCT_STATFS_F_FSTYPENAME.
1361
1362 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
1363
1364         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
1365         yesterday's patch by changing test -n to test -z.
1366
1367 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
1368
1369         * modules/getloadavg (Files): Add m4/getloadavg.m4.
1370         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
1371         the former is now obsolescent.
1372
1373         * modules/chdir-long (Depends-on): Add fcntl.
1374
1375 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
1376
1377         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
1378         obsolescent, and programs should use gnulib instead.
1379         * m4/getloadavg.m4: New file, with contents taken from Autoconf
1380         but with prefixes changed.
1381
1382 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
1383
1384         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
1385         or stdbool.h, because they might not exist while configuring.
1386
1387         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
1388         Don't include unistd.h or limits.h; not needed, since chdir-long.h
1389         does that for us.
1390         (O_DIRECTORY): Remove.
1391
1392 2006-08-31  Eric Blake  <ebb9@byu.net>
1393
1394         * gnulib-tool: Don't let emacs change spaces to TAB.
1395
1396 2006-08-31  Bruno Haible  <bruno@clisp.org>
1397
1398         * gnulib-tool: When calling func_import more than once, do it in a
1399         subshell.
1400         Reported by Eric Blake <ebb9@byu.net>.
1401
1402 2006-08-31  Bruno Haible  <bruno@clisp.org>
1403
1404         * gnulib-tool (nl): Remove variable.
1405         (sed_transform_lib_file): Use more robust test for config-h module.
1406         (func_import): Fix typo in 2006-08-25 patch.
1407
1408 2006-08-31  Bruno Haible  <bruno@clisp.org>
1409
1410         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
1411         specified, augment Makefile.am variables instead of assigning them.
1412
1413 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
1414
1415         Work around a bug in both the Linux and SunOS 64-bit kernels:
1416         nanosleep mishandles sleeps for longer than 2**31 seconds.
1417         Problem reported by Frank v Waveren in
1418         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
1419         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
1420         Check for nanosleep bug.
1421         (LIB_NANOSLEEP): Append clock_gettime library if needed.
1422
1423 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
1424
1425         Work around a bug in both the Linux and SunOS 64-bit kernels:
1426         nanosleep mishandles sleeps for longer than 2**31 seconds.
1427         Problem reported by Frank v Waveren in
1428         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
1429         * lib/nanosleep.c (BILLION): New constant.
1430         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
1431         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
1432         implementation.
1433
1434 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
1435
1436         * modules/nanosleep (Depends-on): Add gettime.
1437
1438 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
1439         and Simon Josefsson  <jas@extundo.com>
1440         and Oskar Liljeblad  <oskar@osk.mine.nu>
1441
1442         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
1443         * gnulib-tool (func_import): New license type 'unmodifiable license
1444         text'.
1445         * modules/fdl: Use it.  Longer description.
1446         * module/gpl, module/lgpl: New files.
1447
1448 2006-08-30  Jim Meyering  <jim@meyering.net>
1449
1450         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
1451         shadowing the parameter.
1452
1453 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1454
1455         Sync from Libtool:
1456
1457         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1458
1459         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
1460         sharing with gnulib.  Report by Eric Blake.
1461
1462 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
1463
1464         * modules/isapipe: New file.
1465         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
1466
1467 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
1468
1469         * modules/configmake (Makefile.am): Add a comment, and omit
1470         the CONFIGMAKE_ prefix from generated macro names.  Suggested
1471         by Bruno Haible.
1472
1473 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
1474
1475         * m4/isapipe.m4: New file.
1476
1477 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
1478
1479         * lib/isapipe.c, isapipe.h: New files.
1480
1481 2006-08-29  Jim Meyering  <jim@meyering.net>
1482
1483         * modules/configmake (Makefile.am): Make configmake.h depend on
1484         Makefile.  Otherwise, a stale configmake.h could hang around.
1485
1486 2006-08-29  Eric Blake  <ebb9@byu.net>
1487
1488         * lib/error.c (error_at_line, print_errno_message): Match libc, after
1489         resolution of upstream bug 3044.
1490
1491 2006-08-29  Bruno Haible  <bruno@clisp.org>
1492
1493         * modules/localcharset (Depends-on): Add configmake.
1494         (Makefile.am): Remove setting of LIBDIR through DEFS.
1495
1496 2006-08-29  Bruno Haible  <bruno@clisp.org>
1497
1498         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
1499         defined.
1500
1501 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
1502
1503         * modules/fcntl: New file.
1504         * modules/chdir-safer (Depends-on): Add fcntl.
1505         * modules/fts: Likewise.
1506         * modules/mkdir-p: Likewise.
1507
1508         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
1509         This undoes the most recent change, since we're now addressing the
1510         problem in a different way.
1511
1512         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
1513         into output, since the output might be called Makefile.am even
1514         if $makefile_name is something different.
1515         (func_import): Use $makefile_am rather than
1516         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
1517         empty.
1518
1519         * modules/inttypes (Files): Add m4/inttypes-h.m4.
1520
1521 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
1522
1523         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
1524         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
1525         recent change to stdint.m4, since we're now addressing the problem in a
1526         different way.
1527
1528 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
1529
1530         * m4/fcntl_h.m4: New file.
1531
1532 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
1533
1534         * lib/fcntl_.h: New file.
1535         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
1536         the fcntl module.
1537         * lib/dirchownmod.c: Likewise.
1538         * lib/fts.c: Likewise.
1539
1540         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
1541         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
1542         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
1543         just before including <inttypes.h>, to avoid circular inclusion.
1544
1545 2006-08-28  Jim Meyering  <jim@meyering.net>
1546
1547         * doc/visibility.texi: Actually read and correct the grammar of the
1548         sentence affected by yesterday's change.
1549
1550 2006-08-28  Eric Blake  <ebb9@byu.net>
1551
1552         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
1553         needs wrapper.
1554
1555 2006-08-28  Eric Blake  <ebb9@byu.net>
1556
1557         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
1558
1559 2006-08-28  Eric Blake  <ebb9@byu.net>
1560
1561         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
1562
1563 2006-08-28  Bruno Haible  <bruno@clisp.org>
1564
1565         * modules/c-strstr: New file, from GNU gettext.
1566         * MODULES.html.sh (String handling): Add c-strstr.
1567
1568 2006-08-28  Bruno Haible  <bruno@clisp.org>
1569
1570         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
1571         macros.
1572         Reported by Eric Blake.
1573
1574 2006-08-28  Bruno Haible  <bruno@clisp.org>
1575
1576         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
1577         (VASNPRINTF): Return a string of length > INT_MAX without failing.
1578         * lib/vasprintf.c: Include errno.h, limits.h.
1579         (EOVERFLOW): New fallback definition.
1580         (vasprintf): Test here whether the string length is > INT_MAX.
1581         * lib/vsnprintf.c: Include errno.h, limits.h.
1582         (EOVERFLOW): New fallback definition.
1583         (vsnprintf): Fix bug when generated string was too long for the buffer.
1584         Test here whether the string length is > INT_MAX.
1585
1586 2006-08-28  Bruno Haible  <bruno@clisp.org>
1587
1588         * lib/inttypes_.h (SCNX*): Remove definitions.
1589         Reported by Eric Blake.
1590
1591 2006-08-28  Bruno Haible  <bruno@clisp.org>
1592
1593         * lib/c-strstr.h: New file, from GNU gettext.
1594         * lib/c-strstr.c: New file, from GNU gettext.
1595
1596 2006-08-28  Bruno Haible  <bruno@clisp.org>
1597
1598         * gnulib-tool: Reorder some statements.
1599
1600 2006-08-28  Bruno Haible  <bruno@clisp.org>
1601
1602         * gnulib-tool: New option --makefile-name.
1603         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
1604         $makefile_name.
1605         (func_import): Write $makefile_name to the cache file, and read it from
1606         there unless explicitly specified. Use $makefile_name as file name
1607         instead of Makefile.am. Adjust the recommendations accordingly.
1608
1609 2006-08-28  Bruno Haible  <bruno@clisp.org>
1610
1611         * gnulib-tool (func_verify_module): Check against misapplying patch.
1612
1613 2006-08-28  Bruno Haible  <bruno@clisp.org>
1614
1615         * gnulib-tool (func_relativize, func_relconcat): New functions.
1616         Give an error if --local-dir is given with --update.
1617         Remove trailing slashes from $local_gnulib_dir.
1618         (func_import): Store the relativized $local_gnulib_dir in
1619         gnulib-cache.m4, and read it from there if not specified explicitly.
1620
1621 2006-08-28  Bruno Haible  <bruno@clisp.org>
1622
1623         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
1624         is the current directory. Respect also $local_gnulib_dir.
1625
1626 2006-08-28  Bruno Haible  <bruno@clisp.org>
1627             Simon Josefsson  <jas@extundo.com>
1628
1629         BeOS portability.
1630         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
1631
1632 2006-08-27  Jim Meyering  <jim@meyering.net>
1633
1634         * doc/visibility.texi: Remove duplicate word: "pointer".
1635
1636 2006-08-26  Bruno Haible  <bruno@clisp.org>
1637
1638         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
1639         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
1640         (Makefile.am): Create inttypes.h from inttypes_.h.
1641         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
1642
1643         * modules/imaxabs: New file.
1644
1645         * modules/imaxdiv: New file.
1646
1647 2006-08-26  Bruno Haible  <bruno@clisp.org>
1648
1649         * m4/inttypes.m4: New file.
1650         * m4/_inttypes_h.m4: Remove file.
1651         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
1652         PRI_MACROS_BROKEN.
1653         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
1654
1655         * m4/imaxabs.m4: New file.
1656
1657         * m4/imaxdiv.m4: New file.
1658
1659 2006-08-26  Bruno Haible  <bruno@clisp.org>
1660
1661         * lib/inttypes_.h: New file.
1662         * lib/inttypes.h: Remove file.
1663         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
1664
1665         * lib/imaxabs.c: New file.
1666
1667         * lib/imaxdiv.c: New file.
1668
1669 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
1670
1671         New config-h module, so that "make" output needn't be cluttered
1672         by -DHAVE_CONFIG_H.
1673         * MODULES.html.sh (Support for building libraries and executables):
1674         Add config-h.
1675         * modules/config-h: New file.
1676         * gnulib-tool (nl, sed_transform_lib_file): New vars.
1677         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
1678         the config-h module is used.
1679
1680         New configmake module, so that "make" output needn't be cluttered
1681         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
1682         * MODULES.html.sh (Support for building libraries and executables):
1683         Add configmake.
1684         * modules/configmake: New file.
1685
1686 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
1687
1688         * m4/config-h.m4: New file.
1689
1690 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
1691
1692         * config/srclist.txt: Add elisp-comp.
1693
1694 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
1695
1696         * MODULES.html.sh (Support for building libraries and executables):
1697         Add elisp-comp.
1698         * build-aux/elisp-comp: New file.
1699         * modules/elisp-comp: New file.
1700
1701 2006-08-24  Bruno Haible <bruno@clisp.org>
1702
1703         * gnulib-tool (func_create_testdir): Use non-default values of
1704         sourcebase and m4base.
1705
1706 2006-08-24  Bruno Haible <bruno@clisp.org>
1707
1708         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
1709         HTML structure.
1710
1711 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
1712
1713         * modules/openat (Depends-on): Add lchown.
1714
1715 2006-08-23  Bruno Haible <bruno@clisp.org>
1716
1717         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
1718         of gl_LOCK_EARLY instead of gl_LOCK.
1719
1720 2006-08-23  Bruno Haible  <bruno@clisp.org>
1721
1722         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
1723         on OSF/1 to no.
1724         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
1725
1726 2006-08-23  Bruno Haible  <bruno@clisp.org>
1727
1728         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
1729         as unusable.
1730
1731         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
1732         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
1733         (gl_LOCK): New macro.
1734
1735 2006-08-22  Simon Josefsson  <jas@extundo.com>
1736
1737         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
1738         to md5 module.
1739
1740 2006-08-22  Simon Josefsson  <jas@extundo.com>
1741
1742         * MODULES.html.sh: Add "Support for maintaining and release
1743         projects".
1744
1745         * build-aux/gnupload: New file, from coreutils.
1746
1747 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
1748
1749         Avoid the need for AC_LIBSOURCES in m4 macros.
1750         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
1751         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
1752         * modules/check-version (EXTRA_DIST): Add check-version.h.
1753         * modules/crc (EXTRA_DIST): Add crc.h.
1754         * modules/des (EXTRA_DIST): Add des.h.
1755         * modules/gc (EXTRA_DIST): Add gc.h.
1756         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
1757         * modules/getline (EXTRA_DIST): Add getline.h.
1758         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
1759         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
1760         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
1761         * modules/md2 (EXTRA_DIST): Add md2.h.
1762         * modules/md4 (EXTRA_DIST): Add md4.h.
1763         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
1764         * modules/read-file (EXTRA_DIST): Add read-file.h.
1765         * modules/readline (EXTRA_DIST): Add readline.h.
1766         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
1767         rijndael-api-fst.h.
1768
1769 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
1770
1771         * m4/rijndael.m4 (gl_ARCFOUR):
1772         * m4/arctwo.m4 (gl_ARCTWO):
1773         * m4/check-version.m4 (gl_CHECK_VERSION):
1774         * m4/crc.m4 (gl_CRC):
1775         * m4/des.m4 (gl_DES):
1776         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
1777         * m4/gc.m4 (gl_GC):
1778         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
1779         * m4/getline.m4 (gl_FUNC_GETLINE):
1780         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
1781         * m4/hmac-md5.m4 (gl_HMAC_MD5):
1782         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
1783         * m4/md2.m4 (gl_MD2):
1784         * m4/md4.m4 (gl_MD4):
1785         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
1786         * m4/read-file.m4 (gl_FUNC_READ_FILE):
1787         * m4/readline.m4 (gl_FUNC_READLINE):
1788         * m4/rijndael.m4 (gl_RIJNDAEL):
1789         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
1790         to get the necessary .h files and whatnot.
1791
1792 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
1793
1794         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
1795         gnulib rather than the other way around.
1796         * config/srclistvars.sh (COREUTILS): Remove.
1797
1798 2006-08-22  Jim Meyering  <jim@meyering.net>
1799
1800         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
1801
1802         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
1803
1804 2006-08-22  Eric Blake  <ebb9@byu.net>
1805
1806         * modules/regexprops-generic: New file.
1807         * MODULES.html.sh (Support for building documentation): List it.
1808
1809 2006-08-22  Eric Blake  <ebb9@byu.net>
1810
1811         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
1812         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
1813         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
1814         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
1815
1816 2006-08-22  Bruno Haible <bruno@clisp.org>
1817
1818         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
1819         and lib_LTLIBRARIES like the other lib_* variables.
1820
1821 2006-08-22  Bruno Haible <bruno@clisp.org>
1822
1823         * build-aux/x-to-1.in: New file, from GNU gettext.
1824
1825 2006-08-22  Bruno Haible  <bruno@clisp.org>
1826
1827         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
1828         <utmpx.h> exists.
1829
1830 2006-08-22  Bruno Haible  <bruno@clisp.org>
1831
1832         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
1833         <utmpx.h> exists.
1834
1835 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
1836
1837         BeOS portability.
1838         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
1839         exist.
1840         Problem reported by Bruno Haible.
1841
1842 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
1843
1844         Avoid the need for AC_LIBSOURCES in m4 macros.
1845         * modules/acl (EXTRA_DIST): Add acl.h.
1846         * modules/argmatch (Files): Add m4/argmatch.m4.
1847         (configure.ac): Add gl_ARGMATCH.
1848         (EXTRA_DIST): Renamed from lib_SOURCES, for
1849         consistency with the other modules.  Remove argmatch.c.
1850         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
1851         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
1852         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
1853         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
1854         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
1855         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
1856         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
1857         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
1858         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
1859         * modules/closeout (EXTRA_DIST): Add closeout.h.
1860         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
1861         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
1862         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
1863         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
1864         dirname.h; remove basename.c and stripslash.c.
1865         * modules/exclude (EXTRA_DIST): Add exclude.h.
1866         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
1867         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
1868         * modules/file-type (EXTRA_DIST): Add file-type.h.
1869         * modules/filemode (EXTRA_DIST): Add filemode.h.
1870         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
1871         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
1872         * modules/fpending (EXTRA_DIST): Add __fpending.h.
1873         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
1874         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
1875         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
1876         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
1877         * modules/getdate (EXTRA_DIST): Add getdate.c.
1878         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
1879         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
1880         * modules/getpass (EXTRA_DIST): Add getpass.h.
1881         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
1882         * modules/group-member (EXTRA_DIST): Add group-member.h.
1883         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
1884         * modules/hash (EXTRA_DIST): Add hash.h.
1885         * modules/human (EXTRA_DIST): Add human.h.
1886         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
1887         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
1888         * modules/lchown (EXTRA_DIST): Add lchown.h.
1889         * modules/long-options (EXTRA_DIST): Add long-options.h.
1890         * modules/lstat (EXTRA_DIST): Add lstat.h.
1891         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
1892         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
1893         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
1894         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
1895         * modules/memxor (EXTRA_DIST): Add memxor.h.
1896         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
1897         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
1898         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
1899         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
1900         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
1901         * modules/physmem (EXTRA_DIST): Add physmem.h.
1902         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
1903         * modules/posixver (EXTRA_DIST): Add posixver.h.
1904         * modules/quote (EXTRA_DIST): Add quote.h.
1905         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
1906         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
1907         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
1908         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
1909         regex_internal.h regexec.c.
1910         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
1911         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
1912         * modules/same (EXTRA_DIST): Add same.h.
1913         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
1914         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
1915         * modules/savedir (EXTRA_DIST): Add savedir.h.
1916         * modules/sha1 (EXTRA_DIST): Add sha1.h.
1917         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
1918         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
1919         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
1920         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
1921         * modules/strdup (EXTRA_DIST): Add strdup.h.
1922         * modules/strftime (EXTRA_DIST): Add strftime.h.
1923         * modules/strndup (EXTRA_DIST): Add strndup.h.
1924         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
1925         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
1926         * modules/time_r (EXTRA_DIST): Add time_r.h.
1927         * modules/timespec (EXTRA_DIST): Add timespec.h.
1928         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
1929         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
1930         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
1931         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
1932         * modules/userspec (EXTRA_DIST): Add userspec.h.
1933         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
1934         * modules/utimens (EXTRA_DIST): Add utimens.h.
1935         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
1936         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
1937         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
1938         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
1939         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
1940         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
1941         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
1942         * modules/yesno (EXTRA_DIST): Add yesno.h.
1943
1944 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
1945
1946         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
1947
1948         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
1949         * m4/dev-ino.m4, same-inode.m4: Remove.
1950
1951         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
1952         * m4/acl.m4 (AC_FUNC_ACL):
1953         * m4/backupfile.m4 (gl_BACKUPFILE):
1954         * m4/c-strtod.m4 (gl_C99_STRTOLD):
1955         * m4/canon-host.m4 (gl_CANON_HOST):
1956         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
1957         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
1958         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
1959         * m4/cloexec.m4 (gl_CLOEXEC):
1960         * m4/close-stream.m4 (gl_CLOSE_STREAM):
1961         * m4/closeout.m4 (gl_CLOSEOUT):
1962         * m4/dirfd.m4 (gl_FUNC_DIRFD):
1963         * m4/dirname.m4 (gl_DIRNAME):
1964         * m4/exclude.m4 (gl_EXCLUDE):
1965         * m4/exitfail.m4 (gl_EXITFAIL):
1966         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
1967         * m4/file-type.m4 (gl_FILE_TYPE):
1968         * m4/filemode.m4 (gl_FILEMODE):
1969         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
1970         * m4/fpending.m4 (gl_FUNC_FPENDING):
1971         * m4/fprintftime.m4 (gl_FPRINTFTIME):
1972         * m4/fts.m4 (gl_FUNC_FTS):
1973         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
1974         * m4/getdate.m4 (gl_GETDATE):
1975         * m4/gethrxtime.m4 (gl_GETHRXTIME):
1976         * m4/getpagesize.m4 (gl_GETPAGESIZE):
1977         * m4/getpass.m4 (gl_FUNC_GETPASS):
1978         * m4/gettime.m4 (gl_GETTIME):
1979         * m4/getugroups.m4 (gl_GETUGROUPS):
1980         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
1981         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
1982         * m4/hard-locale.m4 (gl_HARD_LOCALE):
1983         * m4/hash.m4 (gl_HASH):
1984         * m4/idcache.m4 (gl_IDCACHE):
1985         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
1986         * m4/lchown.m4 (gl_FUNC_LCHOWN):
1987         * m4/long-options.m4 (gl_LONG_OPTIONS):
1988         * m4/lstat.m4 (gl_FUNC_LSTAT):
1989         * m4/md5.m4 (gl_MD5):
1990         * m4/memcasecmp.m4 (gl_MEMCASECMP):
1991         * m4/memcoll.m4 (gl_MEMCOLL):
1992         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
1993         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
1994         * m4/memxor.m4 (gl_MEMXOR):
1995         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
1996         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
1997         * m4/modechange.m4 (gl_MODECHANGE):
1998         * m4/mountlist.m4 (gl_MOUNTLIST):
1999         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
2000         * m4/openat.m4 (gl_FUNC_OPENAT):
2001         * m4/pathmax.m4 (gl_PATHMAX):
2002         * m4/physmem.m4 (gl_PHYSMEM):
2003         * m4/posixtm.m4 (gl_POSIXTM):
2004         * m4/posixver.m4 (gl_POSIXVER):
2005         * m4/quote.m4 (gl_QUOTE):
2006         * m4/quotearg.m4 (gl_QUOTEARG):
2007         * m4/readtokens.m4 (gl_READTOKENS):
2008         * m4/readutmp.m4 (gl_READUTMP):
2009         * m4/regex.m4 (gl_REGEX):
2010         * m4/safe-read.m4 (gl_SAFE_READ):
2011         * m4/safe-write.m4 (gl_SAFE_WRITE):
2012         * m4/same.m4 (gl_SAME):
2013         * m4/save-cwd.m4 (gl_SAVE_CWD):
2014         * m4/savedir.m4 (gl_SAVEDIR):
2015         * m4/settime.m4 (gl_SETTIME):
2016         * m4/sha1.m4 (gl_SHA1):
2017         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
2018         * m4/stat-macros.m4 (gl_STAT_MACROS):
2019         * m4/stat-time.m4 (gl_STAT_TIME):
2020         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
2021         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
2022         * m4/strdup.m4 (gl_FUNC_STRDUP):
2023         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
2024         * m4/strndup.m4 (gl_FUNC_STRNDUP):
2025         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
2026         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
2027         * m4/time_r.m4 (gl_TIME_R):
2028         * m4/timespec.m4 (gl_TIMESPEC):
2029         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
2030         * m4/unlinkdir.m4 (gl_UNLINKDIR):
2031         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
2032         * m4/userspec.m4 (gl_USERSPEC):
2033         * m4/utimecmp.m4 (gl_UTIMECMP):
2034         * m4/utimens.m4 (gl_UTIMENS):
2035         * m4/xalloc.m4 (gl_XALLOC):
2036         * m4/xgetcwd.m4 (gl_XGETCWD):
2037         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
2038         * m4/xreadlink.m4 (gl_XREADLINK):
2039         * m4/xstrtod.m4 (gl_XSTRTOD):
2040         * m4/yesno.m4 (gl_YESNO):
2041         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
2042         to get the necessary .h files and whatnot.
2043
2044 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
2045             Bruno Haible <bruno@clisp.org>
2046
2047         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
2048         /bin/sh understanding of '!' conditional negation.
2049
2050 2006-08-21  Jim Meyering  <jim@meyering.net>
2051
2052         * modules/openat (Depends-on): Really alphabetize.
2053
2054         * modules/acl (Depends-on): Add error and quote.
2055
2056         * check-module (find_included_lib_files): Add at-func.c to the
2057         ok-to-include-more-than-once white list.
2058
2059         * modules/openat (Depends-on): Add lstat.  Alphabetize.
2060
2061 2006-08-21  Bruno Haible <bruno@clisp.org>
2062
2063         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2064         Emit a pkgdata_DATA variable only if some snippets add contents to it.
2065         Reported by Martin Lambers <marlam@marlam.de>.
2066
2067 2006-08-21  Bruno Haible <bruno@clisp.org>
2068
2069         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
2070         specify an installation location, don't emit a noinst_LIBRARIES or
2071         noinst_LTLIBRARIES assignment.
2072
2073 2006-08-21  Bruno Haible  <bruno@clisp.org>
2074
2075         BeOS portability.
2076         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
2077         BeOS has mbrtowc() but no <wctype.h>.
2078
2079 2006-08-21  Bruno Haible  <bruno@clisp.org>
2080
2081         BeOS portability.
2082         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
2083         exist.
2084
2085 2006-08-21  Bruno Haible  <bruno@clisp.org>
2086
2087         BeOS portability.
2088         * lib/mbchar.h: Include <wctype.h> only if it exists.
2089
2090 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2091
2092         Remove files that are no longer needed by their respective modules.
2093         * m4/obstack.m4: Remove.
2094         * m4/strerror_r.m4: Remove.
2095         * m4/uint32_t.m4: Remove.
2096         * m4/uintptr_t.m4: Remove.
2097         * m4/ullong_max.m4: Remove.
2098         * m4/xstrtoimax.m4: Remove.
2099         * m4/xstrtoumax.m4: Remove.
2100
2101         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
2102         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
2103         dependencies now capture this.
2104
2105         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
2106         Do not use AC_LIBSOURCES, since gnulib modules now do this.
2107         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
2108         * m4/human.m4 (gl_HUMAN): Likewise.
2109         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
2110         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
2111
2112         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
2113
2114         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
2115         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
2116         stdint.
2117         * m4/human.m4 (gl_HUMAN): Likewise.
2118         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
2119         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
2120         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
2121         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
2122         * m4/xstrtol (gl_XSTRTOL): Likewise.
2123
2124         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
2125         AC_TYPE_LONG_LONG_INT.
2126         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
2127         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
2128         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
2129         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
2130
2131         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
2132         on stdbool.
2133
2134         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
2135         (gl_PREREQ_XSTRTOUL): Remove.
2136
2137         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
2138
2139         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
2140         mode.
2141
2142 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2143
2144         Add and change modules to make it easier for coreutils to use
2145         gnulib-tool.
2146         * modules/backupfile (Files): Remove m4/d-ino.m4.
2147         (Depends-on): Add d-ino.
2148         * modules/cycle-check (Depends-on): Add stdint.
2149         (lib_SOURCES): Add cycle-check.h.
2150         * modules/d-ino: New module.
2151         * modules/d-type: New module.
2152         * modules/error (Files): Remove m4/strerror_r.m4.
2153         * modules/filemode (Files): Add m4/st_dm_mode.m4.
2154         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2155         m4/inttypes_h.m4, m4/uintmax_t.m4.
2156         (Depends-on): Add stdint.
2157         (lib_SOURCES): Add fsusage.h.
2158         * modules/getcwd (Files): Remove d-ino.m4.
2159         (Depends-on): Add d-ino.
2160         * modules/getndelim2 (Depends-on): Add stdint.
2161         * modules/glob (Files): Remove m4/d-type.m4.
2162         (Depends-on): Add d-type.
2163         * modules/host-os: New module.
2164         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
2165         m4/inttypes_h.m4, m4/uintmax_t.m4.
2166         * Depends-on: Add stdint.
2167         (lib_SOURCES): Add human.h.
2168         * modules/inttostr (Files): Remove m4/intmax_t.m4,
2169         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
2170         m4/uintmax_t.m4, m4/ulonglong.m4.
2171         (Depends-on): Add stdint.
2172         (EXTRA_DIST): Add inttostr.h.
2173         * modules/lchmod: New module.
2174         * modules/link-follow: New module.
2175         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
2176         (Depends-on): Add lchmod.
2177         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
2178         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
2179         (Depends-on): Add stdint.
2180         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
2181         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
2182         (Depends-on): Add stdint.
2183         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
2184         * modules/perl: New module.
2185         * modules/regex (Depends-on): Add stdint.
2186         * modules/rmdir-errno: New module.
2187         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
2188         m4/intmax_t.m4.
2189         (Depends-on): Add stdint.
2190         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
2191         m4/uintmax_t.m4.
2192         (Depends-on): Add stdint.
2193         * modules/unlink-busy: New module.
2194         * modules/utimecmp (Depends-on): Add stdint.
2195         * modules/uptime: New module.
2196         * modules/winsz-ioctl: New module.
2197         * modules/winsz-termios: New module.
2198         * modules/xnanosleep (Depends-on): Add nanosleep.
2199         * modules/ullong_max: Remove.
2200         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
2201         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
2202         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
2203         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
2204         (Depends-on): Add inttypes.
2205         (lib_SOURCES): Add xstrtol.h.
2206         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
2207         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
2208         * MODULES.html.sh: Move 'assert' into the assert section.
2209         Move 'dummy' into the linking section.
2210         Remove ullong_max.
2211         Add section for compatibility checks for POSIX:2001 functions,
2212         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
2213         winsz-ioctl, and winsz-termios into it.
2214         Add lchmod.
2215         Add top-level Misc section and put host-os, perl, and uptime
2216         into it.
2217
2218 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
2219
2220         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
2221         now assume the stdint module.  Do not include inttypes.h.
2222         * lib/fsusage.h: Likewise.
2223         * lib/getndelim2.c: Likewise.
2224         * lib/human.h: Likewise.
2225         * lib/inttostr.h: Likewise.
2226         * lib/obstack.c: Likewise.
2227         * lib/regex_internal.h: Likewise.
2228         * lib/tempname.c: Likewise.
2229         * lib/utimecmp.c: Likewise.
2230         * lib/xstrtol.h: Likewise.
2231
2232         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
2233
2234         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
2235         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
2236         * lib/xtime.h: Likewise.
2237
2238 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
2239
2240         * modules/openat (Files): Add lib/fchmodat.c.
2241         Fixes problem reported by Jay Youngman.
2242
2243 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
2244
2245         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
2246         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
2247
2248 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
2249             Bruno Haible  <bruno@clisp.org>
2250
2251         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
2252         and is a script that invokes bison. Tighten the code. Add comments.
2253
2254 2006-08-18  Jim Meyering  <jim@meyering.net>
2255
2256         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
2257         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
2258         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
2259         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
2260
2261 2006-08-18  Bruno Haible  <bruno@clisp.org>
2262
2263         * modules/bison-i18n: New file.
2264         * MODULES.html.sh (Internationalization functions): Add it.
2265
2266 2006-08-18  Bruno Haible  <bruno@clisp.org>
2267
2268         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
2269         sys/statvfs.h. When getmntinfo was found, check its declaration and
2270         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
2271
2272 2006-08-18  Bruno Haible  <bruno@clisp.org>
2273
2274         * m4/bison-i18n.m4: New file, from bison.
2275
2276 2006-08-18  Bruno Haible  <bruno@clisp.org>
2277
2278         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
2279         (ME_DUMMY): Treat "kernfs" as a dummy.
2280         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
2281
2282 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
2283
2284         Update from coreutils.
2285
2286         2006-08-15  Jim Meyering  <jim@meyering.net>
2287
2288         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
2289
2290         2006-01-17  Jim Meyering  <jim@meyering.net>
2291
2292         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
2293
2294         2006-01-11  Jim Meyering  <jim@meyering.net>
2295
2296         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
2297         Check for the lchmod function.
2298
2299 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
2300
2301         Update from coreutils.
2302
2303         * lib/__fpending.h: Add copyright notice.
2304         * lib/fprintftime.h: Likewise.
2305         * lib/savedir.c: Use (C) in copyright notice.
2306         * lib/savedir.h: Likewise.
2307
2308         2006-08-15  Jim Meyering  <jim@meyering.net>
2309
2310         * lib/at-func.c: New file, with the logic of all emulated at-functions.
2311         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
2312         in support of the EXPECTED_ERRNO macro.
2313         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
2314         definitions.  Instead, define the appropriate symbols and include
2315         "at-func.c".
2316         * lib/mkdirat.c (mkdirat): Likewise.
2317         * lib/fchmodat.c (fchmodat): Likewise.
2318         (ENOSYS): Remove definition.
2319         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
2320         it.  Don't include "unistd--.h" -- it wasn't ever used.
2321
2322         2006-01-17  Jim Meyering  <jim@meyering.net>
2323
2324         Rewrite fts.c not to change the current working directory,
2325         by using openat, fstatat, fdopendir, etc..
2326
2327         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
2328         (HAVE_OPENAT_SUPPORT): Define.
2329         [_LIBC] (fchdir): Don't undef or define; no longer used.
2330         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
2331         Now, this `function' always succeeds, and consumes its file descriptor
2332         parameter -- so callers must not close such FDs.  Update callers.
2333         (diropen_fd, opendirat, cwd_advance_fd): New functions.
2334         (diropen): Add parameter, SP.  Adjust all callers.
2335         Implement using diropen_fd, rather than open.
2336         (fts_open): Initialize new member, fts_cwd_fd.
2337         Remove fts_rft-setting code.
2338         (fts_close): Close fts_cwd_fd, if necessary.
2339         (__opendir2): Define in terms of opendir or opendirat,
2340         depending on whether the FST_NOCHDIR flag is set.
2341         (fts_build): Since fts_safe_changedir consumes its FD, and since
2342         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
2343         and close the dup'd file descriptor upon failure.
2344         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
2345         (fts_safe_changedir): Tweak semantics to reflect that this function
2346         now calls cwd_advance_fd and hence consumes its FD argument.
2347         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
2348         [struct FTS] (fts_rft): Remove now-unused member.
2349         [struct FTS] (fts_cycle.state): Improve comment.
2350
2351         * lib/openat.c (openat_needs_fchdir): New function.
2352         * lib/openat.h (openat_needs_fchdir): Declare it.
2353
2354 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
2355
2356         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
2357         Problem and fix reported by Pádraig Brady in
2358         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
2359
2360 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2361
2362         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
2363
2364 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2365
2366         * lib/memcoll.c (memcoll): Optimize for the common case where the
2367         arguments are bytewise equal.
2368
2369 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
2370
2371         * doc/regexprops-generic.texi: Add a copyright notice.
2372
2373 2006-08-15  Bruno Haible  <bruno@clisp.org>
2374
2375         * modules/tmpdir (License): Change to LGPL.
2376
2377 2006-08-15  Bruno Haible  <bruno@clisp.org>
2378
2379         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
2380         module.
2381
2382 2006-08-14  Simon Josefsson  <jas@extundo.com>
2383
2384         * config/srclist.txt: Add gnupload.
2385
2386 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
2387
2388         Change copyright notice from LGPL 2 to GPL 2, since that's the
2389         standard form used in the gnulib repository.
2390         * tests/test-lock.c: Likewise.
2391         * tests/test-stdint.c: Likewise.
2392         * tests/test-tls.c: Likewise.
2393
2394         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
2395         prelude-manager.  User shorter URLs for GNU projects, without '?'.
2396         Add copyright notice.
2397
2398         * check-module: Add copyright notice.  Output a copyright
2399         notice if "--version" is specified.
2400         * modules/COPYING: New file.
2401         * tests/test-getaddrinfo.c: Add copyright notice.
2402         * tests/test-verify.c: Likewise.
2403
2404 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
2405
2406         Change copyright notice from LGPL 2 to GPL 2, since that's the
2407         standard form used in the gnulib repository.
2408         * lib/lock.c: LGPL -> GPL.
2409         * lib/lock.h: Likewise.
2410         * lib/strnlen1.c: Likewise.
2411         * lib/strnlen1.h: Likewise.
2412         * lib/tls.c: Likewise.
2413         * lib/tls.h: Likewise.
2414         * lib/tmpdir.c: Likewise.
2415
2416         * lib/TODO: Remove; this belongs only in coreutils.
2417
2418 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
2419
2420         Add copyright notices to long-enough files that lack them, since
2421         otherwise the files aren't clearly free.  Use the same notice that
2422         getdate.texi already uses.
2423         * doc/alloca-opt.texi: Add copyright notice.
2424         * doc/alloca.texi: Likewise.
2425         * doc/ctime.texi: Likewise.
2426         * doc/functions.texi: Likewise.
2427         * doc/gcd.texi: Likewise.
2428         * doc/gnulib-tool.texi: Likewise.
2429         * doc/inet_ntoa.texi: Likewise.
2430         * doc/visibility.texi: Likewise.
2431
2432         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
2433         * doc/quote.texi: Add copyright notice.
2434
2435         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
2436         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
2437         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
2438         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
2439         is now obsolete, and give a pointer to the Sun list.
2440         Add copyright notice.
2441
2442 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
2443
2444         * config/srclistvars.sh: Add copyright notice.
2445
2446 2006-08-14  Eric Blake  <ebb9@byu.net>
2447
2448         Import the following change from libc:
2449
2450         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2451
2452         Upstream bug 2997.
2453         * lib/misc/error.c: Add space between program name and message if file
2454         name is missing.
2455
2456 2006-08-12  Karl Berry  <karl@gnu.org>
2457
2458         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
2459         remove, these originate in gnulib now.
2460
2461 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2462
2463         * doc/Makefile (standards.info standards.html standards.dvi):
2464         Also depend on make-stds.texi.
2465
2466 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
2467
2468         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
2469         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
2470
2471         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
2472         in wchar_t.  Problem reported by Eric Blake.
2473
2474         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
2475         LEN is smaller than SIZE.  Suggested by Bruno Haible.
2476         Also, help the compiler to keep LEN in a register.
2477
2478 2006-08-11  Eric Blake  <ebb9@byu.net>
2479
2480         * users.txt: Sort.  Add tar.
2481
2482 2006-08-11  Bruno Haible  <bruno@clisp.org>
2483
2484         * users.txt: New file.
2485
2486 2006-08-11  Bruno Haible  <bruno@clisp.org>
2487
2488         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
2489         before <wchar.h>. Needed for OSF/1 and BSD/OS.
2490
2491 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
2492
2493         * modules/snprintf (Depends-on): Remove minmax.
2494         (Maintainer): Add self and Bruno.
2495
2496 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
2497
2498         * lib/.cppi-disable: Add snprintf.h, socket_.h.
2499         * lib/snprintf.c: Include <errno.h> and <limits.h>.
2500         (EOVERFLOW): Define if the system does not.
2501         Do not include "minmax.h"; it wasn't used.
2502         (snprintf): Don't assume size_t promotes to an unsigned type.
2503         Fix bug when generated string was too long for the buffer: the
2504         buffer's contents are supposed to be the initial prefix of the
2505         output.  Don't assume vasnprintf returns EOVERFLOW if the size
2506         exceeds INT_MAX; do the check ourselves.
2507
2508         Import the following changes from libc:
2509
2510         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
2511
2512         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
2513         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
2514         set wc to the byte which couldn't be converted.
2515         (re_string_reconstruct): Don't clear valid_raw_len before calling
2516         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
2517         tip_context using re_string_context_at.
2518
2519         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
2520
2521         * lib/posix/regex.h: g++ still cannot handled [restrict].
2522
2523         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
2524
2525         * lib/posix/regex.h: Remove special handling for VMS.
2526
2527 2006-08-10  Jim Meyering  <jim@meyering.net>
2528
2529         * modules/same-inode: New module.
2530         * modules/dev-ino: New module.
2531         * modules/cycle-check: Depend on these modules, rather than simply
2532         including their .h files.
2533         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
2534         required via m4/cycle-check.m4.
2535         * modules/same: Depend on new same-inode module, rather than
2536         including same-inode.h.
2537         * modules/chdir-safer: New file.
2538
2539         * modules/chown (Depends-on): Add stat-macros.
2540
2541 2006-08-10  Jim Meyering  <jim@meyering.net>
2542
2543         * m4/cycle-check.m4: New file.
2544         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
2545         * m4/dev-ino.m4, same-inode.m4: New files.
2546
2547 2006-08-10  Eric Blake  <ebb9@byu.net>
2548
2549         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
2550         in from original proposal.
2551
2552 2006-08-10  Eric Blake  <ebb9@byu.net>
2553         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2554
2555         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
2556         namespace.
2557
2558 2006-08-10  Bruno Haible  <bruno@clisp.org>
2559
2560         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
2561         as well.
2562
2563 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
2564
2565         Sync from coreutils.
2566
2567         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
2568
2569         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
2570         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
2571
2572 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
2573
2574         * modules/restrict: Remove; no longer needed now that we assume
2575         Autoconf 2.59 or later.
2576         * MODULES.html.sh: Remove 'restrict'.
2577         * modules/argp (Depends-on): Remove 'restrict'.
2578         * modules/base64 (Depends-on): Likewise.
2579         * modules/gc (Depends-on): Likewise.
2580         * modules/getaddrinfo (Depends-on): Likewise.
2581         * modules/glob (Depends-on): Likewise.
2582         * modules/inet_ntop (Depends-on): Likewise.
2583         * modules/inet_pton (Depends-on): Likewise.
2584         * modules/memxor (Depends-on): Likewise.
2585         * modules/regex (Depends-on): Likewise.
2586         * modules/strtok_r (Depends-on): Likewise.
2587         * modules/time_r (Depends-on): Likewise.
2588
2589 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
2590
2591         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
2592         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
2593         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
2594         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
2595         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
2596         * m4/memxor.m4 (gl_MEMXOR): Likewise.
2597         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
2598         gl_C_RESTRICT replaced by AC_C_RESTRICT.
2599
2600         Merge from coreutils.
2601         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
2602         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
2603         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2604         * m4/time_r.m4 (gl_TIME_R): Likewise.
2605
2606 2006-08-09  Karl Berry  <karl@gnu.org>
2607
2608         * config/srclist.txt: no more gettext-tools, per Bruno.
2609
2610 2006-08-08  Eric Blake  <ebb9@byu.net>
2611
2612         * modules/verror: New module.
2613         * MODULES.html.sh: Document it.
2614
2615 2006-08-08  Eric Blake  <ebb9@byu.net>
2616
2617         * lib/verror.h, verror.c: New files.
2618
2619 2006-08-08  Eric Blake  <ebb9@byu.net>
2620
2621         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
2622         verror_at_line output complies with GNU Coding Standards even when
2623         file is NULL.
2624
2625 2006-08-07  Bruno Haible  <bruno@clisp.org>
2626
2627         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
2628         versions of AIX.
2629         Reported by Ralf Wildenhues.
2630
2631 2006-08-07  Bruno Haible  <bruno@clisp.org>
2632
2633         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
2634         in an AC_DEFUN. Needed so that the autoconf snippets can use
2635         AC_REQUIRE.
2636
2637 2006-08-06  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2638
2639         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2640         Initialize pkgdata_DATA.
2641         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
2642         overriding it.
2643
2644 2006-08-06  Eric Blake  <ebb9@byu.net>
2645
2646         * lib/error.h: Fold in some upstream changes from glibc.
2647         * lib/error.c: Likewise.
2648
2649 2006-08-04  Bruno Haible  <bruno@clisp.org>
2650
2651         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2652         Make the mostlyclean-local rule depend on mostlyclean-generic.
2653         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
2654
2655 2006-07-31  Bruno Haible  <bruno@clisp.org>
2656
2657         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
2658         <stdlib.h>, <string.h>.
2659
2660 2006-07-30  Bruno Haible  <bruno@clisp.org>
2661
2662         * modules/readlink (License): Change to LGPL.
2663
2664 2006-07-30  Bruno Haible  <bruno@clisp.org>
2665
2666         * modules/javaversion (Makefile.am): Distribute javaversion.java and
2667         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
2668         set PKGDATADIR to point to it.
2669
2670 2006-07-30  Bruno Haible  <bruno@clisp.org>
2671
2672         * modules/csharpexec (configure.ac): Comment out macro invocation.
2673         * modules/javaexec (configure.ac): Likewise.
2674         * modules/javacomp-script (configure.ac): Likewise.
2675
2676         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
2677
2678 2006-07-30  Bruno Haible  <bruno@clisp.org>
2679
2680         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
2681         linked-list.
2682
2683 2006-07-30  Bruno Haible  <bruno@clisp.org>
2684
2685         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
2686
2687 2006-07-30  Bruno Haible  <bruno@clisp.org>
2688
2689         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2690         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
2691         get removed.
2692
2693 2006-07-29  Bruno Haible  <bruno@clisp.org>
2694
2695         Make it possible for gnulib-tool to work with locally modified or
2696         augmented gnulib repositories.
2697         * gnulib-tool (func_usage): Document --local-dir option.
2698         (local_gnulib_dir): New variable.
2699         Handle --local-dir option.
2700         (func_lookup_file): New function.
2701         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
2702         (func_get_description, func_get_filelist, func_get_description,
2703         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
2704         func_get_automake_snippet, func_get_include_directive,
2705         func_get_license, func_get_maintainer): Use func_lookup_file.
2706         (func_import, func_create_testdir): Use func_lookup_file.
2707
2708 2006-07-29  Bruno Haible  <bruno@clisp.org>
2709
2710         * modules/setenv (Depends-on): Add unistd.
2711
2712 2006-07-29  Bruno Haible  <bruno@clisp.org>
2713
2714         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
2715
2716 2006-07-29  Bruno Haible  <bruno@clisp.org>
2717
2718         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
2719
2720 2006-07-29  Bruno Haible  <bruno@clisp.org>
2721
2722         * gnulib-tool (import, update): If there is no Makefile.am, look at
2723         aclocal.m4, instead of bailing out.
2724
2725 2006-07-29  Bruno Haible  <bruno@clisp.org>
2726
2727         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
2728         Categorize the options by when they are useful.
2729
2730 2006-07-29  Bruno Haible  <bruno@clisp.org>
2731
2732         * gnulib-tool (func_usage): Document option --no-libtool.
2733         Handle option --no-libtool.
2734         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
2735         for changed semantics of $libtool variable.
2736         (func_import): Likewise. If libtool is not used, show this through
2737         an option --no-libtool.
2738         (func_create_testdir): Update.
2739
2740 2006-07-29  Bruno Haible  <bruno@clisp.org>
2741
2742         * gnulib-tool (func_import): Extend error message about missing
2743         --doc-base.
2744
2745 2006-07-29  Bruno Haible  <bruno@clisp.org>
2746
2747         * gnulib-tool (func_import): Don't create the $docbase directory if
2748         there is no file to store there.
2749
2750 2006-07-29  Bruno Haible  <bruno@clisp.org>
2751
2752         * gnulib-tool (autoconf_minversion): If a --dir option is given and
2753         relevant, look for configure.ac there, not in the current directory.
2754         Also use a simple search for AC_PREREQ, not "autoconf --trace".
2755
2756 2006-07-29  Bruno Haible  <bruno@clisp.org>
2757
2758         * gnulib-tool (SORT): New variable.
2759         (func_usage): Undocument --assume-autoconf option.
2760         Remove --assume-autoconf option handling.
2761         (autoconf_minversion): Determine from the contents of configure.ac.
2762         (func_import): Remove autoconf_minversion handling.
2763         Suggested by Eric Blake.
2764
2765 2006-07-29  Bruno Haible  <bruno@clisp.org>
2766
2767         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
2768
2769 2006-07-29  Bruno Haible  <bruno@clisp.org>
2770
2771         * config/srclist.txt (*setenv.[ch]): Remove rules.
2772
2773 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2774
2775         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
2776
2777 2006-07-28  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2778
2779         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
2780         arpa/inet.h.
2781
2782 2006-07-28  Simon Josefsson  <jas@extundo.com>
2783
2784         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
2785         * modules/inet_pton (Depends-on): Likewise.
2786
2787 2006-07-28  Simon Josefsson  <jas@extundo.com>
2788
2789         * m4/netinet_in_h.m4: New file.
2790
2791 2006-07-28  Simon Josefsson  <jas@extundo.com>
2792
2793         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
2794         #include's.
2795
2796 2006-07-28  Simon Josefsson  <jas@extundo.com>
2797
2798         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
2799         #include's.
2800
2801 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
2802
2803         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
2804         setgid on directories only if they set these bits.
2805         * lib/modechange.h: Remove obsolete comment about masks.
2806
2807 2006-07-28  Eric Blake  <ebb9@byu.net>
2808
2809         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
2810         macro expansion.
2811
2812 2006-07-28  Bruno Haible <bruno@clisp.org>
2813
2814         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
2815
2816 2006-07-28  Bruno Haible  <bruno@clisp.org>
2817
2818         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
2819
2820 2006-07-28  Bruno Haible  <bruno@clisp.org>
2821
2822         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
2823         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
2824         Define fallbacks.
2825         Avoids link error on FreeBSD 4.x.
2826         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
2827
2828         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
2829         encoding.
2830         * lib/mbswidth.c (iswcntrl): Likewise.
2831
2832 2006-07-27  Bruno Haible  <bruno@clisp.org>
2833
2834         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
2835         test.
2836
2837 2006-07-27  Bruno Haible  <bruno@clisp.org>
2838
2839         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
2840         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
2841         defined.
2842
2843 2006-07-26  Eric Blake  <ebb9@byu.net>
2844
2845         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
2846
2847 2006-07-26  Eric Blake  <ebb9@byu.net>
2848
2849         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
2850         like mingw that lack mkstemp.
2851         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
2852         avoid compilation warning on mingw.
2853
2854 2006-07-26  Bruno Haible  <bruno@clisp.org>
2855
2856         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
2857         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
2858         INT_FAST*_MIN, INTPTR_MIN.
2859
2860 2006-07-25  Bruno Haible  <bruno@clisp.org>
2861
2862         * modules/version-etc (Depends-on): Add stdarg.
2863
2864 2006-07-25  Bruno Haible  <bruno@clisp.org>
2865
2866         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
2867         complex commands.
2868
2869 2006-07-25  Bruno Haible  <bruno@clisp.org>
2870
2871         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
2872         defined in <stdarg.h> or config.h.
2873
2874 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
2875
2876         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
2877         (gl_STDIO_SAFER): Remove.
2878
2879 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
2880
2881         * MODULES.html.sh (File stream based Input/Output):
2882         Add fopen-safer, tmpfile-safer; remove stdio-safer.
2883         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
2884         * modules/fopen-safer, modules/tmpfile-safer: New files.
2885         * modules/stdio-safer: Remove.
2886
2887 2006-07-24  Bruno Haible  <bruno@clisp.org>
2888
2889         * modules/tmpdir: New file.
2890         * MODULES.html.sh (File system functions): Add it.
2891
2892 2006-07-24  Bruno Haible  <bruno@clisp.org>
2893
2894         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
2895         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
2896
2897 2006-07-24  Bruno Haible  <bruno@clisp.org>
2898
2899         * modules/clean-temp: New file.
2900
2901 2006-07-24  Bruno Haible  <bruno@clisp.org>
2902
2903         * m4/tmpdir.m4: New file, from GNU gettext.
2904
2905 2006-07-24  Bruno Haible  <bruno@clisp.org>
2906
2907         * lib/tmpdir.h: New file, from GNU gettext.
2908         * lib/tmpdir.c: New file, from GNU gettext.
2909
2910 2006-07-24  Bruno Haible  <bruno@clisp.org>
2911
2912         * lib/clean-temp.h: New file, from GNU gettext.
2913         * lib/clean-temp.c: New file, from GNU gettext.
2914
2915 2006-07-23  Eric Blake  <ebb9@byu.net>
2916
2917         * modules/stdio-safer (Files): Add tmpfile-safer.c.
2918         (Depends-on): Add binary-io.
2919
2920 2006-07-23  Eric Blake  <ebb9@byu.net>
2921
2922         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
2923
2924 2006-07-23  Eric Blake  <ebb9@byu.net>
2925
2926         * lib/tmpfile-safer.c: New file.
2927         * lib/stdio-safer.h (fopen_safer): Add prototype.
2928         * lib/stdio--.h (tmpfile): Make safer.
2929
2930 2006-07-23  Bruno Haible  <bruno@clisp.org>
2931
2932         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
2933         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
2934         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
2935         gl_linked_remove_at): Use it.
2936
2937 2006-07-22  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
2938         and Simon Josefsson <jas@extundo.com>
2939
2940         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
2941
2942         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
2943
2944 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
2945
2946         * modules/close-stream: New file.
2947         * modules/closeout (Description): Make it clear that it exits
2948         with a diagnostic on error.
2949         (Depends-on): Add close-stream.  Remove fpending, stdbool.
2950         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
2951
2952 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
2953
2954         * m4/close-stream.m4: New file.
2955
2956 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
2957
2958         * lib/close-stream.c, close-stream.h: New files.
2959
2960 2006-07-22  Bruno Haible  <bruno@clisp.org>
2961
2962         Merge from GNU gettext 0.15.
2963
2964         2006-05-01  Bruno Haible  <bruno@clisp.org>
2965
2966                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
2967
2968         2006-07-22  Bruno Haible  <bruno@clisp.org>
2969
2970                 * modules/javaversion: New file.
2971                 * MODULES.html.sh (Java): Add javaversion.
2972
2973         2006-03-12  Bruno Haible  <bruno@clisp.org>
2974
2975                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
2976
2977         2005-12-04  Bruno Haible  <bruno@clisp.org>
2978
2979                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
2980                 (untested).
2981
2982         2006-06-21  Bruno Haible  <bruno@clisp.org>
2983
2984                 Avoid warnings from recent versions of mcs.
2985                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
2986                 -o, -L, -r any more. Use options documented since mcs-1.0
2987                 instead. Similarly for -g.
2988
2989         2005-12-04  Bruno Haible  <bruno@clisp.org>
2990
2991                 * build-aux/csharpcomp.sh.in: Suffix for resources is
2992                 .resources, not .resource.
2993
2994         2005-07-09  Bruno Haible  <bruno@clisp.org>
2995
2996                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
2997                 add a .dll suffix.
2998                 Reported by Mark Junker <mjscod@gmx.de>.
2999
3000         2006-07-22  Bruno Haible  <bruno@clisp.org>
3001
3002                 * modules/gettext: Upgrade to gettext-0.15.
3003                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
3004                 m4/visibility.m4.
3005                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
3006
3007 2006-07-22  Bruno Haible  <bruno@clisp.org>
3008
3009         Merge from GNU gettext 0.15.
3010
3011         2006-03-25  Bruno Haible  <bruno@clisp.org>
3012
3013                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
3014
3015         2006-07-21  Bruno Haible  <bruno@clisp.org>
3016
3017                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
3018                 "1.1".
3019
3020         2006-05-09  Bruno Haible  <bruno@clisp.org>
3021
3022                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
3023                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
3024                 for the conftestver execution.
3025
3026         2006-05-01  Bruno Haible  <bruno@clisp.org>
3027
3028                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
3029                 optional target-version argument. Verify that the compiler
3030                 groks source of the specified source-version, or add -source
3031                 option as necessary. Verify that the compiler produces
3032                 bytecode in the specified target-version, or add -target and
3033                 -source options as necessary. Make the result of the test
3034                 available as variable CONF_JAVAC. Also log error output in
3035                 config.log.
3036
3037         2006-03-11  Bruno Haible  <bruno@clisp.org>
3038
3039                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
3040
3041         2006-05-09  Bruno Haible  <bruno@clisp.org>
3042
3043                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
3044                 CLASSPATH_SEPARATOR to a semicolon.
3045
3046         2006-03-12  Bruno Haible  <bruno@clisp.org>
3047
3048                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
3049                 available as variable CONF_JAVA, for subsequent autoconf
3050                 tests. Also log error output in config.log.
3051
3052         2006-07-19  Bruno Haible  <bruno@clisp.org>
3053
3054                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
3055                 that getline works on glibc2 systems. Needed to avoid trouble
3056                 in relocatable.c.
3057                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
3058
3059         2005-12-04  Bruno Haible  <bruno@clisp.org>
3060
3061                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
3062                 launcher (untested).
3063
3064         2005-12-04  Bruno Haible  <bruno@clisp.org>
3065
3066                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
3067
3068         2006-07-22  Bruno Haible  <bruno@clisp.org>
3069
3070                 * gettext.m4: Update from GNU gettext-0.15.
3071                 * nls.m4: Likewise.
3072                 * po.m4: Likewise.
3073                 * inttypes-pri.m4: Likewise.
3074                 * inttypes-h.m4: Renamed from inttypes.m4.
3075                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
3076
3077 2006-07-22  Bruno Haible  <bruno@clisp.org>
3078
3079         Merge from GNU gettext 0.15.
3080
3081         2005-07-05  Bruno Haible  <bruno@clisp.org>
3082
3083                 * printf-args.c (printf_fetchargs): Work around broken
3084                 definition of wint_t on mingw.
3085
3086         2005-02-12  Bruno Haible  <bruno@clisp.org>
3087
3088                 * xallocsa.h: Add extern "C" for C++.
3089
3090         2006-05-17  Bruno Haible  <bruno@clisp.org>
3091
3092                 Cygwin portability.
3093                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
3094
3095         2006-04-30  Bruno Haible  <bruno@clisp.org>
3096
3097                 * progreloc.c: Include <mach-o/dyld.h> if available.
3098                 (find_executable): Use _NSGetExecutablePath when possible.
3099
3100         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3101
3102                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
3103                 function.
3104
3105         2005-12-29  Bruno Haible  <bruno@clisp.org>
3106
3107                 * progreloc.c (set_program_name_and_installdir): Fix
3108                 compilation error.
3109
3110         2005-12-04  Bruno Haible  <bruno@clisp.org>
3111
3112                 Cygwin portability.
3113                 * progreloc.c: Include <windows.h> also on Cygwin.
3114                 (find_executable): Add support for Cygwin.
3115                 (set_program_name_and_installdir): Handle also platforms with
3116                 nonempty EXEEXT.
3117
3118         2006-07-11  Bruno Haible  <bruno@clisp.org>
3119
3120                 * javacomp.c: Fix a comment.
3121                 Reported by Jim Meyering.
3122
3123         2006-04-30  Bruno Haible  <bruno@clisp.org>
3124
3125                 * javacomp.h (compile_java_class): Add source_version,
3126                 target_version arguments.
3127                 * javacomp.c: Rewritten to choose only a compiler that
3128                 respects the specified source_version and target_version.
3129
3130         2006-06-27  Bruno Haible  <bruno@clisp.org>
3131
3132                 Assume correct S_ISDIR macro.
3133                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
3134
3135         2006-07-22  Bruno Haible  <bruno@clisp.org>
3136
3137                 * javaversion.h: New file, from GNU gettext.
3138                 * javaversion.c: New file, from GNU gettext.
3139                 * javaversion.java: New file, from GNU gettext.
3140                 * javaversion.class: New file, from GNU gettext.
3141
3142         2006-05-17  Bruno Haible  <bruno@clisp.org>
3143
3144                 Cygwin portability.
3145                 * javaexec.c (execute_java_class): Test for jview program
3146                 also on Cygwin.
3147
3148         2006-04-09  Bruno Haible  <bruno@clisp.org>
3149
3150                 * fatal-signal.c: Don't include string.h.
3151                 (at_fatal_signal): Use a copying loop instead of memcpy.
3152
3153         2005-12-04  Bruno Haible  <bruno@clisp.org>
3154
3155                 * csharpexec.c: Add support for 'clix' launcher (untested).
3156                 (execute_csharp_using_sscli): New function.
3157                 (execute_csharp_program): Call it.
3158
3159         2006-06-21  Bruno Haible  <bruno@clisp.org>
3160
3161                 Avoid warnings from recent versions of mcs.
3162                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
3163                 -o, -L, -r any more. Use options documented since mcs-1.0
3164                 instead. Similarly for -g.
3165
3166         2005-07-09  Bruno Haible  <bruno@clisp.org>
3167
3168                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
3169                 add a .dll suffix.
3170                 Reported by Mark Junker <mjscod@gmx.de>.
3171
3172         2006-06-17  Bruno Haible  <bruno@clisp.org>
3173
3174                 * config.charset: Update for NetBSD 3.0.
3175
3176         2006-05-17  Bruno Haible  <bruno@clisp.org>
3177
3178                 Cygwin portability.
3179                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
3180
3181         2006-05-16  Bruno Haible  <bruno@clisp.org>
3182
3183                 * localcharset.c [CYGWIN]: Include <windows.h>.
3184                 (get_charset_aliases): For Cygwin, return the same CPxxx
3185                 aliases list as under WIN32.
3186                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
3187                 the environment variables. Fall back to GetACP().
3188
3189         2006-04-05  Bruno Haible  <bruno@clisp.org>
3190
3191                 * config.charset: Update Juan Manuel Guerrero's address.
3192
3193         2005-02-12  Bruno Haible  <bruno@clisp.org>
3194
3195                 * allocsa.h: Add extern "C" for C++.
3196
3197         2005-02-10  Bruno Haible  <bruno@clisp.org>
3198
3199                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
3200                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
3201
3202         2006-07-22  Bruno Haible  <bruno@clisp.org>
3203
3204                 * gettext.h: Update to GNU gettext-0.15.
3205
3206 2006-07-22  Bruno Haible  <bruno@clisp.org>
3207
3208         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
3209         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
3210         lib-prefix.m4, longdouble.m4, ssize_t.m4.
3211
3212 2006-07-21  Eric Blake  <ebb9@byu.net>
3213
3214         * modules/stdlib-safer: New file.
3215         * MODULES.html.sh (File stream based Input/Output): Add
3216         stdlib-safer.
3217
3218 2006-07-21  Eric Blake  <ebb9@byu.net>
3219
3220         * lib/stdlib-safer.h: New file from coreutils, required by
3221         stdlib--.h.
3222
3223 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
3224
3225         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
3226
3227 2006-07-20  Bruno Haible  <bruno@clisp.org>
3228
3229         * gnulib-tool: Recognize new option --assume-autoconf.
3230         (autoconf_minversion): New variable.
3231         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
3232
3233 2006-07-20  Bruno Haible  <bruno@clisp.org>
3234
3235         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
3236
3237 2006-07-19  Derek R. Price  <derek@ximbiot.com>
3238
3239         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
3240         Reindent and repaginate.
3241
3242 2006-07-19  Derek Price  <derek@ximbiot.com>
3243
3244         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
3245         Correct grammar.
3246
3247 2006-07-17  Bruno Haible  <bruno@clisp.org>
3248
3249         * modules/list: New file.
3250         * modules/array-list: New file.
3251         * modules/carray-list, modules/carray-list-tests: New files.
3252         * modules/linked-list, modules/linked-list-tests: New files.
3253         * modules/avltree-list, modules/avltree-list-tests: New files.
3254         * modules/rbtree-list, modules/rbtree-list-tests: New files.
3255         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
3256         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
3257         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
3258         * modules/oset: New file.
3259         * modules/array-oset: New file.
3260         * modules/avltree-oset, modules/avltree-oset-tests: New files.
3261         * modules/rbtree-oset, rbtree-oset-tests: New files.
3262         * tests/test-carray_list.c: New file.
3263         * tests/test-linked_list.c: New file.
3264         * tests/test-avltree_list.c: New file.
3265         * tests/test-rbtree_list.c: New file.
3266         * tests/test-linkedhash_list.c: New file.
3267         * tests/test-avltreehash_list.c: New file.
3268         * tests/test-rbtreehash_list.c: New file.
3269         * tests/test-avltree_oset.c: New file.
3270         * tests/test-rbtree_oset.c: New file.
3271         * MODULES.html.sh (Container data structures): New section.
3272
3273 2006-07-17  Bruno Haible  <bruno@clisp.org>
3274
3275         * m4/gl_list.m4: New file.
3276
3277 2006-07-17  Bruno Haible  <bruno@clisp.org>
3278
3279         * lib/gl_list.h: New file.
3280         * lib/gl_list.c: New file.
3281         * lib/gl_array_list.h: New file.
3282         * lib/gl_array_list.c: New file.
3283         * lib/gl_carray_list.h: New file.
3284         * lib/gl_carray_list.c: New file.
3285         * lib/gl_linked_list.h: New file.
3286         * lib/gl_linked_list.c: New file.
3287         * lib/gl_anylinked_list1.h: New file.
3288         * lib/gl_anylinked_list2.h: New file.
3289         * lib/gl_avltree_list.h: New file.
3290         * lib/gl_avltree_list.c: New file.
3291         * lib/gl_anyavltree_list1.h: New file.
3292         * lib/gl_anyavltree_list2.h: New file.
3293         * lib/gl_rbtree_list.h: New file.
3294         * lib/gl_rbtree_list.c: New file.
3295         * lib/gl_anyrbtree_list1.h: New file.
3296         * lib/gl_anyrbtree_list2.h: New file.
3297         * lib/gl_anytree_list1.h: New file.
3298         * lib/gl_anytree_list2.h: New file.
3299         * lib/gl_linkedhash_list.h: New file.
3300         * lib/gl_linkedhash_list.c: New file.
3301         * lib/gl_anyhash_list1.h: New file.
3302         * lib/gl_anyhash_list2.h: New file.
3303         * lib/gl_avltreehash_list.h: New file.
3304         * lib/gl_avltreehash_list.c: New file.
3305         * lib/gl_rbtreehash_list.h: New file.
3306         * lib/gl_rbtreehash_list.c: New file.
3307         * lib/gl_anytreehash_list1.h: New file.
3308         * lib/gl_anytreehash_list2.h: New file.
3309
3310         * lib/gl_oset.h: New file.
3311         * lib/gl_oset.c: New file.
3312         * lib/gl_array_oset.h: New file.
3313         * lib/gl_array_oset.c: New file.
3314         * lib/gl_avltree_oset.h: New file.
3315         * lib/gl_avltree_oset.c: New file.
3316         * lib/gl_rbtree_oset.h: New file.
3317         * lib/gl_rbtree_oset.c: New file.
3318         * lib/gl_anytree_oset.h: New file.
3319
3320 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
3321
3322         * m4/mkancesdirs.m4: New file.
3323         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
3324         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
3325         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
3326         it.
3327
3328 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
3329
3330         * lib/dirchownmod.c, dirchownmod.h, mkancesdirs.c, mkancesdirs.h:
3331         New files.
3332         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
3333         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
3334         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
3335         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
3336         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
3337         callers changed.  Revamp internals significantly, by not
3338         attempting to create directories that are temporarily more
3339         permissive than the final results.  Do not attempt to use
3340         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
3341         This removes some race conditions, fixes some bugs, and simplifies
3342         things.  Use new dirchownmod function to do owner and mode changes.
3343         * lib/mkdir-p.h: Likewise.
3344         * lib/modechange.c (octal_to_mode): New function.
3345         (struct mode_change): New member mentioned.
3346         (make_node_op_equals): New arg mentioned.  All callers changed.
3347         (mode_compile): Keep track of which mode bits the user has explicitly
3348         mentioned.
3349         (mode_adjust): New arg DIR, so that we implement the X op correctly.
3350         New arg PMODE_BITS, to keep track of which mode bits the user
3351         mentioned; it treats S_ISUID and S_ISGID speciall.
3352         All callers changed.
3353         * lib/modechange.h: Likewise.
3354
3355 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
3356
3357         * MODULES.html.sh: Add mkancestors.
3358         * modules/mkancesdirs: New module.
3359         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
3360         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
3361         The chdir-safer and afs files are now orphans; I'll remove them
3362         unless someone speaks up.
3363         Add lib/dirchownmod.c, lib/dirchownmod.h.
3364         (Depends-on): Remove alloca, chown, save-cwd, dirname.
3365         Add lchown, mkancesdirs.
3366         (Maintainer): Add self.
3367
3368 2006-07-15  Karl Berry  <karl@gnu.org>
3369
3370         * gnulib-tool: help message wording/arrangement.
3371
3372 2006-07-14  Simon Josefsson  <jas@extundo.com>
3373
3374         * doc/gnulib.texi (Libtool and Windows): New section.
3375
3376 2006-07-12  Simon Josefsson  <jas@extundo.com>
3377
3378         * modules/gendocs (License): Fix license, approved by Karl.
3379
3380 2006-07-12  Eric Blake  <ebb9@byu.net>
3381
3382         * MODULES.html.sh: Add gendocs.
3383
3384 2006-07-11  Eric Blake  <ebb9@byu.net>
3385
3386         * modules/fdl: New module, to install doc/fdl.texi.
3387         * MODULES.html.sh: Add new section for documentation modules.
3388         * gnulib-tool: Avoid space-tab.
3389         (--doc-base): New option, to manage files from doc.
3390
3391 2006-07-11  Eric Blake  <ebb9@byu.net>
3392
3393         * m4/absolute-header.m4: Fix comments to match recent change.
3394
3395 2006-07-11  Eric Blake  <ebb9@byu.net>
3396
3397         * gnulib-tool: List --doc-base before --tests-base.
3398
3399 2006-07-11  Derek R. Price  <derek@ximbiot.com>
3400
3401         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
3402
3403 2006-07-11  Bruno Haible  <bruno@clisp.org>
3404
3405         * README: Mention where to put documentation.
3406
3407 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3408
3409         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
3410
3411 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
3412
3413         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
3414         to stdint.m4.
3415
3416 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
3417
3418         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
3419         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
3420         "no/such/file/stdint.h" when there is no such file, so that
3421         the resulting C code can be parsed by dodgy compilers.
3422         Problems reported by Bob Proulx.
3423
3424 2006-07-10  Derek R. Price  <derek@ximbiot.com>
3425
3426         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
3427         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
3428         macros into the GNU _D_EXACT_NAMLEN.
3429         * lib/savedir.c:  Likewise.
3430         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
3431
3432 2006-07-10  Derek R. Price  <derek@ximbiot.com>
3433         and Paul Eggert  <eggert@cs.ucla.edu>
3434
3435         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
3436         * m4/savedir.m4:
3437         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
3438         macros into the GNU _D_EXACT_NAMLEN.
3439
3440 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
3441
3442         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
3443         around the absolute name, to work around a problem with the HP-UX
3444         11.23 native C compiler, reported by Bob Proulx.
3445
3446 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
3447
3448         * doc/maintain.texi, make-stds.texi: Sync from
3449         <http://savannah.gnu.org/projects/gnustandards>.
3450
3451 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
3452
3453         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
3454
3455 2006-07-09  Jim Meyering  <jim@meyering.net>
3456
3457         * m4/glob.m4: Remove a doubled word in a comment.
3458
3459 2006-07-09  Jim Meyering  <jim@meyering.net>
3460
3461         * lib/argp-pv.c: Remove a doubled word in a comment.
3462         * lib/check-version.c (check_version): Likewise.
3463         * lib/javacomp.c (compile_java_class): Likewise.
3464
3465 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
3466
3467         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
3468         for the benefit of people using Autoconf 2.60.  If you want to
3469         support older Autoconf versions you can copy m4/onceonly_2_57.m4
3470         (or m4/onceonly.m4, if pre-2.57) manually.
3471
3472 2006-07-08  Jim Meyering  <jim@meyering.net>
3473
3474         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
3475         comment.
3476         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
3477         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
3478         comment.
3479
3480 2006-07-08  Jim Meyering  <jim@meyering.net>
3481
3482         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
3483
3484 2006-07-07  Simon Josefsson  <jas@extundo.com>
3485
3486         * tests/test-crc.c: Change expected crc value, the test vector
3487         were probably computed using the old broken crc.c?
3488
3489 2006-07-06  Simon Josefsson  <jas@extundo.com>
3490
3491         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
3492         now the canonical place for the M4 file).
3493
3494         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
3495         from the sys_socket dependency now.
3496
3497         * modules/inet_pton (Files): Ditto.
3498
3499         * modules/inet_ntop (Files): Ditto.
3500
3501 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
3502
3503         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
3504         not gl_PREREQ_GETUSERSHELL.
3505
3506 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3507
3508         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
3509         with only one argument, for Autoconf 2.60.
3510         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
3511         expand to nothing, so add a shell command to avoid syntax error.
3512         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
3513
3514 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3515
3516         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
3517
3518 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
3519
3520         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
3521         no longer needed.  Check for isblank decl.
3522         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
3523         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
3524         of existence.
3525
3526 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
3527
3528         * lib/getloadavg.c: Use __VMS, not VMS.
3529         * lib/getopt.c: Likewise.
3530         * lib/getpagesize.h: Likewise.
3531         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
3532         and probably does not work.
3533
3534 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
3535
3536         * lib/.cppi-disable: Add wcwidth.
3537         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
3538         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
3539         (ISGRAPH): Remove.  All uses changed to isgraph.
3540         (FOLD) [!defined _LIBC]: Remove special case.
3541         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
3542         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
3543         HAVE_ISBLANK.
3544         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
3545         case.
3546
3547 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
3548
3549         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
3550         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
3551         brackets.  Other minor changes to suppress some compiler
3552         warnings.
3553
3554 2006-07-06  Derek R. Price  <derek@ximbiot.com>
3555         and Paul Eggert  <eggert@cs.ucla.edu>
3556
3557         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
3558         of invoking obsolescent AC_HEADER_DIRENT macro.
3559         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
3560         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
3561         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
3562         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
3563         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
3564         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
3565         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
3566         * m4/readdir.m4: Remove; no longer needed.
3567
3568 2006-07-06  Derek R. Price  <derek@ximbiot.com>
3569         and Paul Eggert  <eggert@cs.ucla.edu>
3570
3571         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
3572         Don't worry about this obsolete case any more.
3573         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
3574         directories.
3575         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
3576         worry about this obsolete case any more.
3577         * lib/fts.c: Likewise.
3578         * lib/getcwd.c: Likewise.
3579         * lib/glob.h: Likewise.
3580         * lib/savedir.c: Likewise.
3581
3582 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
3583
3584         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
3585         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
3586         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
3587         needed.
3588         All uses removed.
3589         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
3590         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
3591         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
3592         needed.
3593         * m4/getdate.m4 (gl_GETDATE): Likewise.
3594         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
3595         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
3596         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
3597         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
3598         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
3599         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
3600         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
3601         needed.
3602
3603 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
3604
3605         * lib/memcasecmp.c: Include <limits.h>.
3606         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
3607         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
3608         Don't assume isdigit succeeds only on '0' through '9'.
3609
3610 2006-07-05  Eric Blake  <ebb9@byu.net>
3611
3612         * modules/getaddrinfo (Depends-on): Add snprintf.
3613
3614 2006-07-05  Eric Blake  <ebb9@byu.net>
3615
3616         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
3617         to avoid 'header present but could not be compiled' on cygwin.
3618
3619 2006-07-05  Eric Blake  <ebb9@byu.net>
3620
3621         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
3622         missing from netdb.h.
3623         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
3624
3625 2006-07-05  Derek R. Price  <derek@ximbiot.com>
3626
3627         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
3628         no longer needed.
3629         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
3630         * m4/getdate.m4 (gl_GETDATE): Likewise.
3631         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
3632         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
3633         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
3634         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
3635         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
3636
3637 2006-07-05  Derek R. Price  <derek@ximbiot.com>
3638
3639         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
3640         All uses of is_space replaced by isspace.
3641         * lib/exit.h: Don't talk about STDC_HEADERS.
3642         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
3643         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
3644         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
3645         replaced by isprint etc.
3646         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
3647         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
3648         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
3649         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
3650         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
3651         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
3652
3653 2006-07-05  Bruno Haible  <bruno@clisp.org>
3654
3655         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
3656         the function exists, before testing against AIX.
3657         Reported by Martin Lambers <marlam@marlam.de>.
3658
3659 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
3660
3661         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
3662         From Mark D. Baushke.
3663
3664 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
3665
3666         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
3667         to the absolute name, not just one, to bypass Sun C 5.8's
3668         "warning: #include of /usr/include/... may be non-portable".
3669
3670 2006-07-04  Eric Blake  <ebb9@byu.net>
3671
3672         * modules/dirname-tests: New test module.
3673         * tests/test-dirname.c: New file, replacing dirname.c
3674         TEST_DIRNAME section that was recently deleted.
3675
3676 2006-07-04  Bruno Haible  <bruno@clisp.org>
3677
3678         Assume ANSI C header files and <ctype.h> functions.
3679         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
3680         (mbsnwidth): Use isprint, iscntrl instead.
3681
3682 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
3683
3684         Merge from coreutils.
3685         * MODULES.html.sh: Add xstrtold.
3686         * modules/xstrtold: New file.
3687         * modules/cycle-check (Files): Add lib/same-inode.h.
3688         * modules/dirname (Files): Add m4/double-slash-root.m4.
3689         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
3690         * modules/mkdir-p (Files): Add lib/same-inode.h.
3691         * modules/same (Files): Add lib/same-inode.h.
3692
3693 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
3694
3695         * m4/absolute-header.m4: Renamed from full-header-path.m4.
3696         This is to keep the terminology clean; POSIX talks about
3697         "absolute pathnames", not "full pathnames", but the GNU
3698         Coding Standards say to use "path" for something else;
3699         so use "absolute" to keep both sides happy.
3700         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
3701         Set gl_absolute_header, not gl_full_header_path.
3702         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
3703         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
3704         All uses changed.
3705
3706         Merge from coreutils.
3707
3708         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
3709
3710         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
3711         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
3712         want to require the building of c-strtod.o.
3713         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
3714         needs -lm directly.
3715         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
3716
3717         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
3718
3719         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
3720         --as-needed option if available.  Problem reported by Albert Chin in
3721         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
3722         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
3723         cc merely issues a bunch of annoying warnings for --as-needed
3724         (this problem was reported by Bob Proulx).  Also, try linking with
3725         -lm to detect a bug in binutils 2.16 (this problem was reported
3726         by Ralf Wildenhues).
3727
3728         2006-06-18  Jim Meyering  <jim@meyering.net>
3729
3730         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
3731         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
3732         macro.
3733         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
3734         also check for glibc-2.4's abort-inducing bug.
3735
3736         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
3737         Low-probability clean-up should be to use rmdir to get rid of
3738         the just-created directory, not unlink.
3739
3740         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
3741         configure fail, and request a bug report to inform us about it.
3742         Add a comment that, barring reports to the contrary, in 2007 we'll
3743         assume ftruncate is universally available.
3744
3745         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
3746
3747         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
3748
3749         2006-03-12  Jim Meyering  <jim@meyering.net>
3750
3751         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
3752         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
3753         * m4/same.m4 (gl_SAME): Likewise.
3754         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
3755
3756         2006-03-11  Eric Blake  <ebb9@byu.net>
3757
3758         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
3759         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
3760         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
3761         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
3762
3763 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
3764
3765         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
3766         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
3767         reported by Mark D. Baushke, one in
3768         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
3769
3770         Merge from coreutils.
3771
3772         * lib/.cppi-disable: Add stdint_.h.
3773         * lib/.cvsignore: Add stdint.h.
3774
3775         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
3776
3777         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
3778         both double and long double versions.
3779         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
3780         * lib/xstrtold.c: New file.
3781         * lib/xstrtod.h (xstrtold): New decl.
3782
3783         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
3784
3785         * lib/filemode.c (setst): Remove.
3786         (strmode): Rewrite to avoid setst.  This makes the code shorter,
3787         (arguably) clearer, and the generated code is a bit smaller on my
3788         Debian GNU/Linux stable x86 host.
3789
3790         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
3791
3792         * lib/filemode.c: Include "filemode.h" first, to test the interface.
3793         Assume that filemode.h includes sys/types.h and sys/stat.h.
3794         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
3795         (ftypelet): Reorder to put common cases first, for efficiency.
3796         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
3797         to do 'M'.
3798         (strmode): Renamed from mode_string, and now stores 12 bytes instead
3799         of 10, for compatibility with FreeBSD.  All callers changed.
3800         (filemodestring): Now stores 12 bytes instead of 10, and sets file
3801         types that can't be deduced solely from st_mode.  First arg is now a
3802         const pointer.
3803         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
3804         (strmode): Renamed from mode_string.
3805         (filemodestring): New decl.
3806         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
3807         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
3808         needed.
3809         (S_ISPORT, S_ISWHT): New macros, if not already defined.
3810
3811         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
3812
3813         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
3814         fsusage.h now does that.  Include fsusage.h first, to test interface.
3815         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
3816         at most one method (the old code could have generated decls that
3817         didn't conform to C89, not that this was ever exercised).
3818         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
3819
3820         2006-03-19  Jim Meyering  <jim@meyering.net>
3821
3822         Work even in a chroot where d_ino values for entries in "/"
3823         don't match the stat.st_ino values for the same names.
3824         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
3825         number, iterate through all entries again, using lstat instead.
3826         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
3827         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
3828
3829         * lib/getcwd.c (__getcwd): Clarify a comment.
3830         Use memcpy in place of a call to strcpy.
3831
3832         2006-03-12  Jim Meyering  <jim@meyering.net>
3833
3834         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
3835         matches that of the current directory (which we're about to chdir ".."
3836         out of), then save the dev-ino of the parent, instead.
3837
3838         * lib/same-inode.h (SAME_INODE): New file/macro.
3839         * lib/chdir-safer.c (SAME_INODE): Remove definition.
3840         Include "same-inode.h", instead.
3841         * lib/same.c: Likewise.
3842         * lib/cycle-check.h: Include "same-inode.h".
3843         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
3844         * lib/cycle-check.c (SAME_INODE): Remove definition.
3845         * lib/root-dev-ino.h: Include "same-inode.h".
3846
3847         2006-03-11  Eric Blake  <ebb9@byu.net>
3848
3849         * lib/same.c (same_name): s/base_name/last_component/
3850         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
3851         * lib/filenamecat.c (file_name_concat): Likewise.
3852
3853         2006-03-11  Eric Blake  <ebb9@byu.net>,
3854                     Paul Eggert  <eggert@cs.ucla.edu>
3855
3856         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
3857         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
3858         drive prefix.
3859         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
3860         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
3861         (last_component): New method.
3862         * lib/dirname.c (dir_len): Determine when drive letters need a
3863         subsequent slash.  Preserve // when it is special.
3864         (dir_name): Don't append dot when drive letter is absolute.
3865         [TEST_DIRNAME]: Move into a full-blown gnulib test.
3866         * lib/basename.c (base_name): New semantics - malloc the result.
3867         Preserve // when it is special.  Preserve relative files that look
3868         like drive letters.
3869         (base_len): Preserve // when it is special.
3870         (last_component): New method, similar to old base_name semantics.
3871         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
3872         base_name.  Strip redundant slashes from ///.
3873
3874 2006-07-03  Jim Meyering  <jim@meyering.net>
3875
3876         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
3877         macro is used before the first cycle_check call.
3878
3879 2006-07-03  Eric Blake  <ebb9@byu.net>
3880
3881         * modules/dirname (Depends-on): Add xstrndup.
3882
3883 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
3884
3885         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
3886         test cases, so that config.log is a bit easier to follow.
3887
3888 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
3889
3890         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
3891         both are 64 bits, since this seems to be the tradition, and this
3892         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
3893         we ever run into a host that prefers long long to long in this
3894         case, we'll need another configure-time test.  Problem reported by
3895         Jim Meyering.
3896
3897 2006-07-02  Eric Blake  <ebb9@byu.net>
3898
3899         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
3900
3901 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
3902
3903         * modules/inttypes (Depends-on): No longer depends on stdint.
3904         * modules/stdint (Description): Say more about assumptions.
3905         Say that the fast types might differ.  Say macros are used.
3906         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
3907         (Makefile.am): Revise list of substituted symbols to match
3908         new stdint.m4.
3909         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
3910         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
3911         * tests/test-stdint.c (verify_same_types)
3912         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
3913         the code conforms to C99/C89.
3914         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
3915         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
3916
3917 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
3918
3919         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
3920         but fix a bug, by requiring at least 64 bits.
3921         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
3922         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
3923         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
3924         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
3925
3926         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
3927         changes.  Make 2.59 a prerequisite.  Check and substitute for
3928         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
3929         inttypes.h.  Do not use special include files; just use the
3930         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
3931         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
3932         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
3933         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
3934         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
3935         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
3936         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
3937         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
3938         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
3939         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
3940         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
3941         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
3942         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
3943         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
3944         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
3945         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
3946         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
3947         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
3948         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
3949         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
3950         WINT_MAX.  Check for C99 conformance more strictly, by detecting
3951         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
3952         not check for things that C99 does not require, e.g., int8_t.  If
3953         a test isn't needed unless <stdint.h> isn't working, and is
3954         unlikely to be needed for any other reason, then don't do it
3955         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
3956         size_t, since we assume C89 freestanding at least.  Do not check
3957         for sig_atomic_t, wchar_t, or wint_t, since the code now does
3958         the right thing even if the types are not defined.  Instead use:
3959         (gl_STDINT_TYPE_PROPERTIES): New macro.
3960         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
3961         testing whether <sys/types.h> clashes, as Autoconf does this for
3962         us now.  All uses removed.
3963         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
3964         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
3965         (gl_CHECK_TYPE_SAME):
3966         Remove; no longer needed.
3967         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
3968         exists, since we'll return 0 anyway in that case.
3969         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
3970
3971 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
3972
3973         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
3974         possible collision with system files.
3975         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
3976         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
3977         WCHAR_MIN and WCHAR_MAX in this case.
3978         (<stddef.h>): Do not include; no longer needed.
3979         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
3980         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
3981         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
3982         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
3983         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
3984         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
3985         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
3986         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
3987         !defined(__c99))]: Include in this case too, since it's harmless
3988         now.
3989         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
3990         dangerous to do so.
3991         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
3992         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
3993         (_STDINT_MIN, _STDINT_MAX): New macros.
3994         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
3995         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
3996         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
3997         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
3998         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
3999         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
4000         macros, not typedefs; this simplifies things quite a bit.
4001         Use long int for all types narrower than int64_t.
4002         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
4003         Define in terms of long long int or int64_t or long int,
4004         not int64_t or int32_t.  This saves some compile-time testing.
4005         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
4006         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
4007         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
4008         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
4009         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
4010         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
4011         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
4012         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
4013         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
4014         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
4015         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4016         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4017         undef any previous version and define our own version, for
4018         simplicity and consistency with the new macros for types.
4019         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
4020         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
4021         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
4022         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
4023         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
4024         @WINT_T_SUFFIX@ to keep things simple here.
4025         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
4026         Simplify by assuming typical 8/16/32/64 host, since we're
4027         already doing that elsewhere anyway.
4028         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
4029         and assume long long int is 64 bits if available.  This
4030         speeds up 'configure'.
4031
4032 2006-07-01  Eric Blake  <ebb9@byu.net>
4033
4034         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
4035         Reported by Andreas Buening.
4036
4037 2006-07-01  Eric Blake  <ebb9@byu.net>
4038
4039         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
4040
4041 2006-06-30  Jim Hyslop <jhyslop@dreampossible.ca>  (tiny change)
4042
4043         * lib/getaddrinfo.c: fixed typo
4044
4045 2006-06-29  Jim Meyering  <jim@meyering.net>
4046
4047         * modules/strftime (Maintainer): Add my name, since with the
4048         FPRINTFTIME changes strftime.c has forked from glibc.
4049
4050 2006-06-29  Eric Blake  <ebb9@byu.net>
4051
4052         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
4053
4054 2006-06-29  Eric Blake  <ebb9@byu.net>
4055
4056         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
4057
4058 2006-06-29  Eric Blake  <ebb9@byu.net>
4059
4060         * lib/stat_.h: New file.
4061
4062 2006-06-29  Eric Blake  <ebb9@byu.net>
4063
4064         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
4065         unused static function.
4066
4067 2006-06-29  Eric Blake  <ebb9@byu.net>
4068
4069         * doc/functions.texi (Function Portability): Document missing lstat
4070         on mingw.
4071
4072 2006-06-29  Eric Blake  <ebb9@byu.net>
4073
4074         * MODULES.html.sh: Add sys_stat.
4075         * modules/sys_stat: New module.
4076         * modules/mkstemp (Depends-on): Add sys_stat.
4077
4078 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4079
4080         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
4081
4082 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4083
4084         * m4/c-bs-a.m4: Removed.
4085
4086 2006-06-29  Derek R. Price  <derek@ximbiot.com>
4087
4088         * lib/strftime.c: Assume strftime() exists.
4089
4090 2006-06-29  Derek Price  <derek@ximbiot.com>
4091
4092         * modules/c-bs-a: Removed - \a is C89.
4093         * MODULES.html.sh: Remove c-bs-a.
4094
4095 2006-06-29  Bruno Haible  <bruno@clisp.org>
4096
4097         * modules/wcwidth (License): Change to LGPL.
4098
4099 2006-06-28  Simon Josefsson  <jas@extundo.com>
4100
4101         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
4102         on _WIN32.
4103
4104         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
4105         getnameinfo.
4106
4107 2006-06-28  Simon Josefsson  <jas@extundo.com>
4108
4109         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
4110
4111 2006-06-28  Simon Josefsson  <jas@extundo.com>
4112
4113         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
4114         functions there.  It will succeed on Windows XP, but on Windows
4115         2000 and (presumably) earlier, it will fail, and use the internal
4116         re-implementation.
4117         (use_win32_p): New function.
4118         (getaddrinfo): Use strtoul on servname, to support numeric ports.
4119         Support AI_NUMERICSERV to disable getservbyname.
4120         (getnameinfo): New function, only supports
4121         NI_NUMERICHOST|NI_NUMERICSERV for now.
4122
4123         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
4124         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
4125         getnameinfo.
4126
4127 2006-06-28  Eric Blake  <ebb9@byu.net>
4128
4129         * modules/wcwidth: New file.
4130         * modules/mbchar (Depends-on): Add wcwidth.
4131         * modules/mbswidth (Depends-on): Add wcwidth.
4132         * MODULES.html.sh: Add wcwidth.
4133
4134 2006-06-28  Eric Blake  <ebb9@byu.net>
4135
4136         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
4137         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
4138
4139 2006-06-28  Eric Blake  <ebb9@byu.net>
4140
4141         * lib/xvasprintf.h: Fix comments.
4142
4143 2006-06-28  Eric Blake  <ebb9@byu.net>
4144
4145         * lib/mbchar.h (wcwidth): Include wcwidth.h.
4146         * lib/mbswidth.c (wcwidth): Move from here...
4147         * lib/wcwidth.h: ...to this new file.
4148
4149 2006-06-28  Derek R. Price  <derek@ximbiot.com>
4150
4151         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
4152
4153         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
4154         it's obsolete.
4155         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
4156
4157 2006-06-28  Derek R. Price  <derek@ximbiot.com>
4158
4159         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
4160         Autoconf 2.60 says this stuff was obsolete.
4161
4162 2006-06-28  Bruno Haible  <bruno@clisp.org>
4163
4164         * modules/wcwidth (Files): Add m4/wchar_t.m4.
4165
4166 2006-06-28  Bruno Haible  <bruno@clisp.org>
4167
4168         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
4169         gt_TYPE_WCHAR_T.
4170
4171 2006-06-28  Bruno Haible  <bruno@clisp.org>
4172
4173         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
4174         declaration for wcwidth.
4175         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
4176
4177 2006-06-28  Bruno Haible  <bruno@clisp.org>
4178
4179         * lib/mkdtemp.c [MINGW]: Include <io.h>.
4180         (mkdir): Define using _mkdir.
4181
4182 2006-06-28  Bruno Haible  <bruno@clisp.org>
4183
4184         * lib/getaddrinfo.h: Fix POSIX URL.
4185         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
4186         _WIN32.
4187         (use_win32_p): Make static.
4188         (getaddrinfo): Reject service name if it is empty or does not consist
4189         solely of decimal digits, or if its value is > 65535.
4190         (getnameinfo): Remove useless casts.
4191
4192 2006-06-27  Simon Josefsson  <jas@extundo.com>
4193
4194         * modules/sys_select: New file, suggested by Bruno Haible, Paul
4195         Eggert and Martin Lambers.
4196
4197 2006-06-27  Simon Josefsson  <jas@extundo.com>
4198
4199         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
4200         Eggert and Martin Lambers.
4201
4202 2006-06-27  Bruno Haible  <bruno@clisp.org>
4203
4204         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
4205         result to 0, not to empty.
4206         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
4207
4208 2006-06-27  Bruno Haible  <bruno@clisp.org>
4209
4210         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
4211
4212 2006-06-26  Simon Josefsson  <jas@extundo.com>
4213
4214         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
4215         present.
4216
4217 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
4218
4219         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
4220         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
4221         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
4222
4223 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
4224
4225         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
4226
4227 2006-06-26  Bruno Haible  <bruno@clisp.org>
4228
4229         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
4230
4231 2006-06-26  Bruno Haible  <bruno@clisp.org>
4232
4233         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
4234
4235 2006-06-26  Bruno Haible  <bruno@clisp.org>
4236
4237         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
4238         SGI C compiler in pre-C99 mode.
4239         Suggested by Mark D. Baushke and Larry Jones.
4240
4241 2006-06-26  Bruno Haible  <bruno@clisp.org>
4242
4243         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
4244         WCHAR_MAX.
4245         Reported by Mark D. Baushke and Larry Jones.
4246
4247 2006-06-26  Bruno Haible  <bruno@clisp.org>
4248
4249         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
4250         in pre-C99 mode.
4251         Suggested by Mark D. Baushke and Larry Jones.
4252
4253 2006-06-23  Simon Josefsson  <jas@extundo.com>
4254             Bruno Haible  <bruno@clisp.org>
4255
4256         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
4257         Emit mostlyclean-local rule.
4258         (func_emit_tests_Makefile_am): Likewise.
4259         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
4260
4261 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
4262
4263         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
4264
4265 2006-06-23  Bruno Haible  <bruno@clisp.org>
4266
4267         * tests/test-stdint.c: Update to match ISO C 99 Technical
4268         Corrigendum 1.
4269
4270 2006-06-23  Bruno Haible  <bruno@clisp.org>
4271
4272         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
4273
4274 2006-06-23  Bruno Haible  <bruno@clisp.org>
4275
4276         * lib/stdint_.h: Treat IRIX like OpenBSD.
4277
4278 2006-06-23  Bruno Haible  <bruno@clisp.org>
4279
4280         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
4281         ISO C 99 Technical Corrigendum 1.
4282
4283 2006-06-22  Simon Josefsson  <jas@extundo.com>
4284
4285         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
4286         MinGW.
4287
4288 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
4289
4290         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
4291         needed.  Some compiler complained about some of them.  Problem reported
4292         by Larry Jones in
4293         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
4294
4295 2006-06-21  Simon Josefsson  <jas@extundo.com>
4296
4297         * tests/test-getaddrinfo.c: New file.
4298
4299         * modules/getaddrinfo-tests: New file.
4300
4301         * MODULES.html.sh: Add inet_pton.
4302
4303         * modules/inet_pton: New file.
4304
4305 2006-06-21  Simon Josefsson  <jas@extundo.com>
4306
4307         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
4308         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
4309         of using the (limited) gnulib implementation on Windows XP.
4310
4311         * m4/inet_pton.m4: New file.
4312
4313 2006-06-21  Simon Josefsson  <jas@extundo.com>
4314
4315         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
4316         variable.
4317
4318         * lib/socket_.h: Don't define WINVER.
4319
4320         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
4321         slightly modified to work in gnulib.
4322
4323 2006-06-21  Simon Josefsson  <jas@extundo.com>
4324
4325         * doc/gnulib.texi (Windows sockets): Add.
4326
4327 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
4328
4329         * lib/read-file.c (fread_file): Start with buffer allocation of
4330         0 bytes rather than 1 byte; this simplifies the code.
4331         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
4332         code to free buffer and save/restore errno.
4333         (internal_read_file): Remove unused local.
4334
4335 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
4336
4337         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
4338         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
4339         Problem reported by Denis Excoffier in
4340         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
4341
4342 2006-06-19  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
4343
4344         * modules/sys_socket, modules/socklen: Include sys/types since
4345         FreeBSD 4.x's sys/socket.h needs it.
4346
4347 2006-06-19  Simon Josefsson  <jas@extundo.com>
4348
4349         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
4350
4351 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
4352
4353         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
4354
4355 2006-06-19  Bruno Haible  <bruno@clisp.org>
4356
4357         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
4358         and FULL_PATH_INTTYPES_H in angle brackets.
4359         Reported by Mark D. Baushke <mdb@gnu.org>.
4360
4361 2006-06-17  Eric Blake  <ebb9@byu.net>
4362
4363         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
4364         errno.
4365
4366 2006-06-17  Bruno Haible  <bruno@clisp.org>
4367
4368         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
4369         <sys/inttypes.h>.
4370
4371 2006-06-17  Bruno Haible  <bruno@clisp.org>
4372
4373         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
4374         whether errno is declared. Assume <errno.h> declares errno.
4375
4376 2006-06-17  Bruno Haible  <bruno@clisp.org>
4377
4378         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
4379
4380 2006-06-17  Bruno Haible  <bruno@clisp.org>
4381
4382         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
4383         problem on Solaris 2.5.1.
4384
4385 2006-06-16  Eric Blake  <ebb9@byu.net>
4386
4387         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
4388         * lib/unicodeio.c [!defined errno]: Likewise.
4389         * lib/strtol.c [!defined errno]: Likewise.
4390         * lib/strtod.c [!defined errno]: Likewise.
4391
4392 2006-06-15  Eric Blake  <ebb9@byu.net>
4393
4394         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
4395
4396 2006-06-15  Eric Blake  <ebb9@byu.net>
4397
4398         * config/srclist.txt (ssize_t.m4): Lose sync.
4399
4400 2006-06-15  Bruno Haible  <bruno@clisp.org>
4401
4402         * modules/stdint (Files): Include m4/full-header-path.m4,
4403         m4/size_max.m4, m4/wchar_t.m4.
4404         (Makefile.am): Many more substitutions.
4405         * modules/stdint-tests: New file.
4406         * tests/test-stdint.c: New file.
4407
4408 2006-06-15  Bruno Haible  <bruno@clisp.org>
4409
4410         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
4411         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
4412         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
4413         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
4414         gl_CHECK_TYPE_SAME): New macros.
4415
4416 2006-06-15  Bruno Haible  <bruno@clisp.org>
4417
4418         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
4419
4420 2006-06-15  Bruno Haible  <bruno@clisp.org>
4421
4422         * lib/stdint_.h: Rewritten to be fully auto-configured.
4423         Fixes bug on HP-UX/IA64.
4424
4425 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
4426
4427         * lib/getdate.y (__attribute__): Don't define if already defined.
4428         Problem reported by Larry Jones.
4429         * lib/utimens.c (__attribute__): Likewise.
4430
4431 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
4432
4433         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
4434         reported by Andreas Schwab.
4435
4436 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4437             Bruno Haible  <bruno@clisp.org>
4438
4439         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
4440         check for the declaration of strnlen and a run test that exposes the
4441         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
4442         rpl_strndup.
4443
4444 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4445             Bruno Haible  <bruno@clisp.org>
4446
4447         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
4448
4449 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4450
4451         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
4452         compile test, for Tru64 4.0D.
4453
4454 2006-05-28  Karl Berry  <karl@gnu.org>
4455
4456         * config/srclist.txt (printf-args.c): lose sync.
4457
4458 2006-05-26  Martin Lambers  <marlam@marlam.de>
4459
4460         * lib/getpass.c: Updates the test for the native W32 API, and adds
4461         missing includes, thus fixing compilation warnings.
4462
4463 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
4464
4465         * lib/exclude.c (exclude_fnmatch): New function.
4466         (excluded_file_name): Call exclude_fnmatch.
4467         * lib/exclude.h (excluded_file_name): New prototype
4468
4469 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
4470
4471         * lib/tempname.c (small_open, large_open): New macros.
4472         (__open, __open64) [!_LIBC]: Remove.
4473         (__gen_tempname): Use small_open and large_open instead of __open
4474         and __open64.  This fixes a portability bug on HP-UX 11.11i
4475         reported by Simon Wing-Tang in
4476         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
4477
4478 2006-05-24  Bruno Haible  <bruno@clisp.org>
4479
4480         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
4481         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
4482         Reported by Thorsten Maerz <torte@netztorte.de> via
4483         Aaron Stone <aaron@serendipity.cx>.
4484
4485 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
4486
4487         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
4488         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
4489         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
4490         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
4491         not really conditional on the cache.
4492         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
4493
4494 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
4495
4496         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
4497         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
4498         (my_usleep): Don't mishandle maximum value.
4499
4500 2006-05-19  Jim Meyering  <jim@meyering.net>
4501
4502         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
4503
4504 2006-05-17  Bruno Haible  <bruno@clisp.org>
4505
4506         Cygwin portability.
4507         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
4508
4509 2006-05-17  Bruno Haible  <bruno@clisp.org>
4510
4511         * lib/stdint_.h: Fix recognition of Cygwin.
4512
4513 2006-05-15  Bruno Haible  <bruno@clisp.org>
4514
4515         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
4516         on libtool patch by Ralf Wildenhues.
4517
4518 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
4519
4520         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
4521         test for C99 conformance; (bool) 0.5 is an integer constant
4522         expression, but (bool) -0.5 is not.  Problem reported by Fedor
4523         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
4524
4525 2006-05-11  Simon Josefsson  <jas@extundo.com>
4526
4527         * m4/xvasprintf.m4: Fix obvious typo.
4528
4529 2006-05-11  Jim Meyering  <jim@meyering.net>
4530
4531         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
4532         James Lemley.
4533
4534 2006-05-10  Simon Josefsson  <jas@extundo.com>
4535
4536         * lib/md4.c: Typo fix, update copyright years.
4537         (K1, K2): Don't use L because it turn computations into 64-bit on
4538         64-bit platforms.
4539
4540 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
4541
4542         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
4543         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
4544         unwanted sign propagation, e.g., on hosts with 64-bit int.
4545         There still are some problems with reeelly weird theoretical hosts
4546         (e.g., 33-bit int) but it's not worth worrying about now.
4547         * lib/sha1.c (rol): Likewise.
4548         (K1, K2, K3, K4): Remove unnecessary L suffix.
4549
4550 2006-05-10  Bruno Haible  <bruno@clisp.org>
4551
4552         * lib/des.c: Cast to avoid warnings.
4553
4554 2006-05-09  Bruno Haible  <bruno@clisp.org>
4555
4556         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
4557         (Depends-on): Depend also on xsize, stdarg.
4558         (configure.ac): Add gl_XVASPRINTF.
4559
4560 2006-05-09  Bruno Haible  <bruno@clisp.org>
4561
4562         * m4/xvasprintf.m4: New file.
4563
4564 2006-05-09  Bruno Haible  <bruno@clisp.org>
4565
4566         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
4567         (EOVERFLOW): Define fallback value.
4568         (xstrcat): New function.
4569         (xvasprintf): Recognize the special case of a string concatenation.
4570
4571 2006-05-08  Eric Blake  <ebb9@byu.net>
4572
4573         * gnulib-tool (func_version): Base copyright year on CVS date.
4574         (func_emit_copyright_notice): New function.
4575         (func_emit_lib_Makefile_am): Use it.
4576         (func_emit_tests_Makefile_am): Likewise.
4577         (func_import): Likewise.
4578
4579 2006-05-08  Bruno Haible  <bruno@clisp.org>
4580
4581         * modules/stdarg: New file.
4582         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
4583
4584 2006-05-08  Bruno Haible  <bruno@clisp.org>
4585
4586         * m4/stdarg.m4: New file, from GNU gettext.
4587
4588 2006-05-08  Bruno Haible  <bruno@clisp.org>
4589
4590         * config/srclist.txt (build-aux/config.rpath): different from latest
4591         release.
4592
4593 2006-05-08  Bruno Haible  <bruno@clisp.org>
4594
4595         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
4596
4597 2006-05-05  Jim Meyering  <jim@meyering.net>
4598
4599         * m4/warning.m4: New file, derived from bison's file by the same name.
4600
4601 2006-05-03  Bruno Haible  <bruno@clisp.org>
4602
4603         * lib/stdint_.h: Shorter URL.
4604         * lib/inttypes.h: Likewise.
4605
4606 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
4607
4608         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
4609
4610 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
4611
4612         * lib/verify.h: Document the internals better.  Most of this change
4613         was written by Bruno Haible.
4614
4615 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
4616
4617         * doc/verify.texi: New file, partly based on a proposal by
4618         Bruno Haible.
4619
4620 2006-05-02  Bruno Haible  <bruno@clisp.org>
4621
4622         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
4623         test from here...
4624         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
4625
4626 2006-04-29  Bruno Haible  <bruno@clisp.org>
4627
4628         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
4629         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
4630
4631 2006-04-29  Bruno Haible  <bruno@clisp.org>
4632
4633         * gnulib-tool: Make --update option actually work.
4634
4635 2006-04-29  Bruno Haible  <bruno@clisp.org>
4636
4637         * doc/gcd.texi: New file.
4638         * doc/gnulib.texi: Include it.
4639
4640 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
4641
4642         * lib/getdate.y (get_date): When adding relative date, start with the
4643         initial time, not with the result of the first mktime call.
4644
4645 2006-04-25  Bruno Haible  <bruno@clisp.org>
4646
4647         * gnulib-tool (func_import): Output the include directives in three
4648         blocks, sorted separately.
4649         Reported by Ben Pfaff <blp@cs.stanford.edu>.
4650
4651 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
4652
4653         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
4654         to define main with arguments, for C++.  Reported by Eric Blake.
4655         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
4656         Prefer 'int main ()' to 'int main (void)', for C++.
4657         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
4658         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
4659         for 'main', for C99 and C++.
4660
4661 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
4662
4663         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
4664         Don't assume that exit status -1 is valid.
4665         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
4666         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
4667         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
4668         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
4669         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
4670         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
4671         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
4672         functions can be used without declaring them, or that you can
4673         exit with status -1.
4674         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
4675
4676 2006-04-24  Karl Berry  <karl@gnu.org>
4677
4678         * config/srclist.txt (longdouble.m4): sync lost.
4679
4680 2006-04-24  Eric Blake  <ebb9@byu.net>
4681
4682         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
4683
4684 2006-04-24  Bruno Haible  <bruno@clisp.org>
4685
4686         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
4687         poll() implementation in AIX.
4688         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4689
4690 2006-04-24  Bruno Haible  <bruno@clisp.org>
4691
4692         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
4693         assigned exactly once.
4694
4695 2006-04-23  Claudio Fontana  <claudio@gnu.org>
4696             Bruno Haible  <bruno@clisp.org>
4697
4698         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
4699         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
4700         for AM_CPPFLAGS.
4701
4702 2006-04-23  Bruno Haible  <bruno@clisp.org>
4703
4704         * modules/copy-file: Depend on unistd.
4705         * modules/execute: Likewise.
4706         * modules/fatal-signal: Likewise.
4707         * modules/findprog: Likewise.
4708         * modules/mkdtemp : Likewise.
4709         * modules/pipe: Likewise.
4710         * modules/wait-process: Likewise.
4711
4712 2006-04-23  Bruno Haible  <bruno@clisp.org>
4713
4714         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
4715         condition was already detected.
4716         Reported by Ben Pfaff <blp@cs.stanford.edu>.
4717
4718 2006-04-23  Bruno Haible  <bruno@clisp.org>
4719
4720         * lib/copy-file.c: Include <unistd.h> unconditionally.
4721         * lib/execute.c: Likewise.
4722         * lib/fatal-signal.c: Likewise.
4723         * lib/findprog.c: Likewise.
4724         * lib/mkdtemp.c: Likewise.
4725         * lib/pipe.h: Likewise.
4726         * lib/pipe.c: Likewise.
4727         * lib/wait-process.h: Likewise.
4728
4729 2006-04-23  Bruno Haible  <bruno@clisp.org>
4730
4731         * gnulib-tool (func_usage): Fix --import description. Document
4732         --update.
4733         (func_import): Create temporary file in a temporary directory, if
4734         --dry-run is specified. Silence errors from 'grep' when there are no
4735         m4 files in $m4dir.
4736         (func_create_testdir): Silence errors from 'grep' when there are no
4737         m4 files in $m4dir.
4738         Reported by Karl Berry <karl@freefriends.org>.
4739
4740 2006-04-20  Bruno Haible  <bruno@clisp.org>
4741
4742         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
4743         one argument, so that the code will be portable to Autoconf 2.60.
4744         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
4745         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
4746         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
4747
4748 2006-04-19  Derek Price  <derek@ximbiot.com>
4749             Eric Blake  <ebb9@byu.net>
4750
4751         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
4752         rather than "/full/path.h".  Update comment to match.  Shorten &
4753         generalize m4_translit call via AS_TR_CPP.
4754
4755 2006-04-19  Derek Price  <derek@ximbiot.com>
4756             Eric Blake  <ebb9@byu.net>
4757
4758         * lib/inttypes.h: Correct grammar in comment.
4759
4760 2006-04-18  Derek Price  <derek@ximbiot.com>
4761             Paul Eggert  <eggert@cs.ucla.edu>
4762
4763         * modules/inttypes: New file.
4764         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
4765
4766 2006-04-18  Derek Price  <derek@ximbiot.com>
4767             Paul Eggert  <eggert@cs.ucla.edu>
4768
4769         * m4/_inttypes_h.m4, full-header-path.m4, include_next: New files.
4770
4771 2006-04-18  Derek Price  <derek@ximbiot.com>
4772             Paul Eggert  <eggert@cs.ucla.edu>
4773
4774         * lib/inttypes.h: New file.
4775         * lib/strtoimax.c: Assume <inttypes.h>.
4776
4777 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
4778
4779         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
4780         isn't mounted.  Problem reported by Kir Kolyshkin.
4781
4782 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
4783
4784         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
4785         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
4786         Derek R. Price.
4787         * lib/regex.h (RE_DUP_MAX): Update comment to match current
4788         implementation.
4789
4790 2006-04-12  Eric Blake  <ebb9@byu.net>
4791
4792         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
4793         is now done automatically by the corresponding Autoconf macro.
4794
4795 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
4796
4797         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
4798         time_r.h.
4799
4800 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
4801
4802         Merge regex changes from libc, removing some of our
4803         POSIX-conformance changes that were rejected and redoing them in a
4804         less-intrusive way.
4805
4806         * lib/regcomp.c (re_compile_internal, init_dfa):
4807         Length arg is now size_t, not Idx.  All uses changed.
4808         (peek_token): Forward decl now says internal_function.
4809         (__re_error_msgid, __re_error_msgid_idx):
4810         Now static rather than extern with attribute_hidden.
4811         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
4812         For some reason libc prefers K&R style defns for external functions.
4813         (regerror) [!defined _LIBC]: Likewise.
4814         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
4815         (seek_collating_symbol_entry, lookup_collation_sequence_value):
4816         (build_range_exp, build_collating_symbol):
4817         Use K&R-style defn.
4818         (re_compile_fastmap): Use '\0' to memset, not 0.
4819         (utf8_sb_map): Make the calculations more obvious.
4820         (init_dfa, parse_bracket_exp, build_charclass_op):
4821         Call calloc and cast result, as glibc does.
4822         (init_word_char, fetch_token, peek_token, peek_token_bracket):
4823         (build_range_exp, build_collating_symbol):
4824         Now internal functions.
4825
4826         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
4827
4828         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
4829         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
4830         Don't depend on VMS; depend on __VMS instead, for POSIX
4831         namespace cleanness.
4832         (regoff_t): Define to ssize_t, not long int.
4833
4834         Remove the REG_ macros named below.  Instead, make the old names
4835         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
4836         __USE_GNU_REGEX.
4837         (REG_BACKSLASH_ESCAPE_IN_LISTS):
4838         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
4839         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
4840         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
4841         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
4842         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
4843         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
4844         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
4845         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
4846         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
4847         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
4848         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
4849         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
4850         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
4851         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
4852         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
4853         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
4854         (REG_NREGS):
4855         Remove.  All uses replaced by the old RE_* names.
4856         (RE_BACKSLASH_ESCAPE_IN_LISTS):
4857         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
4858         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
4859         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
4860         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
4861         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
4862         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
4863         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
4864         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
4865         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
4866         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
4867         Don't bother having these macros be independent of each others'
4868         values, since they no longer exist in the POSIX name space.
4869
4870         Rename the following member names back to their old names,
4871         unless !__USE_GNU_REGEX.  All uses changed back.
4872         (buffer): Renamed from re_buffer.
4873         (allocated): Renamed from re_allocated.
4874         (used): Renamed from re_used.
4875         (syntax): Renamed from re_syntax.
4876         (fastmap): Renamed from re_fastmap.
4877         (translate): Renamed from re_translate.
4878         (can_be_null): Renamed from re_can_be_null.
4879         (regs_allocated): Renamed from re_regs_allocated.
4880         (fastmap_accurate): Renamed from re_fastmap_accurate.
4881         (no_sub): Renamed from re_no_sub.
4882         (not_bol): Renamed from re_not_bol.
4883         (not_eol): Renamed from re_not_eol.
4884         (newline_anchor): Renamed from re_newline_anchor.
4885         (num_regs): Renamed from rm_num_regs.
4886         (start): Renamed from rm_start.
4887         (end): Renamed from rm_end.
4888
4889         (free_state): Move up a bit.
4890
4891         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
4892         #define to be empty.
4893         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
4894         when that is what is intended.
4895         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
4896         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
4897         (MAX): New macro.
4898         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
4899         All uses changed back to re_malloc, etc.  It's now the caller's
4900         responsibility to check for overflow; all callers changed.
4901         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
4902         (re_x2nrealloc): Remove.
4903         (free_state): Remove decl.
4904
4905         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
4906         (re_set_registers, re_exec):
4907         Use K&R-style defn.
4908
4909         2006-01-31  Roland McGrath  <roland@redhat.com>
4910
4911         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
4912         Reported by Mike Frysinger <vapier@gentoo.org>.
4913
4914         2006-01-15  Andreas Jaeger  <aj@suse.de>
4915
4916         [BZ #1950]
4917         * lib/regex_internal.c (re_string_reconstruct): Adjust for
4918         build_wcs_upper_buffer change.
4919         (build_wcs_upper_buffer): Change return type.
4920
4921         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
4922
4923         * lib/regex_internal.h: Include <stdint.h> if available.
4924
4925         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
4926
4927         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
4928
4929         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
4930
4931         * lib/regcomp.c: Adjust for changed secondary hash function.
4932
4933         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
4934
4935         * lib/regex.h: Pretty printing.
4936         Clean up namespace a bit.
4937
4938         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
4939
4940         * lib/regexec.c (update_cur_sifted_state, check_arrival,
4941         check_arrival_add_next_nodes): Avoid using uninitialized variable.
4942
4943         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
4944                     Ulrich Drepper  <drepper@redhat.com>
4945
4946         [BZ #1302]
4947         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
4948         changed.
4949         (bitset_word_t): Renamed from bitset_word.  All uses changed.
4950
4951         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
4952
4953         [BZ #281]
4954         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
4955         * lib/regcomp.c: Remove unnecessary uses of
4956         unsigned RE_TRANSLATE_TYPE.
4957         * lib/regex_internal.h: Likewise.
4958         * lib/regex_internal.c: Likewise.
4959         * lib/regexec.c: Likewise.
4960         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
4961
4962         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
4963
4964         * lib/regexec.c (find_recover_state): Remove unnecessary
4965         initialization.
4966         (transit_state_bkref): Make DFA a const pointer.
4967         (get_subexp): Likewise.
4968         (check_arrival): Likewise.
4969         (update_cur_sifted_state): Likewise.
4970         (re_search_internal): Likewise.
4971         (prune_impossible_nodes): Likewise.
4972         (acquire_init_state_context): Likewise.
4973         (proceed_next_node): Likewise.
4974         (set_regs): Likewise.
4975         (free_fail_stack_return): Likewise.
4976         (check_arrival_expand_ecl): Mark DFA parameter as const.
4977         (check_arrival_expand_ecl_sub): Likewise.
4978         (check_subexp_limits): Likewise.
4979         (sub_epsilon_src_nodes):  Likewise.
4980         (add_epsilon_src_nodes):  Likewise.
4981         (merge_state_array): Likewise.
4982         (update_regs): Likewise.
4983         (build_trtable): Likewise.
4984         (sift_states_backward): Mark MCTX parameter as const.
4985         (build_sifted_states): Likewise.
4986         (update_cur_sifted_state): Likewise.
4987         (sift_states_mkref): Likewise.
4988         (check_arrival_expand_ecl): Mark eclosure as const.
4989         (check_dst_limits_calc_pos_1): Likewise.
4990         * lib/regex_internal.h (re_match_context_t): Make dfa a const
4991         pointer.
4992
4993         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
4994
4995         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
4996         (transit_state_sb): Likewise.
4997         (transit_state_mb): Likewise.
4998         (sift_states_iter_mb): Likewise.
4999         (check_arrival_add_next_nodes): Likewise.
5000         (check_node_accept_bytes): Change first parameter to pointer-to-const.
5001         [_LIBC] (re_search_2_stub): Use mempcpy.
5002
5003         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
5004         mbrtowc for very simple UTF-8 case.
5005
5006         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
5007         a pointer-to-const.
5008         (re_acquire_state_context): Likewise.
5009         * lib/regex_internal.h: Adjust prototypes.
5010
5011         * lib/regex.c: Prevent using C++ compilers.
5012
5013         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
5014         (re_acquire_state_context): Likewise.
5015
5016 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5017
5018         * modules/regex (Depends-on): Add ssize_t.
5019
5020 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5021
5022         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
5023         translation table.
5024
5025 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
5026
5027         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
5028
5029 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
5030             Bruno Haible  <bruno@clisp.org>
5031
5032         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
5033         <sys/types.h> and <inttypes.h>.
5034
5035 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5036
5037         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
5038         `__error_t_defined', so argp.h will not typedef the former.
5039
5040 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
5041
5042         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
5043         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
5044         glibc names.  Even if glibc is changed to conform to POSIX, the
5045         traditional names will be available anyway, since regex depends on
5046         the extensions module.  Also, fix a longstanding typo in the
5047         implementation of Spencer ERE test #75 from grep 2.3.  Problems
5048         reported by Emanuele Giaquinta.  Also, change sense of cached
5049         variable, so that the message makes sense.
5050
5051 2006-03-24  Simon Josefsson  <jas@extundo.com>
5052
5053         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
5054         including some doc fixes.
5055         (base64_encode_alloc): Fix +1 bug on allocation failures.
5056
5057 2006-03-24  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5058
5059         * lib/base64.c (base64_encode): Do not read past end of array with
5060         unsanitized input on systems with CHAR_BIT > 8.
5061
5062 2006-03-24  Eric Blake  <ebb9@byu.net>
5063
5064         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
5065
5066 2006-03-22  Karl Berry  <karl@gnu.org>
5067
5068         * config/srclist.txt (*setenv.[ch]): get from coreutils.
5069         * config/srclistvars.sh (COREUTILS): new var.
5070
5071 2006-03-17  Jim Meyering  <jim@meyering.net>
5072
5073         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
5074         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
5075
5076 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
5077
5078         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
5079         no longer needs it.  Instead, check that regoff_t is as least
5080         as wide as ptrdiff_t.
5081
5082         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
5083         so that our regex.h stays compatible with the installed regex.
5084         This is helpful for installers who configure --without-included-regex.
5085         Problem reported by Emanuele Giaquinta.
5086
5087 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
5088
5089         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
5090         Typedef to long int, not to off_, as POSIX will likely change
5091         in that direction.
5092
5093 2006-03-15  Eric Blake  <ebb9@byu.net>
5094
5095         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
5096
5097 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
5098
5099         * lib/argp-help.c (validate_uparams): Fix typo
5100         * lib/argp-parse.c (argp_default_options): Consistently begin help
5101         messages with a lowercase letter.
5102
5103 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
5104
5105         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
5106         overrun buffers and shouldn't be used (much as gets shouldn't be
5107         used).
5108         * lib/time_r.c (asctime_r, ctime_r): Likewise.
5109
5110 2006-03-08  Simon Josefsson  <jas@extundo.com>
5111
5112         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
5113         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5114
5115 2006-03-08  Simon Josefsson  <jas@extundo.com>
5116
5117         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
5118         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5119
5120 2006-03-08  Simon Josefsson  <jas@extundo.com>
5121
5122         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
5123         signal that configure disabled the device.
5124
5125 2006-03-08  Simon Josefsson  <jas@extundo.com>
5126
5127         * build-aux/maint.mk: Fix refresh-po, to handle no translated
5128         languages.
5129
5130 2006-03-07  Simon Josefsson  <jas@extundo.com>
5131
5132         * modules/getopt (Depends-on): Add unistd.
5133
5134         * modules/unistd: New file.
5135
5136 2006-03-07  Simon Josefsson  <jas@extundo.com>
5137
5138         * modules/gc-random: New file.
5139
5140 2006-03-07  Simon Josefsson  <jas@extundo.com>
5141
5142         * m4/unistd_h.m4: New file.
5143
5144 2006-03-07  Simon Josefsson  <jas@extundo.com>
5145
5146         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
5147         test to be side-effect free by storing the result in the cache
5148         variable gl_cv_lib_readline, and moving the assignment of
5149         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
5150         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5151
5152 2006-03-07  Simon Josefsson  <jas@extundo.com>
5153
5154         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
5155         error on missing devices (the functions will return an error).
5156
5157         * m4/gc.m4: Move random stuff to gc-random.m4
5158
5159 2006-03-07  Simon Josefsson  <jas@extundo.com>
5160
5161         * lib/unistd_.h: New file.
5162
5163 2006-03-07  Simon Josefsson  <jas@extundo.com>
5164
5165         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
5166
5167 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
5168
5169         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
5170         Problem reported by Juan Manuel Guerrero.
5171
5172 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
5173
5174         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
5175         the unistd module.
5176         * lib/getlogin_r.c: Likewise.
5177         * lib/getlogin_r.h: Likewise.
5178         * lib/glob.c: Likewise.
5179         * lib/pagealign_alloc.c: Likewise.
5180         * lib/unistd_.h: Remove; no longer needed.
5181
5182 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
5183
5184         * MODULES.html.sh (Support for systems lacking POSIX:2001):
5185         Add unistd.
5186         * modules/c-stack (Depends-on): Add unistd.
5187         * modules/getlogin_r: Likewise.
5188         * modules/glob: Likewise.
5189         * modules/pagealign_alloc: Likewise.
5190         * modules/unistd (Files): Remove lib/unistd_.h.
5191         (EXTRA_DIST): Remove.
5192         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
5193         need unistd_.h.
5194         (MOSTLYCLEANFILES): Remove unistd.h-t.
5195
5196 2006-03-03  Simon Josefsson  <jas@extundo.com>
5197
5198         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
5199
5200 2006-03-03  Simon Josefsson  <jas@extundo.com>
5201
5202         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
5203         libidn and bison.
5204
5205 2006-03-03  Simon Josefsson  <jas@extundo.com>
5206
5207         * build-aux/maint.mk: Add indent target.
5208
5209 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
5210
5211         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
5212         our replacement poll.h in any case, to avoid a differing
5213         declaration from a system header.  Seen on AIX.
5214
5215 2006-03-01  Simon Josefsson  <jas@extundo.com>
5216
5217         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
5218         <kasal@ucw.cz>.
5219
5220 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5221
5222         * modules/gettime (Depends-on): Add extensions module.
5223         * modules/nanosleep (Depends-on): Likewise.
5224         * modules/settime (Depends-on): Likewise.
5225
5226 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5227
5228         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
5229         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
5230         pedantically.
5231         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
5232         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
5233
5234         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
5235         not "==".  Reported by Ralf Wildenhues.
5236
5237 2006-03-01  Karl Berry  <karl@gnu.org>
5238
5239         * doc/Copyright/request-*: new files, synced from gnuorg.
5240
5241 2006-03-01  Karl Berry  <karl@gnu.org>
5242
5243         * config/srclist.txt (Copyright/*): new entries.
5244
5245 2006-02-28  Simon Josefsson  <jas@extundo.com>
5246
5247         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
5248
5249 2006-02-27  Simon Josefsson  <jas@extundo.com>
5250
5251         * lib/base64.h: Indent #define's.  From Jim Meyering
5252         <jim@meyering.net>.
5253
5254 2006-02-27  Jim Meyering  <jim@meyering.net>
5255
5256         Revert the change of 2006-02-24, so these files can continue
5257         to be sync'd from gettext.
5258         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
5259         of `config.h'.
5260
5261 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
5262
5263         * modules/intprops: New file.
5264         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
5265         Add intprops.
5266         * modules/getloadavg (Files): Remove lib/intprops.h.
5267         (Depends-on): Add intprops.
5268         * modules/human: Likewise.
5269         * modules/inttostr: Likewise.
5270         * modules/openat: Likewise.
5271         * modules/sig2str: Likewise.
5272         * modules/userspec: Likewise.
5273         * modules/utimecmp: Likewise.
5274         * modules/xnanosleep: Likewise.
5275         * modules/xstrtol: Likewise.
5276
5277 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
5278
5279         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
5280         * modules/lock-tests (TESTS): Use $(EXEEXT).
5281         * modules/tls-tests: Likewise.
5282         * modules/argp-tests: Likewise.
5283         (check_PROGRAMS): New var, replacing...
5284         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
5285
5286 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5287
5288         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
5289         `config.h'.
5290
5291 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5292
5293         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
5294
5295 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5296
5297         Sync from coreutils.
5298         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
5299         gl_CHDIR_SAFER.
5300
5301 2006-02-22  Jim Meyering  <jim@meyering.net>
5302
5303         Sync from coreutils.
5304         * m4/chdir-safer.m4: New file.
5305
5306 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5307
5308         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
5309         AT_FDCWD exceeds INT_MAX.
5310         * lib/openat.h (AT_FDCWD): Likewise.
5311
5312 2006-02-17  Eric Blake  <address@hidden>
5313
5314         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
5315
5316 2006-02-16  Simon Josefsson  <jas@extundo.com>
5317
5318         * modules/getaddrinfo (Depends-on): Add sys_socket.
5319
5320 2006-02-15  Simon Josefsson  <jas@extundo.com>
5321
5322         * build-aux/maint.mk: Add dsyntax-check rule.
5323
5324 2006-02-15  Eric Blake  <ebb9@byu.net>
5325
5326         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
5327         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
5328         'present but cannot compile' warnings on cygwin.
5329         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
5330         use ws2tcpip.h if sys/socket.h works.
5331         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
5332         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
5333
5334 2006-02-14  Simon Josefsson  <jas@extundo.com>
5335
5336         * modules/maintainer-makefile (Files): Rename.
5337
5338         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
5339         and (the local) Makefile.cfg to maint-cfg.mk.
5340
5341         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
5342         to the latter.
5343
5344         * modules/maintainer-makefile: New module.
5345
5346         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
5347         severaly stripped to make it possible to build it up from scratch
5348         with reliable tests.
5349
5350         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
5351         fixes to permit overriding the default actions when configure and
5352         makefile are not available.
5353
5354 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
5355
5356         Sync from coreutils.
5357         * modules/lstat (Depends-on): Don't depend on xalloc.
5358         (License): Change from GPL to LGPL, since this is now simply a
5359         replacement for a libc function.
5360
5361 2006-02-14  Jim Meyering  <jim@meyering.net>
5362
5363         Sync from coreutils.
5364
5365         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
5366         failure on deficient systems, and simplify gnulib lgpl dependencies.
5367         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
5368         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
5369
5370         * lib/xalloc-die.c: Remove unused definition of N_.
5371
5372 2006-02-14  Jim Meyering  <jim@meyering.net>
5373
5374         Sync from coreutils.
5375         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
5376         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
5377         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
5378         double-quote uses of that variable, to accommodate the rare case in
5379         which getmntent is available in none of the libraries checked.  This
5380         happens at least on FreeBSD 5.0.
5381
5382 2006-02-13  Simon Josefsson  <jas@extundo.com>
5383
5384         * gnulib-tool (Usage): Fix --import, from
5385         karl@freefriends.org (Karl Berry).
5386
5387 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
5388
5389         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
5390
5391 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
5392
5393         * lib/argp-namefrob.h: Restore changes accidentally lost during the
5394         "autoupdate" on 2005-12-12.
5395
5396 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
5397
5398         * modules/closeout (Depends-on): Remove atexit.
5399
5400 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
5401
5402         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
5403         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
5404
5405 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
5406
5407         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
5408         __EXTENSIONS__ if this causes compilation to fail.  Problem
5409         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
5410         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
5411
5412 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
5413
5414         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
5415         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
5416         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
5417         All uses changed.
5418
5419 2006-01-26  Simon Josefsson  <jas@extundo.com>
5420
5421         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
5422         prototype is visible on mingw32.
5423
5424         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
5425         for mingw32.
5426
5427         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
5428         mingw32).
5429
5430 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
5431
5432         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
5433         attempt to open for write; this always fails, at least on POSIX
5434         hosts.  This reinstates the 2006-01-09 change, which was
5435         inadvertently removed.
5436
5437 2006-01-26  Bruno Haible  <bruno@clisp.org>
5438
5439         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
5440         Reported by Paul Eggert.
5441
5442 2006-01-26  Bruno Haible  <bruno@clisp.org>
5443             Paul Eggert  <eggert@cs.ucla.edu>
5444
5445         * lib/stdbool_.h (_Bool)
5446         [(! (defined __cplusplus || defined __BEOS__)
5447           && !defined __GNUC__
5448           && !(defined __HP_cc || defined __xlc__
5449                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
5450                || defined __sgi))]:
5451         #define to signed char in these cases too; this simplifies
5452         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
5453         etc., separately) and makes it more conservative.
5454
5455 2006-01-25  Simon Josefsson  <jas@extundo.com>
5456
5457         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
5458         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
5459         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
5460
5461 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
5462
5463         * lib/argp-namefrob.h: Bugfix. Remove stray #
5464
5465 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
5466
5467         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
5468         so that we test the test.
5469         Check for yet another HP-UX cc bug involving *bool |= bool.
5470
5471 2006-01-25  Karl Berry  <karl@gnu.org>
5472
5473         * config/srclist.txt (vasnprintf.c): sync lost.
5474
5475 2006-01-25  Jim Meyering  <jim@meyering.net>
5476
5477         Sync from the stable (b5) branch of coreutils:
5478
5479         * lib/fts.c (fts_children): Don't let close() clobber errno from
5480         failed fchdir().
5481
5482         * lib/fts.c (fts_stat): When following a symlink-to-directory,
5483         don't necessarily interpret stat-fails+lstat-succeeds as indicating
5484         a dangling symlink.  That can also happen at least for ELOOP.
5485         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
5486         FYI, this bug predates the inclusion of fts.c in coreutils.
5487
5488         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
5489         in their own block, so pre-c99 compilers don't object.
5490
5491         Avoid the double-free (first in fts_read, second in fts_close) that
5492         would occur when an `active' directory is made inaccessible (e.g.,
5493         via chmod a-x) during a traversal.
5494         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
5495         before returning.  Reproduce this failure by
5496         mkdir -p a/b; cd a; chmod a-x . b
5497         Reported by Stavros Passas.
5498
5499 2006-01-25  Jim Meyering  <jim@meyering.net>
5500
5501         * lib/fileblocks.c: Remove more useless parentheses.
5502         * lib/readutmp.h: Likewise.
5503
5504 2006-01-25  Bruno Haible  <bruno@clisp.org>
5505
5506         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
5507         warnings.
5508         Reported by Paul Eggert.
5509
5510 2006-01-25  Bruno Haible  <bruno@clisp.org>
5511
5512         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
5513         rid of a trap command. For Solaris sh.
5514         Reported by Mark D. Baushke <mdb@gnu.org>.
5515
5516 2006-01-24  Simon Josefsson  <jas@extundo.com>
5517
5518         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
5519         Bruno.
5520
5521 2006-01-24  Karl Berry  <karl@gnu.org>
5522
5523         * config/srclist.txt (argp-namefrob.h): sync lost.
5524
5525 2006-01-24  Jim Meyering  <jim@meyering.net>
5526
5527         * modules/openat (Files): Add lib/intprops.h.
5528         From Mark D. Baushke.
5529
5530 2006-01-24  Jim Meyering  <jim@meyering.net>
5531
5532         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
5533         Reported by Mark D. Baushke.
5534
5535 2006-01-24  Jim Meyering  <jim@meyering.net>
5536
5537         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
5538
5539 2006-01-24  Bruno Haible  <bruno@clisp.org>
5540
5541         * modules/strnlen (Maintainer): Change from glibc to all.
5542
5543 2006-01-24  Bruno Haible  <bruno@clisp.org>
5544
5545         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
5546         Patch by Paul Eggert.
5547
5548 2006-01-24  Bruno Haible  <bruno@clisp.org>
5549
5550         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
5551         already has it.
5552         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
5553         2005-11-26.
5554
5555         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
5556         'signed char' to avoid problems with the built-in _Bool type.
5557         Reported by Paul Eggert on 2005-11-26.
5558
5559 2006-01-24  Bruno Haible  <bruno@clisp.org>
5560
5561         * gnulib-tool (func_import): Avoid constructing complicated sed
5562         expressions inside backquote.
5563         Report and solution by Mark D. Baushke <mdb@gnu.org>.
5564
5565 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
5566
5567         These changes imported from libc.
5568         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
5569         test and two separate function calls.
5570         * lib/strndup.c (__strndup): Add libc_hidden_def.
5571
5572 2006-01-23  Simon Josefsson  <jas@extundo.com>
5573
5574         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
5575         Remove the test_*_SOURCES variable: automake infers it by default.
5576         * modules/tls-tests: Likewise.
5577
5578 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
5579
5580         Work around porting bugs reported by Dieter in
5581         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
5582         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
5583         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
5584         Include "getopt.h" first, to check interface.
5585         (getenv): Declare only if defined HAVE_DECL_GETENV &&
5586         !HAVE_DECL_GETENV.
5587         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
5588         (__strndup): Revert to K&R-style function dfns, the glibc style.
5589         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
5590         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
5591         Include strnlen.h first, to get prototype properly.
5592         (strnlen): Renamed from __strnlen.
5593         Remove weak alias.
5594
5595 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
5596
5597         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
5598
5599 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
5600
5601         * config/srclist.txt: Adjust to reflect glibc reorganization.
5602         This affects only comments.
5603
5604 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
5605
5606          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
5607          Reported by Bruce Korb <bkorb@gnu.org>.
5608
5609 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
5610
5611         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
5612         to pacify gcc -Wswitch-default.
5613
5614 2006-01-22  Bruno Haible  <bruno@clisp.org>
5615
5616         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
5617         temporary buffer for sprintf, take into account the precision also
5618         for 'd', 'i', 'u', 'o', 'x', 'X'.
5619
5620 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
5621
5622         * modules/argp-tests: New module
5623         * tests/test-argp.c: New file
5624         * tests/test-argp-2.sh: New file
5625
5626 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
5627
5628         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
5629         (__argp_base_name): Removed
5630         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
5631         typo.
5632         (__argp_base_name): Provide macro definition or extern declaration
5633         depending on the configuration
5634
5635 2006-01-20  Simon Josefsson  <jas@extundo.com>
5636
5637         * modules/inet_ntop (Depends-on): Depend on sys_socket.
5638
5639 2006-01-20  Simon Josefsson  <jas@extundo.com>
5640
5641         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
5642
5643 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
5644
5645         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
5646         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
5647         Suggested by Bruno Haible.
5648
5649 2006-01-20  Karl Berry  <karl@gnu.org>
5650
5651         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
5652         until changes propagate, I guess.
5653
5654 2006-01-19  Simon Josefsson  <jas@extundo.com>
5655
5656         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
5657
5658 2006-01-19  Simon Josefsson  <jas@extundo.com>
5659
5660         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
5661
5662 2006-01-19  Simon Josefsson  <jas@extundo.com>
5663
5664         * gnulib-tool: Set check_PROGRAMS.
5665
5666         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
5667         modules/des-tests, modules/gc-arcfour-tests,
5668         modules/gc-arctwo-tests, modules/gc-des-tests,
5669         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
5670         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
5671         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
5672         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
5673         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
5674         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
5675         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
5676         test_*_SOURCES.
5677
5678 2006-01-18  Simon Josefsson  <jas@extundo.com>
5679
5680         * modules/socklen (Depends-on): Depend on sys_socket.
5681
5682 2006-01-18  Simon Josefsson  <jas@extundo.com>
5683
5684         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
5685         modules/des-tests, modules/gc-arcfour-tests,
5686         modules/gc-arctwo-tests, modules/gc-des-tests,
5687         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
5688         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
5689         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
5690         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
5691         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
5692         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
5693         $(EXEEXT) to automake TESTS variable, for mingw32.
5694
5695 2006-01-17  Simon Josefsson  <jas@extundo.com>
5696
5697         * modules/socklen (Include): Need sys/socket.h.
5698
5699 2006-01-17  Bruno Haible  <bruno@clisp.org>
5700
5701         * modules/ssize_t (Include): Add <sys/types.h>.
5702
5703 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
5704
5705         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
5706         it's not portable and it doesn't work with cross-compiles.
5707         Problem reported by Bruno Haible.  Fix missing-$ typo in
5708         'test "gl_cv_ignore_unused_libraries" ...' that prevented
5709         -zignore from being used with Sun's C compiler.
5710
5711 2006-01-12  Simon Josefsson  <jas@extundo.com>
5712
5713         * lib/base64.c: Fix warning, reported by Bruno Haible
5714         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
5715
5716 2006-01-12  Bruno Haible  <bruno@clisp.org>
5717
5718         * modules/ldd: New file.
5719         * build-aux/ldd.sh.in: New file.
5720         * MODULES.html.sh (Support for building libraries and executables): Add
5721         ldd.
5722
5723 2006-01-12  Bruno Haible  <bruno@clisp.org>
5724
5725         * m4/ldd.m4: New file.
5726
5727 2006-01-12  Bruno Haible  <bruno@clisp.org>
5728
5729         * gnulib-tool (func_import, func_create_testdir): Don't go into an
5730         endless loop while replacing $auxdir with build-aux.
5731
5732 2006-01-11  Simon Josefsson  <jas@extundo.com>
5733
5734         * lib/stdint_.h (SIZE_MAX): Add missing (.
5735
5736 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
5737
5738         Sync from coreutils.
5739         * lib/md5.c: Fix commentary typos.
5740         (alignof, UNALIGNED_P): No need for a GCC-specific version.
5741         * lib/md5.h (__attribute__): Remove; unused.
5742         * lib/sha1.c: Fix commentary to match md5 better.
5743         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
5744         so that we don't need to worry about alignment.  All uses changed.
5745         This merges the 2005-10-28 md5 change into sha1.
5746
5747 2006-01-11  Jim Meyering  <jim@meyering.net>
5748
5749         Sync from coreutils.
5750         * lib/md5.c (OP): Fix spacing.
5751
5752 2006-01-11  Bruno Haible  <bruno@clisp.org>
5753
5754         Ensure automatic ordering between gl_LOCK and gl_ARGP.
5755         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
5756         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
5757
5758 2006-01-11  Bruno Haible  <bruno@clisp.org>
5759
5760         Ensure automatic ordering between gl_LOCK and gl_ARGP.
5761         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
5762         the "early" section as well.
5763
5764 2006-01-11  Bruno Haible  <bruno@clisp.org>
5765
5766         Avoid "ar: no archive members specified" error on MacOS X.
5767         * gnulib-tool (func_modules_add_dummy): New function.
5768         (func_import, func_create_testdir): Invoke it.
5769
5770 2006-01-11  Bruno Haible  <bruno@clisp.org>
5771
5772         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
5773         with $auxdir in AC_CONFIG_FILES statements.
5774
5775 2006-01-11  Bruno Haible  <bruno@clisp.org>
5776
5777         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5778         Initialize also noinst_HEADERS to empty.
5779
5780 2006-01-11  Bruno Haible  <bruno@clisp.org>
5781
5782         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
5783         variables.
5784         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
5785         autoreconf.
5786
5787 2006-01-11  Bruno Haible  <bruno@clisp.org>
5788
5789         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
5790         overridable by the user.
5791         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
5792
5793 2006-01-10  Simon Josefsson  <jas@extundo.com>
5794
5795         * modules/sys_socket: New file.
5796
5797 2006-01-10  Simon Josefsson  <jas@extundo.com>
5798
5799         * m4/sys_socket_h.m4: New file.
5800
5801 2006-01-10  Simon Josefsson  <jas@extundo.com>
5802
5803         * lib/socket_.h: New file.
5804
5805 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
5806
5807         * modules/readutmp (Maintainer): Add myself.
5808
5809 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
5810
5811         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
5812         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
5813         People who are still concerned with buggy memcmp implementations
5814         can invoke gl_FUNC_MEMCMP themselves.
5815
5816 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
5817
5818         * lib/regex_internal.h (BITSET_WORD_BITS):
5819         Work around a bug in 64-bit PGC (before version 6.1-2), where the
5820         preprocessor mishandles large unsigned values as if they were signed.
5821         Problem reported by Claudio Fontana in
5822         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
5823
5824 2006-01-10  Jim Meyering  <jim@meyering.net>
5825
5826         Avoid the double-free (first in fts_read, second in fts_close) that
5827         would occur when an `active' directory is made inaccessible (e.g.,
5828         via chmod a-x) during a traversal.
5829         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
5830         before returning.  Reproduce this failure by
5831         mkdir -p a/b; cd a; chmod a-x . b
5832         Reported by Stavros Passas.
5833
5834         Sync from coreutils.
5835         * lib/sha1.c: Tweak grammar in a comment.
5836
5837 2006-01-10  Jim Meyering  <jim@meyering.net>
5838
5839         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
5840         Patch by Joerg Sonnenberger.
5841
5842 2006-01-10  Bruno Haible  <bruno@clisp.org>
5843
5844         * modules/readutmp: Depend on module free.
5845         * modules/strtok_r: Depend on module restrict.
5846
5847 2006-01-10  Bruno Haible  <bruno@clisp.org>
5848
5849         * modules/gettext (configure.ac): Add an invocation of
5850         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
5851
5852 2006-01-10  Bruno Haible  <bruno@clisp.org>
5853
5854         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
5855         Reported by Werner Lemberg <wl@gnu.org>.
5856
5857 2006-01-10  Bruno Haible  <bruno@clisp.org>
5858
5859         * lib/localcharset.c: Update from GNU gettext.
5860
5861 2006-01-10  Bruno Haible  <bruno@clisp.org>
5862
5863         * lib/argp.h (__const): Remove macro. Use const instead.
5864         * lib/argp-fmtstream.h (__const): Likewise.
5865         * lib/glob_.h (__const): Remove macro.
5866         * lib/glob-libc.h: Use const instead of __const.
5867
5868 2006-01-10  Bruno Haible  <bruno@clisp.org>
5869
5870         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
5871         variable.
5872         Needed to avoid an automake error regarding the 'gettext' module.
5873
5874 2006-01-09  Simon Josefsson  <jas@extundo.com>
5875
5876         * modules/inet_ntop (Depends-on): Add restrict.
5877
5878 2006-01-09  Simon Josefsson  <jas@extundo.com>
5879
5880         * modules/gc-rijndael-tests (License): Put under LGPL.
5881
5882         * modules/gc-des-tests (License): Likewise.
5883
5884         * modules/gc-arcfour-tests (License): Likewise.
5885
5886         * modules/gc-arctwo-tests (License): Likewise.
5887
5888         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
5889
5890         * modules/gc-hmac-sha1-tests (Files): Likewise.
5891
5892         * modules/gc-hmac-md5-tests (License): Likewise.
5893
5894         * modules/gc-sha1-tests (License): Likewise.
5895
5896         * modules/gc-md5-tests (License): Likewise.
5897
5898         * modules/gc-md4-tests (License): Likewise.
5899
5900         * modules/gc-md2-tests (License): Likewise.
5901
5902         * modules/gc-tests (License): Likewise.
5903
5904         * modules/des-tests (License): Likewise.
5905
5906         * modules/md4-tests (License): Likewise.
5907
5908         * modules/md2-tests (License): Likewise.
5909
5910 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
5911
5912         Sync from coreutils:
5913
5914         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
5915         * modules/lib-ignore: New file.
5916         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
5917         chdir-safer.m4, lchmod.m4.
5918         * modules/openat: Add mkdirat.c, openat-priv.h.
5919
5920 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
5921
5922         Sync from coreutils.
5923         * m4/lib-ignore.m4: New file.
5924         * m4/lchmod.m4: New file.
5925
5926 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
5927
5928         Sync from coreutils.
5929         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
5930         for write access: POSIX says that must fail.
5931         * lib/fts.c (diropen): Likewise.
5932         * lib/save-cwd.c (save_cwd): Likewise.
5933         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
5934         well, for minor improvements on hosts that lack O_DIRECTORY.
5935         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
5936         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
5937         Fall back on chown if open failed with EACCES.
5938
5939         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
5940         Report an error at compile-time if only a 1-second nominal clock
5941         resolution is found.
5942
5943         * lib/lchmod.h: New file.
5944         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
5945         (make_dir_parents): Use lchown rather than chown, and
5946         lchmod rather than chmod.
5947
5948         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
5949         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
5950         "proc" reported by n0dalus.
5951
5952         * lib/mountlist.c: Include <limits.h>.
5953         (dev_from_mount_options)
5954         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
5955         New function.  It no longer assumes "dev=" has the System V meaning
5956         on Linux (since it doesn't).  It also parses "dev=" more carefully.
5957         (read_file_system_list)
5958         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
5959         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
5960         dev= in that case.
5961
5962         * lib/posixtm.h (PDS_PRE_2000): New macro.
5963         * lib/posixtm.c (year): Arg is now syntax_bits rather than
5964         allow_century.  All usages changed.  Reject dates outside the range
5965         1969-1999 if PDS_PRE_2000 is used.
5966
5967 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
5968
5969         Sync from coreutils.
5970         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
5971         (Time of day items): Mention the possibility of leap seconds.
5972         Problem reported by Dr. David Alan Gilbert.
5973
5974 2006-01-09  Jim Meyering  <jim@meyering.net>
5975
5976         Sync from coreutils.
5977
5978         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
5979
5980         * lib/chdir-safer.h, chdir-safer.c: New files.
5981
5982         * lib/modechange.c (mode_compile): Reject an invalid mode string
5983         that starts with an octal digit.  From Andreas Gruenbacher.
5984
5985         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
5986         and dup to open_safer and dup_safer, respectively.
5987         (openat_permissive): Fix typo in comment.
5988
5989         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
5990         "gettext.h"; either no longer needed or are guaranteed by openat.h.
5991         (_): Remove; no longer needed.
5992         (openat): Renamed from rpl_openat; no need for rpl_openat
5993         since openat.h renames openat for us.
5994         Replace most of the body with a call to openat_permissive,
5995         to avoid duplicate code.
5996         Port to (probably hypothetical) environments were mode_t is
5997         wider than int.
5998         (openat_permissive): Require mode arg, so that we can check
5999         types better.  Put it just after flags.  Change cwd failure
6000         indicator from pointer-to-bool to pointer-to-errno-value.
6001         All callers changed.
6002         Invoke openat_save_fail and/or openat_restore_fail if
6003         cwd_errno is null, so that openat can call us.
6004         (openat_permissive, fdopendir, fstatat, unlinkat):
6005         Simplify errno handling to avoid some duplicate code,
6006         as it's OK to set errno on success.
6007         * lib/openat.h: Revamp code so that function macros depend on
6008         __OPENAT_PREFIX only, not also on AT_FDCWD.
6009         (openat_ro): Remove.  Caller changed to use openat_permissive.
6010         (openat_permissive): Now a macro, if not a function.
6011         (openat_restore_fail, openat_save_fail): Now always functions,
6012         since mkdirat needs them even if __OPENAT_PREFIX is defined.
6013
6014         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
6015         and openat.c.
6016         * lib/mkdirat.c: Include openat-priv.h.
6017         Remove definitions of macros defined therein.
6018         * lib/openat.c: Likewise.
6019
6020         * lib/mkdirat.c (mkdirat): New file and function.
6021         * lib/openat.h (mkdirat): Declare.
6022
6023         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
6024
6025         * lib/openat.h (openat_permissive): Declare.
6026         (openat_ro): Define.
6027
6028         * lib/openat.c (EXPECTED_ERRNO): New macro.
6029         (openat_permissive): New function -- used in remove.c rewrite.
6030         (all functions): Set errno just before returning, only if there
6031         was an actual failure.
6032         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
6033
6034         Emulate openat-family functions using Linux's procfs, if possible.
6035         Idea and some code based on Ulrich Drepper's glibc changes.
6036
6037         * lib/openat.c: (BUILD_PROC_NAME): New macro.
6038         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
6039         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
6040         before falling back on save_cwd and restore_cwd.
6041         (fdopendir, fstatat, unlinkat): Likewise.
6042
6043         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
6044         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
6045
6046         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
6047         as second argument to va_arg.  Otherwise, some versions of gcc
6048         warn that `if this code is reached, the program will abort'.
6049
6050 2006-01-09  Jim Meyering  <jim@meyering.net>
6051
6052         Sync from coreutils.
6053         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
6054         Require openat-priv.h.
6055
6056 2006-01-09  Bruno Haible  <bruno@clisp.org>
6057
6058         * modules/strnlen (Include): Use strnlen.h.
6059
6060 2006-01-09  Bruno Haible  <bruno@clisp.org>
6061
6062         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
6063
6064 2006-01-09  Bruno Haible  <bruno@clisp.org>
6065
6066         * lib/sysexit_.h (EX_OK): New macro.
6067         Suggested by Martin Lambers <marlam@marlam.de>.
6068
6069 2006-01-09  Bruno Haible  <bruno@clisp.org>
6070
6071         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
6072         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
6073
6074 2006-01-09  Bruno Haible  <bruno@clisp.org>
6075
6076         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
6077         numbers.
6078
6079 2006-01-09  Bruno Haible  <bruno@clisp.org>
6080
6081         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
6082         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
6083         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
6084         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
6085
6086 2006-01-09  Bruno Haible  <bruno@clisp.org>
6087
6088         * build-aux/javacomp.sh.in: New file, moved from lib/.
6089         * modules/javacomp-script (Files): Update.
6090         (configure.ac): Add AC_CONFIG_FILES invocation.
6091         (EXTRA_DIST): Remove variable.
6092
6093         * build-aux/javaexec.sh.in: New file, moved from lib/.
6094         * modules/javaexec (Files): Update.
6095         (configure.ac): Add AC_CONFIG_FILES invocation.
6096         (EXTRA_DIST): Remove javaexec.sh.in.
6097
6098         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
6099         * modules/csharpcomp-script (Files): Update.
6100         (configure.ac): Add AC_CONFIG_FILES invocation.
6101         (EXTRA_DIST): Remove variable.
6102
6103         * build-aux/csharpexec.sh.in: New file, moved from lib/.
6104         * modules/csharpexec (Files): Update.
6105         (configure.ac): Add AC_CONFIG_FILES invocation.
6106         (EXTRA_DIST): Remove csharpexec.sh.in.
6107
6108 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
6109
6110         Sync from coreutils.
6111
6112         Add POSIX ACL support
6113         * lib/acl.h (copy_acl, set_acl): Add declarations.
6114         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
6115         systems other than Linux.
6116         (chmod_or_fchmod): New function: use fchmod when possible,
6117         and chmod otherwise.
6118         (file_has_acl): Add a POSIX ACL implementation, with a
6119         Linux-specific subcase.
6120         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
6121         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
6122         acls are unsupported.
6123         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
6124         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
6125         are unsupported.
6126
6127 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
6128
6129         Sync from coreutils.
6130         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
6131
6132 2006-01-07  Bruno Haible  <bruno@clisp.org>
6133
6134         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
6135         gl_EARLY.
6136
6137 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
6138
6139         * lib/strftime.c (tzname): Don't declare if it is already #defined.
6140         Problem reported for Mingw by Mark Junker.
6141
6142 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
6143
6144         * README: Gnulib normally doesn't generate a tarball.
6145
6146 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
6147
6148         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
6149         long int, not int, for nanosecond counts, so that people who are
6150         used to POSIX struct timespec won't be surprised.  Reported by Jim
6151         Meyering.
6152
6153 2005-12-28  Bruno Haible  <bruno@clisp.org>
6154
6155         * build-aux/config.rpath: Update from GNU gettext.
6156
6157 2005-12-16  Jim Meyering  <jim@meyering.net>
6158
6159         * modules/fprintftime: New module.
6160         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
6161
6162 2005-12-16  Jim Meyering  <jim@meyering.net>
6163
6164         * m4/fprintftime.m4: New file.
6165
6166 2005-12-16  Jim Meyering  <jim@meyering.net>
6167
6168         * lib/fprintftime.c, fprintftime.h: New files.
6169
6170 2005-12-15  Simon Josefsson  <jas@extundo.com>
6171
6172         * modules/socklen (configure.ac): Fix M4 macro name, to align with
6173         new m4/socklen.m4.
6174
6175 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6176
6177         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
6178         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
6179
6180 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
6181
6182         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
6183         * lib/argp-help.c (fill_in_uparams): Check if the constructed
6184         struct uparams is valid. Fall back to the default values if it is
6185         not.
6186
6187 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6188
6189         * modules/argp (Files): Add argp-pin.c
6190         (Depends-on): dirname
6191         (lib_SOURCES): Add argp-pin.c
6192
6193 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6194
6195         * m4/argp.m4:  Check if program_invocation_name and
6196         program_invocation_short_name are declared and define appropriate
6197         macros if they are not.
6198
6199 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
6200
6201         * lib/argp-help.c (__argp_base_name): New function
6202         (__argp_short_program_name): Rewrite using __argp_base_name
6203         * lib/argp-namefrob.h: Define program_invocation_name and
6204         program_invocation_short_name if requested
6205         (__argp_base_name): Add prototype
6206         * lib/argp-parse.c (argp_def): Use gettext wrappers
6207         (argp_default_parser): Use __argp_base_name
6208         * lib/argp-pin.c: New file. Defines program_invocation_name and
6209         program_invocation_short_name on systems that lack them.
6210
6211 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
6212
6213         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
6214         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
6215         porting problem reported by Georg Schwarz in
6216         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
6217
6218 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
6219
6220         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
6221         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
6222         porting problem reported by Georg Schwarz in
6223         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
6224
6225 2005-12-05  Bruno Haible  <bruno@clisp.org>
6226
6227         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
6228         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
6229         Reported by Mark Junker <mjscod@gmx.de>.
6230
6231 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
6232
6233         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
6234         Use implementation from Albert Chin, with some
6235         comments/corrections by Stepan Kasal and myself.
6236
6237 2005-12-02  Bruno Haible  <bruno@clisp.org>
6238
6239         * gnulib-tool (func_import): Accept GPLed build tool modules when
6240         --lgpl is given.
6241         * modules/csharpcomp-script: New file.
6242         * modules/csharpcomp: Depend on it.
6243         * modules/javacomp-script: New file.
6244         * modules/javacomp: Depend on it.
6245         Suggested by Simon Josefsson.
6246
6247 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
6248
6249         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
6250         statement, to work around an HP-UX 10.20 compiler bug reported by
6251         Peter O'Gorman.
6252
6253 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
6254
6255         * modules/savedir (Depends-on): Add openat.
6256
6257 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
6258
6259         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
6260         (uintmax_t) [defined uintmax_t]: Do not declare.
6261         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
6262         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
6263         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
6264         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
6265         sake of portability to weird hosts that C allows (though we don't
6266         know of any practical examples).
6267
6268         * lib/savedir.h (fdsavedir): New decl.
6269         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
6270         contains most of the former guts of savedir.
6271         (savedir): Use savedirstream.
6272         Include "openat.h".
6273
6274 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
6275
6276         * modules/obstack (Files): Add m4/ulonglong.m4.
6277         Problem reported by Davide Angelocola.
6278
6279 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
6280
6281         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
6282         coreutils no longer futzes with rounding modes.
6283
6284 2005-11-14  Jim Meyering  <jim@meyering.net>
6285
6286         * lib/mkstemp-safer.c: Include <config.h>, required for possible
6287         replacement of mkstemp.
6288
6289 2005-11-10  Simon Josefsson  <jas@extundo.com>
6290
6291         * lib/readline.c: Remove EOL.
6292
6293 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
6294
6295         * modules/gethrxtime (Depends-on): Add gettime.
6296
6297 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
6298
6299         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
6300         or gettimeofday; no longer needed.
6301
6302 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
6303
6304         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
6305         time business.
6306         (gethrxtime) [! (HAVE_NANOUPTIME
6307         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
6308         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
6309         our own approximation.
6310
6311 2005-11-08  Eric Blake  <ebb9@byu.net>
6312
6313         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
6314
6315 2005-11-08  Eric Blake  <ebb9@byu.net>
6316
6317         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
6318
6319 2005-11-04  Bruno Haible  <bruno@clisp.org>
6320
6321         * gnulib-tool: Implement --update mode.
6322
6323 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
6324
6325         Fix porting problem reported by Theodoros V. Kalamatianos.
6326         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
6327         Don't assume that futimes failing means we must fail.
6328
6329 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
6330
6331         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
6332         variables to suggest the intended function of the PATH_MAX check.
6333
6334 2005-10-30  Kean Johnston  <jkj@sco.com>
6335
6336         Trivial changes to support SCO systems.
6337         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
6338         as PATH_MAX.
6339         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
6340         where __ptr is null when no I/O is pending.
6341
6342 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
6343
6344         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
6345         leave errno alone.  Problem reported by Dmitry V. Levin.
6346
6347 2005-10-28  Simon Josefsson  <jas@extundo.com>
6348
6349         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
6350         Test more.
6351
6352         * tests/test-gc-md2.c, tests/test-md2.c: New files.
6353
6354         * modules/md2, modules/md2-tests: New files.
6355
6356 2005-10-28  Simon Josefsson  <jas@extundo.com>
6357
6358         * m4/inet_ntop.m4: More tests.
6359
6360         * m4/gc-md2.m4, md2.m4: New file.
6361
6362 2005-10-28  Simon Josefsson  <jas@extundo.com>
6363
6364         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
6365         "restrict" keywords, as per POSIX.  Protect the function
6366         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
6367         Don't use K&R prototypes.  Check the sprintf return values.
6368         Re-define EAFNOSUPPORT if not present.  Indent.
6369
6370         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
6371         suggested by Bruno Haible <bruno@clisp.org>.
6372
6373         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
6374
6375         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
6376
6377         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
6378         libgcrypt).
6379
6380         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
6381
6382         * lib/md2.h, md2.c: New files.
6383
6384 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
6385
6386         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
6387         errno alone.  Problem reported by Frederic Jolliton.
6388
6389 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
6390
6391         * modules/verify (License): Change from GPL to LGPL.  This is a
6392         tiny module and there are apparently near-equivalents that are
6393         under the BSD license.
6394
6395 2005-10-24  Simon Josefsson  <jas@extundo.com>
6396
6397         * modules/sha1: Relicense to LGPL.
6398
6399 2005-10-24  Simon Josefsson  <jas@extundo.com>
6400
6401         * lib/md4.h: Shrink buffer size, now that we changed the type.
6402
6403 2005-10-23  Simon Josefsson  <jas@extundo.com>
6404
6405         * gnulib-tool (func_import): Fix --tests-base.
6406
6407 2005-10-22  Simon Josefsson  <jas@extundo.com>
6408
6409         * modules/arcfour (Depends-on): Need stdint.
6410
6411 2005-10-22  Simon Josefsson  <jas@extundo.com>
6412
6413         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
6414         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
6415
6416 2005-10-22  Simon Josefsson  <jas@extundo.com>
6417
6418         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
6419         suggested by Bruno Haible <bruno@clisp.org>.
6420
6421 2005-10-22  Simon Josefsson  <jas@extundo.com>
6422
6423         * lib/crc.h: Include stddef.h, for size_t.
6424
6425 2005-10-22  Simon Josefsson  <jas@extundo.com>
6426
6427         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
6428         arcfour_context struct (simplify test vector testing in GNU
6429         Shishi).
6430
6431 2005-10-21  Simon Josefsson  <jas@extundo.com>
6432
6433         * modules/des, modules/des-tests: New files.
6434
6435         * modules/gc-des, modules/gc-des-tests: New files.
6436
6437         * tests/test-des.c, tests/test-gc-des.c: New file.
6438
6439 2005-10-21  Simon Josefsson  <jas@extundo.com>
6440
6441         * modules/arctwo, modules/arctwo-tests: New files.
6442
6443         * tests/test-arctwo.c: New file.
6444
6445         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
6446
6447         * tests/test-gc-arctwo.c: New file.
6448
6449 2005-10-21  Simon Josefsson  <jas@extundo.com>
6450
6451         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
6452         Bruno Haible <bruno@clisp.org>.
6453
6454         * m4/gc-des.m4: New file.
6455
6456 2005-10-21  Simon Josefsson  <jas@extundo.com>
6457
6458         * m4/arctwo.m4: New file.
6459
6460         * m4/gc-arctwo.m4: New file.
6461
6462 2005-10-21  Simon Josefsson  <jas@extundo.com>
6463
6464         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
6465         block.
6466
6467 2005-10-21  Simon Josefsson  <jas@extundo.com>
6468
6469         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
6470         <bruno@clisp.org>.
6471
6472         * lib/hmac-sha1.c (hmac_sha1): Likewise.
6473
6474         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
6475         Bruno Haible <bruno@clisp.org>.
6476
6477         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
6478         <bruno@clisp.org>.
6479
6480 2005-10-21  Simon Josefsson  <jas@extundo.com>
6481
6482         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
6483
6484 2005-10-21  Simon Josefsson  <jas@extundo.com>
6485
6486         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
6487
6488 2005-10-21  Simon Josefsson  <jas@extundo.com>
6489
6490         * lib/des.h, des.c: New files.
6491
6492         * lib/gc-gnulib.c: Support DES.c
6493
6494 2005-10-21  Simon Josefsson  <jas@extundo.com>
6495
6496         * lib/arctwo.h, arctwo.c: New files.
6497
6498         * lib/gc-gnulib.c: Support ARCTWO.
6499
6500 2005-10-21  Simon Josefsson  <jas@extundo.com>
6501
6502         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
6503         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6504
6505 2005-10-21  Simon Josefsson  <jas@extundo.com>
6506
6507         * gnulib-tool (func_import, func_create_testdir): Define automake
6508         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
6509         Makefile.am snippet),
6510         suggested by Bruno Haible <bruno@clisp.org>.
6511
6512         * modules/gc (Makefile.am): Use it.
6513
6514 2005-10-21  Bruno Haible  <bruno@clisp.org>
6515
6516         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
6517         patch.
6518
6519 2005-10-19  Simon Josefsson  <jas@extundo.com>
6520
6521         * tests/test-gc-rijndael.c: New file.
6522
6523         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
6524
6525 2005-10-19  Simon Josefsson  <jas@extundo.com>
6526
6527         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
6528         interface too.
6529
6530 2005-10-19  Simon Josefsson  <jas@extundo.com>
6531
6532         * tests/test-gc-arcfour.c: New file.
6533
6534         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
6535
6536 2005-10-19  Simon Josefsson  <jas@extundo.com>
6537
6538         * modules/gc-md4, modules/gc-md4-tests: New file.
6539
6540         * tests/test-gc-md4.c: New file.
6541
6542 2005-10-19  Simon Josefsson  <jas@extundo.com>
6543
6544         * m4/gc-md4.m4: New file.
6545
6546 2005-10-19  Simon Josefsson  <jas@extundo.com>
6547
6548         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
6549         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
6550         <kasal@ucw.cz>.
6551
6552 2005-10-19  Simon Josefsson  <jas@extundo.com>
6553
6554         * m4/gc-arcfour.m4: New file.
6555
6556         * m4/gc-rijndael.m4: New file.
6557
6558 2005-10-19  Simon Josefsson  <jas@extundo.com>
6559
6560         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
6561
6562 2005-10-19  Simon Josefsson  <jas@extundo.com>
6563
6564         * lib/gc-gnulib.c: Support ARCFOUR.
6565
6566 2005-10-19  Simon Josefsson  <jas@extundo.com>
6567
6568         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
6569         support.
6570
6571         * lib/gc.h: Add ECB enum type.
6572
6573         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
6574
6575 2005-10-18  Simon Josefsson  <jas@extundo.com>
6576
6577         * tests/test-md5.c: New file.
6578
6579         * modules/md5-tests: New file.
6580
6581 2005-10-18  Simon Josefsson  <jas@extundo.com>
6582
6583         * tests/test-md4.c: New file.
6584
6585         * modules/md4, modules/md4-tests: New files.
6586
6587 2005-10-18  Simon Josefsson  <jas@extundo.com>
6588
6589         * m4/md4.m4: New file.
6590
6591 2005-10-18  Simon Josefsson  <jas@extundo.com>
6592
6593         * lib/md4.h, md4.c: New files, based on md5.?.
6594
6595 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
6596
6597         * gnulib-tool (func_create_testdir): Omit the second check whether
6598         BUILT_SOURCES in nonempty.
6599
6600 2005-10-17  Simon Josefsson  <jas@extundo.com>
6601
6602         * tests/test-rijndael.c: New file.
6603
6604 2005-10-17  Simon Josefsson  <jas@extundo.com>
6605
6606         * modules/sha1: Depend on stdint instead of md5.
6607
6608         * modules/md5: Depend on stdint, remove uint32_t.
6609
6610 2005-10-17  Simon Josefsson  <jas@extundo.com>
6611
6612         * modules/gc-sha1-tests: New file.
6613
6614         * tests/test-gc-sha1.c: New file.
6615
6616 2005-10-17  Simon Josefsson  <jas@extundo.com>
6617
6618         * m4/md5.m4: Remove call to uint32_t.m4.
6619
6620 2005-10-17  Simon Josefsson  <jas@extundo.com>
6621
6622         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
6623
6624         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
6625         md5.h.
6626
6627         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
6628
6629         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
6630
6631 2005-10-17  Simon Josefsson  <jas@extundo.com>
6632
6633         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
6634
6635 2005-10-17  Simon Josefsson  <jas@extundo.com>
6636
6637         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
6638
6639 2005-10-17  Simon Josefsson  <jas@extundo.com>
6640
6641         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
6642
6643         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
6644
6645 2005-10-17  Bruno Haible  <bruno@clisp.org>
6646
6647         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
6648         that it can also be used in a test.
6649
6650 2005-10-16  Bruno Haible  <bruno@clisp.org>
6651
6652         * gnulib-tool (func_emit_tests_Makefile_am): Also define
6653         TESTS_ENVIRONMENT, so that individual tests can augment it.
6654
6655         * gnulib-tool (func_create_testdir): Use an intermediate target for
6656         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
6657         macros, like $(ALLOCA_H), which cannot be passed through the command
6658         line.
6659
6660 2005-10-15  Simon Josefsson  <jas@extundo.com>
6661
6662         * modules/rijndael-tests: New file.
6663
6664         * modules/rijndael: New file.
6665
6666 2005-10-15  Simon Josefsson  <jas@extundo.com>
6667
6668         * m4/rijndael.m4: New file.
6669
6670 2005-10-15  Simon Josefsson  <jas@extundo.com>
6671
6672         * lib/rijndael-api-fst.h, rijndael-api-fst.c: New files.
6673
6674         * lib/rijndael-alg-fst.h, rijndael-alg-fst.c: New files.
6675
6676 2005-10-14  Simon Josefsson  <jas@extundo.com>
6677
6678         * tests/test-arcfour.c: New file.
6679
6680         * modules/arcfour, modules/arcfour-tests: New files.
6681
6682 2005-10-14  Simon Josefsson  <jas@extundo.com>
6683
6684         * m4/arcfour.m4: New file.
6685
6686 2005-10-14  Simon Josefsson  <jas@extundo.com>
6687
6688         * lib/arcfour.h, arcfour.c: New files.
6689
6690 2005-10-14  Roland McGrath  <roland@redhat.com>
6691
6692         Import from libc.  [BZ #1331]
6693         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
6694         macro argument.
6695         Reported by Matej Vela <vela@debian.org>.
6696
6697 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
6698
6699         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
6700         include <wchar.h>; no longer needed.
6701
6702 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
6703
6704         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
6705
6706 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
6707         and  Ulrich Drepper  <drepper@redhat.com>
6708
6709         Import from libc.
6710         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
6711         instead of inline stream orientation test and two separate
6712         function calls.  Pay no attention to USE_IN_LIBIO.
6713
6714 2005-10-13  Simon Josefsson  <jas@extundo.com>
6715
6716         * modules/gc-hmac-md5-tests: New file.
6717
6718         * tests/test-gc-hmac-sha1.c: New file.
6719
6720         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
6721
6722         * modules/gc-hmac-md5-tests: New file.
6723
6724         * tests/test-gc-md5.c: New file.
6725
6726         * modules/gc-md5-tests: New file.
6727
6728 2005-10-13  Simon Josefsson  <jas@extundo.com>
6729
6730         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
6731         Move memory allocation outside of loop.
6732
6733 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
6734
6735         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
6736         intermediate directory is in a read-only file system.  Problem
6737         reported by Eric Blake.
6738
6739 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
6740
6741         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
6742
6743 2005-10-12  Simon Josefsson  <jas@extundo.com>
6744
6745         * tests/test-hmac-sha1.c: New file.
6746
6747         * modules/hmac-sha1-tests: New file.
6748
6749         * modules/hmac-sha1: New file.
6750
6751 2005-10-12  Simon Josefsson  <jas@extundo.com>
6752
6753         * modules/gc-sha1: New file.
6754
6755 2005-10-12  Simon Josefsson  <jas@extundo.com>
6756
6757         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
6758
6759         * tests/test-gc-pbkdf2-sha1.c: New file.
6760
6761 2005-10-12  Simon Josefsson  <jas@extundo.com>
6762
6763         * modules/gc-md5, modules/gc-hmac-md5: New files.
6764
6765         * modules/gc (Files): Remove md5, memxor and hmac files.
6766
6767 2005-10-12  Simon Josefsson  <jas@extundo.com>
6768
6769         * m4/gc-pbkdf2-sha1.m4: New file.
6770
6771         * m4/gc-hmac-sha1.m4: New file.
6772
6773         * m4/gc-sha1: New file.
6774
6775         * m4/hmac-sha1.m4: New file.
6776
6777 2005-10-12  Simon Josefsson  <jas@extundo.com>
6778
6779         * m4/gc-md5.m4, gc-hmac-md5: New files.
6780
6781         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
6782
6783 2005-10-12  Simon Josefsson  <jas@extundo.com>
6784
6785         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
6786         suggested by Bruno Haible <bruno@clisp.org>.
6787
6788 2005-10-12  Simon Josefsson  <jas@extundo.com>
6789
6790         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
6791
6792 2005-10-12  Simon Josefsson  <jas@extundo.com>
6793
6794         * lib/gc-pbkdf2-sha1.c: New file.
6795
6796         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
6797
6798 2005-10-12  Simon Josefsson  <jas@extundo.com>
6799
6800         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
6801
6802         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
6803
6804 2005-10-12  Simon Josefsson  <jas@extundo.com>
6805
6806         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
6807         GC_USE_HMAC_MD5, respectively.
6808
6809         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
6810         (gc_md5): Fix typo.
6811
6812         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
6813
6814         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
6815
6816         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
6817
6818 2005-10-12  Bruno Haible  <bruno@clisp.org>
6819
6820         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
6821         Reported by Stepan Kasal <kasal@ucw.cz>.
6822
6823 2005-10-11  Simon Josefsson  <jas@extundo.com>
6824
6825         * tests/test-crc.c: New file.
6826
6827         * modules/crc, modules/crc-tests: New files.
6828
6829 2005-10-11  Simon Josefsson  <jas@extundo.com>
6830
6831         * m4/crc.m4: New file.
6832
6833 2005-10-11  Simon Josefsson  <jas@extundo.com>
6834
6835         * lib/gc.h: Add gc_hash and gc_hash_buffer.
6836
6837         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
6838
6839         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
6840
6841 2005-10-11  Simon Josefsson  <jas@extundo.com>
6842
6843         * lib/crc.h, crc.c: New files.
6844
6845         * lib/gc.h (gc_hash_buffer): Add doc.
6846
6847 2005-10-11  Bruno Haible  <bruno@clisp.org>
6848
6849         * modules/c-strcasestr: New file.
6850         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
6851
6852 2005-10-11  Bruno Haible  <bruno@clisp.org>
6853
6854         * modules/c-strcase: New file.
6855         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
6856
6857 2005-10-11  Bruno Haible  <bruno@clisp.org>
6858
6859         * lib/strcasecmp.c: Include limits.h.
6860         (strcasecmp): Avoid integer overflow on exotic platforms.
6861         * lib/strncasecmp.c: Include limits.h.
6862         (strncasecmp): Avoid integer overflow on exotic platforms.
6863         Reported by Paul Eggert.
6864
6865 2005-10-11  Bruno Haible  <bruno@clisp.org>
6866
6867         * lib/c-strcasestr.h: New file, from GNU gettext.
6868         * lib/c-strcasestr.c: New file, from GNU gettext.
6869
6870 2005-10-11  Bruno Haible  <bruno@clisp.org>
6871
6872         * lib/c-strcase.h: New file, from GNU gettext.
6873         * lib/c-strcasecmp.c: New file, from GNU gettext.
6874         * lib/c-strncasecmp.c: New file, from GNU gettext.
6875
6876 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
6877
6878         * modules/mempcpy (License): GPL -> LGPL.
6879         * modules/strchrnul (License): Likewise.
6880         * modules/sysexits (License): Likewise.
6881
6882 2005-10-08  Simon Josefsson  <jas@extundo.com>
6883
6884         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
6885
6886 2005-10-07  Simon Josefsson  <jas@extundo.com>
6887
6888         * m4/memxor.m4: Remove gl_C_RESTRICT call.
6889
6890 2005-10-06  Simon Josefsson  <jas@extundo.com>
6891
6892         * tests/test-hmac-md5.c: New file.
6893
6894         * modules/hmac-md5-tests: New file.
6895
6896         * modules/hmac-md5: New file.
6897
6898 2005-10-06  Simon Josefsson  <jas@extundo.com>
6899
6900         * m4/hmac-md5.m4: New file.
6901
6902         * m4/memxor.m4: Require gl_C_RESTRICT.
6903
6904 2005-10-06  Simon Josefsson  <jas@extundo.com>
6905
6906         * lib/memxor.c (memxor): Avoid casts and warnings.
6907
6908 2005-10-06  Simon Josefsson  <jas@extundo.com>
6909
6910         * lib/hmac-md5.c: New file.
6911
6912         * lib/hmac.h: New file.
6913
6914 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
6915
6916         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
6917         promotes to int, not unsigned int, to catch the AIX 5.3
6918         compiler bug.
6919
6920 2005-10-05  Simon Josefsson  <jas@extundo.com>
6921
6922         * modules/memxor: New file.
6923
6924         * modules/iconv (Files): Move config.rpath to havelib, it is used
6925         there.
6926
6927         * modules/havelib (Files): Add config.rpath.
6928
6929 2005-10-05  Simon Josefsson  <jas@extundo.com>
6930
6931         * m4/memxor.m4: New file.
6932
6933 2005-10-05  Simon Josefsson  <jas@extundo.com>
6934
6935         * lib/memxor.c (memxor): Fix compiler error.
6936
6937         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
6938         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
6939
6940         * lib/memxor.h, memxor.c: New files.
6941
6942         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
6943         we assume all systems have it, suggested by Jim Meyering
6944         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
6945         any systems lack sys/socket.h; mingw32 is known to lack it, but we
6946         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
6947         same reasons.
6948
6949 2005-10-05  Simon Josefsson  <jas@extundo.com>
6950
6951         * config/srclist.txt: Add glibc bug 1423 for md5.h.
6952
6953 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
6954
6955         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
6956         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
6957         needed, since the source code now assumes these .h files.
6958
6959 2005-10-05  Derek Price  <derek@ximbiot.com>
6960
6961         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
6962
6963 2005-10-05  Bruno Haible  <bruno@clisp.org>
6964
6965         * modules/stdint (License): Change to LGPL.
6966
6967 2005-10-04  Simon Josefsson  <jas@extundo.com>
6968
6969         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
6970         D. Baushke" <mdb@gnu.org>.
6971
6972 2005-10-04  Bruno Haible  <bruno@clisp.org>
6973
6974         * lib/verify.h (verify_true): Provide alternative definition for C++.
6975
6976 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
6977
6978         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
6979         (SSIZE_MAX): New macro, if not already defined.
6980         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
6981         than 2 GiB.
6982
6983 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
6984
6985         Sync from coreutils.
6986         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
6987         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
6988         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
6989         ULLONG_MAX doesn't work with 2.7.2.1.
6990
6991 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
6992
6993         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
6994         From Ben Pfaff.
6995
6996         * modules/exclude (Depends-on): Depend on verify.
6997         * modules/strtoimax (Depends-on): Likewise.
6998         * modules/utimecmp (Depends-on): Likewise.
6999
7000 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
7001
7002         * lib/exclude.c: Include verify.h.
7003         (verify): Remove.  All callers changed to use verify.h's version.
7004         * lib/strtoimax.c: Likewise.
7005         * lib/utimecmp.c: Likewis.e
7006
7007         Sync from coreutils.
7008         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
7009         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
7010         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
7011         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
7012         bother returning ENOSYS if settimeofday or stime fails; just let
7013         them return whatever errno they want to return.
7014         * lib/utimens.c: Include unistd.h, for dup2.
7015         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
7016         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
7017
7018 2005-10-02  Jim Meyering  <jim@meyering.net>
7019
7020         Sync from coreutils.
7021         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
7022         from glibc-2.2.5 that fails for read-only files.
7023
7024 2005-10-02  Jim Meyering  <jim@meyering.net>
7025
7026         Sync from coreutils.
7027         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
7028         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
7029         `#if HAVE_CONFIG_H'.
7030         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
7031         Remove AT_FDCWD test.
7032         Do not consume the fd unless successful.
7033         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
7034         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
7035         block, so that we don't even try to compile it if settimeofday is
7036         available.  This works around a compilation failure on OSF1 V5.1,
7037         due to stime requiring a `long int*' while tv_sec is `int'.
7038
7039 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
7040
7041         Sync from coreutils.
7042         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
7043         against `yes', rather than just testing for nonempty.
7044
7045 2005-10-01  Simon Josefsson  <jas@extundo.com>
7046
7047         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
7048         and Darwin.
7049
7050         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
7051         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
7052         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
7053         freeaddrinfo and gai_strerror are declared by the POSIX headers.
7054         Check if struct addrinfo is declared.
7055
7056 2005-10-01  Simon Josefsson  <jas@extundo.com>
7057
7058         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
7059         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
7060         AI_* and EAI_* definitions.  Protect function declarations.
7061
7062 2005-10-01  Jim Meyering  <jim@meyering.net>
7063
7064         Sync from coreutils.
7065
7066         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
7067         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
7068         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
7069         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
7070         in the inet and nsl libraries.  Required on Solaris 5.7.
7071
7072 2005-10-01  Jim Meyering  <jim@meyering.net>
7073
7074         Sync from coreutils.
7075         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
7076         in the inet and nsl libraries.  Required on Solaris 5.7.
7077
7078 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
7079
7080         * lib/getdelim.c (getdelim): Remove unused variables.
7081
7082 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
7083
7084         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
7085         so that the code works even with ancient cpp.  Portability problem
7086         with GCC 2.7.2.1 reported by Thomas M.Ott.
7087
7088 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
7089
7090         * modules/regex (Depends-on): Add strcase.
7091
7092         * modules/gethostname (Licence): Change from GPL to LGPL, since
7093         gethostname.c is a trivial implementation of a standard library
7094         function.
7095         * modules/poll (License): Change from GPL to LGPL, since it's
7096         derived from LGPL code.
7097
7098 2005-09-27  Jim Meyering  <jim@meyering.net>
7099
7100         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
7101         HAVE_CONFIG_H.
7102
7103         * lib/intprops.h (signed_type_or_expr__): Define.
7104         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
7105         for unsigned types.
7106
7107 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
7108
7109         * lib/verify.h (verify_expr): Remove, replacing with:
7110         (verify_true): New macro that returns true instead of void.
7111         (verify_type__): Remove.
7112         (verify): Use verify_true rather than verify_type__.
7113
7114 2005-09-26  Bruno Haible  <bruno@clisp.org>
7115
7116         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
7117         is necessary.
7118         (lib_SOURCES): Remove mbchar.c.
7119         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
7120         (Files): Add m4/mbrtowc.m4.
7121         * modules/mbiter: Likewise.
7122         * modules/mbuiter: Likewise.
7123
7124 2005-09-26  Bruno Haible  <bruno@clisp.org>
7125
7126         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
7127         compile mbchar.c if they are not both present.
7128         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
7129         * m4/mbiter.m4 (gl_MBITER): Likewise.
7130         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
7131         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
7132         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
7133
7134 2005-09-25  Jim Meyering  <jim@meyering.net>
7135
7136         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
7137         also uses socklen_t.
7138
7139 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
7140
7141         * lib/utimens.c (ENOSYS): Define if not already defined.
7142         (futimens): Support having a null PATH if the file descriptor
7143         is nonnegative.
7144
7145         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
7146         Remove.
7147         (__attribute): Define to empty unless GCC 3.1 or later.
7148         This works around a core dump on OpenBSD 3.4, which has GCC
7149         2.95.3, which dumps core when given __attribute__(()).  It also
7150         simplifies other tests, since we really don't want to bother with
7151         worrying about which ancient version of GCC supported what.
7152         Original problem reported by Yoann Vandoorselaere, with part of
7153         the fix suggested by Derek Price.
7154
7155 2005-09-24  Jim Meyering  <jim@meyering.net>
7156
7157         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
7158         so we can once again use a positive bitfield width of 1 -- now we
7159         don't have to explain why we were using a bitfield width of 2.
7160
7161 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
7162
7163         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
7164         and similarly for the other external symbols.  Problem reported
7165         by James Gallager.
7166
7167         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
7168         bug reported by Jim Meyering.
7169
7170         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
7171         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
7172         not needed, since socklen is a prerequisite module.
7173
7174 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
7175
7176         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
7177         Problem reported by Eric Blake.
7178         (getaddrinfo): Initialize se so that it's not garbage.
7179         Redo internal storage allocation so that it doesn't make unportable
7180         assumptions about alignment.
7181         Fix a memory leak.
7182
7183         * lib/utimens.c (futimens): Use futimesat if available.
7184         Prefer it to futimes since it doesn't have the futimes bug.
7185
7186         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
7187         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
7188         Instead, declare a function that returns a pointer to an array,
7189         and use verify_type__ to declare the size of the array.
7190         Problem and germ of a solution reported by Bruno Haible.
7191         (verify_type__): Use 2, not 1, for bitfield size, to avoid
7192         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
7193
7194 2005-09-23  Jim Meyering  <jim@meyering.net>
7195
7196         Sync from coreutils.
7197         Correct build failure (socklen_t not defined) on at least
7198         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
7199         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
7200
7201 2005-09-23  Jim Meyering  <jim@meyering.net>
7202
7203         * modules/getaddrinfo (Depends-on): Add socklen.
7204
7205 2005-09-23  Bruno Haible  <bruno@clisp.org>
7206
7207         * tests/test-verify.c: New file.
7208
7209 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7210
7211         Sync from coreutils.
7212
7213         * modules/argmatch (Depends-on): Add verify.
7214         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
7215         unistd-safer.
7216         * modules/save-cwd (Depends-on): Likewise.
7217
7218         * modules/openat (Files): Add lib/openat-die.c.
7219         (Depends-on): Remove error, exitfail.
7220         Add dirname.
7221
7222         * modules/verify: New file.
7223         * MODULES.html.sh (Diagnostics <assert.h>): New section,
7224         with "verify" module.
7225
7226 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7227
7228         Sync from coreutils.
7229
7230         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
7231         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
7232         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
7233         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
7234         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
7235         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
7236         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
7237         Don't bother checking for string.h, stdlib.h, unistd.h.
7238         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
7239         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
7240         module's job.
7241         * m4/jm-macros.m4 (gl_MACROS): Likewise.
7242         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
7243
7244         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
7245         (gl_GETDATE): Use it.
7246
7247         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
7248
7249 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7250
7251         Sync from coreutils.
7252
7253         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
7254         stat-time.h.
7255         * lib/argmatch.h: Include verify.h
7256         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
7257         (ARGMATCH_ASSERT): Remove; unused.
7258         * lib/canonicalize.c: Assume STDC_HEADERS.
7259         * lib/exclude.c: Include "strcase.h".
7260         * lib/regex_internal.h [!defined _LIBC]: Likewise.
7261         * lib/getusershell.c: Include stdio--.h rather than stdio.h
7262         and stdio-safer.h.
7263         (getusershell): Call fopen, not fopen_safer.
7264         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
7265         Do not include unistd-safer.h.
7266         (save_cwd): Don't call fd_safer; no longer needed
7267         now that we include fcntl--.h.
7268
7269         * lib/getdate.y (relative_time): New type.
7270         (RELATIVE_TIME_0): New constant.
7271         (parser_control): Use relative_time instead of doing it ourselves.
7272         (%union): Add new relative_time rel member.
7273         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
7274         Now typeless.
7275         (relunit, relunit_snumber): Now of type rel.
7276         (zone, rel, relunit, get_date): Adjust to above changes.
7277
7278         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
7279         Do not include unistd-safer.h.
7280         (getloadavg): Don't call fd_safer; no longer needed
7281         now that we include fcntl--.h.
7282
7283         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
7284         (make_dir_parents): Treat ENOSYS like EEXIST.
7285
7286         Improve quality of diagnostics on restore_cwd failure.
7287         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
7288         (make_dir_parents): Last arg is now int * (for errno), not bool *.
7289         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
7290         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
7291         each time through the loop.  Do not diagnose restore_cwd failure;
7292         that is the caller's job (and perhaps the caller does not care).
7293
7294         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
7295         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
7296         If the file already exists but is not a directory, don't bother
7297         to try to make its parents.
7298         Close potential file descriptor leak if we can't chdir("/") (!).
7299         Don't always return true if chdir($PWD) fails; return true only
7300         if the requested action was done successfully (except for the
7301         chdir($PWD)).
7302         Don't log final directory unless we actually made it.
7303         Refactor to avoid duplicate code to fix up permissions.
7304         Don't attempt to fix up parent permissions if chdir($PWD) fails.
7305
7306         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
7307         to make it a bit faster and (I hope) clearer.
7308         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
7309         Fix bug in formats like %2N.
7310
7311         * lib/verify.h: New file.
7312
7313 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
7314
7315         Sync from coreutils.
7316         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
7317
7318 2005-09-22  Jim Meyering  <jim@meyering.net>
7319
7320         Sync from coreutils.
7321
7322         * m4/lstat.m4 (gl_FUNC_LSTAT):
7323         Use AC_LIBSOURCES to require lstat.c and lstat.h.
7324         Remove obsolete comment.
7325         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
7326         * m4/xstrtod.m4: Likewise.
7327
7328         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
7329
7330 2005-09-22  Jim Meyering  <jim@meyering.net>
7331
7332         Sync from coreutils.
7333
7334         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
7335
7336         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
7337         the .tm_year member, since otherwise gcc-4.0 would now warn about
7338         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
7339
7340         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
7341         order to avoid an unsuppressible warning from gcc on 64-bit systems.
7342
7343         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
7344         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
7345         when run in a time zone for which daylight savings time is in effect
7346         for the starting date.
7347
7348         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
7349         stop us from restricting permissions of just-created absolute-named
7350         directories.
7351         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
7352         to restore initial working directory.
7353         * lib/mkdir-p.c (make_dir_parents): New parameter:
7354         different_working_dir, to tell caller if/when we change the working
7355         directory and are unable to return to the initial one.
7356         * lib/mkdir-p.h (make_dir_parents): Update prototype.
7357         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
7358         `return false'.  This fixes a bug introduced on 2004-07-30.
7359
7360         * lib/openat.c (fdopendir): Be sure to close the supplied
7361         file descriptor before returning.  This makes our replacement
7362         implementation a little closer to Solaris's, where fdopendir
7363         ties the file descriptor to the returned DIR* pointer.
7364         * lib/openat.c (unlinkat): New function.
7365         * lib/openat.h (unlinkat): Add prototype.
7366         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
7367         (openat_restore_fail): Rename from openat_restore_die.
7368         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
7369
7370         Provide an alternative to exiting immediately upon save_cwd or
7371         restore_cwd failure.  Now, an application can arrange e.g.,
7372         to perform a longjump in that case.
7373         * lib/openat.c: Include dirname.h.
7374         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
7375         (rpl_openat, fdopendir, fstatat): Call openat_save_die
7376         and openat_restore_die rather than calling error directly.
7377         Don't include "error.h" or "exitfail.h"; they're no longer needed.
7378
7379         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
7380         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
7381         define.
7382
7383         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
7384         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
7385                             int utc, int nanoseconds);
7386         Background:
7387         date should not have to allocate a megabyte of virtual memory to
7388         handle a format argument like +%1048575T.  When implemented with
7389         strftime, it must allocate such a buffer, use strftime to fill it
7390         in, print it, then free it.
7391         With fprintftime, it simply prints everything and exits.
7392         With no need for memory allocation, that's one fewer way to fail.
7393         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
7394         optional field width, not before, so we accept %9:z, not %:9z.
7395         (my_strftime): Be sure to use L_('x') for literals.
7396
7397         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
7398         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
7399         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
7400         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
7401         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
7402         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
7403         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
7404         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
7405         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
7406         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
7407         * lib/xgethostname.c, lib/xreadlink.c:
7408         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
7409
7410         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
7411         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
7412         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
7413         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
7414         and don't include <sys/file.h>).
7415
7416 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
7417
7418         Sync from coreutils.
7419
7420         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
7421         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
7422         [!LDAV_DONE]: Avoid unused variable warning.
7423
7424 2005-09-21  Bruno Haible  <bruno@clisp.org>
7425
7426         * lib/unicodeio.h (unicode_to_mb): New declaration.
7427
7428 2005-09-20  Derek Price  <derek@ximbiot.com>
7429
7430         * lib/getaddrinfo.c: Don't include <netdb.h> included from
7431         getaddrinfo.h.
7432
7433 2005-09-20  Bruno Haible  <bruno@clisp.org>
7434
7435         * gnulib-tool: Remove trailing slashes from the values specified for
7436         --source-base, --m4-base, --tests-base, --aux-dir.
7437         Suggested by Simon Josefsson <jas@extundo.com>.
7438
7439 2005-09-20  Bruno Haible  <bruno@clisp.org>
7440
7441         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
7442         func_modules_to_filelist, func_import, func_create_testdir): Make all
7443         sorting results locale-independent, so that gnulib-cache.m4 doesn't
7444         change when gnulib-tool is invoked in a different locale.
7445
7446 2005-09-19  Simon Josefsson  <jas@extundo.com>
7447
7448         * m4/socklen.m4: Fix typo.
7449
7450 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7451
7452         Use a consistent style for including <config.h>.
7453         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
7454         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
7455         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
7456         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
7457         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
7458         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
7459         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
7460         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
7461         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
7462         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
7463         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
7464         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
7465         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
7466         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
7467         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
7468         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
7469         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
7470         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
7471         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
7472         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
7473         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
7474         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
7475         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
7476         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
7477         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
7478         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
7479         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
7480         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
7481         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
7482         lib/xstrtoumax.c, lib/yesno.c:
7483         Standardize inclusion of config.h.
7484         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
7485         lib/inttostr.h:  Removed inclusion of config.h from header files.
7486         * lib/inttostr.c:  Adjusted in-tree users.
7487         * lib/timespec.h: Remove superfluous warning to include config.h.
7488         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
7489         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
7490         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
7491         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
7492         config.h with HAVE_CONFIG_H.
7493
7494 2005-09-19  Jim Meyering  <jim@meyering.net>
7495
7496         * modules/pathmax (License): Change to LGPL.
7497
7498 2005-09-19  Derek Price  <derek@ximbiot.com>
7499
7500         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
7501
7502 2005-09-19  Bruno Haible  <bruno@clisp.org>
7503
7504         * gnulib-tool (import): Provide default for --tests-base.
7505
7506 2005-09-19  Bruno Haible  <bruno@clisp.org>
7507
7508         * doc/quote.texi: New file, extracted from gnulib.texi.
7509         * doc/ctime.texi: New file, extracted from gnulib.texi.
7510         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
7511         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
7512         * doc/gnulib.texi: Include them.
7513
7514 2005-09-18  Bruno Haible  <bruno@clisp.org>
7515
7516         Portability fix.
7517         * gnulib-tool (func_readlink): New function.
7518         (func_ln_if_changed): Use it.
7519
7520 2005-09-18  Bruno Haible  <bruno@clisp.org>
7521
7522         * gnulib-tool: Support --with-tests also with --import.
7523         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
7524         (func_import): Use variables $testsbase and $inctests. Emit a
7525         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
7526         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
7527         SUBDIRS += $testsdir.
7528         (func_create_testdir): Update.
7529
7530 2005-09-18  Bruno Haible  <bruno@clisp.org>
7531
7532         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
7533         instead of $dry_run.
7534         (func_cp_if_changed, func_mv_if_changed): Remove functions.
7535         (func_ln_if_changed): Don't handle dry-run here.
7536         (func_import): In dry-run mode, detect more precisely which actions
7537         would be performed, and don't use "...ing" verbs.
7538
7539 2005-09-18  Bruno Haible  <bruno@clisp.org>
7540
7541         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
7542         (func_import): Use join on two temporary files instead of three nested
7543         loops, in order to determine which files are new or old.
7544
7545 2005-09-18  Bruno Haible  <bruno@clisp.org>
7546
7547         * gnulib-tool (func_import): Comment out code that spits out the
7548         new files with --dry-run.
7549
7550 2005-09-18  Bruno Haible  <bruno@clisp.org>
7551
7552         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
7553
7554 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
7555
7556         * lib/stat-time.h: New file.
7557         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
7558         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
7559         in a different way.
7560         (timespec_cmp): New function.
7561         * lib/utimecmp.c: Include stat-time.h.
7562         (SYSCALL_RESOLUTION): Depend on whether various struct stat
7563         members exist, not on the obsolescent ST_MTIM_NSEC.
7564         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
7565
7566 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
7567
7568         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
7569
7570 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
7571
7572         * MODULES.html.sh (File system functions): Add stat-time.
7573         * modules/stat-time: New file.
7574         * modules/timespec (Files): Remove m4/st_mtim.m4; this
7575         is now done in a different way, by the stat-time module.
7576         * modules/utimecmp (Depends-on): Add stat-time.
7577
7578 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
7579
7580         * m4/st_mtim.m4: Remove.  Superseded by...
7581         * m4/stat-time.m4: New file.
7582         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
7583         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
7584
7585 2005-09-15  Derek Price  <derek@ximbiot.com>
7586
7587         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
7588
7589 2005-09-15  Derek Price  <derek@ximbiot.com>
7590
7591         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
7592         * lib/regex_internal.c: Ditto, using this...
7593         (__GNUC_PREREQ): ...new macro.
7594         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
7595         using...
7596         (__GNUC_PREREQ): ...this new macro.
7597
7598         * lib/strstr.h: Include string.h. Define strstr as a macro here.
7599
7600 2005-09-15  Derek Price  <derek@ximbiot.com>
7601             Paul Eggert  <eggert@cs.ucla.edu>
7602
7603         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
7604         changes, consolidating in...
7605         * lib/regex_internal.h: ...this file.
7606
7607 2005-09-13  Jim Meyering  <jim@meyering.net>
7608
7609         * lib/canon-host.c: Filter through gnu indent and reword comments
7610         slightly.
7611         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
7612
7613 2005-09-13  Derek Price  <derek@ximbiot.com>
7614
7615         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
7616         failure.
7617         Reported by Jim Meyering  <jim@meyering.net>.
7618
7619 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7620
7621         * lib/base64.c: Typo.
7622         (base64_encode): Put b64str in initialized data section.
7623
7624 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
7625
7626         Merge glibc and coreutils changes into gnulib, plus a few
7627         extra fixes.
7628         * lib/md5.c: Use #error rather than a string.
7629         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
7630         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
7631         (__attribute__): Define to empty for non recent-GCC.
7632         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
7633         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
7634         Renamed from their non-__ counterparts, with new macros replacing
7635         them if not _LIBC.  Add __THROW attribute.
7636         (rol): Remove.
7637         (struct md5_ctx): Align buffer if using GCC.
7638         * lib/sha1.h (struct sha1_ctx): Likewise.
7639         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
7640         The old name was backwards.
7641         (NOTSWAP): Remove; not used.
7642         (rol): New macro, moved here from md5.h.
7643         (sha1_process_block): Remove a FIXME that doesn't make sense.
7644
7645 2005-09-12  Derek Price  <derek@ximbiot.com>
7646
7647         Return usable errors from canon-host.
7648         * lib/canon-host.h: New file.
7649         * lib/canon-host.c (canon_host): Wrap...
7650         (canon_host_r): ...this new function, which now relies exclusively on
7651         getaddrinfo.
7652         (ch_strerror): New function.
7653         (last_cherror): New global.
7654         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
7655         interface.
7656         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
7657         void *.
7658         (freeaddrinfo): Free ai->ai_canonname when set.
7659
7660 2005-09-12  Derek Price  <derek@ximbiot.com>
7661
7662         Make canon-host require getaddrinfo.
7663         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
7664         AC_LIBSOURCE canon-host.h.  Call...
7665         (gl_PREREQ_CANON_HOST): ...this new function, which requires
7666         gl_GETADDRINFO.
7667         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
7668
7669 2005-09-12  Derek Price  <derek@ximbiot.com>
7670
7671         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
7672         LGPL.
7673         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
7674
7675 2005-09-12  Derek Price  <derek@ximbiot.com>
7676
7677         * lib/gai_strerror.c: Include config.h when available.  Include
7678         getaddrinfo.h before other headers to test interface.
7679         Reported by Larry Jones <lawrence.jones@ugs.com>.
7680
7681 2005-09-12  Derek Price  <derek@ximbiot.com>
7682             Paul Eggert  <eggert@cs.ucla.edu>
7683
7684         * modules/glob (Files): Add glob-libc.h.
7685
7686 2005-09-12  Derek Price  <derek@ximbiot.com>
7687             Paul Eggert  <eggert@cs.ucla.edu>
7688
7689         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
7690         glob_.h, glob-libc.h.
7691         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
7692
7693 2005-09-12  Derek Price  <derek@ximbiot.com>
7694             Paul Eggert  <eggert@cs.ucla.edu>
7695
7696         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
7697         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
7698         protecting things that should be done only in gnulib contexts.
7699         * lib/glob_.h: New file, containing only the glob things needed for
7700         gnulib.
7701         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
7702         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
7703         (glob, globfree, glob_pattern_p): Now defined simply in terms of
7704         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
7705         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
7706         and to respect the namespace rules better.
7707
7708 2005-09-08  Simon Josefsson  <jas@extundo.com>
7709
7710         * modules/socklen: New file.
7711
7712 2005-09-08  Simon Josefsson  <jas@extundo.com>
7713
7714         * m4/socklen.m4: New file.
7715
7716 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7717
7718         * modules/utimens (Files): Add m4/utimbuf.m4, since
7719         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
7720         Reported by Sergey Poznyakoff.
7721
7722 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7723
7724         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
7725         definitions, since that's the preferred style in glibc.
7726         Fix a minor spacing issue, and update copyright notice to match
7727         glibc's.
7728
7729 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
7730
7731         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
7732
7733 2005-09-06  Simon Josefsson  <jas@extundo.com>
7734
7735         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
7736         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
7737
7738 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7739
7740         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
7741         warning.
7742
7743 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
7744
7745         * config/srclist.txt: Add glibc bug 1302.
7746
7747 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
7748
7749         Change bitset word type from unsigned int to unsigned long int,
7750         as this has better performance on typical 64-bit hosts.
7751         Port bitset code to hosts with unusual word sizes.
7752         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
7753         (build_collating_symbol):
7754         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
7755         argument is a bitset.  This is merely a style issue, but it makes
7756         it clearer that an entire array is expected.
7757         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
7758         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
7759         Port to the case where bitset_word is not the same as unsigned int.
7760         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
7761         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
7762         Likewise.
7763         * lib/regexec.c (check_dst_limits_calc_pos_1,
7764         check_subexp_matching_top):
7765         (build_trtable, group_nodes_into_DFAstates):
7766         Likewise.
7767         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
7768         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
7769         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
7770         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
7771         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
7772         * lib/regcomp.c (optimize_subexps, lower_subexp):
7773         Work even if bitset_word has holes in its bitwise representation.
7774         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
7775         * lib/regexec.c (check_dst_limits_calc_pos_1,
7776         check_subexp_matching_top):
7777         Likewise.
7778         * lib/regex_internal.c (re_string_reconstruct):
7779         Don't assume UCHAR_MAX == 255.
7780         * lib/regex_internal.h (bitset_set_all): Likewise.
7781         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
7782         All uses changed.
7783         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
7784         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
7785         All uses changed.
7786         (BITSET_WORD_MAX): New macro.
7787         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
7788         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
7789         (bitset_empty, bitset_copy):
7790         Prefer sizeof (bitset) to multiplying it out ourselves.
7791         (bitset_not_merge): Remove; unused.
7792         (bitset_contain): Return bool, not unsigned int with one bit on.
7793         All callers changed.
7794         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
7795         alignment than re_node_set; do this by defining a new internal
7796         type struct dests_alloc and using it to allocate memory.
7797
7798 2005-09-05  Bruno Haible  <bruno@clisp.org>
7799
7800         * gnulib-tool (func_import): Fix comparison in handling of symbolic
7801         links.
7802
7803 2005-09-04  Martin Lambers <marlam@marlam.de>  (tiny change)
7804
7805         * modules/size_max (Makefile.am): Add size_max.h
7806
7807 2005-09-04  Derek Price  <derek@ximbiot.com>
7808
7809         * gnulib-tool (func_import): Fix reversed $symbolic logic.
7810
7811 2005-09-03  Simon Josefsson  <jas@extundo.com>
7812
7813         * gnulib-tool: Fix typo.
7814
7815 2005-09-03  Simon Josefsson  <jas@extundo.com>
7816
7817         * config/srclist.txt: Add glibc bug 1293.
7818
7819 2005-09-03  Derek Price  <derek@ximbiot.com>
7820
7821         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
7822         From Larry Jones <lawrence.jones@ugs.com>.
7823
7824 2005-09-02  Simon Josefsson  <jas@extundo.com>
7825
7826         * modules/socklen: New file.
7827
7828 2005-09-02  Simon Josefsson  <jas@extundo.com>
7829
7830         * modules/havelib: New module.
7831
7832         * modules/gettext, modules/iconv, modules/lock, modules/readline:
7833         Use havelib.
7834
7835 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
7836
7837         Check for arithmetic overflow when calculating sizes, to prevent
7838         some buffer-overflow issues.  These patches are conservative, in the
7839         sense that when I couldn't determine whether an overflow was possible,
7840         I inserted a run-time check.
7841         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
7842         macros.
7843         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
7844         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
7845         (re_xnrealloc, re_x2nrealloc): New inline functions.
7846         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
7847         parse_bracket_exp):
7848         (build_equiv_class, build_charclass): Check for arithmetic overflow
7849         in size expression calculations.
7850         * lib/regex_internal.c (re_string_realloc_buffers):
7851         (build_wcs_upper_buffer, re_node_set_add_intersect):
7852         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
7853         (re_dfa_add_node, register_state): Likewise.
7854         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
7855         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
7856         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
7857         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
7858
7859 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
7860
7861         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
7862         m4/ulonglong.m4.  Problem reported by Martin Lambers.
7863
7864 2005-09-02  Bruno Haible  <bruno@clisp.org>
7865
7866         Support for lib vs. lib64 distinction on biarch platforms.
7867         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
7868         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
7869         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
7870
7871 2005-09-02  Bruno Haible  <bruno@clisp.org>
7872
7873         * gnulib-tool (import): In the other first-use case, provide defaults
7874         as well.
7875
7876 2005-09-02  Bruno Haible  <bruno@clisp.org>
7877
7878         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
7879         patches not yet found in the latest gettext release.
7880
7881 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7882
7883         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
7884         to avoid a collision with bits/local_lim.h in glibc.
7885         All uses changed.  Problem reported by Dmitry V. Levin in
7886         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
7887
7888         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
7889         bugs in int versus size_t comparisons.
7890         (re_string_context_at): Fix bug where the code assumed that
7891         Idx is signed.
7892
7893         Use bool where appropriate.
7894         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
7895         All callers changed.
7896         (calc_eclosure_iter): Likewise, for ROOT arg.
7897         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
7898         (build_charclass_op): Likewise, for NON_MATCH arg.
7899         * lib/regex_internal.c (re_string_allocate, re_string_construct):
7900         (re_string_construct_common): Likewise, for ICASE arg.
7901         * lib/regexec.c (re_search_2_stub, re_search_stub):
7902         Likewise, for RET_LEN arg.
7903         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
7904         (set_regs): Likewise, for FL_BACKTRACK arg.
7905         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
7906         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
7907         (calc_eclosure_iter, parse_bracket_exp):
7908         Use bool for internal variables that are booleans.
7909         * lib/regexec.c (re_search_internal, check_matching,
7910         proceed_next_node):
7911         (set_regs, build_sifted_states, sift_states_bkref):
7912         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
7913         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
7914         (find_collation_sequence_value):
7915         Likewise.
7916         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
7917         (re_node_set_compare):
7918         Return bool, not int. All callers changed.
7919         * lib/regexec.c (check_halt_node_context, check_dst_limits):
7920         (build_trtable, check_node_accept): Likewise.
7921         * lib/regex_internal.h: Include stdbool.h.
7922
7923         Fix bugs uncovered when converting to bool.
7924         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
7925         failure instead of charging ahead blindly.
7926         * lib/regex_internal.c (register_state): Likewise.
7927         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
7928         for freeing internal storage.
7929         (group_nodes_into_DFA_states): Use unsigned int, not int, for
7930         bitset pieces used as boolean, to avoid undefined behavior
7931         on hosts that do int overflow checking.
7932
7933 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
7934
7935         * config/srclist.txt: Add glibc bugs 1285-1287.
7936
7937 2005-09-01  Jim Meyering  <jim@meyering.net>
7938
7939         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
7940         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
7941         Require gl_STAT_MACROS, too.
7942
7943 2005-09-01  Bruno Haible  <bruno@clisp.org>
7944
7945         * gnulib-tool (import): In the first-use case, provide defaults.
7946
7947 2005-09-01  Bruno Haible  <bruno@clisp.org>
7948
7949         * gnulib-tool (func_import): Remove the .tmp files.
7950
7951 2005-09-01  Bruno Haible  <bruno@clisp.org>
7952
7953         * gnulib-tool (func_import): Fix handling of symbolic links.
7954
7955 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
7956
7957         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
7958         old glibc regex code mishandles strings longer than 2**31 bytes.
7959         This patch fixes this when the regex code is used in gnulib
7960         (i.e., outside glibc).
7961
7962         This patch should not affect the use of the regex code inside
7963         glibc.  No doubt this problem also needs to be handled for glibc
7964         as well, but the result will be an incompatible change to the
7965         glibc ABI, and the old ABI will have to be supported too.  That
7966         can be the the subject for another patch.
7967
7968         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
7969         governing whether the rest of this patch is active.  By default,
7970         the macro is disabled and the patch has no effect.
7971         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
7972         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
7973         (struct re_pattern_buffer, re_search, re_search_2, re_match):
7974         (re_match_2, re_set_registers): Use the new types.
7975         * lib/regex_internal.h (Idx, re_hashval_t): New types.
7976         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
7977         New macros.
7978         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
7979         (re_string_context_at, bin_tree_t, re_dfastate_t):
7980         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
7981         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
7982         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
7983         (re_string_char_size_at, re_string_wchar_at):
7984         (re_string_elem_size_at):
7985         Use the new types and macros to port to 64-bit hosts.
7986         Use unsigned types for internal values, so that the code
7987         mostly works even for arrays larger than SSIZE_MAX.
7988         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
7989         (search_duplicated_node, calc_eclosure_iter, fetch_number):
7990         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
7991         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
7992         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
7993         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
7994         (calc_inveclosure, parse_dup_op, build_range_exp):
7995         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
7996         (fetch_number, create_token_tree, mark_opt_subexp):
7997         Likewise.
7998         * lib/regex_internal.c (re_string_construct_common,
7999         create_ci_newstate):
8000         (create_cd_newstate, re_string_allocate, re_string_construct):
8001         (re_string_realloc_buffers, build_wcs_upper_buffer):
8002         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
8003         (re_string_reconstruct, re_string_peek_byte_case):
8004         (re_string_fetch_byte_case, re_string_context_at):
8005         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
8006         (re_node_set_init_copy, re_node_set_add_intersect):
8007         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
8008         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
8009         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
8010         (re_acquire_state, re_acquire_state_context, register_state):
8011         Likewise.
8012         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
8013         search_cur_bkref_entry):
8014         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
8015         (re_search_internal, re_search_2_stub, re_search_stub)
8016         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
8017         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
8018         (update_cur_sifted_state, check_dst_limits):
8019         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
8020         (check_subexp_limits, sift_states_bkref, merge_state_array):
8021         (check_subexp_matching_top, get_subexp, get_subexp_sub):
8022         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
8023         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
8024         (expand_bkref_cache, check_node_accept_bytes):
8025         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
8026         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
8027         (acquire_init_state_context, check_halt_node_context):
8028         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
8029         (sift_states_backward, clean_state_log_if_needed):
8030         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
8031         (find_recover_state, transit_state_sb, transit_state_mb):
8032         (transit_state_bkref, build_trtable, match_ctx_clean):
8033         Likewise.
8034         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
8035         to work around an assumption that REG_MISSING is negative.
8036
8037         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
8038         (seek_collating_symbol_entry) [defined _LIBC]:
8039         (lookup_collation_sequence_value) [defined _LIBC]:
8040         (build_range_exp, build_collating_symbol) [defined _LIBC]:
8041         Use prototypes rather than old-style function definitions.
8042         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
8043         (transit_state_sb) [0]:
8044         (find_collation_sequence_value) [defined _LIBC]: Likewise.
8045
8046         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
8047         rm_eo.
8048
8049         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
8050         (optimize_subexps, lower_subexp):
8051         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
8052         since the signed shift might overflow.  Use 1u<<31 instead.
8053         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
8054         Likewise.
8055         * lib/regexec.c (check_dst_limits_calc_pos_1,
8056         check_subexp_matching_top): Likewise.
8057
8058         * lib/regcomp.c (optimize_subexps, lower_subexp):
8059         Use CHAR_BIT rather than 8, for clarity.
8060         * lib/regexec.c (check_dst_limits_calc_pos_1):
8061         (check_subexp_matching_top): Likewise.
8062         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
8063         have to worry about portability issues when shifting it left.
8064         Remove no-longer-needed test for table_size > 0.
8065         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
8066         in a word, as the resulting behavior is undefined.
8067         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
8068         in one case, a <= should have been an <, and in another case the
8069         whole test was missing.
8070         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
8071         the standard name CHAR_BIT.
8072         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
8073         this is not true on one's complement and signed-magnitude hosts.
8074
8075         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
8076         next_last_offset.
8077         (struct re_dfa_t): Remove unused member states_alloc.
8078         * lib/regcomp.c (init_dfa): Don't initialize unused members.
8079
8080 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8081
8082         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
8083         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
8084         and large-file glibc and in 32-bit large-file Solaris.
8085
8086 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8087
8088         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
8089         lengths fit in regoff_t; this isn't true if regoff_t is the same
8090         width as size_t.
8091         * lib/regex.c (re_search_internal): 5th arg is LAST_START
8092         (= START + RANGE) instead of RANGE.  This avoids overflow
8093         problems when regoff_t is the same width as size_t.
8094         All callers changed.
8095         (re_search_2_stub): Check for overflow when adding the
8096         sizes of the two strings.
8097         (re_search_stub): Check for overflow when adding START
8098         to RANGE; if it occurs, substitute the extreme value.
8099
8100 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
8101
8102         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
8103
8104 2005-08-31  Jim Meyering  <jim@meyering.net>
8105
8106         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
8107         a pointer-to-const.
8108         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
8109         (register_state): Likewise.
8110         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
8111         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
8112         (group_nodes_into_DFAstates): Likewise.
8113
8114 2005-08-31  Jim Meyering  <jim@meyering.net>
8115
8116         * check-module: Add a FIXME comment.
8117
8118 2005-08-31  Eric Blake  <ebb9@byu.net>
8119
8120         * modules/unistd-safer (Files): Add unistd--.h.
8121         * modules/stdio-safer (Files): Add stdio--.h.
8122
8123 2005-08-31  Derek Price  <derek@ximbiot.com>
8124
8125         * lib/getdelim.c (getdelim): Return EOF on EOF.
8126         Reported by Larry Jones <lawrence.jones@ugs.com>.
8127
8128 2005-08-31  Bruno Haible  <bruno@clisp.org>
8129
8130         Avoid unnecessary diffs in the generated lib/Makefile.am.
8131         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
8132         the generated files.
8133         (func_import): Don't set cmd.
8134
8135 2005-08-31  Bruno Haible  <bruno@clisp.org>
8136
8137         * lib/strstr.c: Include <stddef.h>, for NULL.
8138         * lib/strcasestr.c: Likewise.
8139         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
8140
8141 2005-08-31  Bruno Haible  <bruno@clisp.org>
8142
8143         * gnulib-tool: New option --macro-prefix.
8144         (func_import): Use macro_prefix.
8145         (import): Handle option --macro-prefix.
8146
8147 2005-08-31  Bruno Haible  <bruno@clisp.org>
8148
8149         * gnulib-tool (import): Rename most ac_* variables to cached_*.
8150         Also use new variables cached_lgpl, cached_libtool.
8151
8152 2005-08-31  Bruno Haible  <bruno@clisp.org>
8153
8154         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
8155         always instantiating them.
8156
8157 2005-08-31  Bruno Haible  <bruno@clisp.org>
8158
8159         * gnulib-tool (func_import): Read the previous cached settings
8160         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
8161         earlier added by gnulib but are now dropped. Warn when a gnulib file
8162         overwrites a non-gnulib file.
8163
8164 2005-08-31  Bruno Haible  <bruno@clisp.org>
8165
8166         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
8167         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
8168         projects that don't keep autogenerated files in CVS. Put into
8169         actioncmd only the specified modules, not the transitive closure.
8170
8171 2005-08-31  Bruno Haible  <bruno@clisp.org>
8172
8173         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
8174         Create directories that shall be filled.
8175         (import): Don't look for gl_* macros in configure.ac. Recurse across
8176         all directories containing a gnulib-cache.m4 files, if meaningful.
8177
8178 2005-08-31  Bruno Haible  <bruno@clisp.org>
8179
8180         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
8181         (import): Set seen_libtool when we see gl_LIBTOOL.
8182
8183 2005-08-31  Bruno Haible  <bruno@clisp.org>
8184
8185         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
8186         declaration macro definitions from generated gnulib.m4.
8187
8188 2005-08-30  "Oskar Liljeblad" <oskar@osk.mine.nu>
8189
8190         * lib/iconvme.h: Add prototype for iconv_alloc.
8191
8192 2005-08-29  Simon Josefsson  <jas@extundo.com>
8193
8194         * lib/iconvme.c: Fix errno.
8195
8196 2005-08-29  Bruno Haible  <bruno@clisp.org>
8197
8198         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
8199         that it works when the directory contains spaces.
8200
8201 2005-08-29  Bruno Haible  <bruno@clisp.org>
8202
8203         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
8204
8205 2005-08-29  Bruno Haible  <bruno@clisp.org>
8206
8207         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
8208         Emit more advice.
8209
8210 2005-08-29  Bruno Haible  <bruno@clisp.org>
8211         and Stepan Kasal  <kasal@ucw.cz>
8212
8213         * check-module: If more parameters are given, check each of them
8214         separately; add more exceptions, as noted by Jim Meyering.
8215         (check_module): New procedure.
8216         (%exempt_header): Now contains all exceptions.
8217
8218 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
8219
8220         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
8221
8222 2005-08-29  "Oskar Liljeblad" <oskar@osk.mine.nu>
8223
8224         * lib/iconvme.c: Split iconv_string into iconv_alloc.
8225
8226 2005-08-28  Bruno Haible  <bruno@clisp.org>
8227
8228         * m4/gnulib-tool.m4: New file.
8229
8230 2005-08-27  Jim Meyering  <jim@meyering.net>
8231
8232         * modules/unistd-safer (Files): Add pipe-safer.c.
8233         * modules/fcntl-safer (Files): Add creat-safer.c.
8234
8235 2005-08-27  Jim Meyering  <jim@meyering.net>
8236
8237         * m4/stdlib-safer.m4: New file.  From coreutils.
8238         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
8239         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
8240         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
8241         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
8242         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
8243
8244 2005-08-27  Jim Meyering  <jim@meyering.net>
8245
8246         * lib/fopen-safer.c: Merge minor changes from coreutils.
8247         * lib/dup-safer.c: Likewise.
8248         * lib/fd-safer.c: Likewise.
8249
8250         Merge from coreutils.
8251         * lib/stdio--.h: New file.
8252         * lib/stdlib--.h: New file.
8253         * lib/mkstemp-safer.c: New file.
8254
8255         GNU tar needs these.
8256         * lib/pipe-safer.c: New file.
8257         * lib/creat-safer.c: New file.
8258         * lib/fcntl--.h (creat): Define to creat_safer.
8259         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
8260         * lib/unistd--.h (pipe): Define to pipe_safer.
8261         * lib/unistd-safer.h: Declare pipe_safer.
8262
8263 2005-08-26  Simon Josefsson  <jas@extundo.com>
8264
8265         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
8266         Haible <bruno@clisp.org>.
8267
8268 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
8269
8270         * lib/regex_internal.h: Remove all references to
8271         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
8272         or better.
8273         (bitset_not, bitset_merge, bitset_not_merge):
8274         (bitset_mask, re_string_allocate, re_string_construct):
8275         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
8276         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
8277         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
8278         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
8279         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
8280         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
8281         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
8282         (re_acquire_state_context):
8283         Remove unnecessary forward decls.
8284         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
8285         Put __attribute at function definition,
8286         now that the function decl has been removed.
8287         * lib/regex_internal.c (re_string_peek_byte_case):
8288         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
8289         Likewise.
8290
8291 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
8292
8293         * m4/regex.m4: Add AC_PREREQ(2.50).
8294         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
8295
8296 2005-08-25  Simon Josefsson  <jas@extundo.com>
8297
8298         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
8299         __fsetlocking.
8300
8301 2005-08-25  Simon Josefsson  <jas@extundo.com>
8302
8303         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
8304         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
8305         GLIBC specific code.
8306
8307 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8308
8309         Make regex safe for g++.  This fixes one real bug (an "err"
8310         that should have been "*err").  g++ problem reported by
8311         Sam Steingold.
8312         * lib/regex_internal.h (re_calloc): New macro, consistent with
8313         re_malloc etc.  All callers of calloc changed to use re_calloc.
8314         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
8315         not int.  All callers changed.
8316         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
8317         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
8318         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
8319         (find_recover_state): Change "err" to "*err"; this fixes what
8320         appears to be a real bug.
8321         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
8322         versus int.
8323
8324 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8325
8326         * modules/regex (Depends-on): Add malloc, since the code
8327         assumes that !malloc(0) means failure.
8328
8329 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8330
8331         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
8332
8333         alloca modernization/simplification for regex.
8334         * lib/regex.c: Remove portability cruft for alloca.  This no longer
8335         needs to be at the start of the file, and can be moved into
8336         regex_internal.h and simplified.
8337         * lib/regex_internal.h: Include <alloca.h>.
8338         (__libc_use_alloca) [!defined _LIBC]: New macro.
8339         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
8340         now works outside glibc.
8341
8342 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
8343
8344         * config/srclist.txt: Add glibc bugs 1241, 1245.
8345
8346 2005-08-25  Jim Meyering  <jim@meyering.net>
8347
8348         * lib/open-safer.c: Include <config.h>.
8349         Otherwise, we'd lose LARGEFILE support in any file using
8350         e.g. "fcntl--.h"
8351
8352 2005-08-25  Bruno Haible  <bruno@clisp.org>
8353
8354         * m4/minmax.m4: Require autoconf 2.52.
8355         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
8356         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
8357         alternatives of translit over the alphabet.
8358         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
8359
8360 2005-08-24  Simon Josefsson  <jas@extundo.com>
8361
8362         * tests/test-getpass.c: New file.
8363
8364 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8365
8366         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
8367         for GNU regex features.
8368
8369 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8370
8371         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
8372         * lib/regex.h (regerror): Likewise.
8373
8374         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
8375         requires this.  (The code never needed it.)
8376
8377         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
8378         All uses of recently-renamed identifiers changed to use the new,
8379         POSIX-compliant names.  The code will build and run just fine
8380         without these changes, but it's better to eat our own dog food
8381         and use the standard-conforming names.
8382
8383         * lib/regex.h: Fix a multitude of POSIX name space violations.
8384         These changes have an effect only for programs that define
8385         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
8386         do not change anything for programs compiled in the normal way.
8387         Also, there is no effect on the ABI.
8388
8389         (_REGEX_SOURCE): New macro.
8390         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
8391         defined and _GNU_SOURCE is not; this fixes a name space violation.
8392
8393         Rename the following macros to obey POSIX requirements.
8394         The old names are still visible as macros if _REGEX_SOURCE is defined.
8395         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
8396         RE_BACKSLASH_ESCAPE_IN_LISTS.
8397         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
8398         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
8399         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
8400         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
8401         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
8402         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
8403         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
8404         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
8405         (REG_INTERVALS): renamed from RE_INTERVALS.
8406         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
8407         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
8408         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
8409         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
8410         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
8411         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
8412         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
8413         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
8414         RE_UNMATCHED_RIGHT_PAREN_ORD.
8415         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
8416         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
8417         (REG_DEBUG): renamed from RE_DEBUG.
8418         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
8419         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
8420         unusual, since we can't clash with the POSIX REG_ICASE.
8421         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
8422         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
8423         (REG_NO_SUB): renamed from RE_NO_SUB.
8424         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
8425         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
8426         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
8427         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
8428         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
8429         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
8430         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
8431         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
8432         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
8433         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
8434         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
8435         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
8436         RE_SYNTAX_POSIX_MINIMAL_BASIC.
8437         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
8438         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
8439         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
8440         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
8441         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
8442         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
8443         (REG_FIXED): Renamed from REGS_FIXED.
8444         (REG_NREGS): Renamed from RE_NREGS.
8445
8446         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
8447         of other REG_* macros, since POSIX says the user is allowed to
8448         #undef these macros selectively.
8449
8450         (reg_errcode_t): Update comment stating what other tables need
8451         to be consistent.
8452
8453         Rename the following enum values to obey POSIX requirements.
8454         The old names are still visible as macros.
8455         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
8456         is not defined, since GNU is supposed to be a superset of POSIX as
8457         much as possible, and since we want reg_errcode_t to be a signed
8458         type for implementation consistency.
8459         (_REG_NOERROR): Renamed from REG_NOERROR.
8460         (_REG_NOMATCH): Renamed from REG_NOMATCH.
8461         (_REG_BADPAT): Renamed from REG_BADPAT.
8462         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
8463         (_REG_ECTYPE): Renamed from REG_ECTYPE.
8464         (_REG_EESCAPE): Renamed from REG_EESCAPE.
8465         (_REG_ESUBREG): Renamed from REG_ESUBREG.
8466         (_REG_EBRACK): Renamed from REG_EBRACK.
8467         (_REG_EPAREN): Renamed from REG_EPAREN.
8468         (_REG_EBRACE): Renamed from REG_EBRACE.
8469         (_REG_BADBR): Renamed from REG_BADBR.
8470         (_REG_ERANGE): Renamed from REG_ERANGE.
8471         (_REG_ESPACE): Renamed from REG_ESPACE.
8472         (_REG_BADRPT): Renamed from REG_BADRPT.
8473         (_REG_EEND): Renamed from REG_EEND.
8474         (_REG_ESIZE): Renamed from REG_ESIZE.
8475         (_REG_ERPAREN): Renamed from REG_ERPAREN.
8476         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
8477         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
8478         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
8479         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
8480
8481         (_REG_RE_NAME, _REG_RM_NAME): New macros.
8482         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
8483         changed.  But support the old name if the new one is not defined
8484         and if _REGEX_SOURCE.
8485
8486         Change the following member names in struct re_pattern_buffer.
8487         The old names are still supported if !_REGEX_SOURCE.
8488         The new names are always supported, regardless of _REGEX_SOURCE.
8489         (re_buffer): Renamed from buffer.
8490         (re_allocated): Renamed from allocated.
8491         (re_used): Renamed from used.
8492         (re_syntax): Renamed from syntax.
8493         (re_fastmap): Renamed from fastmap.
8494         (re_translate): Renamed from translate.
8495         (re_can_be_null): Renamed from can_be_null.
8496         (re_regs_allocated): Renamed from regs_allocated.
8497         (re_fastmap_accurate): Renamed from fastmap_accurate.
8498         (re_no_sub): Renamed from no_sub.
8499         (re_not_bol): Renamed from not_bol.
8500         (re_not_eol): Renamed from not_eol.
8501         (re_newline_anchor): Renamed from newline_anchor.
8502
8503         Change the following member names in struct re_registers.
8504         The old names are still supported if !_REGEX_SOURCE.
8505         The new names are always supported, regardless of _REGEX_SOURCE.
8506         (rm_num_regs): Renamed from num_regs.
8507         (rm_start): Renamed from start.
8508         (rm_end): Renamed from end.
8509
8510         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
8511         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
8512         Prepend __ to parameter names.
8513
8514         Undo yesterday's changes.
8515
8516 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
8517
8518         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
8519         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
8520         lib/regex.c.
8521
8522 2005-08-24  Jim Meyering  <jim@meyering.net>
8523
8524         Sync from coreutils.
8525         * m4/fcntl-safer.m4: New file.
8526
8527         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
8528         and object files for this module.
8529
8530 2005-08-24  Jim Meyering  <jim@meyering.net>
8531
8532         Sync from coreutils.
8533         * lib/fcntl--.h, fcntl-safer.h, open-safer.c: New files.
8534
8535 2005-08-24  Jim Meyering  <jim@meyering.net>
8536
8537         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
8538         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
8539
8540 2005-08-24  Jim Meyering  <jim@meyering.net>
8541
8542         * modules/fcntl-safer: New module.
8543         * modules/fts (Depends-on): Add fcntl-safer.
8544         * MODULES.html.sh (File descriptor based Input/Output):
8545         Add fcntl-safer.
8546
8547 2005-08-24  Bruno Haible  <bruno@clisp.org>
8548
8549         Support for unit test modules.
8550         * modules/README: Mention tests modules.
8551         * modules/TEMPLATE-TESTS: New file.
8552         * gnulib-tool: New options --extract-tests-module, --with-tests and
8553         --tests-base (unused for the moment).
8554         (testsbase, inctests): New variables.
8555         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
8556         (func_verify_module): Exclude TEMPLATE-TESTS.
8557         (func_verify_nontests_module, func_verify_tests_module): New functions.
8558         (func_get_dependencies): Add implicit dependency for tests modules.
8559         (func_get_tests_module): New function.
8560         (func_modules_transitive_closure): When --with-tests was specified,
8561         include the unit tests as well, unless explicitly avoided.
8562         (func_emit_lib_Makefile_am): Ignore the tests modules here.
8563         (func_emit_tests_Makefile_am): New function.
8564         (func_create_testdir): When --with-tests was specified, emit a
8565         tests/ directory.
8566         * MODULES.html.sh (Future developments): Update.
8567
8568 2005-08-24  Bruno Haible  <bruno@clisp.org>
8569
8570         * modules/tls-tests: New file.
8571         * tests/test-tls.c: New file, from GNU gettext.
8572
8573 2005-08-24  Bruno Haible  <bruno@clisp.org>
8574
8575         * modules/lock-tests: New file.
8576         * tests/test-lock.c: New file, from GNU gettext.
8577
8578 2005-08-24  Bruno Haible  <bruno@clisp.org>
8579
8580         * lib/lock.h: Add multiple inclusion guard.
8581         * lib/tls.h: Add multiple inclusion guard.
8582
8583 2005-08-24  Bruno Haible  <bruno@clisp.org>
8584
8585         * gnulib-tool: Add support for the --aux-dir option to
8586         --create-testdir, --create-megatestdir, --test, --megatest.
8587         (func_create_testdir, func_create_megatestdir): Optionally emit a
8588         AC_CONFIG_AUX_DIR directive.
8589         (create-testdir, create-megatestdir, test, megatest): Provide a
8590         default value for $auxdir.
8591
8592 2005-08-24  Bruno Haible  <bruno@clisp.org>
8593
8594         * gnulib-tool (import): Use compound statement instead of subshell
8595         where possible.
8596
8597 2005-08-24  Bruno Haible  <bruno@clisp.org>
8598
8599         * gnulib-tool (import): Change --aux-dir default to "build-aux".
8600
8601 2005-08-24  Bruno Haible  <bruno@clisp.org>
8602
8603         * gnulib-tool (func_version): Update.
8604
8605 2005-08-24  Bruno Haible  <bruno@clisp.org>
8606
8607         * gnulib-tool (func_import, func_create_testdir,
8608         func_create_megatestdir): Quote all autoconf macro arguments.
8609
8610 2005-08-24  Bruno Haible  <bruno@clisp.org>
8611
8612         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
8613         option --force, because --force causes the aclocal.m4 of each
8614         subdirectory to be newer than the corresponding config.h.in.
8615
8616 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8617
8618         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
8619         All contents moved to gl_REGEX.
8620         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
8621         assume that it does.
8622
8623 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8624
8625         * lib/regex.h (REG_NOSYS)
8626         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
8627         Define, since POSIX requires it as of 2001.
8628         (_REG_ENOSYS)
8629         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
8630         New private symbol, used to keep the enum signed in all cases.
8631         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
8632         Youngman in
8633         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
8634
8635         * lib/regex_internal.c (re_string_skip_chars, register_state):
8636         (calc_state_hash):
8637         Remove forward decls; no longer needed now that we use prototypes.
8638         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
8639         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
8640         (clean_state_log_if_needed): Likewise.
8641
8642 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
8643
8644         * config/srclist.txt: Add glibc bugs 1231-1233.
8645
8646 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8647
8648         Fix problems reported by Sam Steingold in
8649         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
8650         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
8651         assumed that reg_errcode_t is a signed type, which is not
8652         necessarily true if _XOPEN_SOURCE is not defined.
8653         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
8654         since some compilers warn about it otherwise.
8655
8656 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8657
8658         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
8659         (init_word_char, create_initial_state, duplicate_node_closure):
8660         (fetch_token, peek_token_bracket, build_range_exp):
8661         (build_collating_symbol): Remove forward decls; no longer needed
8662         now that we use prototypes.
8663
8664         * lib/regcomp.c:
8665         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
8666         (re_compile_fastmap_iter, regcomp, regerror, regfree):
8667         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
8668         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
8669         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
8670         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
8671         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
8672         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
8673         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
8674         (build_range_exp, build_collating_symbol, parse_bracket_exp):
8675         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
8676         (build_charclass, build_charclass_op, fetch_number, create_tree):
8677         (create_token_tree, mark_opt_subexp, duplicate_tree):
8678         Use prototypes rather than old-style definitions.
8679
8680         * lib/regex_internal.c:
8681         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
8682         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
8683         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
8684         (re_string_reconstruct, re_string_peek_byte_case):
8685         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
8686         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
8687         (re_node_set_init_copy, re_node_set_add_intersect):
8688         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
8689         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
8690         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
8691         (re_acquire_state, re_acquire_state_context, register_state):
8692         (create_ci_newstate, create_cd_newstate, free_state):
8693         Likewise.
8694         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
8695         re_search_2):
8696         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
8697         (re_search_internal, prune_impossible_nodes):
8698         (acquire_init_state_context, check_matching, static):
8699         (check_halt_node_context, check_halt_state_context, proceed_next_node):
8700         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
8701         (update_regs, sift_states_backward, build_sifted_states):
8702         (clean_state_log_if_needed, merge_state_array):
8703         (update_cur_sifted_state, add_epsilon_src_nodes):
8704         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
8705         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
8706         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
8707         (find_recover_state, check_subexp_matching_top, transit_state_mb):
8708         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
8709         (check_arrival, check_arrival_add_next_nodes):
8710         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
8711         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
8712         (check_node_accept_bytes, check_node_accept, extend_buffers):
8713         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
8714         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
8715         (sift_ctx_init):
8716         Likewise.
8717
8718         * lib/regex_internal.h:
8719         (re_string_allocate, re_string_construct, re_string_reconstruct):
8720         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
8721         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
8722         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
8723         (re_string_context_at, re_string_peek_byte_case):
8724         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
8725         is defined, since we now use prototypes always.
8726
8727         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
8728         C89 or better.  All uses removed.
8729
8730 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
8731
8732         * config/srclist.txt: Add glibc bugs 1220-1227.
8733
8734 2005-08-20  Jim Meyering  <jim@meyering.net>
8735
8736         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
8737         of unused local, dfa.
8738
8739 2005-08-20  Bruno Haible  <bruno@clisp.org>
8740
8741         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
8742
8743 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8744
8745         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
8746         (re_node_set_insert_last, re_dfa_add_node):
8747         Rename local variables to avoid GCC shadowing warnings.
8748
8749 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8750
8751         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
8752         [defined lint]: Suppress bogus uninitialized-variable warnings.
8753
8754         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
8755         and let the caller return REG_ESPACE if out of space.  This
8756         removes an uninitialied-variable warning with GCC 4.0.1, and also
8757         avoids taking the address of a local variable.  All callers
8758         changed.
8759
8760 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
8761
8762         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
8763         $LIBCSRC/posix/regexec.c.
8764         Add glibc bug 1217 for regcomp.c.
8765
8766 2005-08-19  Jim Meyering  <jim@meyering.net>
8767
8768         * lib/regexec.c (proceed_next_node): Redo local variables to
8769         avoid GCC shadowing warnings.
8770
8771 2005-08-18  Bruno Haible  <bruno@clisp.org>
8772
8773         * lib/strstr.c (strstr): Fix return value in multibyte case.
8774         * lib/strcasestr.c (strcasestr): Likewise.
8775
8776 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
8777
8778         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
8779
8780 2005-08-17  Jim Meyering  <jim@meyering.net>
8781
8782         Make the %s format (seconds since the epoch) work for a negative
8783         number and when used with a zero-padded field width, e.g. %015s.
8784
8785         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
8786         label so that it precedes the code to set `digits'.  Otherwise,
8787         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
8788         print `00-22'.  Now, it prints `-0022', as it should.
8789
8790 2005-08-17  Bruno Haible  <bruno@clisp.org>
8791
8792         * modules/strstr (Files): Add m4/mbrtowc.m4.
8793         (Depends-on): Add mbuiter.
8794
8795 2005-08-17  Bruno Haible  <bruno@clisp.org>
8796
8797         * modules/strcasestr: New file.
8798         * MODULES.html.sh (String handling, based on ANSI C 89): Add
8799         strcasestr.
8800
8801 2005-08-17  Bruno Haible  <bruno@clisp.org>
8802
8803         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
8804
8805 2005-08-17  Bruno Haible  <bruno@clisp.org>
8806
8807         * modules/mbuiter: New file.
8808         * MODULES.html.sh (Extended multibyte and wide character utilities):
8809         Add mbuiter.
8810
8811 2005-08-17  Bruno Haible  <bruno@clisp.org>
8812
8813         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
8814         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
8815
8816 2005-08-17  Bruno Haible  <bruno@clisp.org>
8817
8818         * m4/strcasestr.m4: New file.
8819
8820 2005-08-17  Bruno Haible  <bruno@clisp.org>
8821
8822         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
8823         * lib/strstr.c: Completely rewritten, with multibyte locale support.
8824
8825 2005-08-17  Bruno Haible  <bruno@clisp.org>
8826
8827         * lib/strcasestr.h: New file.
8828         * lib/strcasestr.c: New file.
8829
8830 2005-08-17  Bruno Haible  <bruno@clisp.org>
8831
8832         * lib/strcasecmp.c: Use mbuiter.h.
8833
8834 2005-08-17  Bruno Haible  <bruno@clisp.org>
8835
8836         * lib/mbuiter.h: New file.
8837
8838 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
8839
8840         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
8841         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
8842         and gl_GETOPT are both invoked via different paths (as happens
8843         with GNU tar CVS because it uses both argp and getopt), the former
8844         wins.
8845
8846 2005-08-16  Bruno Haible  <bruno@clisp.org>
8847
8848         * modules/tls: New file.
8849         * MODULES.html.sh (Multithreading): Add tls.
8850
8851 2005-08-16  Bruno Haible  <bruno@clisp.org>
8852
8853         * modules/strnlen1: New file.
8854         * MODULES.html.sh (String handling): Add strnlen1.
8855
8856 2005-08-16  Bruno Haible  <bruno@clisp.org>
8857
8858         * modules/strcase (Files): Add m4/mbrtowc.m4.
8859         (Depends-on): Add strnlen1, mbchar.
8860
8861 2005-08-16  Bruno Haible  <bruno@clisp.org>
8862
8863         * modules/mbiter: New file.
8864         * MODULES.html.sh (Extended multibyte and wide character utilities):
8865         Add mbiter.
8866
8867 2005-08-16  Bruno Haible  <bruno@clisp.org>
8868
8869         * modules/mbfile: New file.
8870         * MODULES.html.sh (Extended multibyte and wide character utilities):
8871         Add mbfile.
8872
8873 2005-08-16  Bruno Haible  <bruno@clisp.org>
8874
8875         * modules/mbchar: New file.
8876         * MODULES.html.sh (Extended multibyte and wide character utilities):
8877         New section.
8878
8879 2005-08-16  Bruno Haible  <bruno@clisp.org>
8880
8881         * m4/tls.m4: New file, from GNU gettext.
8882
8883 2005-08-16  Bruno Haible  <bruno@clisp.org>
8884
8885         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
8886         always.
8887         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
8888
8889 2005-08-16  Bruno Haible  <bruno@clisp.org>
8890
8891         * m4/mbiter.m4: New file.
8892
8893 2005-08-16  Bruno Haible  <bruno@clisp.org>
8894
8895         * m4/mbfile.m4: New file.
8896
8897 2005-08-16  Bruno Haible  <bruno@clisp.org>
8898
8899         * m4/mbchar.m4: New file.
8900
8901 2005-08-16  Bruno Haible  <bruno@clisp.org>
8902
8903         * lib/tls.h: New file, from GNU gettext.
8904         * lib/tls.c: New file, from GNU gettext.
8905
8906 2005-08-16  Bruno Haible  <bruno@clisp.org>
8907
8908         * lib/strnlen1.h: New file.
8909         * lib/strnlen1.c: New file.
8910
8911 2005-08-16  Bruno Haible  <bruno@clisp.org>
8912
8913         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
8914         (mbi_init): Update.
8915         (mbi_avail, mbi_advance): Let the iteration end before the terminating
8916         NUL byte, not after it.
8917
8918 2005-08-16  Bruno Haible  <bruno@clisp.org>
8919
8920         * lib/strcase.h (strcasecmp): Add note in comments.
8921         * lib/strncasecmp.c: Use code from strcasecmp.c.
8922         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
8923         (strcasecmp): Work correctly in multibyte locales.
8924
8925 2005-08-16  Bruno Haible  <bruno@clisp.org>
8926
8927         * lib/mbiter.h: New file.
8928
8929 2005-08-16  Bruno Haible  <bruno@clisp.org>
8930
8931         * lib/mbfile.h: New file.
8932
8933 2005-08-16  Bruno Haible  <bruno@clisp.org>
8934
8935         * lib/mbchar.h: New file.
8936         * lib/mbchar.c: New file.
8937
8938 2005-08-16  Bruno Haible  <bruno@clisp.org>
8939
8940         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
8941         the valid ones. Makes the comparison operations transitive:
8942         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
8943         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
8944
8945 2005-08-15  Simon Josefsson  <jas@extundo.com>
8946
8947         * modules/ssize_t (License): Change to 'unlimited'.
8948
8949         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
8950
8951 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
8952
8953         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
8954         Add comments for each pending glibc patch.
8955
8956 2005-08-15  Bruno Haible  <bruno@clisp.org>
8957
8958         * lib/regex.h (__restrict_arr): Don't define to __restrict if
8959         __cplusplus is defined.
8960
8961 2005-08-14  Jim Meyering  <jim@meyering.net>
8962
8963         Sync from coreutils.
8964
8965         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
8966         Use the hash-table-based cycle-detection code not just when
8967         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
8968         Reported by James Youngman in
8969         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
8970         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
8971         FTS_TIGHT_CYCLE_CHECK.
8972         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
8973         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
8974         once again.
8975         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
8976         * lib/fts.c (fd_safer): Remove decl.
8977         Include fcntl--.h rather than unistd-safer.h
8978         (fts_safe_changedir): Don't call fd_safer; no longer needed
8979         now that we include fcntl--.h.
8980
8981 2005-08-12  Simon Josefsson  <jas@extundo.com>
8982
8983         * modules/getndelim2: Use ssize_t module.
8984         * modules/getnline: Likewise.
8985         * modules/safe-read: Likewise.
8986         * modules/xreadlink: Likewise.
8987
8988         * modules/ssize_t: New file.
8989
8990 2005-08-12  Simon Josefsson  <jas@extundo.com>
8991
8992         * m4/readline.m4: Look for termcap, curses or ncurses if required.
8993
8994 2005-08-12  Simon Josefsson  <jas@extundo.com>
8995
8996         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
8997         ssize_t.
8998
8999 2005-08-12  Simon Josefsson  <jas@extundo.com>
9000
9001         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
9002         readline, getdelim and check_version.
9003         (Support for systems lacking ISO C 99: Sizes of integer types):
9004         Add size_max.
9005
9006 2005-08-12  Bruno Haible  <bruno@clisp.org>
9007
9008         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
9009
9010 2005-08-11  Simon Josefsson  <jas@extundo.com>
9011
9012         * modules/readline: New file.
9013
9014         * modules/strnlen (Files): Add strnlen.h.
9015
9016 2005-08-11  Simon Josefsson  <jas@extundo.com>
9017
9018         * m4/readline.m4: New file.
9019
9020 2005-08-11  Simon Josefsson  <jas@extundo.com>
9021
9022         * lib/readline.h, readline.c: New file.
9023
9024 2005-08-11  Simon Josefsson  <jas@extundo.com>
9025
9026         * doc/gnulib.texi (Initial import, Finishing touches): Mention
9027         gl_AVOID.
9028
9029 2005-08-11  Bruno Haible  <bruno@clisp.org>
9030
9031         * lib/strnlen.h (strnlen): Change parameter name to match comment.
9032
9033 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
9034
9035         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
9036
9037 2005-08-10  Simon Josefsson  <jas@extundo.com>
9038
9039         * tests/test-iconvme.c: New file.
9040
9041 2005-08-10  Simon Josefsson  <jas@extundo.com>
9042
9043         * m4/strnlen.m4: New file.
9044
9045         * m4/strndup.m4: Don't check for strnlen declaration, done in
9046         strnlen.m4.
9047
9048 2005-08-10  Simon Josefsson  <jas@extundo.com>
9049
9050         * lib/strndup.c: Use strnlen.h.
9051
9052         * lib/strnlen.h: New file.
9053
9054 2005-08-08  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>  (tiny change)
9055
9056         * README: Typos.
9057
9058 2005-08-02  Simon Josefsson  <jas@extundo.com>
9059
9060         * modules/readline: New file.
9061
9062 2005-08-02  Simon Josefsson  <jas@extundo.com>
9063
9064         * modules/getdelim: New file.
9065
9066         * modules/getline: Rewrite, don't use getndelim2.
9067
9068 2005-08-02  Simon Josefsson  <jas@extundo.com>
9069
9070         * m4/getline.m4: Separate out getdelim stuff into separate module.
9071
9072         * m4/getdelim.m4: New file.
9073
9074 2005-08-02  Simon Josefsson  <jas@extundo.com>
9075
9076         * lib/getline.h, getline.c: Rewrite.
9077
9078         * lib/getdelim.h, getdelim.c: New files, ported from glibc.
9079
9080 2005-07-31  Bruno Haible  <bruno@clisp.org>
9081
9082         * lib/lock.h (gl_lock_initializer): New macro.
9083         (gl_lock_define_initialized): Use it.
9084         (gl_rwlock_initializer): New macro.
9085         (gl_rwlock_define_initialized): Use it.
9086         (gl_recursive_lock_initializer): New macro.
9087         (gl_recursive_lock_define_initialized): Use it.
9088
9089 2005-07-30  Karl Berry  <karl@gnu.org>
9090
9091         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
9092         Report from Ben Pfaff, regarding getopt.
9093
9094 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
9095
9096         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
9097         normal way.
9098         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
9099         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
9100         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
9101         (gl_GETOPT): Use the new macros.  Most of the implementation
9102         is moved to the new macros.  This is for programs like Emacs
9103         that don't want all the functionality of gl_GETOPT.
9104
9105 2005-07-26  Bruno Haible  <bruno@clisp.org>
9106
9107         * m4/lock.m4: Update from GNU gettext.
9108
9109 2005-07-26  Bruno Haible  <bruno@clisp.org>
9110
9111         * lib/lock.h: Update from GNU gettext.
9112         * lib/lock.c: Update from GNU gettext.
9113
9114 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
9115
9116         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
9117         obsolescent AC_TRY_RUN.  Include the default includes files, for
9118         'exit'.
9119
9120 2005-07-24  Bruno Haible  <bruno@clisp.org>
9121
9122         * modules/visibility: New file.
9123         * MODULES.html.sh (Misc): Add visibility.
9124
9125 2005-07-24  Bruno Haible  <bruno@clisp.org>
9126
9127         * m4/visibility.m4: New file.
9128
9129 2005-07-24  Bruno Haible  <bruno@clisp.org>
9130
9131         * doc/visibility.texi: New file.
9132
9133 2005-07-22  Bruno Haible  <bruno@clisp.org>
9134
9135         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
9136         $(ALLOCA_H), redundant through BUILT_SOURCES.
9137         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
9138         redundant through BUILT_SOURCES.
9139         * modules/byteswap (Makefile.am): Remove explicit dependency on
9140         $(BYTESWAP_H), redundant through BUILT_SOURCES.
9141         * modules/fnmatch (Makefile.am): Remove explicit dependency on
9142         $(FNMATCH_H), redundant through BUILT_SOURCES.
9143         * modules/getopt (Makefile.am): Remove explicit dependency on
9144         $(GETOPT_H), redundant through BUILT_SOURCES.
9145         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
9146         redundant through BUILT_SOURCES.
9147         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
9148         redundant through BUILT_SOURCES.
9149         * modules/stdbool (Makefile.am): Remove explicit dependency on
9150         $(STDBOOL_H), redundant through BUILT_SOURCES.
9151         * modules/stdint (Makefile.am): Remove explicit dependency on
9152         $(STDINT_H), redundant through BUILT_SOURCES.
9153         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
9154         Remove explicit dependency on $(SYSEXITS_H).
9155         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
9156
9157 2005-07-18  Simon Josefsson  <jas@extundo.com>
9158
9159         * lib/check-version.c (check_version): Accept identical versions too.
9160
9161 2005-07-18  Bruno Haible  <bruno@clisp.org>
9162
9163         * modules/lock: New file.
9164         * MODULES.html.sh (Multithreading): New section.
9165
9166 2005-07-18  Bruno Haible  <bruno@clisp.org>
9167
9168         * m4/lock.m4: New file, from GNU gettext.
9169
9170 2005-07-18  Bruno Haible  <bruno@clisp.org>
9171
9172         * lib/lock.h: New file, from GNU gettext.
9173         * lib/lock.c: New file, from GNU gettext.
9174
9175 2005-07-18  Bruno Haible  <bruno@clisp.org>
9176
9177         * lib/lock.h (gl_once_t): New type.
9178         (gl_once_define, gl_once): New macros.
9179         * lib/lock.c (fresh_once): New variable.
9180         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
9181         functions.
9182
9183 2005-07-16  Simon Josefsson  <jas@extundo.com>
9184
9185         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
9186         workaround, suggested by Bruno.
9187
9188 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
9189
9190         * modules/xalloc (Depends-on): Add xalloc-die.
9191         * modules/xvasprintf (Depends-on): Add xalloc-die.
9192
9193 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
9194
9195         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
9196         with a minor change.
9197
9198 2005-07-15  Bruno Haible  <bruno@clisp.org>
9199
9200         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
9201         When using lib/poll.c, define poll as rpl_poll.
9202
9203 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
9204
9205         * modules/argp (Depends-on): Remove unlocked-io.
9206
9207 2005-07-14  Derek Price  <derek@ximbiot.com>
9208
9209         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
9210         for glob symlink bug.
9211
9212 2005-07-14  Bruno Haible  <bruno@clisp.org>
9213
9214         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
9215         Instead, test for *_unlocked function declarations directly.
9216
9217 2005-07-11  Simon Josefsson  <jas@extundo.com>
9218
9219         * modules/size_max: New file.
9220
9221         * modules/xsize: Depend on size_max module for size_max.m4.
9222
9223 2005-07-11  Simon Josefsson  <jas@extundo.com>
9224
9225         * lib/size_max.h: New file.
9226
9227 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
9228
9229         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
9230         copyright symbol and the year.
9231         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
9232         (version_etc_va): Use parameterized copyright notice.
9233         Reword to conform to the current GNU coding standards.
9234
9235 2005-07-11  Karl Berry  <karl@gnu.org>
9236
9237         * doc/gnulib.texi (Quoting): new node.
9238         (Initial import): more info, from Patrice.
9239
9240 2005-07-11  Bruno Haible  <bruno@clisp.org>
9241
9242         * gnulib-tool (func_usage): Document option --avoid.
9243         (Command line options): Handle --avoid.
9244         (func_acceptable): New function.
9245         (func_modules_transitive_closure): Use it.
9246
9247 2005-07-11  Bruno Haible  <bruno@clisp.org>
9248
9249         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
9250         Reported by Jim Meyering.
9251
9252 2005-07-10  Bruno Haible  <bruno@clisp.org>
9253
9254         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
9255         Needed when size_t is smaller than 'unsigned int'.
9256         Reported by Paul Eggert.
9257
9258 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9259
9260         * modules/argp (Depends-on): Add unlocked-io
9261
9262 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9263
9264         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
9265         block of defines.
9266
9267 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
9268
9269         * config/srclist.txt: Comment out regcomp.c, since we have a porting
9270         fix now.
9271
9272 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
9273        and  Paul Eggert  <eggert@cs.ucla.edu>
9274
9275         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
9276         in wint_t, not wchar_t.  Remove now-unnecessary cast.
9277
9278 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9279
9280         * modules/regex (Files): Add lib/regex_internal.c,
9281         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
9282         (Depends-on): Add extensions.
9283         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
9284
9285 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9286
9287         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
9288         pathconf.
9289         * m4/same.m4 (gl_SAME): Likewise.
9290         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
9291
9292         * m4/regex.m4: Adjust to new libc regex implementation.
9293         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
9294         all the .c and .h parts of (the new) regex.
9295         Quote the m4 stuff better.
9296         Check for RE_ICASE bug of old gnulib.
9297         Check for REG_STARTEND of recent libc.
9298         Rename local variables from jm_* to gl_*.
9299         Quote operand of "test -f".
9300         Say "recent enough" version of libc, not "version 2".
9301         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
9302         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
9303         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
9304         Remove check for btowc, isascii.
9305         Require AM_LANGINFO_CODESET.
9306
9307 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9308
9309         * lib/regex.c, regex.h: Sync from libc.
9310         * lib/regcomp.c, regexec_internal.c, regex_internal.h, regexec.c:
9311         New files, synced from libc, except that regex_internal.h
9312         currently has a small porting fix.
9313
9314 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
9315
9316         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
9317         regex_internal.c, regexec.c.
9318         Add regex_internal.h too, but as a comment, since the libc version
9319         is currently broken in gnulib mode.
9320
9321 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
9322
9323         Support programs like Emacs that use gnulib but not gettext.
9324         * MODULES.html.sh (Internationalization functions): Add gettext-h.
9325         * modules/gettext-h: New file.
9326         * modules/gettext (Files): Remove lib/gettext.h.
9327         (Depends-on): Add gettext-h.
9328         (Makefile.am): Remove lib_SOURCES.
9329         * modules/argmatch, modules/c-stack, modules/closeout:
9330         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
9331         * modules/execute, modules/file-type, modules/getaddrinfo:
9332         * modules/getopt, modules/human, modules/javacomp:
9333         * modules/javaexec, modules/mkdir-p, modules/obstack:
9334         * modules/openat, modules/pagealign_alloc, modules/pipe:
9335         * modules/quotearg, modules/regex, modules/rpmatch:
9336         * modules/unicodeio, modules/userspec, modules/version-etc:
9337         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
9338         * modules/xsetenv:
9339         Depend on gettext-h, not gettext.
9340
9341 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
9342
9343         * gnulib-tool (func_import): Add support for 'public domain' license.
9344         * modules/alloca, modules/atexit, modules/memmove:
9345         Now public domain, not GPL.
9346         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
9347         * modules/realloc, modules/strerror, modules/strtod:
9348         Now LGPL, not GPL.
9349
9350 2005-07-05  Bruno Haible  <bruno@clisp.org>
9351
9352         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
9353         autoconf CVS. Needed for mingw.
9354
9355 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9356
9357         Remove the dependency of the strftime module on the tzset module.
9358         * modules/strftime (Depends-on): Remove dependency on tzset.
9359
9360 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9361
9362         Remove the dependency of the strftime module on the tzset module.
9363         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
9364         gl_FUNC_TZSET_CLOBBER.
9365
9366 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
9367
9368         Remove the dependency of the strftime module on the tzset module.
9369         * lib/strftime.c (my_strftime)
9370         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
9371         Copy the input structure, to work around some of the bug with
9372         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
9373         Solaris releases, you should also use the tzset module, but we won't
9374         require it as a dependency any more since we don't want LGPLed code
9375         to depend on GPLed code.
9376
9377 2005-07-02  Jim Meyering  <jim@meyering.net>
9378
9379         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
9380         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
9381         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
9382         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
9383
9384 2005-07-02  Jim Meyering  <jim@meyering.net>
9385
9386         * lib/backupfile.c (backup_args): Change a `0' to NULL.
9387
9388 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
9389
9390         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
9391         declares only 'struct timespec;' (!).
9392
9393 2005-07-01  Jim Meyering  <jim@meyering.net>
9394
9395         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
9396         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
9397         * lib/save-cwd.c, tempname.c:
9398         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9399         and don't include <sys/file.h>).
9400
9401 2005-06-29  Jim Meyering  <jim@meyering.net>
9402
9403         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
9404         type name.  Use the variable name instead.
9405         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
9406         Likewise.
9407
9408 2005-06-28  Simon Josefsson  <jas@extundo.com>
9409
9410         * modules/check-version (Files): Add check-version.m4.
9411
9412 2005-06-28  Simon Josefsson  <jas@extundo.com>
9413
9414         * m4/check-version.m4: New file, suggested by Jim Meyering
9415         <jim@meyering.net>.
9416
9417 2005-06-28  Simon Josefsson  <jas@extundo.com>
9418
9419         * lib/check-version.h, check-version.c: New files.
9420
9421 2005-06-28  Simon Josefsson  <jas@extundo.com>
9422
9423         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
9424         collision with global variable.  Better indentation.  Don't
9425         increment buffer pointer beyond buffer end.  Based on comments
9426         from Paul Eggert <eggert@cs.ucla.edu>.
9427
9428         * lib/base64.h: Indent.
9429
9430 2005-06-28  Simon Josefsson  <jas@extundo.com>
9431
9432         * doc/gnulib.texi (Library version handling): New section.
9433
9434 2005-06-28  Jim Meyering  <jim@meyering.net>
9435
9436         * check-module (find_included_lib_files): Hard-code another
9437         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
9438         but modules/fts-lgpl (correctly) does not list those files.
9439
9440         * modules/canonicalize (Files): Add lib/pathmax.h.
9441
9442 2005-06-25  Simon Josefsson  <jas@extundo.com>
9443
9444         * modules/check-version: New file.
9445
9446 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
9447
9448         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
9449         initializer of struct addrinfo, as an indication that we don't
9450         care how many members the structure has.
9451
9452 2005-06-24  Derek Price  <derek@ximbiot.com>
9453         and Bruno Haible  <bruno@clisp.org>
9454
9455         Remove stat module & update lstat.
9456         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
9457         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
9458         * m4/stat.m4: Remove this file.
9459
9460 2005-06-24  Derek Price  <derek@ximbiot.com>
9461         and Bruno Haible  <bruno@clisp.org>
9462
9463         Remove stat module & update lstat.
9464         * lib/stat.c: Remove this file...
9465         (slash_aware_lstat): ...moving this content and its support...
9466         * lib/lstat.c (rpl_lstat): ...into here.
9467         * lib/lstat.h: New file.
9468
9469 2005-06-24  Derek Price  <derek@ximbiot.com>
9470         and Bruno Haible  <bruno@clisp.org>
9471
9472         Remove stat module & update lstat.
9473         * config/srclist.txt (libc sources): Remove stat.
9474
9475 2005-06-24  Derek Price  <derek@ximbiot.com>
9476         and Bruno Haible  <bruno@clisp.org>
9477
9478         Remove stat module & update lstat.
9479         * MODULES.html.sh (stat): Remove.
9480         * MODULES.html: Regenerated.
9481         * modules/lstat (Description): Correct function name.
9482         (Files): Add "lstat.h".
9483         (Depends-on): Remove stat, add xalloc, stat-macros.
9484         * modules/stat: Remove this file.
9485         (Include): Add "lstat.h", remove <sys/stat.h>.
9486
9487 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
9488
9489         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
9490         (ranged_convert): Don't save conversion in a temporary struct.
9491         This causes a warning with GCC 4.0.0, and anyway in the typical
9492         case it's not worth the extra 100 bytes or so of code.
9493         (ranged_convert, __mktime_internal): When calling a function via a
9494         pointer P, use P () rather than (*P) (), as we now assume C89 or
9495         better.
9496
9497 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
9498
9499         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
9500         "who -r" failed to give output.  Problem reported by Tim Waugh.
9501
9502         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
9503         (xcalloc): Use it to avoid needless tests.
9504         Problem reported by Jim Meyering.
9505
9506 2005-06-20  Derek Price  <derek@ximbiot.com>
9507
9508         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
9509         unnecessary for Autoconfs > 2.59c.
9510
9511 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
9512
9513         * lib/argp.h (__option_is_short): Check upper limit of
9514         __key. Isprint() requires its argument to have the value
9515         of an unsigned char or EOF.
9516
9517 2005-06-16  Jim Meyering  <jim@meyering.net>
9518
9519         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
9520         when either N or S is zero.
9521
9522 2005-06-16  Derek Price  <derek@ximbiot.com>
9523
9524         * m4/bison.m4: Declare YACC & YFLAGS precious.
9525
9526 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
9527
9528         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
9529         multibyte string or pattern, fall back on unibyte matching.
9530         Problem reported by James Youngman.
9531
9532 2005-06-08  Bruno Haible  <bruno@clisp.org>
9533
9534         * modules/csharpcomp: New file.
9535         * MODULES.html.sh (C#): Add csharpcomp.
9536
9537 2005-06-08  Bruno Haible  <bruno@clisp.org>
9538
9539         * m4/csharpcomp.m4: New file, from GNU gettext.
9540
9541 2005-06-08  Bruno Haible  <bruno@clisp.org>
9542
9543         * lib/csharpcomp.h: New file, from GNU gettext.
9544         * lib/csharpcomp.c: New file, from GNU gettext.
9545         * lib/csharpcomp.sh.in: New file, from GNU gettext.
9546
9547 2005-06-08  Bruno Haible  <bruno@clisp.org>
9548
9549         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
9550         warning on mingw.
9551
9552 2005-06-07  Derek Price  <derek@ximbiot.com>
9553
9554         Sync from CVS.
9555         * lib/glob_.h: Indent nested #ifdef.
9556
9557 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
9558
9559         Sync from coreutils.
9560         Use "file name" when talking about file names, instead of "filename"
9561         or "path", as per the GNU coding standards.
9562         * lib/mkdir-p.c: Renamed from makepath.c.
9563         (make_dir_parents): Renamed from make_path.  All callers changed.
9564         * lib/mkdir-p.h: Likewise.  All includers changed.
9565         * lib/filenamecat.c: Renamed from path-concat.c.
9566         (file_name_concat): Renamed from path_concat.  All callers changed.
9567         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
9568         * lib/filenamecat.h: Likewise.  All includers changed.
9569         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
9570         in comments or local variable names.
9571         * lib/basename.c: Likewise.
9572         * lib/canonicalize.c, canonicalize.h: Likewise.
9573         * lib/dirname.c, dirname.h: Likewise.
9574         * lib/euidaccess.c: Likewise.
9575         * lib/exclude.c: Likewise
9576         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
9577         * lib/fsusage.c, fsuage.h: Likewise.
9578         * lib/fts.c, fts_.h: Likewise.
9579         * lib/getcwd.c: Likewise.
9580         * lib/getloadavg.c: Likewise.
9581         * lib/mkstemp.c: Likewise.
9582         * lib/mountlist.c, mountlist.h: Likewise.
9583         * lib/openat.c, openat.h: Likewise.
9584         * lib/readlink-stub.c: Likewise.
9585         * lib/readutmp.c, readutmp.h: Likewise.
9586         * lib/rename.c: Likewise.
9587         * lib/rmdir.c: Likewise.
9588         * lib/same.c: Likewise.
9589         * lib/savedir.c: Likewise.
9590         * lib/stripslash.c: Likewise.
9591         * lib/tempname.c: Likewise.
9592         * lib/xreadlink.c: Likewise.
9593         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
9594         All uses changed.
9595         * lib/exclude.h: Likewise.
9596
9597         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
9598         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
9599         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
9600         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
9601         * lib/pathmax.h: Include <limits.h> unconditionally, since other
9602         files have been getting away with it for years (MORE/BSD 4.3
9603         is extinct now).
9604         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
9605         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
9606
9607         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
9608         Define to 256, not 255, as per modern POSIX.
9609
9610 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
9611
9612         Sync from coreutils.
9613         Use "file name" when talking about file names, instead of "filename"
9614         or "path", as per the GNU coding standards.
9615         * MODULES.html.sh: mkdir-p renamed from makepath.
9616         filenamecat renamed from path-concat.
9617         * modules/filenamecat: Renamed from modules/path-concat.
9618         (Files): filenamecat.h and filenamecat.c renamed from
9619         path-concat.h and path-concat.c.
9620         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
9621         (Include): filenamecat.h, not path-concat.h.
9622         * modules/mkdir-p: Renamed from modules/makepath.
9623         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
9624         makepath.c.
9625         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
9626         (Include): mkdir-p.h, not makepath.h.
9627
9628 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
9629
9630         Sync from coreutils.
9631         * m4/mkdir-p.m4: Renamed from makepath.m4.
9632         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
9633         Rename files from makepath.c to mkdir-p.c, and from
9634         makepath.h to mkdir-p.h.
9635         * m4/filenamecat.m4: Renamed from path-concat.m4.
9636         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
9637         Rename files from path-concat.c to filenamecat.c,
9638         and from path-concat.h to filenamecat.h.
9639         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
9640         "file name" in local variables or comments.
9641         * m4/rename.m4: Likewise.
9642
9643 2005-06-01  Bruno Haible  <bruno@clisp.org>
9644
9645         * modules/csharpexec: New file.
9646         * MODULES.html.sh (C#): New section.
9647
9648 2005-06-01  Bruno Haible  <bruno@clisp.org>
9649
9650         * m4/csharp.m4: New file, from GNU gettext.
9651         * m4/csharpexec.m4: New file, from GNU gettext.
9652
9653 2005-06-01  Bruno Haible  <bruno@clisp.org>
9654
9655         * lib/csharpexec.h: New file, from GNU gettext.
9656         * lib/csharpexec.c: New file, from GNU gettext.
9657         * lib/csharpexec.sh.in: New file, from GNU gettext.
9658
9659 2005-05-31  Derek Price  <derek@ximbiot.com>
9660             Paul Eggert  <eggert@cs.ucla.edu>
9661
9662         Sync from cvs.
9663         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
9664
9665 2005-05-31  Derek Price  <derek@ximbiot.com>
9666             Paul Eggert  <eggert@cs.ucla.edu>
9667
9668         Sync from cvs.
9669         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
9670
9671 2005-05-29  Derek Price  <derek@ximbiot.com>
9672
9673         * config/srclist.txt (glob_.h, glob.c): Add these files.
9674
9675 2005-05-29  Derek Price  <derek@ximbiot.com>
9676
9677         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
9678         * modules/glob: New file.
9679         * modules/getlogin_r: Add link to POSIX spec in description.
9680
9681 2005-05-29  Derek Price  <derek@ximbiot.com>
9682             Paul Eggert  <eggert@cs.ucla.edu>
9683
9684         * m4/glob.m4: New file.
9685
9686 2005-05-29  Derek Price  <derek@ximbiot.com>
9687             Paul Eggert  <eggert@cs.ucla.edu>
9688
9689         * lib/glob_.h, glob.c: New files.
9690
9691 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
9692
9693         * modules/fts (Files): Remove m4/inttypes-pri.m4.
9694         * modules/fts-lgpl (Depends-on): Remove gettext.
9695
9696 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
9697
9698         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
9699         and don't require gt_INTTYPES_PRI.
9700
9701 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
9702
9703         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
9704
9705         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
9706         the configuration hassle isn't worth it.
9707         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
9708         (LONGEST_MODIFIER, PRIuMAX): Remove.
9709
9710 2005-05-27  Bruno Haible  <bruno@clisp.org>
9711
9712         * lib/getlogin_r.h: Remove second include of <stddef.h>.
9713
9714 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
9715
9716         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
9717         _POSIX_PTHREAD_SEMANTICS for Solaris.
9718
9719 2005-05-25  Derek Price  <derek@ximbiot.com>
9720
9721         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
9722
9723 2005-05-25  Derek Price  <derek@ximbiot.com>
9724             Paul Eggert  <eggert@cs.ucla.edu>
9725
9726         * modules/getlogin_r: New files.
9727
9728 2005-05-25  Derek Price  <derek@ximbiot.com>
9729             Paul Eggert  <eggert@cs.ucla.edu>
9730
9731         * m4/getlogin_r.m4: New files.
9732
9733 2005-05-25  Derek Price  <derek@ximbiot.com>
9734             Paul Eggert  <eggert@cs.ucla.edu>
9735
9736         * lib/getlogin_r.c, getlogin_r.h: New files.
9737
9738 2005-05-25  Bruno Haible  <bruno@clisp.org>
9739             Derek Price  <derek@ximbiot.com>
9740
9741         * lib/getlogin_r.h: Simplify API documentation.
9742
9743 2005-05-23  Derek Price  <derek@ximbiot.com>
9744
9745         * modules/minmax (Files): Add m4/minmax.m4.
9746         (configure.ac): Add gl_MINMAX.
9747
9748 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
9749
9750         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
9751         so that unistd-safer.h (GPL'ed code) need not be included.
9752
9753 2005-05-22  Bruno Haible  <bruno@clisp.org>
9754
9755         * m4/minmax.m4: New file.
9756         Based on a patch by Derek Price <derek@ximbiot.com>.
9757
9758 2005-05-22  Bruno Haible  <bruno@clisp.org>
9759
9760         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
9761         (INT64_MIN): Fix definition.
9762         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
9763
9764         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
9765         NEED_SIGNED_INT_TYPES.
9766
9767         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
9768         HAVE_SYSTEM_INTTYPES.
9769
9770 2005-05-22  Bruno Haible  <bruno@clisp.org>
9771
9772         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
9773         Also include <sys/param.h> if it defines MIN, MAX.
9774         Based on a patch by Derek Price <derek@ximbiot.com>.
9775
9776 2005-05-21  Jim Meyering  <jim@meyering.net>
9777
9778         * modules/fts (Files): Add m4/inttypes-pri.m4.
9779         (Depends-on): Add lstat and remove gettext.  Alphabetize.
9780
9781 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
9782
9783         New fts module.
9784         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
9785         (setup_dir, free_dir): New functions.
9786         (enter_dir, leave_dir): Define trivial
9787         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
9788         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
9789         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
9790         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
9791         Move to fts-cycle.c.
9792         (fts_open): Use setup_dir.
9793         (fts_close): Use free_dir.
9794         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
9795         This adds a label and some gotos, but the alternatives were messier.
9796         Check for memory allocation failure when entering a dir.
9797         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
9798         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
9799         (FTS): New member fts_cycle, that is a union that contains the
9800         old active_dir_ht and cycle_state.  All uses changed to mention
9801         fts_cycle.ht and fts_cycle.state.
9802         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
9803         fts.c, with the following changes:
9804         (setup_dir, free_dir): New functions.
9805         (enter_dir): Now returns bool.  Return true if successful, false
9806         if memory exhausted.  All callers changed.
9807         Do not bother partly cleaning up on
9808         memory allocation failure; that is free_dir's job.
9809         However, free ad if hash_insert fails, to avoid memory leak.
9810         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
9811         fts->fts_options to see which union member to use.
9812
9813 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
9814
9815         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
9816         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
9817
9818 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
9819
9820         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
9821
9822 2005-05-20  Jim Meyering  <jim@meyering.net>
9823
9824         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
9825         Now a macro, to pacify GCC.
9826
9827 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
9828
9829         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
9830         of -1.
9831
9832 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
9833
9834         * lib/chown.c (rpl_chown): Return -1 on failure.
9835
9836 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
9837
9838         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
9839         Don't check for stddef.h.
9840         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
9841         don't use its results.
9842         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
9843         since we include them unconditionally.  Don't require
9844         AM_STDBOOL_H, since stdbool is a prerequisite.
9845         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
9846         since we assume C89 or better.
9847         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
9848         as we don't use their results.
9849         Don't check for fchdir, memmove, memset, strrchr, as we use
9850         them unconditionally.
9851         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
9852         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
9853
9854 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
9855
9856         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
9857         Include <stddef.h> unconditionally, since we assume C89 now.
9858         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
9859         * lib/fts.c: Include fts_.h first, to check interface.
9860         Do not include intprops.h; no longer needed.
9861         Include cycle-check.h and hash.h, since fts_.h no longer does.
9862         Remove unnecessary casts of closedir to void.
9863         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
9864         decide whether to decrement nlinks.
9865         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
9866         (FTS): Use struct hash_table * instead of Hash_table, so that
9867         we no longer need to include hash.h here.
9868
9869 2005-05-18  Jim Meyering  <jim@meyering.net>
9870
9871         * modules/dirfd (License): Change to LGPL.  Most of the code
9872         is already in the public domain.
9873
9874 2005-05-18  Jim Meyering  <jim@meyering.net>
9875
9876         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
9877         Reported by Yoann Vandoorselaere.
9878
9879 2005-05-17  Jim Meyering  <jim@meyering.net>
9880
9881         * m4/fts.m4: New file, from coreutils.
9882
9883 2005-05-17  Jim Meyering  <jim@meyering.net>
9884
9885         * lib/fts.c, fts_.h: New files, from coreutils.
9886
9887 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9888
9889         Sync from coreutils.
9890         * m4/unlinkdir.m4: New file.
9891
9892 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9893
9894         Sync from coreutils.
9895         * lib/unlinkdir.c, unlinkdir.h: New files.
9896         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
9897         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
9898         White space changes only.
9899         * lib/makepath.c (make_path): Port to hosts where leading "//" is
9900         special.
9901         * lib/yesno.c: Include getline.h, not ctype.h.
9902         (yesno): Don't remove leading white space; POSIX doesn't allow it.
9903         Use getline to remove arbitrary restriction on response length.
9904
9905 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
9906
9907         * config/srclist-update: Spell out "Street" in FSF postal
9908         mail address; this is the style the FSF seems to prefer.
9909
9910         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
9911         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
9912         this updates FSF postal mail address.
9913
9914         Sync from coreutils.
9915         * modules/unlinkdir: New file.
9916         * modules/yesno (Depends-on): Add getline.
9917         * MODULES.html.sh (File system functions): Add unlinkdir.
9918
9919 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
9920
9921         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
9922         lib/strsep.h:
9923         Change the initial comment to refer to GPL, not LGPL.
9924         gnulib-tool will change it to LGPL as needed.
9925
9926         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
9927         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
9928         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
9929         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
9930         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
9931         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
9932         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
9933         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
9934         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
9935         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
9936         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
9937         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
9938         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
9939         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
9940         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
9941         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
9942         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
9943         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
9944         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
9945         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
9946         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
9947         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
9948         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
9949         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
9950         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
9951         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
9952         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
9953         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
9954         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
9955         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
9956         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
9957         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
9958         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
9959         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
9960         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
9961         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
9962         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
9963         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
9964         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
9965         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
9966         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
9967         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
9968         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
9969         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
9970         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
9971         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
9972         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
9973         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
9974         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
9975         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
9976         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
9977         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
9978         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
9979         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
9980         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
9981         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
9982         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
9983         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
9984         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
9985         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
9986         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
9987         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
9988         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
9989         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
9990         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
9991         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
9992         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
9993         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
9994         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
9995         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
9996         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
9997         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
9998         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
9999         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
10000         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
10001         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
10002         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
10003         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
10004         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
10005         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
10006         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
10007         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
10008         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
10009         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
10010         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
10011         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
10012         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
10013         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
10014         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
10015         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
10016         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
10017         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
10018         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
10019         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
10020         lib/yesno.c, lib/yesno.h:
10021         Update FSF postal mail address.
10022
10023 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
10024
10025         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
10026         tests/test-memmem.c, tests/test-stpncpy.c:
10027         Update FSF postal mail address.
10028
10029 2005-05-13  Bruno Haible  <bruno@clisp.org>
10030
10031         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
10032         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
10033         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
10034         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
10035         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
10036         Add support for 64-bit integers in the MSVC compiler.
10037
10038 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10039
10040         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
10041
10042 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
10043
10044         * gnulib-tool (func_import): Sort and uniquify recommended includes.
10045
10046 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
10047
10048         * doc/getdate.texi (General date syntax): Don't say that date
10049         date --iso-8601=ns generates acceptable dates; it doesn't yet.
10050         Problem reported by Nic Ferrier.
10051
10052 2005-05-10  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10053
10054         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
10055         specified in ai_socktype. Fix invalid ai_protocol
10056         check. ai_protocol is usually set to 0 or depending on
10057         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
10058         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
10059         ai_socktype / ai_protocol in the returned addrinfo structure.
10060
10061 2005-05-10  Simon Josefsson  <jas@extundo.com>
10062
10063         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
10064         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
10065
10066 2005-05-10  Karl Berry  <karl@gnu.org>
10067
10068         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
10069         (from http://www.gnu.org/licenses).
10070         * doc/COPYING.LIB: also rename to COPYING.LESSER.
10071         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
10072         fdl.texi suffices.
10073
10074 2005-05-10  Karl Berry  <karl@gnu.org>
10075
10076         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
10077         (COPYING.DOC): remove.
10078
10079         * config/srclist-update: new FSF address.
10080
10081 2005-05-10  Derek Price  <derek@ximbiot.com>
10082
10083         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
10084         possible.
10085
10086 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10087             Bruno Haible  <bruno@clisp.org>
10088
10089         * modules/inet_ntop: New file.
10090         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10091         inet_ntop.
10092
10093 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10094             Bruno Haible  <bruno@clisp.org>
10095
10096         * m4/inet_ntop.m4: New file.
10097
10098 2005-05-09  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
10099             Bruno Haible  <bruno@clisp.org>
10100
10101         * lib/inet_ntop.h: New file.
10102         * lib/inet_ntop.c: New file, from glibc with modifications.
10103
10104 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
10105
10106         * modules/time_r (License): Change to LGPL.
10107         * modules/extensions (License): Change to LGPL.  Actually,
10108         the license is more permissive than that, but currently gnulib-tool
10109         doesn't know how to handle more-permissive licenses.
10110
10111         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
10112         Problem reported by Dave Love.
10113
10114 2005-05-08  Jim Meyering  <jim@meyering.net>
10115
10116         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
10117         blank.
10118
10119 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
10120
10121         * modules/argmatch (Depends-on): Add stdbool.
10122         * modules/backupfile (Depends-on): Likewise.
10123         * modules/chdir-long (Depends-on): Likewise.
10124         * modules/closeout (Depends-on): Likewise.
10125         * modules/cycle-check (Depends-on): Likewise.
10126         * modules/dirname (Depends-on): Likewise.
10127         * modules/fnmatch (Depends-on): Likewise.
10128         * modules/fsusage (Depends-on): Likewise.
10129         * modules/fwriteerror (Depends-on): Likewise.
10130         * modules/getcwd (Depends-on): Likewise.
10131         * modules/getloadavg (Depends-on): Likewise.
10132         * modules/hard-locale (Depends-on): Likewise.
10133         * modules/makepath (Depends-on): Likewise.
10134         * modules/mountlist (Depends-on): Likewise.
10135         * modules/nanosleep (Depends-on): Likewise.
10136         * modules/posixtm (Depends-on): Likewise.
10137         * modules/quotearg (Depends-on): Likewise.
10138         * modules/readtokens (Depends-on): Likewise.
10139         * modules/readtokens0 (Depends-on): Likewise.
10140         * modules/readutmp (Depends-on): Likewise.
10141         * modules/save-cwd (Depends-on): Likewise.
10142         * modules/strftime (Depends-on): Likewise.
10143         * modules/userspec (Depends-on): Likewise.
10144         * modules/utimecmp (Depends-on): Likewise.
10145         * modules/xgetcwd (Depends-on): Likewise.
10146         * modules/xnanosleep (Depends-on): Likewise.
10147         * modules/xstrtod (Depends-on): Likewise.
10148         * modules/yesno (Depends-on): Likewise.
10149
10150 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
10151
10152         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
10153         needless checks.
10154
10155 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10156
10157         Merge from coreutils.  Among other things,
10158         add bulletproofing for cases where stdin, stdout, or stderr are closed.
10159         * lib/fd-safer.c: New file.
10160         * lib/fcntl-safer.h, open-safer.c: Remove.
10161         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
10162         * lib/dup-safer.c: Include unistd-safer.h first.
10163         Don't include errno.h.
10164         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
10165         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
10166         * lib/file-type.c: Rely on file-type.h change.
10167         * lib/getloadavg.c: Include unistd-safer.h.
10168         (getloadavg): Use safer open.
10169         * lib/getusershell.c: Include "stdio-safer.h".
10170         (getusershell): Use safer fopen.
10171         * lib/long-options.c (long_options): Use NULL rather than 0.
10172         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
10173         'free'.
10174         * lib/modechange.c: Likewise.
10175         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
10176         (MODE_DONE): New constant.
10177         (struct mode_change): Remove 'next' member.
10178         (make_node_op_equals): New function; like the old one of the
10179         same name, except it allocates an array.
10180         (mode_compile, mode_create_from_ref): Use it.
10181         (mode_compile): Allocate result as an array, not a linked list.
10182         Parse octal string ourself, so that we catch mistakes like "+0".
10183         (mode_adjust): Arg is an array, not a linked list.
10184         * lib/modechange.c: Include stat-macros.h, xalloc.h.
10185         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
10186         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
10187         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
10188         Remove.  This is now stat-macros.h's job.
10189         (talloc): Remove.  All callers replaced by xalloc, so that
10190         our invokers don't have to worry about reporting memory failures.
10191         (make_node_op_equals): Remove.
10192         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
10193         New constants.
10194         (struct mode_change): Moved here from modechange.h.
10195         (mode_append_entry): Remove.
10196         (mode_compile): Remove MASKED_OPS arg, since it encouraged
10197         apps to have incorrect behavior.  Use simpler algorithm for head
10198         and tail.  Don't futz with umask; that's now the job of mode_adjust.
10199         Detect more invalid usages rather than having somewhat-random behavior.
10200         Don't insert an "a=" action, as that leads to incorrect behavior.
10201         (mode_compile, mode_create_from_ref): Return NULL on error instead
10202         of an enum, since now there's only one way to have an error.  All
10203         callers changed.
10204         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
10205         at the correct time.  Simplify calculation of "+u" and its ilk.
10206         Don't mishandle "+X".
10207         (mode_free): Remove "register" and localize decls.
10208         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
10209         (struct mode_change): Move to modechange.c; callers don't
10210         need to see this stuff.
10211         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
10212         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
10213         (mode_change, mode_adjust): Reflect the new signatures noted above.
10214         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
10215         that might redefine system include files.
10216         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
10217         (my_usleep): Use NULL rather than (void *) 0.
10218         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
10219         Use siginterrupt to specify that system calls should be interrupted.
10220         (rpl_nanosleep): Move initialization of suspended closer to call of
10221         my_usleep.
10222         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
10223         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
10224         (desirable_utmp_entry): New function.
10225         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
10226         using x2nrealloc, to simplify logic.
10227         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
10228         size calculation.  Do not assume utmp file is a regular file.
10229         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
10230         (READ_UTMP_CHECK_PIDS): New constant.
10231         * lib/save-cwd.c: Include unistd-safer.h.
10232         (save_cwd): Use fd_safer.
10233         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
10234         [!_LIBC] Include "stat-macros.h" instead.
10235         * lib/unistd-safer.h (fd_safer): New decl.
10236
10237 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10238
10239         * modules/getloadavg (Depends-on): Add unistd-safer.
10240         * modules/getusershell (Depends-on): Add stdio-safer.
10241         * modules/lstat (Depends-on): Remove xalloc.
10242         * modules/mkstemp (Depends-on): Add stat-macros.
10243         * modules/modechange (Depends-on): Remove xstrtol.
10244         Add stat-macros, xalloc.
10245         * modules/save-cwd (Depends-on): Add unistd-safer.
10246         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
10247         * modules/unistd-safer (Files): Add lib/fd-safer.c
10248         (Makefile.am): Remove lib_SOURCES.
10249
10250         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
10251         Remove fcntl-safer; unistd-safer supersedes it.
10252
10253 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10254
10255         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
10256         AC_HEADER_STAT.
10257         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
10258         (gl_PREREQ_CHOWN): Remove.
10259         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
10260         it.  Don't require AC_HEADER_STAT.
10261         (gl_PREREQ_LSTAT): Remove.
10262         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
10263         Don't require AC_HEADER_STAT.
10264         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
10265         (gl_PREREQ_RMDIR): Remove.
10266         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
10267         mention stat-macros.h or AC_HEADER_STAT, since we'll make
10268         the stat-macros module a prerequisite.
10269         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
10270         * m4/filemode.m4 (gl_FILEMODE): Likewise.
10271         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
10272         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
10273         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
10274         variable names.
10275         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
10276         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
10277         variable prefixes.
10278         * m4/fcntl-safer.m4: Remove.
10279         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
10280         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
10281         Invoke gl_PREREQ_FD_SAFER.
10282         (gl_PREREQ_FD_SAFER): New macro.
10283         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
10284         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
10285         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
10286         Remove duplicate call to AC_LIBOBJ(readutmp).
10287         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
10288
10289         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
10290         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
10291
10292 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
10293
10294         * MODULES.html.sh (Misc): Add byteswap.
10295
10296 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10297
10298         * modules/getcwd (Depends-on): Add extensions.
10299         * modules/openat (Depends-on): Likewise.
10300
10301 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10302
10303         * modules/byteswap: New file.
10304
10305 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10306
10307         * m4/byteswap.m4: New file.
10308
10309 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
10310
10311         * lib/byteswap_.h: New file.
10312
10313 2005-04-25  Karl Berry  <karl@gnu.org>
10314
10315         * m4/gettext.m4: Update from GNU gettext 0.14.4.
10316
10317 2005-04-25  Albert Chin  <china@thewrittenword.com>
10318
10319         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
10320         Toolkit C bug.
10321
10322 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
10323
10324         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
10325         (func_ln_if_changed) Remove forcibly for no error message
10326         in case file does not exist.
10327
10328 2005-04-19  Simon Josefsson  <jas@extundo.com>
10329
10330         * gnulib-tool (Options): Make --symlink mean --symbolic.
10331
10332 2005-04-18  Oskar Liljeblad <oskar@osk.mine.nu>
10333
10334         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
10335
10336 2005-04-16  Simon Josefsson  <jas@extundo.com>
10337
10338         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
10339
10340 2005-04-15  Simon Josefsson  <jas@extundo.com>
10341
10342         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
10343
10344 2005-04-15  Simon Josefsson  <jas@extundo.com>
10345
10346         * gnulib-tool: Rename --symlink to --symbolic.
10347
10348 2005-04-15  Oskar Liljeblad <oskar@osk.mine.nu>
10349
10350         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
10351         symbolic links to files instead of copying/moving.  Add --aux-dir,
10352         specifying directory relative --dir where auxiliary build tools
10353         are placed.
10354
10355 2005-04-14  Bruno Haible  <bruno@clisp.org>
10356
10357         * modules/allocsa (License): Change to LGPL.
10358         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
10359
10360 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
10361
10362         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
10363         that "UTC +1 second" continues to work.  Problem reported
10364         by Dmitry V. Levin.
10365         (relunit_snumber): New rule.
10366         (relunit): Use it.
10367
10368 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
10369
10370         * lib/getdate.y (universal_time_zone_table): New constant.
10371         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
10372         universal_time_zone_table.
10373         (lookup_zone): Prefer universal_time_zone_table to
10374         local_time_zone_table, so that "GMT" time stamps are allowed in
10375         London during the summer.  Problem reported by Ian Abbott.
10376
10377 2005-04-12  Jim Meyering  <jim@meyering.net>
10378
10379         * lib/human.c (humblock): Set *options even when returning due to
10380         xstrtoumax conversion failure.  Thanks to a used-uninitialized
10381         warning from gcc-4.
10382
10383 2005-04-09  Jim Meyering  <jim@meyering.net>
10384
10385         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
10386         -Wuninitialized: initialize tm0.tm_year.
10387
10388 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
10389
10390         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
10391         count, since there's no maximum.  All uses changed.
10392         Add member dsts_seen.
10393         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
10394         not being INT_MAX.
10395         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
10396         Use pc_rels_seen to decide whther a date is absolute.
10397
10398         * lib/getdate.y (number): Don't overwrite year.
10399         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
10400         check.
10401
10402 2005-04-02  Simon Josefsson  <jas@extundo.com>
10403
10404         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
10405         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
10406
10407 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
10408
10409         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
10410         where no absolute path name can be longer than PATH_MAX.
10411
10412 2005-03-27  Jim Meyering  <jim@meyering.net>
10413
10414         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
10415
10416 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
10417
10418         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
10419         "one's complement" -> "ones' complement" in comment, as per Knuth.
10420         "value of type" -> "type or expression" in comment.
10421         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
10422
10423 2005-03-26  Jim Meyering  <jim@meyering.net>
10424
10425         Comment nits.
10426         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
10427         Correct typos: s/or/of/.
10428
10429 2005-03-26  Jim Meyering  <jim@meyering.net>
10430
10431         * modules/check-include-files: Move to ../ and rename to...
10432         * check-module: ...this.
10433
10434 2005-03-25  Jim Meyering  <jim@meyering.net>
10435
10436         * modules/xvasprintf (Files): Add xalloc.h.
10437
10438 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
10439
10440         * modules/gettext (Files): config/config.rpath ->
10441         build-aux/config.rpath
10442         * modules/iconv (Files): Likewise.
10443         Problem reported by Oskar Liljeblad.
10444
10445 2005-03-23  Jim Meyering  <jim@meyering.net>
10446
10447         * modules/check-include-files: New script to check for
10448         missing dependencies, multiple includes, etc.
10449
10450         * modules/c-strtold (Depends-on): Add xalloc.
10451         * modules/c-strtod (Depends-on): Add xalloc.
10452         * modules/hash (Depends-on): Add xalloc.
10453         (Files): Remove lib/xalloc.h.
10454
10455         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
10456         * modules/userspec (Files): Add lib/inttostr.h.
10457
10458 2005-03-23  Jim Meyering  <jim@meyering.net>
10459
10460         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
10461
10462 2005-03-22  Jim Meyering  <jim@meyering.net>
10463
10464         * modules/stat-macros: New module.
10465         * modules/canonicalize, modules/euidaccess, modules/file-type,
10466         * modules/filemode, modules/lchown, modules/makepath,
10467         * modules/rmdir, modules/stat: Depend on new stat-macros module
10468         rather than listing lib/stat-macros.h manually.
10469         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
10470
10471 2005-03-22  Jim Meyering  <jim@meyering.net>
10472
10473         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
10474
10475 2005-03-22  Bruno Haible  <bruno@clisp.org>
10476
10477         * config/srclist.txt: Replace target directory 'config' with
10478         'build-aux'.
10479         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
10480         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
10481         ../build-aux/.
10482
10483 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
10484
10485         * modules/chdir-long (Depends-on): Add mempcpy.
10486
10487         * modules/acl, modules/backupfile, modules/c-strtod,
10488         modules/c-strtold, modules/canon-host, modules/canonicalize,
10489         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
10490         modules/exclude, modules/exitfail, modules/file-type,
10491         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
10492         modules/getdate, modules/getline, modules/getpagesize,
10493         modules/getpass, modules/getugroups, modules/group-member,
10494         modules/hard-locale, modules/hash, modules/human, modules/idcache,
10495         modules/inttostr, modules/long-options, modules/makepath,
10496         modules/md5, modules/memcasecmp, modules/memcoll,
10497         modules/modechange, modules/mountlist, modules/path-concat,
10498         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
10499         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
10500         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
10501         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
10502         modules/strftime, modules/strndup, modules/strverscmp,
10503         modules/timespec, modules/unlocked-io, modules/userspec,
10504         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
10505         modules/yesno:
10506         Remove lib_SOURCES line from Makefile.am section, as this is now
10507         done automatically by the corresponding Autoconf macro.
10508
10509 2005-03-21  Jim Meyering  <jim@meyering.net>
10510
10511         Changes imported from coreutils.
10512
10513         * lib/cycle-check.c: Don't include xalloc.h.
10514
10515         * lib/path-concat.c: Don't include assert.h.
10516         (path_concat): Remove assertion that would have triggered
10517         for ABASE starting with more than one slash.
10518         Reported by Andreas Schwab.
10519
10520         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
10521         properly when ABASE is an absolute file name.
10522         Correct the description of this function.
10523         Include <assert.h>.
10524         Add an assertion and a test driver.
10525         This fixes a bug introduced on 2004-07-02.
10526         Andreas Schwab reported the resulting failure of cp --parents:
10527         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
10528
10529 2005-03-21  Jim Meyering  <jim@meyering.net>
10530
10531         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
10532         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
10533
10534 2005-03-21  Jim Meyering  <jim@meyering.net>
10535         and  Paul Eggert  <eggert@cs.ucla.edu>
10536
10537         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
10538         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
10539         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
10540         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
10541         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
10542         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
10543         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
10544         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
10545         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
10546         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
10547         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
10548         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
10549         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
10550         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
10551         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
10552         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
10553         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
10554         for these modules.
10555
10556 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
10557
10558         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
10559         (which shouldn't happen), generate nothing instead of returning 0
10560         immediately, so that nstrftime (NULL, ...) doesn't return 0.
10561
10562 2005-03-16  Bruno Haible  <bruno@clisp.org>
10563
10564         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
10565         HAVE_LONGLONG_64BIT.
10566
10567 2005-03-16  Bruno Haible  <bruno@clisp.org>
10568
10569         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
10570         HAVE_LONGLONG_64BIT.
10571
10572 2005-03-16  Bruno Haible  <bruno@clisp.org>
10573
10574         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
10575         HAVE_LONGLONG_64BIT.
10576
10577 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
10578
10579         * lib/strftime.c (my_strftime): Prepend space to format so that we can
10580         reliably distinguish strftime failure from empty output on POSIX
10581         hosts.
10582
10583 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
10584
10585         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
10586         (iconv_string): Don't guess a size-zero buffer, as that might cause
10587         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
10588         result would be 'too large', where 'too large' is (heuristically)
10589         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
10590         overflow concerns.  This will prevent some unwanted malloc failures
10591         when the inputs are very large.
10592
10593 2005-03-15  Karl Berry  <karl@gnu.org>
10594
10595         * config/srclist.txt (config.rpath): from gettext.
10596         * config/config.rpath: update.
10597
10598 2005-03-15  Bruno Haible  <bruno@clisp.org>
10599
10600         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
10601         to 'negate'.
10602
10603         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
10604         variable.
10605
10606         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
10607         results.
10608
10609 2005-03-14  Simon Josefsson  <jas@extundo.com>
10610
10611         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
10612         <fx@gnu.org>.
10613
10614 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
10615
10616         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
10617         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
10618         intprops.h.
10619         * lib/strtol.c: Likewise.
10620
10621 2005-03-14  Jim Meyering  <jim@meyering.net>
10622
10623         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
10624         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
10625         to be nonzero so that we (and caller) can detect the difference
10626         between a valid zero-length expansion and an error return, even
10627         when the underlying strftime fails before writing anything into
10628         that location.
10629
10630 2005-03-14  Bruno Haible  <bruno@clisp.org>
10631
10632         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
10633         Update from GNU gettext 0.14.3.
10634
10635 2005-03-10  Jim Meyering  <jim@meyering.net>
10636
10637         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
10638
10639 2005-03-10  Jim Meyering  <jim@meyering.net>
10640
10641         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
10642         so that this module works on systems without fchdir.
10643
10644 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
10645
10646         Factor int-properties macros into a single file, except for
10647         glibc-related files.
10648         * lib/intprops.h: New file.
10649         * lib/getloadavg.c: Include it instead of limits.h.
10650         (INT_STRLEN_BOUND): Remove.
10651         * lib/human.c: Include intprops.h.
10652         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
10653         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
10654         302/1000.
10655         * lib/inttostr.h: Include intprops.h instead of limits.h.
10656         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
10657         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
10658         for consistency with intprops.h.
10659         (time_t_is_integer, twos_complement_arithmetic): Use them.
10660         * lib/sig2str.h: Include <signal.h>, intprops.h.
10661         (INT_STRLEN_BOUND): Remove.
10662         * lib/strftime.c (TYPE_SIGNED): Remove.
10663         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
10664         * lib/strtol.c: Adjust comments to match intprops.h.
10665         * lib/userspec.c: Include intprops.h.
10666         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
10667         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
10668         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
10669         instead of rolling our own expressions.
10670         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
10671
10672         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
10673         instead of int.
10674         (my_strftime): Do not mishandle years close to INT_MAX, by doing
10675         the right thing even if adding 1900 would overflow.  Similarly
10676         for tm_mon + 1 and tm_yday + 1.
10677         Make %Y always equivalent to %C%y, and similarly for %G and %g.
10678         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
10679         (DO_SIGNED_NUMBER): New macro.
10680         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
10681
10682 2005-03-07  Bruno Haible  <bruno@clisp.org>
10683
10684         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
10685
10686 2005-03-07  Bruno Haible  <bruno@clisp.org>
10687
10688         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
10689
10690 2005-03-04  Derek R. Price  <derek@ximbiot.com>
10691
10692         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
10693         (func_import): Only replace files via --import when they have actually
10694         changed.
10695
10696 2005-03-03  Derek R. Price  <derek@ximbiot.com>
10697
10698         * m4/mmap-anon.m4: New file.
10699         * m4/pagealign_alloc.m4: New file.
10700
10701 2005-03-03  Derek R. Price  <derek@ximbiot.com>
10702             Bruno Haible  <bruno@clisp.org>
10703
10704         * modules/pagealign_alloc: New file.
10705         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
10706
10707 2005-03-03  Derek R. Price  <derek@ximbiot.com>
10708             Bruno Haible  <bruno@clisp.org>
10709
10710         * lib/pagealign_alloc.h: New file.
10711         * lib/pagealign_alloc.c: New file.
10712
10713 2005-03-03  Bruno Haible  <bruno@clisp.org>
10714
10715         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
10716         Use an all-permissive copyright notice, recommended by RMS.
10717
10718 2005-03-02  Bruno Haible  <bruno@clisp.org>
10719
10720         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
10721         of AIX, the replacement has to be done only after <string.h> is
10722         included, therefore not in config.h. stpncpy.h does the replacement,
10723         and stpncpy.c uses it.
10724
10725 2005-03-02  Bruno Haible  <bruno@clisp.org>
10726
10727         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
10728         stpncpy.c uses it.
10729
10730 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10731
10732         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
10733         The workaround isn't strictly needed for POSIX conformance, and
10734         it's too much of a pain to configure and maintain.  We'll ask
10735         people to fix their kernels instead.
10736         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
10737         (NANOSLEEP_BUG_WORKAROUND): Remove.
10738         (xnanosleep): Remove the workaround.
10739
10740 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10741
10742         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
10743         Reported by Derek Price.
10744         (Include): Add "timespec.h".
10745
10746         * modules/xnanosleep (Depends-on): Remove gethrxtime.
10747
10748 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
10749
10750         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
10751         to detect nanosleep bug.
10752
10753 2005-03-01  Bruno Haible  <bruno@clisp.org>
10754
10755         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
10756
10757 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
10758
10759         * modules/gethrxtime: New file.
10760         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
10761         (Depends-on): Add gethrxtime.
10762         (configure.ac): Add gl_XNANOSLEEP.
10763         (Makefile.am): Remove lib_SOURCES line.
10764
10765 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
10766
10767         * m4/gethrxtime.m4, xnanosleep.m4: New files.
10768         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
10769
10770 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
10771
10772         * lib/gethrxtime.h, gethrxtime.c, xtime.h: New files.
10773         * lib/timespec.h (gettime): Return void, since it always
10774         succeeds now.  All uses changed.
10775         * lib/gettime.c (gettime) Likewise.
10776         [HAVE_NANOTIME]: Prefer nanotime.
10777         Assume gettimeofday succeeds, as POSIX requires.
10778         Assime time () succeeds, since other code already does.
10779         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
10780         (timespec_subtract): Remove.
10781         (NANOSLEEP_BUG_WORKAROUND): New constant.
10782         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
10783         things considerably.  Use it only on GNU/Linux hosts, since the
10784         workaround shouldn't be needed elsewhere.
10785
10786 2005-02-24  Bruno Haible  <bruno@clisp.org>
10787
10788         * modules/gettext (Files): Add m4/glibc2.m4.
10789
10790 2005-02-24  Bruno Haible  <bruno@clisp.org>
10791
10792         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
10793         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
10794         * m4/progtest.m4:
10795         Update from GNU gettext 0.14.2.
10796         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
10797
10798 2005-02-24  Bruno Haible  <bruno@clisp.org>
10799
10800         * lib/localcharset.c: Update from GNU gettext 0.14.2.
10801         * lib/config.charset: Update from GNU gettext 0.14.2.
10802
10803 2005-02-24  Bruno Haible  <bruno@clisp.org>
10804
10805         * lib/gettext.h: Update from GNU gettext 0.14.2.
10806
10807 2005-02-23  Simon Josefsson  <jas@extundo.com>
10808
10809         * m4/iconvme.m4: New file.
10810
10811 2005-02-23  Jim Meyering  <jim@meyering.net>
10812
10813         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
10814         change.
10815         Thanks to Bruno Haible for catching it.
10816
10817 2005-02-22  Simon Josefsson  <jas@extundo.com>
10818
10819         * modules/iconvme: New file.
10820
10821         * MODULES.html.sh: Add iconvme.
10822
10823 2005-02-22  Simon Josefsson  <jas@extundo.com>
10824
10825         * lib/iconvme.h, iconvme.c: New files, from libc.
10826
10827 2005-02-22  Simon Josefsson  <jas@extundo.com>
10828
10829         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
10830
10831 2005-02-22  Jim Meyering  <jim@meyering.net>
10832
10833         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
10834         s/ifndef/ifdef/.
10835
10836 2005-02-20  Neil Conway  <neilc@samurai.com>
10837
10838         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
10839         returned by OSX/Darwin if the specified buffer is not large
10840         enough for the hostname.
10841
10842 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10843
10844         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
10845         pass it to _help, otherwise the latter coredumps trying to
10846         dereference state.root_argp.
10847
10848 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
10849
10850         * modules/chdir-long (Depends-on): Add memrchr.
10851         * modules/memrchr (Files): Add lib/memrchr.h.
10852         (Include): "memrchr.h".
10853
10854 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
10855
10856         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
10857
10858 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
10859
10860         * lib/memrchr.h: New file.
10861         * lib/chdir-long.c: Include it.
10862         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
10863         Don't bother including stddef.h.
10864
10865 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
10866
10867         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
10868         inclusion.
10869         Include <sys/types.h>, for dev_t.
10870         (ME_DUMMY, ME_REMOTE): Move from here....
10871         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
10872         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
10873         Dmitry V. Levin.
10874         Include mountlist.h first, to test the interface.
10875
10876 2005-01-29  Bruno Haible  <bruno@clisp.org>
10877
10878         * lib/progname.c (program_name): Initialize.
10879         Needed when linking statically on MacOS X.
10880
10881 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
10882
10883         Sync from coreutils.
10884         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
10885         (Depends-on): Add c-strtod.
10886         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
10887
10888 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
10889
10890         Sync from coreutils.
10891         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
10892
10893         Remove files that are specific to coreutils.
10894         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
10895
10896 2005-01-28  Bruno Haible  <bruno@clisp.org>
10897
10898         * modules/javacomp: New file.
10899         * MODULES.html.sh (Java): Add javacomp.
10900
10901 2005-01-28  Bruno Haible  <bruno@clisp.org>
10902
10903         * m4/javacomp.m4: New file, from GNU gettext.
10904
10905 2005-01-28  Bruno Haible  <bruno@clisp.org>
10906
10907         * lib/javacomp.sh.in: New file, from GNU gettext.
10908         * lib/javacomp.h: New file, from GNU gettext.
10909         * lib/javacomp.c: New file, from GNU gettext.
10910
10911 2005-01-26  Simon Josefsson  <jas@extundo.com>
10912
10913         * lib/gai_strerror.c: Use GPL in header.
10914
10915 2005-01-26  Bruno Haible  <bruno@clisp.org>
10916
10917         * modules/javaexec: New file.
10918         * MODULES.html.sh (Java): Add javaexec.
10919
10920 2005-01-26  Bruno Haible  <bruno@clisp.org>
10921
10922         * m4/javaexec.m4: New file, from GNU gettext.
10923
10924 2005-01-26  Bruno Haible  <bruno@clisp.org>
10925
10926         * lib/javaexec.sh.in: New file, from GNU gettext.
10927         * lib/javaexec.h: New file, from GNU gettext.
10928         * lib/javaexec.c: New file, from GNU gettext.
10929
10930 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10931
10932         * modules/lchown (Depends-on): Remove lchown.h
10933
10934 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10935
10936         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
10937         must be defined if the header file was not found, in order
10938         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
10939
10940 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
10941
10942         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
10943         initializers for struct pentry_state.
10944         (__argp_error): Check return value of __asprintf
10945         (__argp_failure): Translate error message
10946
10947         * lib/argp-parse.c: Removed braces around the expansion of N_()
10948
10949 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
10950
10951         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
10952         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
10953         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
10954         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
10955         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
10956         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
10957         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
10958         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
10959         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
10960         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
10961         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
10962         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
10963         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
10964         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
10965         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
10966         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
10967         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
10968         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
10969         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
10970         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
10971         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
10972         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
10973         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
10974         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
10975         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
10976         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
10977         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
10978         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
10979         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
10980         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
10981         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
10982         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
10983         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
10984         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
10985         xstrtol.m4, xstrtoumax.m4, yesno.m4:
10986         Use an all-permissive copyright notice, recommended by RMS.
10987
10988 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
10989
10990         * modules/chdir-long (Depends-on): Remove mempcpy.
10991
10992 2005-01-21  Jim Meyering  <jim@meyering.net>
10993
10994         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
10995         same value as for Solaris 9.
10996
10997         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
10998         component length.  This included changing the parameter to be
10999         of type `char *' rather than `char const *'.
11000         * lib/chdir-long.h (chdir_long): Update prototype.
11001
11002         * lib/openat.c (fdopendir, fstatat): New functions.
11003         * lib/openat.h: Include headers required for use of DIR and struct
11004         stat.
11005         [AT_SYMLINK_NOFOLLOW]: Define.
11006         (fdopendir, fstatat): Add prototypes.
11007
11008 2005-01-21  Bruno Haible  <bruno@clisp.org>
11009
11010         * modules/classpath: New file.
11011         * MODULES.html.sh (Java): Add classpath.
11012
11013 2005-01-21  Bruno Haible  <bruno@clisp.org>
11014
11015         * lib/classpath.h: New file, from GNU gettext.
11016         * lib/classpath.c: New file, from GNU gettext.
11017
11018 2005-01-20  Simon Josefsson  <jas@extundo.com>
11019
11020         * modules/version-etc-fsf: New file.
11021
11022 2005-01-20  Simon Josefsson  <jas@extundo.com>
11023
11024         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
11025         * lib/version-etc.c: Remove version_etc_copyright.
11026         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
11027         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
11028
11029 2005-01-20  Simon Josefsson  <jas@extundo.com>
11030
11031         * lib/base64.h (isbase64): Add.
11032
11033         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
11034         using a unsigned prototype, don't inline.
11035         (base64_decode): Use it.
11036
11037 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11038
11039         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
11040         it.
11041
11042 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11043
11044         * lib/save-cwd.c (save_cwd): Remove code to support the case
11045         where fchdir is missing or flaky.
11046
11047 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
11048
11049         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
11050
11051 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
11052
11053         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
11054         AC_LIBSOURCES now does this.
11055         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
11056         with new ullong_max module.
11057
11058 2005-01-19  Bruno Haible  <bruno@clisp.org>
11059
11060         * modules/sh-quote: New file.
11061         * MODULES.html.sh (Executing programs): Add sh-quote.
11062
11063 2005-01-19  Bruno Haible  <bruno@clisp.org>
11064
11065         * lib/sh-quote.h: New file, from GNU gettext.
11066         * lib/sh-quote.c: New file, from GNU gettext.
11067
11068 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11069
11070         Merge from coreutils.
11071         * m4/ullong_max.m4: New file.
11072         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
11073         (gl_MACROS): Assume localeconv exists.
11074
11075 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11076
11077         Merge changes from coreutils, as described below in several
11078         changelogs dated today.
11079
11080         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
11081         (O_DIRECTORY): Remove; not needed here, since "." must be
11082         a directory.  All uses removed.
11083         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
11084         universal on Suns, and we also need to test for IRIX.
11085         Revamp code to use 'if' rather than '#if'.
11086         Avoid unnecessary comparison of cwd->desc to 0.
11087
11088         * lib/utimens.c (futimens): Robustify the previous patch, by checking
11089         for known valid error numbers rather than observed invalid ones.
11090
11091 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
11092
11093         * modules/ullong_max: New file.
11094
11095         * modules/chdir-long, modules/openat: New files.
11096         * modules/save-cwd (Depends-on): Depend on chdir-long.
11097         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
11098
11099 2005-01-18  Jim Meyering  <jim@meyering.net>
11100
11101         Merge from coreutils.
11102         * m4/chdir-long.m4, openat.m4: New files.
11103         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
11104         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
11105         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
11106         is sane and DOES follow symlinks.  Besides, testing 20 different
11107         systems found no broken chown implementations.
11108         Prompted by a change in rsync's copy of this macro.
11109         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
11110
11111         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
11112
11113         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
11114         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
11115         NULL-means-set-to-current-time semantics.
11116         Remove temporary file immediately, rather than waiting
11117         for configure's at-exit trap code to do it.
11118
11119 2005-01-18  Jim Meyering  <jim@meyering.net>
11120
11121         * lib/version-etc.c (version_etc_copyright): Update copyright date.
11122
11123         * lib/utimens.c (futimens): Account for the fact that futimes
11124         can also fail with errno == ENOSYS or errno == ENOENT.
11125         Patch from Dmitry V. Levin.
11126
11127         Change the name of the robust chdir function from chdir to chdir_long.
11128         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
11129         (restore_cwd): Use chdir_long, not chdir.
11130         * lib/chdir-long.c: Renamed from chdir.c.
11131         * lib/chdir-long.h: Renamed from chdir.h.
11132         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
11133         Hurd.
11134
11135 2005-01-18  Bruno Haible  <bruno@clisp.org>
11136
11137         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
11138         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
11139         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
11140         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
11141         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
11142         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
11143         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
11144         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
11145         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
11146         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
11147         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
11148         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
11149         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
11150         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
11151         Use an all-permissive copyright notice, recommended by RMS.
11152
11153 2005-01-18  Bob Proulx  <bob@proulx.com>
11154
11155         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
11156         simplify offsetof() macro construct to avoid compile failure with
11157         native HP-UX 11.0 ANSI C compiler.
11158
11159 2005-01-17  Bruno Haible  <bruno@clisp.org>
11160
11161         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
11162         redundant because stpncpy.m4 takes care of it.
11163
11164 2005-01-17  Bruno Haible  <bruno@clisp.org>
11165
11166         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
11167
11168 2005-01-17  Bruno Haible  <bruno@clisp.org>
11169
11170         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
11171         used.
11172
11173 2005-01-17  Bruno Haible  <bruno@clisp.org>
11174
11175         * lib/fwriteerror.h (fwriteerror): Change specification to include
11176         fclose.
11177         * lib/fwriteerror.c: Include <stdbool.h>.
11178         (fwriteerror): At the end, close the file stream. Record whether
11179         stdout was already closed.
11180
11181 2005-01-17  Bruno Haible  <bruno@clisp.org>
11182
11183         * lib/execute.c (environ): Declare if needed.
11184         * lib/pipe.c (environ): Likewise.
11185         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
11186
11187 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11188
11189         * modules/argp: Depend on vsnprintf
11190
11191 2005-01-10  Jim Meyering  <jim@meyering.net>
11192
11193         * modules/closeout (Depends-on): Add atexit.
11194
11195 2005-01-06  Bruno Haible  <bruno@clisp.org>
11196
11197         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
11198
11199 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
11200
11201         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
11202         definitions to be after all include files, to avoid collisions.
11203         Problem reported by Bob Proulx.
11204
11205 2005-01-04  Jim Meyering  <jim@meyering.net>
11206
11207         Changes imported from coreutils.
11208         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
11209         as the mkstemp template, use a temporary directory and an
11210         8.3-friendly template to avoid trouble on systems like DJGPP.
11211         Reported by Juan M. Guerrero via Stepan Kasal.
11212         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
11213         close. Remove the temporary directory right away, rather than waiting
11214         for configure's at-exit trap code to do it.
11215         Suggestion from Stepan Kasal.
11216
11217 2005-01-01  Simon Josefsson  <jas@extundo.com>
11218
11219         * gnulib-tool: Print #include directives when --import'ing.
11220
11221 2004-12-28  Simon Josefsson  <jas@extundo.com>
11222
11223         * tests/test-base64.c: Include required header files.  Remove
11224         unused variables.
11225
11226 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
11227
11228         * modules/error (Depends-on): Remove gettext.
11229
11230 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
11231
11232         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
11233         not needed.  This removes a dependency on the gettext module.
11234         [defined _LIBC]: Do not include <libintl.h>; not needed.
11235
11236 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
11237
11238         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
11239         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
11240
11241 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
11242
11243         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
11244         HAVE_DECL_STRTOLD.
11245
11246 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
11247
11248         * modules/getdate (Depends-on): Remove alloca-opt.
11249
11250 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
11251
11252         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
11253
11254 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
11255
11256         * lib/argp-parse.c: Include <stddef.h>.
11257         (alignof, alignto): New macros.
11258         (parser_init): Don't assume that void * is aligned sufficiently
11259         for struct option.
11260
11261         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
11262         need to extend the stack.
11263         (YYINITDEPTH): New macro, so that the initial stack isn't overly
11264         large.
11265
11266 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11267
11268         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
11269
11270 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
11271
11272         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
11273         (2004-10-24) change.  Apparently this was a false alarm.
11274
11275         * modules/getdate: Depend on alloca-opt, not alloca.
11276
11277 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
11278
11279         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
11280         Remove now-obsolete comment about AIX.
11281         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
11282         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
11283         (YYMAXDEPTH): New macro.
11284
11285 2004-12-18  Simon Josefsson  <jas@extundo.com>
11286
11287         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
11288
11289 2004-12-18  Bruno Haible  <bruno@clisp.org>
11290
11291         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
11292
11293 2004-12-18  Bruno Haible  <bruno@clisp.org>
11294
11295         * lib/fatal-signal.c (fatal_signals): Make non-const.
11296         (init_fatal_signals): New function.
11297         (uninstall_handlers, install_handlers): Ignore signals that were set to
11298         SIG_IGN.
11299         (at_fatal_signal): Call init_fatal_signals.
11300         (init_fatal_signal_set): Likewise. Ignore signals that were set to
11301         SIG_IGN.
11302         Reported by Paul Eggert.
11303
11304 2004-12-18  Bruno Haible  <bruno@clisp.org>
11305
11306         * doc/alloca.texi: New file.
11307         * doc/alloca-opt.texi: New file.
11308
11309 2004-12-17  Jim Meyering  <jim@meyering.net>
11310
11311         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
11312         Otherwise, install-sh could exit with improper exit status when
11313         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
11314
11315 2004-12-16  Simon Josefsson  <jas@extundo.com>
11316
11317         * tests/test-base64.c: Add license.
11318
11319 2004-12-15  Stepan Kasal  <address@hidden>
11320
11321         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
11322
11323 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
11324
11325         * modules/getcwd (Files): Add m4/d-ino.m4.
11326         Suggested by Mark D. Baushke.
11327
11328 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
11329
11330         * lib/getdate.y (textint): New member "negative".
11331         (time_zone_hhmm): New function.
11332         Expect 14 shift-reduce conflicts, not 13.
11333         (o_colon_minutes): New rule.
11334         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
11335         (yylex): Set the "negative" member of signed numbers.
11336
11337 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
11338
11339         * doc/getdate.texi (Time of day items, Time zone items):
11340         Describe new formats +00:00, UTC+00:00.
11341
11342 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
11343
11344         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
11345         spurious "-l"s.  Problem reported by Stepan Kasal.
11346
11347 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
11348
11349         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
11350         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
11351
11352 2004-12-04  Simon Josefsson  <jas@extundo.com>
11353
11354         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
11355         Vandoorselaere <yoann@prelude-ids.org>.
11356
11357 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
11358
11359         Changes imported from coreutils.
11360         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
11361         exist.
11362         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
11363
11364 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
11365
11366         Changes imported from coreutils.
11367         * lib/hard-locale.c: Assume <locale.h> exists.
11368         Include "strdup.h".
11369         (GLIBC_VERSION): New macro.
11370         (hard_locale): Assume setlocale exists.
11371         Rewrite to avoid #ifdef.
11372         Use strdup rather than malloc + strcpy.
11373         * lib/human.c: Assume <locale.h> exists.
11374         (human_readable): Assume localeconv exists.
11375
11376 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
11377
11378         * modules/hard-locale (Depends-on): Add strdup.
11379
11380 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
11381
11382         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
11383         convert T2, not T.  (Imported from libc.)
11384
11385 2004-11-30  Simon Josefsson  <jas@extundo.com>
11386
11387         * modules/restrict (License): Change to LGPL.
11388
11389 2004-11-30  Simon Josefsson  <jas@extundo.com>
11390
11391         * m4/restrict.m4: Add copyright and copying conditions.
11392
11393 2004-11-30  Simon Josefsson  <jas@extundo.com>
11394
11395         * m4/base64.m4: New file.
11396
11397 2004-11-30  Simon Josefsson  <jas@extundo.com>
11398
11399         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
11400         base64.
11401
11402         * tests/test-base64.c: New file.
11403
11404         * modules/base64: New file.
11405
11406 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
11407
11408         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
11409         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
11410
11411         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
11412
11413 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
11414
11415         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
11416         (__getcwd.c): Don't restore errno; glibc doesn't.
11417         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
11418         first, falling back to our code only if its results look suspicious.
11419         Ensure that the resulting buffer is only as large as necessary.
11420
11421         * lib/readutmp.c: Include readutmp.h first.
11422         Include <errno.h>, since readutmp.h no longer does that.
11423         * lib/readutmp.h: Don't include <errno.h>,
11424         <sys/param.h>, <time.h>; not needed to establish interface.
11425         (errno): Remove decl.
11426         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
11427         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
11428         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
11429
11430 2004-11-28  Simon Josefsson  <jas@extundo.com>
11431
11432         * lib/base64.h, base64.c: New file.
11433
11434 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
11435
11436         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
11437
11438 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
11439
11440         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
11441         (Depends-on): Remove pathmax, same.  Add mempcpy.
11442         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
11443         (Makefile.am): Append getcwd.h to lib_SOURCES.
11444         (Include): Add getcwd.h.
11445         (Maintainer): Change from Jim Meyering to "all, glibc",
11446         since getdate now uses intended-for-glibc code.
11447         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
11448         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
11449
11450 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11451
11452         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
11453         HP's ANSI C compiler.
11454         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
11455         Declaring int functions causes warnings on some modern systems and
11456         shouldn't be needed to compile on ancient ones.
11457         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
11458         defined.
11459
11460         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
11461         with the following changes.
11462         (__set_errno): Parenthesize properly.
11463         Include <stdbool.h>.
11464         (MIN, MAX, MATCHING_INO): New macros.
11465         (__getcwd): Define with prototype, not K&R form.
11466         Use heuristics to allocate default buffer on stack if possible.
11467         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
11468         behavior, and to avoid the PATH_MAX limit when computing
11469         ../../../../...
11470         Use MATCHING_INO to compare inode number to file.
11471         Check for arithmetic overflow in size calculations.
11472         Fix bug in reallocation of dot array that caused getcwd to fail
11473         on directories nested deeper than 75.
11474         Be more careful about saving errno on error.
11475         Do not use realloc; use only free+malloc, as this is a bit
11476         more flexible and avoids a needless copy operation.
11477         Do not inspect st_dev and st_ino for symbolic links; POSIX
11478         doesn't specify the latter.
11479         Check for closedir errors.
11480         Avoid needless casts.
11481         Use "#ifdef weak_alias" around weak_alias, to be like other
11482         glibc code.
11483         The following changes to getcwd.c have effect only when used in
11484         gnulib; they have no effect inside glibc proper.
11485         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
11486         as alloca isn't used.
11487         (alloca, __alloca): Likewise.
11488         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
11489         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
11490         unconditionally, as gnulib assumes C89 or better.
11491         Do not include <sys/param.h>.
11492         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
11493         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
11494         better.
11495         (NULL) [!defined NULL]: Remove; we assume C89 or better.
11496         Include <dirent.h> in a way that is compatible with modern Autoconf.
11497         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
11498         New macros, if not already defined.
11499         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
11500         Use "_LIBC", not "defined _LIBC", for consistency.
11501         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
11502         a mempcpy module.
11503         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
11504         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
11505         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
11506         credit only to Jim Meyering and adjust the copyright dates.
11507         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
11508         <stdlib.h>, <unistd.h>, "pathmax.h".
11509         Instead, include "xgetcwd.h" (first) and "getcwd.h".
11510         (INITIAL_BUFFER_SIZE): Remove.
11511         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
11512
11513 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
11514
11515         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
11516         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
11517         Use the _ONCE methods, for efficiency.
11518         Check for fcntl.h.  In test program, include <errno.h>
11519         and <fcntl.h> if available.  Remove old K&R cruft from
11520         test program.  Check for common errors in GNU/Linux,
11521         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
11522         don't do AC_LIBOBJ, as that's getcwd.m4's job.
11523         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
11524         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
11525         name accordingly.
11526         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
11527         accommodate new getcwd.c.
11528         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
11529         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
11530         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
11531         that's all we need now.
11532
11533 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11534
11535         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
11536         argp-parse.c depends on getopt internals, that means we should
11537         always use our getopt, to be on the safe side.
11538         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
11539         order not to spoil the result of an eventual previous invocation
11540         of gl_GETOPT_SUBSTITUTE.
11541
11542 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11543
11544         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
11545         redefinition warnings. To avoid them, include the defines
11546         in `#if !defined __need_getopt ... #endif'. The only place
11547         where __getopt_argv_const is used is in definitions
11548         of getopt_long and getopt_long_only below, which are as well
11549         protected by `#ifndef __need_getopt'.
11550         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
11551         __need_getopt after including <stdio.h> and <unistd.h> These
11552         headers might have defined it.
11553
11554 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
11555
11556         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
11557
11558 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
11559
11560         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
11561         (futimens): New function, which uses futimes if available.
11562         (futimens, utimens): Support timespec==NULL, with same semantics
11563         as utime and utimens.
11564         * lib/utimens.h (futimens): New decl.
11565
11566 2004-11-23  Jim Meyering  <jim@meyering.net>
11567
11568         * lib/getopt_.h: Remove trailing blanks.
11569
11570 2004-11-23  Jim Meyering  <jim@meyering.net>
11571
11572         * lib/__fpending.c: Add comment.
11573
11574 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
11575
11576         * modules/canonicalize (Depends-on): Add xreadlink.
11577         Problem reported by James Youngman.
11578
11579 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
11580
11581         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
11582         New macros.
11583         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
11584         optopt): Use them instead of invoking ## directly; otherwise, the
11585         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
11586
11587 2004-11-19  Bruno Haible  <bruno@clisp.org>
11588
11589         * lib/strtok_r.c: Move comments from here...
11590         * lib/strtok_r.h: ... to here.
11591
11592 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
11593
11594         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
11595         implementations that mishandle size_t overflow.
11596
11597 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
11598
11599         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
11600         might fail.  Problem reported by Yoann Vandoorselaere.
11601         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
11602         implementations that mishandle size_t overflow.
11603
11604 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
11605
11606         * modules/canon-host (Depends-on): Add strdup.
11607
11608 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
11609
11610         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
11611
11612 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
11613
11614         * lib/canon-host.c: Include "strdup.h".
11615         (canon_host): Use getaddrinfo if available, so that IPv6 works.
11616         Use strdup instead of malloc/strcpy to duplicate strings.
11617
11618         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
11619         (human_space_before_unit): New constant.
11620         * lib/human.c (human_readable): Support it.
11621
11622         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
11623         (xgetcwd): Set errno correctly when failing.
11624         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
11625         the failure is actually due to a PATH_MAX problem.
11626
11627         Further getopt changes to make it more likely that glibc will
11628         buy the changes back.
11629         * lib/getopt.c (POSIXLY_CORRECT): New constant.
11630         (getopt): Use it, so to preserve glibc semantic
11631         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
11632         when compiling for libc.
11633         * lib/getopt_.h (__getopt_argv_const): Bring it back.
11634         (getopt_long, getopt_long_only): Use it.
11635
11636         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
11637         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
11638         (getopt): Argv is now char * const *, as per standard.
11639         (_getopt_internal_r, _getopt_internal): Argv is now char **,
11640         not char *__getopt_argv_const *.
11641         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
11642         _getopt_long_only_r): Likewise.
11643         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
11644         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
11645         _getopt_long_r, _getopt_long_only_r): Likewise.
11646         * lib/getopt_.h (__getopt_argv_const): Remove.
11647         (getopt): Argv is now char * const *, as per standard.
11648
11649         * lib/getdate.y (tORDINAL): New token.
11650         (day, relunit): Allow it for relative times.
11651         (relative_time_table): Use tORDINAL for ordinals.
11652
11653 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
11654
11655         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
11656         Document that "second" isn't allowed as an ordinal number.
11657
11658 2004-11-16  Jim Meyering  <jim@meyering.net>
11659
11660         * modules/closeout (Depends-on): Add fpending.
11661
11662 2004-11-15  Jim Meyering  <jim@meyering.net>
11663
11664         * lib/closeout.c: Include "__fpending.h" once again.
11665         Include <stdbool.h>.
11666         (close_stdout): Don't fail just because stdout was closed initially,
11667         since some programs don't write to stdout in the normal course of
11668         operation (other than --version and --help), and we don't want this
11669         function to make e.g. `touch file >&-' fail.
11670         But do fail if it was closed and someone has tried to write to it.
11671         E.g., `printf foo >&-' must fail.
11672
11673 2004-11-13  Jim Meyering  <jim@meyering.net>
11674
11675         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
11676
11677 2004-11-12  Simon Josefsson  <jas@extundo.com>
11678
11679         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
11680         small doc fix is still pending.
11681
11682 2004-11-11  Simon Josefsson  <jas@extundo.com>
11683
11684         * modules/strtok_r: New file.
11685
11686         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11687         strtok_r.
11688
11689 2004-11-11  Simon Josefsson  <jas@extundo.com>
11690
11691         * m4/strtok_r.m4: New file.
11692
11693         * m4/getopt.m4: Replace opterr.
11694
11695 2004-11-11  Simon Josefsson  <jas@extundo.com>
11696
11697         * lib/strtok_r.h, strtok_r.c: New file.
11698
11699 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
11700
11701         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
11702         of replacing opterr, getopt, etc.  This should handle the
11703         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
11704
11705 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
11706
11707         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
11708         we can stop lying to compilers about the constness of argv when we
11709         are compiled outside glibc.
11710         (getopt, getopt_long, getopt_long_only): Use it.
11711         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
11712         _getopt_internal, getopt): Likewise.
11713         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
11714         _getopt_long_only_r): Likewise.
11715         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
11716         _getopt_long_r, _getopt_long_only_r): Likewise.
11717
11718         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
11719         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
11720         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
11721         the other external symbols.
11722         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
11723         declaration, since the above renaming now works around collisions.
11724
11725 2004-11-11  Jim Meyering  <jim@meyering.net>
11726
11727         * lib/linebreak.c: Remove trailing blanks.
11728         * lib/alloca_.h: Likewise.
11729         * lib/acosl.c: Likewise.
11730         * lib/euidaccess.c: Likewise.
11731         * lib/allocsa.h: Likewise.
11732
11733 2004-11-10  Simon Josefsson  <jas@extundo.com>
11734
11735         * m4/getaddrinfo.m4: New file.
11736
11737 2004-11-10  Simon Josefsson  <jas@extundo.com>
11738
11739         * lib/getaddrinfo.h, getaddrinfo.c: New files.
11740
11741 2004-11-10  Simon Josefsson  <jas@extundo.com>
11742
11743         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11744         getaddrinfo.
11745
11746         * modules/getaddrinfo: New file.
11747
11748 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11749
11750         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
11751
11752 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
11753
11754         * lib/mktime.c (SHR): New macro, which is a portable
11755         substitute for >> that should work even on Crays.
11756         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
11757         Problem reported by Mark D. Baushke in
11758         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
11759         * lib/getdate.y (SHR): Likewise.
11760         (tm_diff): Use it.
11761         * lib/strftime.c (SHR): Likewise.
11762         (tm_diff): Use it.
11763         * lib/quotearg.c (struct quoting_options): Use unsigned int for
11764         quote_these_too, so that right shifts are well defined.  All uses
11765         changed.
11766
11767 2004-11-10  Jim Meyering  <jim@meyering.net>
11768
11769         Ensure that no close failure goes unreported.
11770         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
11771         return early when it seems there's nothing to flush.
11772         Don't include __fpending.h.
11773
11774 2004-11-10  Jim Meyering  <jim@meyering.net>
11775
11776         * modules/closeout (Depends-on): Remove fpending.
11777
11778 2004-11-10  Jim Meyering  <jim@meyering.net>
11779
11780         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
11781
11782 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
11783
11784         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
11785         gl_FUNC_STRFTIME.
11786         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
11787         and AC_REQUIRE when possible, to avoid duplicate checks.
11788         Check for <wchar.h>.
11789
11790 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
11791
11792         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
11793
11794 2004-11-09  Bruno Haible  <bruno@clisp.org>
11795
11796         * m4/sockpfaf.m4: New file.
11797
11798 2004-11-05  Bruno Haible  <bruno@clisp.org>
11799
11800         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
11801         Reported by Mark D. Baushke <mdb@cvshome.org>.
11802
11803 2004-11-04  Bruno Haible  <bruno@clisp.org>
11804
11805         2004-09-11  Bruno Haible  <bruno@clisp.org>
11806                 * allocsa.valgrind: New file.
11807         2004-02-06  Bruno Haible  <bruno@clisp.org>
11808                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
11809                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
11810                 Reported by Christopher Seip <chris.seip@hp.com>.
11811
11812 2004-11-04  Bruno Haible  <bruno@clisp.org>
11813
11814         * modules/allocsa (Files): Add lib/allocsa.valgrind.
11815         (Makefile.am): Distribute it.
11816
11817 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
11818
11819         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
11820         with errno == ERANGE if the buffer is too small.
11821         Problem reported by Mark D. Baushke.
11822
11823 2004-11-03  Albert Chin <china@thewrittenword.com>
11824             Paul Eggert  <eggert@cs.ucla.edu>
11825
11826         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
11827         equivalent, substitute $ac_type for equivalent type rather than
11828         blindly using uint32_t *always* which won't work if uint32_t is not
11829         available.  Define _UINT32_T to work around typedef of uint32_t if
11830         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
11831         2.5.1.
11832
11833 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
11834
11835         * m4/jm-macros.m4: Sync from coreutils.
11836         (gl_MACROS): Check for mbrlen, for pathchk.
11837         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
11838
11839 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
11840
11841         * lib/xreadlink.c (MAXSIZE): New macro.
11842         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
11843         size does not exceed MAXSIZE.  Avoid cast.
11844         As suggested by Mark D. Baushke in
11845         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
11846         if readlink fails with buffer size just under MAXSIZE, try again
11847         with MAXSIZE.
11848
11849 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
11850
11851         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
11852
11853 2004-11-02  Derek R. Price  <derek@ximbiot.com>
11854         and  Paul Eggert  <eggert@cs.ucla.edu>
11855
11856         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
11857         (get_date): Overparenthesize to avoid GCC warning.
11858
11859 2004-11-02  Bruno Haible  <bruno@clisp.org>
11860
11861         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
11862         returns void.
11863
11864 2004-11-02  Bruno Haible  <bruno@clisp.org>
11865
11866         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
11867         function returns void.
11868
11869 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
11870
11871         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
11872         fflush_unlocked, flockfile, funlockfile, funlockfile,
11873         fputs_unlocked, putc_unlocked.
11874
11875 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
11876
11877         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
11878         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
11879         already declared.
11880
11881 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11882
11883         * modules/getdate (Files): Add doc/getdate.texi.
11884         (Depends-on): Add setenv, xalloc.
11885
11886 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11887
11888         * lib/getdate.y: Add support for TZ="foo" within a date string.
11889         Fix some bugs near time_t boundaries.  Reject dates with
11890         out-of-range components, e.g., "Sept 31".
11891         Include <stdlib.h>, "setenv.h", "xalloc.h".
11892         (ISDIGIT_LOCALE): Remove; unused.
11893         Note that the TZ and time functions used here are not reentrant.
11894         (mktime_ok, get_tz): New functions.
11895         (TZBUFSIZE): New constant.
11896         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
11897         This requires that we sometimes generate our own TZ="XXX..." setting.
11898
11899 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
11900
11901         * doc/getdate.texi: New file, from coreutils with modifications for
11902         the new TZ parsing.
11903
11904 2004-10-27  Derek R. Price  <derek@ximbiot.com>
11905
11906         * lib/mktime.c (not_equal_tm): Remove redundant check.
11907
11908 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
11909
11910         * modules/regex (lib_SOURCES): Add regex.c.
11911         Reported by James Youngman in
11912         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
11913
11914 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
11915
11916         * lib/getdate.y: Use Bison 1.875 features, and some minor
11917         code cleanups.  This change does not affect semantics.
11918         Don't include <stdlib.h>; no longer needed.
11919         Don't include unlocked-io.h; only the "#if TEST" code uses
11920         stdio, and performance isn't crucial there.
11921         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
11922         Bison 1.875 features as described below.
11923         All uses of "PC." replaced by "pc->".
11924         (YYSTYPE): Add a forward declaration.
11925         (yylex, yyerror): Use full prototypes in forward decls.
11926         Use "%pure-parser" rather than obsolescent "%pure_parser".
11927         Use %parse-param and %lex-param instead of obsolescent
11928         YYPARSE_PARAM and YYLEX_PARAM.
11929         (meridian_table, month_and_day_table, time_units_table,
11930         relative_time_table, time_zone_table, military_table,
11931         lookup_zone, lookup_word, get_date):
11932         Use NULL instead of 0 where appropriate.
11933         (to_hour): Avoid abort (), to avoid a dependency on
11934         stdlib.h.
11935         (yyerror, yylex): Now accepts parser_control * arg.
11936         (main) [TEST]: Use '\0' rather than 0 for char.
11937
11938 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
11939
11940         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
11941
11942 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
11943
11944         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
11945         It's now the caller's responsibility to handle the case where
11946         !HAVE_GETPAGESIZE && !defined getpagesize.
11947
11948         * lib/mktime.c (leapyear): Arg is long int, not int.
11949
11950 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
11951
11952         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
11953
11954 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
11955
11956         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
11957         missing.  Problem reported by James Youngman.
11958
11959 2004-10-16  Simon Josefsson  <jas@extundo.com>
11960
11961         * gnulib-tool: Fix comments.  Fix parse problem.
11962         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
11963
11964 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
11965
11966         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
11967         implementation of getopt_long.  Problem reported by Alexander Taler in:
11968         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
11969
11970 2004-10-15  Bruno Haible  <bruno@clisp.org>
11971
11972         * gnulib-tool: Untabify. Initialize supplied_libname.
11973         (func_usage): More homogenous output.
11974         (func_modules_transitive_closure, func_modules_to_filelist,
11975         func_emit_lib_Makefile_am): New functions.
11976         (func_import): New function, extracted from big case statement. Use
11977         func_get_license, func_modules_transitive_closure,
11978         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
11979         opt_lgpl. Don't use test -a, as it's not portable.
11980         (func_create_testdir): Use func_modules_transitive_closure,
11981         func_modules_to_filelist, func_emit_lib_Makefile_am.
11982
11983 2004-10-15  Bruno Haible  <bruno@clisp.org>
11984
11985         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
11986
11987 2004-10-15  Bruno Haible  <bruno@clisp.org>
11988
11989         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
11990         the portions belonging to each module.
11991         Suggested by Derek Robert Price <derek@ximbiot.com>.
11992
11993 2004-10-12  Simon Josefsson  <jas@extundo.com>
11994
11995         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
11996         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
11997         to real functions.
11998
11999 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12000
12001         * modules/vsnprintf: New file.
12002
12003 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12004
12005         * m4/vsnprintf.m4: New file.
12006
12007 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
12008
12009         * lib/vsnprintf.h: New file.
12010         * lib/vsnprintf.c: New file.
12011
12012 2004-10-11  Bruno Haible  <bruno@clisp.org>
12013
12014         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
12015         vsnprintf.
12016
12017 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
12018
12019         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
12020
12021 2004-10-07  Bruno Haible  <bruno@clisp.org>
12022
12023         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
12024         fits into the provided buffer.
12025
12026 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
12027
12028         * lib/diacrit.c, diacrit.h: Add GPL notice.
12029
12030         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
12031         notice.
12032         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
12033         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
12034         This avoids a potential constant-folding bug.
12035
12036 2004-10-05  Bruno Haible  <bruno@clisp.org>
12037
12038         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
12039         for the declaration of strsep.
12040
12041 2004-10-05  Bruno Haible  <bruno@clisp.org>
12042
12043         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
12044
12045 2004-10-04  Simon Josefsson  <jas@extundo.com>
12046
12047         * modules/memmem: New file.
12048         * tests/test-memmem.c: New file.
12049         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
12050
12051 2004-10-04  Simon Josefsson  <jas@extundo.com>
12052
12053         * m4/memmem.m4: New file.
12054
12055 2004-10-04  Simon Josefsson  <jas@extundo.com>
12056
12057         * lib/memmem.h: New file.
12058         * lib/memmem.c: New file, taken from glibc.
12059
12060 2004-10-04  Simon Josefsson  <jas@extundo.com>
12061
12062         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
12063         '#ifdef USE_UNLOCKED_IO'.
12064
12065 2004-10-04  Simon Josefsson  <jas@extundo.com>
12066
12067         * config/srclist.txt: Add memmem from glibc.
12068
12069 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12070
12071         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
12072
12073         * modules/argmatch, modules/argp, modules/closeout, modules/error,
12074         modules/exclude, modules/getdate, modules/getline,
12075         modules/getndelim2, modules/getpass, modules/getpass-gnu,
12076         modules/getusershell, modules/linebuffer, modules/md5,
12077         modules/mountlist, modules/posixtm, modules/readtokens,
12078         modules/readutmp, modules/regex, modules/sha1,
12079         modules/version-etc, modules/yesno:
12080         Remove dependency on unlocked-io.
12081
12082 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12083
12084         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
12085
12086         * m4/unlocked-io.m4: Add copyright notice.
12087         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
12088
12089 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12090
12091         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
12092         * lib/xmalloc.c (xmemdup): Likewise.
12093         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
12094         XFREE): Remove these long-obsolescent macros.
12095         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
12096         * lib/xstrdup.c: Remove.
12097
12098         * lib/regex.c (re_comp): Cast gettext return value to char *,
12099         Problem reported by Martin Neitzel via Mark D. Baushke.
12100
12101 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
12102
12103         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
12104         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
12105         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
12106         regex.c, sha1.c, version-etc.c, yesno.c:
12107         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
12108         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
12109         the includer's responsibility.
12110
12111         Sync from coreutils.
12112
12113         * lib/modechange.c (mode_compile): Don't decrement a pointer that
12114         points to the start of a string, as the C Standard says the
12115         resulting behavior is undefined.
12116
12117         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
12118         simple -> simple_backups, numbered_existing ->
12119         numbered_existing_backups, numbered -> numbered_backups
12120         to avoid shadowing problems.  All uses changed.
12121         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
12122         * lib/backupfile.c (check_extension, numbered_backup):
12123         Rename locals to avoid shadowing 'basename'.
12124         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
12125         once.
12126
12127         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
12128         * lib/.cvsignore: Add getopt.h.
12129
12130 2004-10-04  Bruno Haible  <bruno@clisp.org>
12131
12132         * modules/README: New file.
12133         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
12134         not a module.
12135
12136 2004-10-02  Jim Meyering  <jim@meyering.net>
12137
12138         * lib/dirfd.h, getpagesize.h: Add copyright notice.
12139
12140 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
12141
12142         * modules/strsep: New file.
12143
12144 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
12145
12146         * m4/strsep.m4: New file.
12147
12148 2004-10-01  Yoann Vandoorselaere <yoann@prelude-ids.org>
12149
12150         * lib/strsep.h: New file.
12151         * lib/strsep.c: New file.
12152
12153 2004-10-01  Simon Josefsson  <jas@extundo.com>
12154
12155         * lib/snprintf.c (snprintf): Handle size==0.
12156
12157 2004-10-01  Simon Josefsson  <jas@extundo.com>
12158             Bruno Haible  <bruno@clisp.org>
12159
12160         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
12161         (snprintf): Declare 'args'.
12162
12163 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
12164
12165         * lib/snprintf.c: Remove comments as to why each header is needed.
12166
12167 2004-10-01  Bruno Haible  <bruno@clisp.org>
12168
12169         * MODULES.html.sh: Add strsep.
12170
12171 2004-09-30  Simon Josefsson  <jas@extundo.com>
12172
12173         * modules/snprintf: New file.
12174
12175 2004-09-30  Simon Josefsson  <jas@extundo.com>
12176
12177         * m4/snprintf.m4: New file.
12178
12179 2004-09-30  Simon Josefsson  <jas@extundo.com>
12180
12181         * lib/snprintf.h, snprintf.c: New files.
12182
12183 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12184
12185         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
12186         (hol_entry_help): Never translate an empty string.
12187         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
12188         * lib/argp.h (OPTION_NO_TRANS): New option.
12189
12190 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
12191
12192         * modules/argp (Maintainer): Replace Simon Josefsson
12193         by Sergey Poznyakoff.
12194
12195 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
12196
12197         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
12198         changes merged back into glibc.
12199
12200 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
12201
12202         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
12203
12204 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12205
12206         * lib/xvasprintf.c: Include xalloc.h.
12207         (xvasprintf): Use xalloc_die, not xmalloc_die.
12208
12209 2004-09-29  Bruno Haible  <bruno@clisp.org>
12210
12211         * modules/alloca-opt: New file, derived from modules/alloca.
12212         * modules/allocsa: Depend on alloca-opt instead of alloca.
12213         * modules/setenv: Likewise.
12214         * modules/vasnprintf: Likewise.
12215         * MODULES.html.sh: Add alloca-opt.
12216
12217 2004-09-28  Simon Josefsson  <jas@extundo.com>
12218
12219         * gnulib-tool: New parameter --lgpl, to asseert that modules are
12220         LGPL, and to replace license template from GPL to LGPL.
12221
12222 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
12223
12224         * modules/dummy: Change license to LGPL.
12225
12226 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
12227
12228         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
12229
12230 2004-09-24  Simon Josefsson  <jas@extundo.com>
12231
12232         * modules/minmax (License): Change from GPL to LGPL.
12233
12234 2004-09-23  Simon Josefsson  <jas@extundo.com>
12235
12236         * gnulib-tool (--import): Typo.
12237
12238 2004-09-23  Simon Josefsson  <jas@extundo.com>
12239
12240         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
12241
12242 2004-09-22  Bruno Haible  <bruno@clisp.org>
12243
12244         * modules/*: Add 'License' field.
12245         * gnulib-tool: Accept --extract-license option.
12246         (func_get_license): New function.
12247
12248 2004-09-21  Bruno Haible  <bruno@clisp.org>
12249
12250         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
12251         Reported by Simon Josefsson.
12252
12253 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
12254
12255         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
12256         gl_AC_TYPE_LONG_LONG.
12257
12258 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
12259
12260         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
12261
12262 2004-09-18  Simon Josefsson  <jas@extundo.com>
12263         and  Paul Eggert  <eggert@cs.ucla.edu>
12264
12265         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
12266         calls with autoreconf.  Define GL_LIB.
12267
12268 2004-09-14  Karl Berry  <karl@gnu.org>
12269
12270         * config/srclist.txt: unsync setenv.c, sigh.
12271
12272 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
12273
12274         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
12275         Problem reported by Bruno Haible in:
12276         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
12277
12278 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
12279
12280         * config/srclist.txt: Comment out argp-pvh.c.
12281
12282 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
12283
12284         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
12285         in case some system header has #define'd it.  Problem reported by
12286         Soeren D. Schulze in
12287         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
12288
12289 2004-09-09  Karl Berry  <karl@gnu.org>
12290
12291         * regex.[ch]: delete from the root.  These were supposed to be
12292                 synced with emacs cvs, but this has not happened for about
12293                 a year, and anyway nothing else uses emacs regex.[ch].
12294                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
12295                 lib/regex[.ch] is untouched.
12296
12297 2004-09-09  Bruno Haible  <bruno@clisp.org>
12298
12299         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
12300
12301 2004-09-09  Bruno Haible  <bruno@clisp.org>
12302
12303         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
12304         modifications.
12305         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
12306
12307 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
12308
12309         * modules/xvasprintf: New file.
12310         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
12311
12312 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
12313
12314         * lib/xvasprintf.h: New file.
12315         * lib/xvasprintf.c: New file.
12316         * lib/xasprintf.c: New file.
12317
12318 2004-09-08  Bruno Haible  <bruno@clisp.org>
12319
12320         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
12321
12322 2004-09-08  Bruno Haible  <bruno@clisp.org>
12323
12324         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
12325         length is > INT_MAX.
12326         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
12327         more.
12328
12329 2004-09-08  Bruno Haible  <bruno@clisp.org>
12330
12331         * lib/stdint_.h: New file, taken from GNU clisp.
12332
12333 2004-09-08  Bruno Haible  <bruno@clisp.org>
12334             Oskar Liljeblad  <oskar@osk.mine.nu>
12335
12336         * modules/stdint: New file.
12337         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
12338
12339 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12340
12341         Import from coreutils.
12342         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
12343         strings on unbounded length.  alloca's performance benefits aren't
12344         that important here.
12345         (V_STRDUP): Remove.
12346         (parse_with_separator): New function, with most of the internals
12347         of the old parse_user_spec.  Allow user to omit both user and group,
12348         for compatibility with FreeBSD.
12349         Clone only the user name, not the entire spec.
12350         Do not set *uid, *gid unless entirely successful.
12351         Avoid memory leak in some failing cases.
12352         Fix regression for USER.GROUP reported by Dmitry V. Levin in
12353         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
12354         (parse_user_spec): Rewrite to use parse_with_separator.
12355
12356 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12357
12358         * modules/userspec: Don't depend on alloca.
12359
12360 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12361
12362         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
12363
12364 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12365
12366         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
12367         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
12368         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
12369
12370 2004-08-16  Simon Josefsson  <jas@extundo.com>
12371
12372         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
12373         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
12374         Add --dry-run for --import.
12375         Let user provided command line parameters override configure.ac
12376         settings.
12377
12378 2004-08-12  Simon Josefsson  <jas@extundo.com>
12379
12380         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
12381         as discussed with Paul Eggert in threads rooted at
12382         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
12383         and
12384         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
12385         Before, the test was empty, and relied on ELIDE_CODE in source
12386         code.)
12387         (gl_PREREQ_GETOPT): New macro.
12388         (gl_GETOPT): Use them.
12389
12390 2004-08-12  Simon Josefsson  <jas@extundo.com>
12391
12392         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
12393         * lib/getopt_.h: Renamed from getopt.h.
12394
12395 2004-08-12  Simon Josefsson  <jas@extundo.com>
12396
12397         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
12398         Change default library name from libfoo to libgnu.
12399         Now, if you have a configure.ac that says:
12400                 gl_SOURCE_BASE(gl)
12401                 gl_M4_BASE(gl/m4)
12402                 gl_MODULES(error getopt etcetera)
12403                 gl_INIT
12404         you can import all you need by running:
12405                 ../gnulib/gnulib-tool --import
12406
12407         * modules/getopt (Files): Rename getopt.h to getopt_.h.
12408         (Makefile.am): Rewrite, use logic from argz.
12409         (Include): Use <getopt.h> instead of "getopt.h".
12410
12411 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
12412
12413         * modules/argp (Files): Add m4/unlocked-io.m4.
12414         (Depends-on): Add extensions.
12415
12416 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
12417
12418         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
12419         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
12420         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
12421         Check for program_invocation_name, program_invocation_short_name,
12422         flockfile, funlockfile, features.h, _getopt_long_only_r.
12423
12424 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
12425
12426         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
12427         its complicated substitute.
12428         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
12429         and program_invocation_name.
12430         (__argp_basename) [!_LIBC]: Remove; the only use was
12431         replaced by its body.
12432         (__argp_short_program_name): Change condition from
12433         !defined __argp_short_program_name to
12434         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
12435         to match argp-namefrob.h.
12436         (__argp_failure): Don't assume strerror_r returns char *.
12437         * lib/argp-parse.c (N_): Define unconditionally.
12438         (argp_default_options): Fill out initializers with 0 to avoid
12439         gcc warnings.
12440
12441 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
12442
12443         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
12444         getopt1.c.
12445
12446 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12447
12448         Merge from coreutils.
12449
12450         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
12451
12452         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
12453         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
12454
12455 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12456
12457         Merge from coreutils.
12458
12459         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
12460         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
12461         for Reliant Unix 5.43.
12462
12463         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
12464         (union fooround): Use uintmax_t, not long int.
12465         The rest is a merge from libc:
12466         [defined _LIBC]: Include <shlib-compat.h>.
12467         (_obstack) [defined _LIBC]: Remove after 2.3.4.
12468
12469         * lib/settime.c (settime): Recode to avoid warning with
12470         Sun Forte C 6U2.
12471
12472         * lib/strverscmp.c: Convert to UTF-8.
12473
12474 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12475
12476         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
12477         m4/uintmax_t.m4.
12478
12479 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12480
12481         * modules/xalloc-die: New file.
12482         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
12483
12484         * modules/md5 (Files): Add m4/uint32_t.m4.
12485         * modules/sha1: Renamed from modules/sha.
12486         (Files):
12487         Rename lib/sha.h to lib/sha1.h.
12488         Rename lib/sha.c to lib/sha1.c.
12489         Rename m4/sha.m4 to m4/sha1.m4.
12490         (lib_SOURCES): Likewise.
12491         (configure.ac): Rename gl_SHA to gl_SHA1.
12492         (Include): sha.h -> sha1.h.
12493
12494 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12495
12496         * m4/uint32_t.m4, uintptr_t.m4: New files.
12497         * m4/sha1.m4: Renamed from sha.m4.
12498         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
12499
12500 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
12501
12502         * lib/obstack.h (obstack_empty_p):
12503         Don't assume that chunk->contents is suitably aligned.
12504         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
12505         Likewise. Problem reported by Benno in
12506         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
12507
12508         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
12509         readable.  This could be improved further but it'd take some work.
12510
12511 2004-08-08  Simon Josefsson  <jas@extundo.com>
12512
12513         * modules/xgethostname (Depends-on): Remove exit and error (not
12514         used).
12515
12516         * modules/getpass-gnu: Add getpass.h.
12517         (Depends-on): Add stdbool.
12518         * modules/getpass: Add getpass.h.
12519
12520 2004-08-08  Simon Josefsson  <jas@extundo.com>
12521
12522         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
12523         Check getpass declaration.
12524
12525 2004-08-08  Simon Josefsson  <jas@extundo.com>
12526
12527         * lib/xgethostname.c: Don't include error.h (not used).
12528
12529         * lib/getpass.h: Add.
12530         * lib/getpass.c: Include getpass.h first.
12531
12532 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
12533
12534         * lib/xalloc-die.c: New files.
12535         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
12536         All uses removed.
12537         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
12538         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
12539         xalloc-die.c.
12540         (_, N_, xalloc_die): Move to xalloc-die.c.
12541         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
12542         so that we needn't mess with xalloc_msg_memory_exhausted.
12543
12544         * lib/sha1.h: Renamed from sha.h.
12545         (SHA1_H): Renamed from _SHA_H.
12546         (sha1_ctx): Renamed from sha_ctx.
12547         (sha1_init_ctx): Renamed from sha_init_ctx.
12548         (sha1_process_block): Renamed from sha_process_block.
12549         (sha1_process_bytes): Renamed from sha_process_bytes.
12550         (sha1_finish_ctx): Renamed from sha_finish_ctx.
12551         (sha1_read_ctx): Renamed from sha_read_ctx.
12552         (sha1_stream): Renamed from sha_stream.
12553         (sha1_buffer): Renamed from sha_buffer.
12554         * lib/sha1.c: Likewise; renamed from sha.c.
12555         Do not include <sys/types.h>.
12556         Include <stddef.h> rather than <stdlib.h>.
12557
12558 2004-08-08  Bruno Haible  <bruno@clisp.org>
12559
12560         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
12561         FILESYSTEM_PREFIX_LEN.
12562         * lib/progreloc.c: Likewise.
12563         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
12564
12565 2004-08-06  Simon Josefsson  <jas@extundo.com>
12566
12567         * modules/progname (Depends-on): Don't depend on stdbool.
12568
12569 2004-08-06  Simon Josefsson  <jas@extundo.com>
12570
12571         * modules/getsubopt: New file.
12572         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12573         getsubopt.
12574
12575 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
12576
12577         More merge from coreutils.
12578
12579         * m4/utimens.m4, utimecmp.m4: New files.
12580         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
12581         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
12582         prereq.m4, sha.m4: Import changes from coreutils.
12583
12584 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
12585
12586         More merge from coreutils.
12587         * modules/raise, modules/readtokens0, modules/utimens,
12588         modules/utimecmp, module/xnanosleep: New files.
12589         * modules/strftime: Add lib/strftime.h.
12590         Change include from <time.h> to "strftime.h".
12591         * modules/yesno: Add lib/yesno.h.
12592         * modules/backupfile: Remove lib/addext.c.
12593         * modules/euidaccess: Add stat-macros.h.
12594         * modules/canonicalize, modules/euidaccess,
12595         modules/filemode, modules/lchown, modules/makepath,
12596         modules/rmdir, modules/stat: Likewise.
12597
12598 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
12599
12600         Merge from tar.
12601         * lib/argp-help.c (make_hol, hol_append): Don't assume that
12602         SIZE_MAX is a valid preprocessor constant.
12603         (__argp_basename): Change from "#ifndef _LIBC"
12604         to "#ifndef __argp_short_program_name", so that
12605         we don't compile these functions for tar.
12606
12607         More merges from coreutils.
12608         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h,
12609         lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c,
12610         lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
12611         * lib/addext.c: Remove; no longer needed.
12612         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
12613         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
12614         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
12615         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
12616         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
12617         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
12618         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
12619         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
12620         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
12621         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
12622         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
12623         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
12624         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
12625         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
12626         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
12627         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
12628         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
12629         Import changes from coreutils.
12630
12631 2004-08-05  Simon Josefsson  <jas@extundo.com>
12632
12633         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
12634
12635 2004-08-05  Simon Josefsson  <jas@extundo.com>
12636
12637         * m4/getsubopt.m4: New file.
12638
12639 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
12640
12641         Merge from coreutils.
12642
12643         * m4/c-strtod.m4, canonicalize.m4, fcntl-safer.m4, getcwd-path-max.m4:
12644         New files.
12645
12646         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
12647         FILESYSTEM_PREFIX_LEN ->
12648         FILE_SYSTEM_PREFIX_LEN.
12649         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
12650         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
12651         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
12652         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
12653
12654         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
12655         prerequisite modules now handle the DOS stuff.
12656         Don't check for unistd.h.
12657
12658 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
12659
12660         Merge from coreutils.
12661
12662         * lib/.gdb-history: Remove; this doesn't belong here.
12663
12664         * lib/c-strtod.c, c-strtod.h, c-strtold.c, cycle-check.c,
12665         cycle-check.h, dev-ino.h, canonicalize.h, canonicalize.c,
12666         fcntl-safer.h, fcntl-safer.c, getcwd.c: New files.
12667
12668         * lib/dirname.h: Include <stdbool.h>.
12669         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
12670         for consistency with POSIX terminology.  All uses changed.
12671         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
12672         (strip_trailing_slashes): Use bool for booleans.
12673         * lib/stripslash.c (strip_trailing_slashes): Likewise.
12674
12675         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
12676         sometimes returns a positive errno value even when it succeeds.
12677         (print_errno_message) [!LIBC]: Fall back on strerror if
12678         __strerror_r fails.
12679
12680         * lib/path-concat.c (mempcpy): Don't define if a system header defines
12681         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
12682         (longest_relative_suffix): New function.
12683         (path_concat): Use it.  Assume first argument is not NULL.
12684         Port to DOS.  Omit redundant separators.
12685         Report an error instead of returning NULL.
12686         Use mempcpy instead of memcpy.
12687         (xpath_concat): Remove: not declared or used.
12688
12689         * lib/same.h: Include <stdbool.h>
12690         (same_name): Return bool, not int.
12691         * lib/same.c (same_name): Likewise.
12692         (errno): Don't declare; we assume C89 or better now.
12693
12694         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
12695         if not already defined.
12696
12697         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
12698         * lib/dup-safer.c (errno): Likewise.
12699
12700 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
12701
12702         Merge from coreutils.
12703         * modules/c-strtod, modules/c-strtold, modules/canonicalize,
12704         modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
12705         * modules/path-concat: Don't depend on strdup.
12706
12707 2004-08-03  Simon Josefsson  <jas@extundo.com>
12708
12709         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
12710         * lib/progname.h: Don't include stdbool.h.
12711
12712 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
12713
12714         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
12715         * MODULES.html.sh (func_all_modules): Remove fatal.
12716
12717 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
12718
12719         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
12720
12721 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
12722
12723         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
12724         working.
12725
12726 2004-08-02  Simon Josefsson  <jas@extundo.com>
12727
12728         * lib/getsubopt.h: New file, with comments from Bruno Haible.
12729         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
12730         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
12731
12732 2004-08-01  Simon Josefsson  <jas@extundo.com>
12733
12734         * lib/xgetdomainname.c: Include stdlib.h, for free().
12735
12736 2004-07-19  Bruno Haible  <bruno@clisp.org>
12737
12738         * MODULES.html.sh (func_all_modules): Add dummy.
12739
12740 2004-07-16  Simon Josefsson  <jas@extundo.com>
12741
12742         * modules/dummy: New file.
12743
12744 2004-07-16  Simon Josefsson  <jas@extundo.com>
12745
12746         * lib/dummy.c: New file.
12747
12748 2004-07-16  Bruno Haible  <bruno@clisp.org>
12749
12750         * lib/backupfile.h: Add extern "C" for C++.
12751         * lib/closeout.h: Likewise.
12752         * lib/copy-file.h: Likewise.
12753         * lib/findprog.h: Likewise.
12754         * lib/full-write.h: Likewise.
12755         * lib/pathname.h: Likewise.
12756         * lib/progname.h: Likewise.
12757         * lib/stpcpy.h: Likewise.
12758         * lib/stpncpy.h: Likewise.
12759         * lib/strcase.h: Likewise.
12760         * lib/strstr.h: Likewise.
12761         * lib/xalloc.h: Likewise.
12762
12763         * lib/mbswidth.h: Add extern "C" for C++.
12764         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
12765
12766 2004-07-13  Robert Millan  <robertmh@gnu.org>
12767
12768         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
12769
12770 2004-07-09  Simon Josefsson  <jas@extundo.com>
12771
12772         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
12773         failed without this.)
12774
12775 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12776
12777         * modules/chown (Files): Add lib/fchown-stub.c, since
12778         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
12779
12780 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
12781
12782         * lib/fchown-stub.c: New file.
12783
12784 2004-06-24  Jim Meyering  <jim@meyering.net>
12785
12786         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
12787
12788 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12789
12790         * modules/argz: Omit "#include".
12791
12792         * MODULES.html.sh (func_all_modules): Add calloc, to match
12793         2004-06-01 addition of calloc module.
12794
12795 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12796
12797         * m4/argz.m4: New file, which is autoupdated from libtool.
12798
12799 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12800
12801         * lib/argz.c, argz_.h: New files, which are autoupdated from libtool.
12802
12803 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12804
12805         * config/srclist-update: Don't insist on "USA." before the
12806         close-comment, as libtool omits the period and puts the */ on a
12807         separate line.
12808         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
12809         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
12810
12811 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
12812
12813         * modules/argz: New file.
12814         * MODULES.html.sh (func_all_modules): Add argz.
12815
12816 2004-06-12  Jim Meyering  <jim@meyering.net>
12817         and  Paul Eggert  <eggert@cs.ucla.edu>
12818
12819         * modules/hash (Files): Add lib/xalloc.h.
12820         * modules/pipe (Depends-on): Add wait-process.
12821         * modules/stat (Depends-on): Add xalloc.
12822         * modules/userspec (Files): Add lib/userspec.h.
12823         * modules/xstrto
12824
12825         Upgrade from gettext-0.13.
12826         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
12827         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
12828         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
12829
12830 2004-06-10  Jim Meyering  <jim@meyering.net>
12831
12832         * lib/calloc.c: New file.
12833
12834 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
12835
12836         * lib/getdate.y (yylex): Allow space between sign and number.
12837         Problem reported by Dan Jacobson.
12838
12839 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
12840
12841         Merge from coreutils CVS.
12842
12843         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
12844         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
12845         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
12846         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
12847         xstrtol.m4: Fix copyright date and/or serial number.
12848
12849         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
12850         See if we need an fchown replacement.
12851         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
12852         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
12853         and use the replacement function if we detect either defect.
12854
12855         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
12856         gl_UTIMECMP.
12857
12858 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
12859         and  Jim Meyering  <jim@meyering.net>
12860
12861         Merge from coreutils CVS.
12862
12863         * lib/stat-macros.h: New file, with contents from file-type.h
12864         and coreutils' system.h.
12865         * lib/file-type.c: Include "stat-macros.h".
12866         * lib/file-type.h (file_type): Move all macro definitions to new file,
12867         stat-macros.h.
12868
12869         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
12870         Wrap old code with this conditional.
12871         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
12872         function that does not dereference symlinks.
12873         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
12874
12875         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
12876         dependency problems.
12877         (xreadlink): Accept new arg SIZE, for efficiency.
12878         All decls and uses changed.
12879         * lib/xreadlink.h: Include <stddef.h>, for size_t.
12880
12881         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
12882         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
12883
12884         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
12885         sysexits.h.
12886
12887 2004-06-01  Jim Meyering  <jim@meyering.net>
12888
12889         * m4/calloc.m4: New file.
12890
12891 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
12892
12893         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
12894         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
12895         Also, fix a typo in a diagnostic.
12896
12897 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
12898
12899         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
12900         or AC_FUNC_REALLOC.
12901
12902 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
12903
12904         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
12905         macros to be defined.
12906         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
12907         the allocator returns NULL because the requested size is zero.
12908
12909 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
12910
12911         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
12912         var.  Add comment explaining why libc still defines it.  This
12913         merges the following patch from glibc:
12914         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
12915
12916 2004-05-20  Andreas Schwab  <schwab@suse.de>
12917
12918         * m4/free.m4: Replace free if it not known to work, not the other
12919         way round.
12920
12921 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
12922
12923         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
12924         present in glibc since revision 1.1 of this file.
12925         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
12926         obstack_alignment_mask, obstack_alloc, obstack_base,
12927         obstack_blank, obstack_blank_fast, obstack_chunk_size,
12928         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
12929         obstack_grow0, obstack_init, obstack_int_grow,
12930         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
12931         obstack_next_free, obstack_object_size, obstack_ptr_grow,
12932         obstack_ptr_grow_fast, obstack_room): Remove declarations of
12933         nonexistent functions.
12934
12935 2004-05-18  Karl Berry  <karl@gnu.org>
12936
12937         * config/srclist.txt: break link for vasnprintf.c.
12938
12939 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
12940
12941         Port obstack to the AS/400, where pointers are 16 bytes wide and
12942         you cannot cast an integer to a valid pointer.  This patch is
12943         currently waiting to be integrated into glibc; see
12944         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
12945
12946         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
12947         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
12948         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
12949         (struct obstack): temp member is now a union of a pointer and
12950         an integer, instead of an integer.  All integer uses changed.
12951         This does not affect the physical layout of struct obstack,
12952         except on hosts (like the AS/400) where the size or alignment of
12953         void * is greater than that of ptrdiff_t.
12954         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
12955         __STDC__)]: Store temporary in pointer member of union, not
12956         integer member.
12957         * lib/obstack.c: Include <stddef.h>, for offsetof.
12958         (struct fooalign): Remove; it doesn't need a name.
12959         (union fooround): Change double to long double, and add void *.
12960         (DEFAULT_ALIGNMENT): Use offsetof to compute.
12961         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
12962         not a macro.  Hence the values are always int; so remove all
12963         casts-to-int in uses.
12964
12965 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
12966
12967         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
12968         we can get this patch merged into glibc.
12969
12970 2004-05-17  Derek R. Price  <derek@ximbiot.com>
12971             Paul Eggert  <eggert@cs.ucla.edu>
12972
12973         * m4/argp: Depend on alloca.
12974
12975 2004-05-17  Derek R. Price  <derek@ximbiot.com>
12976             Paul Eggert  <eggert@cs.ucla.edu>
12977
12978         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
12979         freecoding.
12980
12981 2004-05-17  Bruno Haible  <bruno@clisp.org>
12982
12983         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
12984         precision that consists of a '.' followed by an empty digit string.
12985         Patch by Tor Lillqvist <tml@iki.fi>.
12986
12987 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
12988
12989         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
12990         for backward compatibility with older code.  We need our own
12991         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
12992         it under some other name, and our alloca.h will define it.
12993
12994 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
12995             Derek Price  <derek@ximbiot.com>
12996
12997         * lib/alloca.c: Include <alloca.h>, to get our interface.
12998         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
12999         include <alloca.h> first.  Use C89 prototype for alloca; this
13000         requires including <stddef.h> for size_t.  Use extern "C" if C++.
13001         Use #elif for simplicity, since we can assume C89 now.
13002         Don't try to source the system alloca.h since it will not be found
13003         and to prevent recursively including its replacement.
13004         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
13005         * lib/regex.c: Likewise.
13006
13007 2004-05-16  Derek Price  <derek@ximbiot.com>
13008             Paul Eggert  <eggert@cs.ucla.edu>
13009
13010         getline cleanup.  This changes the getndelim2 API: both order of
13011         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
13012         no delimiter).
13013
13014         * lib/getline.c: Don't include stddef.h or stdio.h, since our
13015         interface does that.
13016         (getline): Always use getdelim, so that we don't have two
13017         copies of this code.
13018         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
13019         if available.
13020         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
13021         (GETNDELIM2_MAXIMUM): New macro.
13022         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
13023         instead of the old practice of delim2==0.  All callers changed.
13024         Return -1 on overflow, instead of returning junk.
13025         Do not set *linesize unless allocation succeeds.
13026         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
13027         that we include sys/types.h.
13028         * lib/getnline.h: Likewise.
13029         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
13030         (getndelim2): Reorder arguments.
13031         * lib/getnline.c (getnline, getndelim):
13032         Don't discard the NMAX argument.
13033         (getnline): Invoke getndelim, to avoid code duplication.
13034         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
13035         of (size_t) -1 by callers of the getnline family.
13036
13037 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13038
13039         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
13040         Check for gettimeofday.
13041         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
13042         Check for settimeofday, stime.
13043
13044 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13045
13046         * lib/nanosleep.c (suspended): Change its type from int to
13047         sig_atomic_t volatile.
13048         (first_call): Make it private to rpl_nanosleep, and have it
13049         be zero initially as that's a bit faster.
13050         (my_usleep): Round up fractional times instead of truncating them,
13051         as this is the usual meaning for 'sleep'.
13052
13053         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
13054         doesn't work.
13055         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
13056         (ENOSYS): Define if not defined.
13057         (settime): Fall back on stime if it exists and settimeofday fails.
13058         But don't bother with fallbacks if a method fails with errno == EPERM.
13059
13060 2004-05-11  Jim Meyering  <jim@meyering.net>
13061
13062         Prior to this change, the save_cwd caller required read access to the
13063         current directory on most systems (ones with the fchdir function).
13064
13065         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
13066         fails, try write-only, and finally, resort to using xgetcwd.
13067
13068 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13069
13070         * lib/obstack.c, obstack.h: Import changes from libc.
13071
13072 2004-04-28  Bruno Haible  <bruno@clisp.org>
13073
13074         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
13075         also implicitly appends .exe to executables.
13076         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
13077         accepts Windows pathnames.
13078         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
13079         Treat Cygwin like Windows, since it now accepts Windows pathnames.
13080         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
13081         Treat Cygwin like Windows, since it now accepts Windows pathnames.
13082         Reported by Derek Robert Price <derek@ximbiot.com>.
13083
13084 2004-04-21  Karl Berry  <karl@gnu.org>
13085
13086         * config/srclist.txt (localcharset.c): break sync.
13087
13088 2004-04-20  Paul Eggert  <eggert@twinsun.com>
13089
13090         * m4/host-os.m4: Add a copyright notice.
13091
13092 2004-04-20  Jim Meyering  <jim@meyering.net>
13093
13094         Change UTILS_ to gl_ in AC_DEFINE'd names.
13095         Change utils_- and jm_-prefixed variables, too.
13096         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
13097         UTILS_FUNC_MKDIR_TRAILING_SLASH.
13098         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
13099
13100         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
13101         Don't emit trailing blanks.
13102         Also rename jm_-prefixed variables to have gl_ prefix.
13103
13104         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
13105         Also rename jm_-prefixed variables to have gl_ prefix.
13106
13107         * m4/jm-macros.m4: Reflect the renamings.
13108         * m4/prereq.m4: Likewise.
13109
13110 2004-04-20  Jim Meyering  <jim@meyering.net>
13111
13112         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
13113         memory.
13114
13115 2004-04-20  Jim Meyering  <jim@meyering.net>
13116             Bruno Haible  <bruno@clisp.org>
13117
13118         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
13119         memory when realloc fails.
13120
13121 2004-04-19  Jim Meyering  <jim@meyering.net>
13122
13123         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
13124         now that readutmp.c may call `free (0)'.
13125
13126 2004-04-19  Bruno Haible  <bruno@clisp.org>
13127
13128         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
13129         * m4/inttypes_h.m4: Likewise.
13130         * m4/stdint_h.m4: Likewise.
13131         * m4/intmax_t.m4: Likewise.
13132         * m4/uintmax_t.m4: Likewise.
13133
13134 2004-04-18  Jim Meyering  <jim@meyering.net>
13135
13136         * m4/prereq.m4: Don't forbid jm_ prefix.
13137
13138         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
13139         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
13140         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
13141         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
13142         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
13143         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
13144         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
13145         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
13146         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
13147         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
13148         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
13149         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
13150         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
13151         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
13152         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
13153         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
13154         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
13155         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
13156         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
13157
13158 2004-04-18  Jim Meyering  <jim@meyering.net>
13159
13160         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
13161         failure, don't leak memory and do call END_UTMP_ENT.
13162
13163 2004-04-16  Jim Meyering  <jim@meyering.net>
13164
13165         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
13166         coreutils' stat program.
13167         (gl_PREREQ): Don't require jm_PREREQ_STAT.
13168
13169 2004-04-11  Paul Eggert  <eggert@twinsun.com>
13170
13171         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
13172         C89.
13173         (CHAR_BIT): Remove, since we assume C89.
13174         Include <stdint.h> if available, as per current Autoconf CVS advice.
13175
13176 2004-03-31  Jim Meyering  <jim@meyering.net>
13177
13178         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
13179         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
13180         * m4/xalloc.m4: Likewise.
13181
13182 2004-03-30  Paul Eggert  <eggert@twinsun.com>
13183
13184         Merge from coreutils.
13185
13186         * m4/inttostr.m4: New file.
13187         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
13188         Require AM_STDBOOL_H and gl_TIMESPEC instead.
13189         Require gl_CLOCK_TIME.
13190         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
13191
13192 2004-03-30  Paul Eggert  <eggert@twinsun.com>
13193
13194         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
13195         not bool, to be more consistent with Unix conventions.
13196         Suggested by Bruno Haible.
13197
13198         Merge from coreutils.
13199
13200         * lib/imaxtostr.c, inttostr.c, inttostr.h, offtostr.c, umaxtostr.c:
13201         New files.
13202
13203         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
13204         the usual <time.h> dance.
13205         (get_date): Change signature to support fractional time stamps.
13206         All callers changed.
13207         * lib/getdate.y: Include "getdate.h" first, as we can now
13208         assume C89 and don't need to worry about 'const'.
13209         Similarly, include "unlocked-io.h" near start, not in middle.
13210         Include <limits.h>.
13211         (textint.value): Use long int rather than int.
13212         (textint.digits): Use size_t rather than int.
13213         (BILLION, LOG10_BILLION): New constants.
13214         (parser_control): New member rel_ns.  Members day_ordinal,
13215         time_zone, month, day, hour, minutes, rel_year, rel_month,
13216         rel_day, rel_hour, rel_minutes, rel_seconds
13217         are now long int, not int.  Member seconds is now struct timespec,
13218         not int.  New member timespec_seen.  Members dates_seen, days_seen,
13219         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
13220         not int.
13221         (%union.intval): Now long int, not int.
13222         New member timespec.
13223         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
13224         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
13225         (spec): Now is a timespec or an item list.
13226         (timespec, items): New nonterminals.
13227         (time, rel, relunit, number, get_date):
13228         Add support for fractional seconds.
13229         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
13230         (gmtime, localtime, mktime): Remove decls; not needed with C89.
13231         (to_hour): First arg is now long int, not int.
13232         (to_year): Returns long int, not int.
13233         Don't treat year -70 like 70.
13234         (tm_diff): Returns long int, not int.
13235         (lookup_word): Use bool instead of int when appropriate.
13236         (yylex): Use size_t for count, not int.
13237         Detect overflow when parsing large integer constants.
13238         Add support for fractions.
13239         (get_date): Make pointers 'const' if possible.
13240         Use more-portable code to detect integer overflow.
13241         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
13242         Don't use ctime; it's not reliable if the year has >4 digits.
13243
13244         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
13245         This is for compatibility with BSD.
13246
13247         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
13248         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
13249         From coreutils' system.h.
13250
13251         * lib/userspec.c: Don't include "posixver.h".
13252         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
13253         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
13254         compatible extension.  Simplify code by removing a boolean int
13255         that was always nonzero if a string was nonnull.
13256
13257 2004-03-30  Jim Meyering  <jim@meyering.net>
13258
13259         Merge from coreutils.
13260
13261         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
13262         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
13263         on some systems one must include <grp.h> before it.
13264         Reported by Christian Krackowizer.
13265
13266 2004-03-30  Jim Meyering  <jim@meyering.net>
13267
13268         Merge from coreutils.
13269
13270         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
13271
13272         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
13273         an empty input stream.
13274
13275         * lib/readtokens.c: Include <stdbool.h>.
13276         (readtoken): Use `size_t' rather than int/long.
13277         All callers adjusted.
13278         Use `bool' rather than `int' where appropriate.
13279         Use memset rather than an explicit loop.
13280         Use x2nrealloc rather than xrealloc.
13281         Allow the use of `\0' as a delimiter.
13282         (readtokens): Likewise.
13283         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
13284
13285 2004-03-30  Jim Meyering  <jim@meyering.net>
13286
13287         * m4/realloc.m4: Remove file, since now it does no more than
13288         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
13289         the `configure.ac' section of module/realloc.
13290         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
13291
13292 2004-03-30  Bruno Haible  <bruno@clisp.org>
13293
13294         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
13295         nonnull.
13296
13297 2004-03-29  Paul Eggert  <eggert@twinsun.com>
13298
13299         Merge changes to getloadavg.c from coreutils and Emacs.
13300
13301         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
13302         Define to an expression, not to the empty string.
13303         Include cloexec.h and xalloc.h.
13304         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
13305         Use set_cloexec_flag rather than rolling our own.
13306         * lib/cloexec.c, cloexec.h: New files.
13307
13308 2004-03-29  Paul Eggert  <eggert@twinsun.com>
13309
13310         * m4/cloexec.m4: New file.
13311
13312 2004-03-18  Paul Eggert  <eggert@twinsun.com>
13313
13314         * lib/getopt.h: Sync with libc CVS.
13315
13316 2004-03-18  Paul Eggert  <eggert@twinsun.com>
13317             Bruno Haible  <bruno@clisp.org>
13318
13319         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
13320         mbswidth.
13321
13322 2004-03-18  Paul Eggert  <eggert@twinsun.com>
13323             Bruno Haible  <bruno@clisp.org>
13324
13325         * lib/mbswidth.h: Include <wchar.h> only if
13326         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
13327         <wchar.h>.
13328         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
13329
13330 2004-03-09  Paul Eggert  <eggert@twinsun.com>
13331
13332         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
13333         Sync with libc CVS.
13334         * lib/getopt_int.h: New file, also synced from libc.
13335
13336 2004-03-09  Paul Eggert  <eggert@twinsun.com>
13337
13338         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
13339         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
13340         Bring back getopt.c, getopt.h, getopt1.c.
13341
13342 2004-03-07  Paul Eggert  <eggert@twinsun.com>
13343
13344         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
13345         All uses changed.  Check for sa_sigaction member; this fixes
13346         a bug first reported by Jason Andrade in
13347         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
13348
13349 2004-03-07  Paul Eggert  <eggert@twinsun.com>
13350
13351         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
13352         '#if' expressions.  Unlike the code it replaces, it does not
13353         depend on (defined _SC_PAGESIZE).  However, it does depend on
13354         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
13355         first reported by Jason Andrade in
13356         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
13357
13358 2004-02-25  Simon Josefsson  <jas@extundo.com>
13359
13360         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
13361
13362 2004-02-25  Simon Josefsson  <jas@extundo.com>
13363
13364         * lib/strdup.h: New file.
13365         * lib/strdup.c: Include it.
13366         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
13367         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
13368
13369 2004-02-23  Karl Berry  <karl@gnu.org>
13370
13371         * doc/maintain.texi, standards.texi, make-stds.texi: new files
13372         (from fencepost.gnu.org:/gd/gnuorg).
13373
13374 2004-02-23  Karl Berry  <karl@gnu.org>
13375
13376         * config/srclistvars.sh (GNUORG) [karl]: redefine.
13377         * config/srclist.txt: add maintain/standards documents.
13378
13379 2004-02-18  Bruno Haible  <bruno@clisp.org>
13380
13381         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
13382         Reported by Derek Robert Price <derek@ximbiot.com>.
13383
13384 2004-02-16  Karl Berry  <karl@gnu.org>
13385
13386         * config/mkinstalldirs, install-sh: update from automake.
13387
13388 2004-02-06  Karl Berry  <karl@gnu.org>
13389
13390         * m4/po.m4: update from gettext 0.14.1.
13391
13392 2004-02-06  Karl Berry  <karl@gnu.org>
13393
13394         * lib/config.charset: update from gettext 0.14.1.
13395
13396 2004-02-05  Paul Eggert  <eggert@twinsun.com>
13397
13398         Add comments and code, prompted by suggestions from Bruno Haible
13399         for sh-quote.
13400         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
13401         describing the enum quoting_style values.
13402         * lib/quotearg.c (quotearg_alloc): New function.
13403         (quotearg_buffer_restyled): Treat lone { and } as special.
13404         Treat = as special.  Work around bug with older shells
13405         that "see" a '\' that is really the 2nd byte of a multibyte char.
13406         Quote empty string with shell_quoting_style.
13407
13408 2004-02-03  Bruno Haible  <bruno@clisp.org>
13409
13410         * m4/pipe.m4: New file, from GNU gettext.
13411
13412 2004-02-03  Bruno Haible  <bruno@clisp.org>
13413
13414         * lib/pipe.h: New file, from GNU gettext.
13415         * lib/pipe.c: New file, from GNU gettext.
13416
13417 2004-01-27  Bruno Haible  <bruno@clisp.org>
13418
13419         * m4/execute.m4: New file, from GNU gettext.
13420
13421 2004-01-27  Bruno Haible  <bruno@clisp.org>
13422
13423         * lib/execute.h: New file, from GNU gettext.
13424         * lib/execute.c: New file, from GNU gettext.
13425         * lib/w32spawn.h: New file, from GNU gettext.
13426
13427 2004-01-24  Paul Eggert  <eggert@twinsun.com>
13428
13429         Merge from diffutils.
13430
13431         * lib/file-type.c (file_type): Add typed memory objects.
13432         * lib/file-type.h (S_TYPEISTMO): New macro.
13433
13434         * lib/c-stack.h (c_stack_action): Remove argv argument.
13435         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
13436         (die): Don't calculate message unless segv_action returns.
13437         (get_stack_location, min_address_from_argv, max_address_from_argv,
13438         volatile stack_base, volatile_stack_size): Remove.
13439         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
13440         that every segmentation violation is a stack overflow.  (Ouch!)
13441         See Debian bug 136249 (still outstanding) for more info about why
13442         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
13443
13444 2004-01-24  Paul Eggert  <eggert@twinsun.com>
13445
13446         Exit-status fix from coreutils.
13447
13448         Use exit_failure consistently in place of EXIT_FAILURE,
13449         so that program exit statuses are consistent on failure.
13450
13451         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
13452         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
13453         * lib/argmatch.h: Comment fix to match the above.
13454         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
13455         Now a macro referring to exit_failure, instead of a separate
13456         variable.  Include "exitfail.h" to get it.
13457         * lib/xstrtol.h: Include "exitfail.h".
13458         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
13459
13460         * lib/long-options.c (parse_long_options): Use prototype
13461         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
13462         for clarity.
13463
13464 2004-01-21  Jim Meyering  <jim@meyering.net>
13465
13466         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
13467         so as not to conflict with a different-sized __mktime_internal
13468         function in GNU libc.
13469         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
13470         Problem building statically-linked `ls' reported by Michael Brunnbauer.
13471
13472 2004-01-20  Karl Berry  <karl@gnu.org>
13473
13474         * config/config.guess: update from config.
13475
13476         * config/srclistvars.sh: GNUWWWLICENSES for karl.
13477
13478 2004-01-20  Bruno Haible  <bruno@clisp.org>
13479
13480         Safer stack allocation.
13481         * lib/setenv.c: Include allocsa.h.
13482         (alloca): Remove fallback definition.
13483         (freea): Remove macro.
13484         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
13485         instead of freea.
13486
13487 2004-01-20  Bruno Haible  <bruno@clisp.org>
13488
13489         * m4/eealloc.m4: New file, from GNU gettext.
13490
13491 2004-01-20  Bruno Haible  <bruno@clisp.org>
13492
13493         * m4/allocsa.m4: New file, from GNU gettext.
13494
13495 2004-01-20  Bruno Haible  <bruno@clisp.org>
13496
13497         * lib/xallocsa.h: New file, from GNU gettext.
13498         * lib/xallocsa.c: New file, from GNU gettext.
13499
13500 2004-01-20  Bruno Haible  <bruno@clisp.org>
13501
13502         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
13503
13504 2004-01-20  Bruno Haible  <bruno@clisp.org>
13505
13506         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
13507         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
13508         specially.
13509
13510 2004-01-20  Bruno Haible  <bruno@clisp.org>
13511
13512         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
13513         patch.
13514
13515 2004-01-20  Bruno Haible  <bruno@clisp.org>
13516
13517         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
13518
13519 2004-01-20  Bruno Haible  <bruno@clisp.org>
13520
13521         * lib/eealloc.h: New file.
13522
13523 2004-01-20  Bruno Haible  <bruno@clisp.org>
13524
13525         * lib/binary-io.h: Avoid warnings on Cygwin.
13526
13527 2004-01-20  Bruno Haible  <bruno@clisp.org>
13528
13529         * lib/allocsa.h: New file, from GNU gettext.
13530         * lib/allocsa.c: New file, from GNU gettext.
13531
13532 2004-01-18  Karl Berry  <karl@gnu.org>
13533
13534         * doc/gpl.texi, lgpl.texi: new files.
13535
13536 2004-01-18  Karl Berry  <karl@gnu.org>
13537
13538         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
13539         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
13540
13541 2004-01-15  Paul Eggert  <eggert@twinsun.com>
13542
13543         Merge from coreutils.
13544
13545         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
13546         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
13547         (gl_DEFAULT_POSIX2_VERSION): Move
13548         the documentation from 'configure' into 'config.hin',
13549         so that 'configure --help' isn't burdened by it and
13550         we don't have to worry about its formatting there.
13551         Reword the documentation so that it's more succinct
13552         and can be run together into a single paragraph.
13553         * m4/same.m4 (gl_SAME): Check for pathconf.
13554
13555 2004-01-15  Paul Eggert  <eggert@twinsun.com>
13556
13557         Merge from coreutils.
13558
13559         * lib/posixver.c: Include posixver.h.
13560
13561         * lib/same.c: Include <stdbool.h>, <limits.h>.
13562         (_POSIX_NAME_MAX): Define if not defined.
13563         (MIN): New macro.
13564         (same_name): If file names are silently truncated, report
13565         that the file names are the same if they are the same after
13566         the silent truncation.
13567
13568         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
13569         conversion function.
13570         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
13571         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
13572         longer needed.
13573
13574 2004-01-15  Jim Meyering  <jim@meyering.net>
13575
13576         Merge from coreutils.
13577
13578         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
13579         if no library is required.
13580         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
13581         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
13582         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
13583         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
13584         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
13585         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
13586         value, $ac_cv_search_crypt, if it's "none required".
13587         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
13588         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
13589         not gl_FUNC_GETLOADAVG.
13590         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
13591         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
13592
13593 2004-01-15  Jim Meyering  <jim@meyering.net>
13594
13595         Merge from coreutils.
13596
13597         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
13598         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
13599         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
13600
13601         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
13602         optional configure-time default.
13603
13604         * lib/version-etc.c (version_etc_copyright): Update copyright date.
13605
13606         * lib/xreadlink.c (xreadlink): Correct outdated comment.
13607
13608 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
13609
13610         Merge from coreutils.
13611
13612         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
13613         value, $ac_cv_search_nanosleep, if it's "none required".
13614
13615 2004-01-14  Paul Eggert  <eggert@twinsun.com>
13616
13617         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
13618         with like-named macro in fnmatch.c.
13619         (EXT): Use an internal constant instead.
13620
13621         Merge fnmatch patches from glibc.
13622         * lib/fnmatch.c (mbsinit): Remove define.
13623         Add libc_hidden_ver (__fnmatch, fnmatch).
13624         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
13625         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
13626
13627 2004-01-14  Karl Berry  <karl@gnu.org>
13628
13629         * config/install-sh: update from automake.
13630
13631 2004-01-13  Karl Berry  <karl@gnu.org>
13632
13633         * config/install-sh: update from automake.
13634
13635 2004-01-09  Karl Berry  <karl@gnu.org>
13636
13637         * config/install-sh: update from automake.
13638
13639 2004-01-05  Karl Berry  <karl@gnu.org>
13640
13641         * config/config.{sub,guess}: update from config.
13642
13643 2003-12-31  Karl Berry  <karl@gnu.org>
13644
13645         * config/depcomp: update from automake.
13646
13647 2003-12-14  Karl Berry  <karl@gnu.org>
13648
13649         * lib/config.charset: update from gettext-runtime.
13650
13651 2003-12-03  Paul Eggert  <eggert@twinsun.com>
13652
13653         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
13654         Bug reported by Alfred M. Szmidt.
13655
13656 2003-12-03  Bruno Haible  <bruno@clisp.org>
13657
13658         * m4/gettext.m4: Upgrade from gettext-0.13.
13659         * m4/po.m4: Upgrade from gettext-0.13.
13660         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
13661         * m4/intmax.m4: New file, from gettext-0.13.
13662         * m4/printf-posix.m4: New file, from gettext-0.13.
13663
13664 2003-11-29  Karl Berry  <karl@gnu.org>
13665
13666         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
13667
13668 2003-11-25  Paul Eggert  <eggert@twinsun.com>
13669             Bruno Haible  <bruno@clisp.org>
13670
13671         * lib/printf-parse.h: Don't include sys/types.h.
13672         (ARG_NONE): New macro.
13673         (char_directive): Change type of *arg_index fields to size_t.
13674         * lib/printf-parse.c: Don't include sys/types.h.
13675         (SSIZE_MAX): Remove macro.
13676         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
13677         Remove unnecessary overflow check.
13678         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
13679         fields.
13680
13681 2003-11-25  Bruno Haible  <bruno@clisp.org>
13682
13683         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
13684
13685 2003-11-25  Bruno Haible  <bruno@clisp.org>
13686
13687         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
13688         gt_TYPE_SSIZE_T.
13689
13690 2003-11-24  Paul Eggert  <eggert@twinsun.com>
13691
13692         * modules/alloca: Remove dependency on xalloc.
13693
13694 2003-11-24  Paul Eggert  <eggert@twinsun.com>
13695
13696         * lib/alloca.c: Remove dependency on xalloc module.
13697         (xalloc_die): Remove.
13698         (memory_full) [!defined emacs]: New macro.
13699         [!defined emacs]: Don't include xalloc.h.
13700         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
13701         address arithmetic overflows.  Change datatypes a bit to avoid
13702         unnecessary casts.
13703
13704 2003-11-22  Jim Meyering  <jim@meyering.net>
13705
13706         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
13707         s/size/size_t/.
13708
13709 2003-11-21  Karl Berry  <karl@gnu.org>
13710
13711         * config/config.{sub,guess}: update from config.
13712
13713 2003-11-18  Karl Berry  <karl@gnu.org>
13714
13715         * config/config.{sub,guess}: update from config.
13716
13717         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
13718
13719 2003-11-17  Paul Eggert  <eggert@twinsun.com>
13720
13721         * README: Mention that S+T cannot overflow if S is the size of
13722         an existing object and T is sufficiently small.
13723
13724 2003-11-17  Jim Meyering  <jim@meyering.net>
13725
13726         On systems without utime and without a utimes function capable of
13727         dealing with a NULL struct utimbuf* argument, this utime replacement
13728         could -- in unusual circumstances -- leak a file descriptor.
13729         * lib/utime.c: Include <unistd.h> and <errno.h>.
13730         (utime_null): Be sure to close `fd' and to preserve errno.
13731         Reported by Geoff Collyer via Arnold Robbins.
13732
13733 2003-11-17  Bruno Haible  <bruno@clisp.org>
13734
13735         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
13736         (Depends-on): Add xsize.
13737
13738 2003-11-17  Bruno Haible  <bruno@clisp.org>
13739
13740         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
13741
13742 2003-11-17  Bruno Haible  <bruno@clisp.org>
13743
13744         * lib/vasnprintf.c (alloca): Remove fallback definition.
13745         (freea): Remove definition.
13746         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
13747         Reported by Paul Eggert.
13748
13749 2003-11-16  Paul Eggert  <eggert@twinsun.com>
13750             Bruno Haible  <bruno@clisp.org>
13751
13752         Protect against address arithmetic overflow.
13753         * lib/printf-args.h: Include stddef.h.
13754         (arguments): Change type of field 'count' to size_t.
13755         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
13756         'unsigned int' where appropriate.
13757         * lib/printf-parse.h: Include sys/types.h.
13758         (char_directive): Change type of *arg_index fields to ssize_t.
13759         (char_directives): Change type of fields 'count', max_*_length to
13760         size_t.
13761         * lib/printf-parse.c: Include sys/types.h and xsize.h.
13762         (SSIZE_MAX): Define fallback value.
13763         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
13764         instead of 'int' where appropriate. Check a_allocated, d_allocated
13765         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
13766         * lib/vasnprintf.c: Include xsize.h.
13767         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
13768         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
13769         overflow. Avoid wraparound when converting a width or precision from
13770         decimal to binary.
13771
13772 2003-11-16  Bruno Haible  <bruno@clisp.org>
13773
13774         Update from GNU gettext.
13775         * lib/printf-parse.c: Generalize to it can be compiled for wide
13776         strings.
13777         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
13778         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
13779         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
13780         SNPRINTF): New macros.
13781         Don't include <alloca.h> if the file is used inside libintl.
13782         (local_wcslen): New function, for Solaris 2.5.1.
13783         (VASNPRINTF): Use it instead of wcslen.
13784
13785 2003-11-16  Bruno Haible  <bruno@clisp.org>
13786
13787         * lib/xsize.h (xmax): New function.
13788         (xsum, xsum3, xsum4): Declare as "pure" functions.
13789
13790 2003-11-12  Paul Eggert  <eggert@twinsun.com>
13791
13792         * modules/xalloc (Files): Undo latest change, since xalloc.h
13793         no longer needs SIZE_MAX or PTRDIFF_MAX.
13794
13795 2003-11-12  Paul Eggert  <eggert@twinsun.com>
13796
13797         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
13798         gl_PTRDIFF_MAX.
13799
13800 2003-11-12  Paul Eggert  <eggert@twinsun.com>
13801
13802         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
13803         "return", to pacify some unknown compiler.  Problem reported
13804         by Joerg Schilling.
13805
13806 2003-11-12  Paul Eggert  <eggert@twinsun.com>
13807
13808         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
13809         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
13810         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
13811         heuristic is just as accurate as far as we know, and it removes a
13812         dependency on size_max.m4 and ptrdiff_max.m4.
13813
13814 2003-11-11  Bruno Haible  <bruno@clisp.org>
13815
13816         * modules/xsize (Files): Add m4/size_max.m4.
13817         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
13818
13819 2003-11-11  Bruno Haible  <bruno@clisp.org>
13820
13821         * m4/size_max.m4: New file.
13822         * m4/ptrdiff_max.m4: New file.
13823         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
13824         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
13825         (gl_XALLOC): Invoke it.
13826
13827 2003-11-11  Bruno Haible  <bruno@clisp.org>
13828
13829         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
13830         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
13831         defined.
13832
13833 2003-11-10  Paul Eggert  <eggert@twinsun.com>
13834
13835         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
13836         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
13837         rejected some allocations of exactly SIZE_MAX - 2 bytes.
13838         From Bruno Haible.
13839         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
13840         not (size_t) -1, since it's defined here.
13841
13842 2003-11-09  Karl Berry  <karl@gnu.org>
13843
13844         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
13845
13846 2003-11-06  Paul Eggert  <eggert@twinsun.com>
13847
13848         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
13849         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
13850         Reject sizes of exactly SIZE_MAX bytes.
13851         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
13852         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
13853
13854 2003-11-05  Bruno Haible  <bruno@clisp.org>
13855
13856         * lib/xsize.h: Include limits.h, to avoid a possible collision with
13857         SIZE_MAX defined in <limits.h> on Solaris.
13858
13859 2003-11-04  Jim Meyering  <jim@meyering.net>
13860
13861         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
13862         variable names, rather than @VAR@.
13863         * modules/poll: Likewise.
13864
13865 2003-11-04  Bruno Haible  <bruno@clisp.org>
13866
13867         * modules/xsize: New file.
13868         * modules/linebreak: Depend on xsize.
13869         * MODULES.html.sh (func_all_modules): Add xsize.
13870
13871 2003-11-04  Bruno Haible  <bruno@clisp.org>
13872
13873         * m4/xsize.m4: New file.
13874
13875 2003-11-04  Bruno Haible  <bruno@clisp.org>
13876
13877         * lib/xsize.h: New file.
13878         * lib/linebreak.c: Include xsize.h.
13879         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
13880         argument for overflow.
13881         Suggested by Paul Eggert.
13882
13883 2003-11-03  Karl Berry  <karl@gnu.org>
13884
13885         * config/config.{guess,sub}: update from config.
13886
13887 2003-11-03  Jim Meyering  <jim@meyering.net>
13888
13889         * modules/userspec (lib_SOURCES): Add userspec.h.
13890         (Include): Add "userspec.h".
13891         Improve description.
13892
13893 2003-11-03  Jim Meyering  <jim@meyering.net>
13894
13895         * lib/userspec.c: Include "userspec.h".
13896         * lib/userspec.h: New file.
13897
13898 2003-11-03  Bruno Haible  <bruno@clisp.org>
13899
13900         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
13901
13902 2003-11-03  Bruno Haible  <bruno@clisp.org>
13903
13904         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
13905         available, to avoid (extremely rare) race condition.
13906         Suggested by Paul Eggert.
13907
13908 2003-11-02  Karl Berry  <karl@gnu.org>
13909
13910         * config/srclist.txt (vasprintf.c): sync broken, sigh.
13911
13912 2003-10-31  Paul Eggert  <eggert@twinsun.com>
13913
13914         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
13915         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
13916         (read_filesystem_list): Set and use me_type_malloced.
13917         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
13918         whatever the type happens to be), for brevity and consistency.
13919         Check for size calculation overflow on Alphas running OSF/1.
13920
13921 2003-10-31  Jim Meyering  <jim@meyering.net>
13922
13923         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
13924
13925         * lib/linebuffer.c: Include <string.h> for declaration of memset.
13926
13927 2003-10-30  Paul Eggert  <eggert@twinsun.com>
13928             Bruno Haible  <bruno@clisp.org>
13929
13930         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
13931         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
13932
13933 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
13934
13935         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
13936         netbsd*-gnu*.  Suggested by Robert Millan.
13937
13938 2003-10-29  Paul Eggert  <eggert@twinsun.com>
13939
13940         * modules/group-member: Depend on stdbool.
13941
13942 2003-10-29  Paul Eggert  <eggert@twinsun.com>
13943
13944         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
13945
13946 2003-10-29  Paul Eggert  <eggert@twinsun.com>
13947
13948         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
13949         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
13950         after the 'gnu' in these cases.  This fixes some bugs in the
13951         previous change, and is based on suggestions by Robert Millan.
13952
13953 2003-10-29  Paul Eggert  <eggert@twinsun.com>
13954
13955         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
13956         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
13957         no longer needed.
13958         * lib/quotearg.c (quotearg_n_options): Use it.
13959         * lib/group-member.c: Include <stdbool.h>.
13960         (free_group_info): Arg is now const *; don't free arg.
13961         (get_group_info): Now returns bool and accepts struct group_info *,
13962         rather than returning a malloc'ed struct group_info *.
13963         All uses changed.  Check for overflow in internal size calculation.
13964
13965         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
13966         rather than xmalloc/xrealloc.
13967         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
13968         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
13969         conformance bug: the old code used a pointer after freeing the
13970         storage that it addressed.
13971         * lib/hash.c (hash_initialize): Simplify the code by using
13972         xalloc_oversized rather than doing it by hand.
13973         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
13974         the buffer preserved.  Use free and xmalloc instead.
13975         * lib/quotearg.c (quotearg_n_options): Likewise.
13976         Use a simpler test for size overflow.  Don't use xalloc_oversized
13977         because unsigned int might be wider than size_t (!); this suggests
13978         that we should switch from unsigned int to size_t for slot numbers.
13979
13980 2003-10-28  Paul Eggert  <eggert@twinsun.com>
13981
13982         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
13983         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
13984         NetBSD kernels.  Requested by Richard Stallman.
13985
13986 2003-10-27  Paul Eggert  <eggert@twinsun.com>
13987
13988         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
13989         to allocate the returned structure.  Do not allocate a subarray,
13990         as x2nrealloc will do that.
13991         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
13992         instead of xnrealloc.
13993         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
13994
13995 2003-10-27  Bruno Haible  <bruno@clisp.org>
13996
13997         * lib/stdbool_.h: Better support for BeOS.
13998
13999 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14000
14001         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
14002         now uses inline.
14003
14004 2003-10-26  Paul Eggert  <eggert@twinsun.com>
14005
14006         * lib/xalloc.h (xalloc_oversized): New static inline function, for
14007         callers that want to do their own size-overflow checking.  Include
14008         <stdbool.h>, since xalloc_oversized returns bool.
14009         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
14010         to use xalloc_oversized.
14011
14012         Add two functions x2realloc, x2nrealloc, for programs that grow
14013         arrays dynamically by doubling their sizes.
14014         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
14015         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
14016         New functions.
14017
14018         Port to C99 semantics for 'inline' of external functions.
14019         Bug reported by Bruno Haible.
14020         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
14021         with the old contents of xnmalloc.
14022         (xnmalloc, xmalloc): Use it.
14023         (xnrealloc_inline): New static inline function,
14024         with the old contents of xnrealloc.
14025         (xnrealloc, xrealloc): Use it.
14026
14027         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
14028         that.
14029
14030 2003-10-26  Karl Berry  <karl@gnu.org>
14031
14032         * config/srclist.txt (COPYING.DOC): no longer available from
14033         /gd/gnuorg; don't know where the ultimate source is.
14034
14035 2003-10-25  Paul Eggert  <eggert@twinsun.com>
14036
14037         Fix several address-calculation bugs in the hash modules,
14038         plus some minor code cleanup.
14039
14040         * lib/hash.h: Include <stdbool.h>, for bool.
14041         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
14042         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
14043         hash_get_n_entries, hash_get_max_bucket_length,
14044         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
14045         hash_rehash): Use size_t rather than unsigned.
14046         * lib/hash.c (struct hash_table, hash_get_n_buckets,
14047         hash_get_n_buckets_used, hash_get_n_entries,
14048         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
14049         hash_get_entries, hash_do_for_each, hash_string, is_prime,
14050         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
14051         Likewise.
14052         (SIZE_MAX): Define if not defined.
14053         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
14054         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
14055         hash_print):
14056         Use const * when possible.
14057         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
14058         (check_tuning): Fix bug: if tuning parameters were very close to
14059         0 or 1, rounding errors could have caused subscript violations.
14060         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
14061         (hash_initialize): Add 'fail:' label
14062         to free table and return NULL, and use it to simplify code.
14063         Use calloc rather than clearing the storage ourself.
14064         (hash_initialize, hash_rehash): Check for arithmetic overflow in
14065         buffer size calculations.
14066         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
14067         Include <stddef.h>, for size_t.
14068         * lib/hash-pjw.c (hash_pjw): Likewise.
14069         Switch to method described by Bruno Haible.
14070         Include <limits.h>, for CHAR_BIT.
14071         (SIZE_BITS): New macro.
14072
14073 2003-10-23  Paul Eggert  <eggert@twinsun.com>
14074
14075         * m4/getline.m4 (AM_FUNC_GETLINE):
14076         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
14077         hosts.  Problem reported by Derek Robert Price in
14078         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
14079         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
14080         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
14081
14082 2003-10-21  Paul Eggert  <eggert@twinsun.com>
14083
14084         * lib/getndelim2.c (getndelim2): When size calculation overflows,
14085         ceiling the allocation at NMAX bytes rather than silently
14086         discarding input bytes before NMAX is reached.  This makes
14087         a difference only if NMAX exceeds SIZE_MAX / 2.
14088
14089         * lib/obstack.c: Merge from glibc.
14090         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
14091         Add libc_hidden_def (_obstack_newchunk).
14092         (_obstack_free) [! defined _LIBC]: Remove.
14093         [defined _LIBC]: Make a strong alias from obstack_free, rather than
14094         a clone of the function body.
14095         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
14096         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
14097
14098         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
14099         glibc.
14100         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
14101         arg to memcpy.
14102
14103         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
14104         (obstack_ptr_grow_fast, obstack_int_grow_fast):
14105         Don't use lvalue casts, as GCC plans to remove support for them
14106         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
14107         was also present in the non-GCC version, indicating that this
14108         code had always been buggy and had never been widely used.
14109         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
14110         Use the fast variant of each macro, rather than copying the
14111         definiens of the fast variant; that way, we'll be more likely to
14112         catch future bugs in the fast variants.
14113
14114 2003-10-20  Bruno Haible  <bruno@clisp.org>
14115
14116         * modules/wait-process: New file.
14117         * MODULES.html.sh (func_all_modules): Add wait-process.
14118
14119 2003-10-20  Bruno Haible  <bruno@clisp.org>
14120
14121         * m4/wait-process.m4: New file.
14122
14123 2003-10-20  Bruno Haible  <bruno@clisp.org>
14124
14125         * lib/wait-process.h: New file, from GNU gettext.
14126         * lib/wait-process.c: New file, from GNU gettext.
14127
14128 2003-10-19  Jim Meyering  <jim@meyering.net>
14129
14130         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
14131         HPUX 10.20.
14132
14133 2003-10-18  Karl Berry  <karl@gnu.org>
14134
14135         * config/config.guess: update from config.
14136
14137 2003-10-16  Paul Eggert  <eggert@twinsun.com>
14138
14139         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
14140         (getgroups): First arg is int, not size_t.
14141         Don't let 'free' mangle errno.
14142
14143 2003-10-16  Paul Eggert  <eggert@twinsun.com>
14144
14145         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
14146
14147 2003-10-16  Karl Berry  <karl@gnu.org>
14148
14149         * config/config.{guess,sub}: update from config.
14150
14151 2003-10-16  Jim Meyering  <jim@meyering.net>
14152
14153         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
14154         memcpy.
14155
14156 2003-10-15  Paul Eggert  <eggert@twinsun.com>
14157
14158         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
14159         (SIZE_MAX): Remove.
14160         (new_exclude, add_exclude_file): Initial size no longer needs to
14161         be a power of 2.
14162         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
14163         our own address arithmetic overflow checking.
14164
14165         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
14166         (fnmatch): Do not alloca more than 2000 wide characters;
14167         instead, use malloc for large buffers.
14168         Check for address arithmetic overflow, and return -1
14169         with errno set to ENOMEM in that case.
14170         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
14171         (NEW_PATTERN): Do not alloca more than 8000 bytes;
14172         instead, return -1.  Check for address arithmetic overflow.
14173
14174 2003-10-14  Paul Eggert  <eggert@twinsun.com>
14175
14176         Handle invalid suffixes and overflow independently, so that
14177         callers can treat them independently as needed.  Fix some bugs in
14178         suffix handling, e.g., "100k@" was not diagnosed as an invalid
14179         suffix for a human-readable blocksize.  The major caller-visible
14180         change is the addition of a new
14181         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
14182         that both overflow and suffix chars were found.
14183
14184         * lib/human.c (humblock): Don't check separately for invalid suffix
14185         char; that is xstrtoumax's job (now that its bug is fixed).
14186         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
14187         INTMAX_MAX]: New macros.
14188         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
14189         TYPE_MAXIMUM): New macros.
14190         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
14191         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
14192         if overflow occurs, as it's what __strtol does and it's more useful
14193         in practice.
14194         (__xstrtol): If __strtol reports some error other than ERANGE,
14195         reflect it to the caller as LONGINT_INVALID.  If it reports
14196         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
14197         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
14198         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
14199         value.
14200         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
14201         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
14202         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
14203         [defined UINTMAX_MAX]: New macros.
14204
14205 2003-10-14  Bruno Haible  <bruno@clisp.org>
14206
14207         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
14208
14209 2003-10-14  Bruno Haible  <bruno@clisp.org>
14210
14211         * m4/sig_atomic_t: New file, from GNU gettext.
14212         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
14213
14214 2003-10-14  Bruno Haible  <bruno@clisp.org>
14215
14216         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
14217         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
14218         Also use volatile where needed.
14219
14220 2003-10-12  Paul Eggert  <eggert@twinsun.com>
14221
14222         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
14223         Change maintainer from Bruno Haible to 'all'.
14224
14225 2003-10-12  Paul Eggert  <eggert@twinsun.com>
14226
14227         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
14228
14229 2003-10-12  Paul Eggert  <eggert@twinsun.com>
14230
14231         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
14232         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
14233         and define in terms of the other primitives.
14234         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
14235         (SIZE_MAX): Define if not already defined.
14236         (array_size_overflow): New function.
14237         (xalloc_die): Abort instead of exiting if 'error' returns.
14238         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
14239         (xmalloc, xrealloc): Use them.
14240         (xcalloc): Check for address arithmetic overflow.
14241         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
14242         a bit faster than strcpy.
14243
14244 2003-10-10  Simon Josefsson  <jas@extundo.com>
14245
14246         * modules/argp (Depends-on): Add restrict and strcase.
14247
14248 2003-10-10  Simon Josefsson  <jas@extundo.com>
14249
14250         * m4/argp.m4: Add AC_C_INLINE.
14251
14252 2003-10-08  Paul Eggert  <eggert@twinsun.com>
14253
14254         Merge getpass from libc, plus a few fixes.
14255
14256         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
14257         Include <stdbool.h>.
14258         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
14259         __fsetlocking to empty.
14260         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
14261         do include <bits/libc-lock.h>.
14262         Do not include <fcntl.h>; not needed.
14263         [_LIBC]: Include <wchar.h>.
14264         (NOTCANCEL_MODE): New macro.
14265         (flockfile, funlockfile) [_LIBC]: New macros.
14266         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
14267         [!_LIBC]: New macros.
14268         (call_fclose): New function.
14269         (getpass): Use it.  Save tty stream separately; this simplifies the
14270         code and makes it more reliable if stdin happens to equal stdout.
14271         Invoke __fsetlocking on tty.
14272         Handle thread cancellation if needed.
14273         Namespace cleanup (use __tcgetattr, __getline).
14274         Use bool for Booleans.
14275         [USE_IN_LIBIO]: Handle wide streams.
14276         [!_LIBC]: Unconditionally do the fseek, since we don't know what
14277         stream might go where.
14278
14279         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
14280         doesn't have to include <stdio.h> before us.
14281         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
14282         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
14283         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
14284         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
14285         if not declared, so that we can use getpass.c code from libc without
14286         rewriting it.
14287         (flockfile, ftrylockfile, funlockfile): New macros.
14288
14289 2003-10-08  Paul Eggert  <eggert@twinsun.com>
14290
14291         * modules/getpass: Depend on stdbool.
14292
14293 2003-10-08  Paul Eggert  <eggert@twinsun.com>
14294
14295         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
14296
14297 2003-10-07  Karl Berry  <karl@gnu.org>
14298
14299         * config/config.{guess,sub}: update from config.
14300
14301 2003-10-06  Jim Meyering  <jim@meyering.net>
14302             Bruno Haible  <bruno@clisp.org>
14303
14304         This lets translators provide better translations for the
14305         "Written by ..." part of --version output.
14306         * lib/version-etc.h: Include stdarg.h.
14307         (version_etc_copyright): Declare as readonly.
14308         (version_etc): Make this function variadic with a NULL-terminated list
14309         of author name strings.
14310         (version_etc_va): New declaration.
14311         * lib/version-etc.c: Include stdarg.h, stdlib.h.
14312         (version_etc_copyright): Declare as readonly.
14313         (version_etc_va): New function. Provide a different translatable string
14314         for each possible number of authors < 10. Abbreviate when there are 10
14315         authors or more.
14316         (version_etc): Make this function variadic. Call version_etc_va.
14317         Suggestion from Gary V. Vaughan.
14318
14319         * lib/long-options.h (parse_long_options): Change prototype: the
14320         authors string is moved to the end and becomes variadic.
14321         * lib/long-options.c: Include stdarg.h.
14322         (parse_long_options): Make this function variadic, too.
14323         Call version_etc_va, not version_etc.
14324
14325 2003-10-06  Bruno Haible  <bruno@clisp.org>
14326
14327         * modules/version-etc-2: Remove file.
14328         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
14329
14330 2003-10-06  Bruno Haible  <bruno@clisp.org>
14331
14332         * modules/fatal-signal: New file.
14333         * MODULES.html.sh (func_all_modules): Add fatal-signal.
14334
14335 2003-10-06  Bruno Haible  <bruno@clisp.org>
14336
14337         * m4/fatal-signal.m4: New file.
14338         * m4/signalblocking.m4: New file, from GNU gettext.
14339
14340 2003-10-06  Bruno Haible  <bruno@clisp.org>
14341
14342         * lib/version-etc-2.h: Remove file.
14343         * lib/version-etc-2.c: Remove file.
14344
14345 2003-10-06  Bruno Haible  <bruno@clisp.org>
14346
14347         * lib/fatal-signal.h: New file, from GNU gettext.
14348         * lib/fatal-signal.c: New file, from GNU gettext.
14349
14350 2003-10-05  Paul Eggert  <eggert@twinsun.com>
14351
14352         * README: Rework advice for preventing empty .o files.
14353         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
14354         not <sys/types.h>.
14355
14356 2003-10-04  Karl Berry  <karl@gnu.org>
14357
14358         * lib/argp*: update from libc.
14359
14360 2003-10-04  Karl Berry  <karl@gnu.org>
14361
14362         * config/config.{guess,sub}: update from config.
14363
14364 2003-10-02  Bruno Haible  <bruno@clisp.org>
14365
14366         * modules/lchown (Include): Add lchown.h.
14367         * modules/time_r (Include): Use "..." syntax.
14368         * modules/xgetdomainname (Include): Add xgetdomainname.h.
14369
14370 2003-10-01  Simon Josefsson  <jas@extundo.com>
14371
14372         * MODULES.html.sh (func_all_modules): Move gethostname from section
14373         'based on' to section 'lacking' POSIX:2001.
14374
14375 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
14376
14377         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
14378         to output mode on the same stream.
14379
14380 2003-09-29  Paul Eggert  <eggert@twinsun.com>
14381
14382         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
14383         Fix arg typo in previous patch.
14384
14385 2003-09-28  Jim Meyering  <jim@meyering.net>
14386
14387         * lib/error.c: Correct cpp indentation.
14388
14389 2003-09-27  Paul Eggert  <eggert@twinsun.com>
14390
14391         * modules/free: New file.
14392
14393 2003-09-27  Paul Eggert  <eggert@twinsun.com>
14394
14395         * m4/free.m4: New file.
14396
14397 2003-09-27  Paul Eggert  <eggert@twinsun.com>
14398
14399         * lib/minmax.h (MIN, MAX)
14400         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
14401         Omit the special code that used __typeof__, since we worry that
14402         it could be more trouble than it's worth.  See:
14403         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
14404         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
14405
14406         * lib/free.c: New file.
14407
14408 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
14409
14410         Trivial fixes to Makefile.am parts of module listings.
14411         * modules/strstr: Append strstr.h to lib_SOURCES.
14412         * modules/strcase: Likewise, for strcase.h.
14413
14414 2003-09-27  Karl Berry  <karl@gnu.org>
14415
14416         * config/mkinstalldirs: update from automake.
14417
14418 2003-09-26  Paul Eggert  <eggert@twinsun.com>
14419
14420         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
14421         (error_tail): Do not loop, reallocating temporary buffer, since
14422         the output cannot contain more wide characters than the input
14423         contains bytes, the size must be big enough already.  This avoids
14424         one potential size overflow calculation.  Check for size overflow
14425         when calculating temporary buffer size.  Free temporary buffer
14426         when done, if it was allocated with malloc; this plugs a memory
14427         leak.  Remove casts from void * to pointers, that are no longer
14428         needed now that we're assuming C89 or better.
14429
14430         Merge error changes from glibc.
14431
14432         * lib/error.c, error.h: Update copyright notice header to match glibc.
14433         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
14434         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
14435         Disable cancellation while printing error.
14436         * lib/error.h: Prepend __ to parameter names.
14437
14438 2003-09-26  Jim Meyering  <jim@meyering.net>
14439
14440         * lib/error.c (error_tail): Move some declarations
14441         into inner scope where the local variables are used.
14442
14443 2003-09-26  Bruno Haible  <bruno@clisp.org>
14444
14445         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
14446         stpncpy().
14447         Don't define stpncpy through config.h; it's now done through stpncpy.h.
14448
14449 2003-09-26  Bruno Haible  <bruno@clisp.org>
14450
14451         * lib/stpncpy.h (gnu_stpncpy): New declaration.
14452         (stpncpy): Define as alias for gnu_stpncpy.
14453         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
14454
14455 2003-09-25  Simon Josefsson  <jas@extundo.com>
14456
14457         * lib/xgetdomainname.h: New file.
14458         * lib/xgetdomainname.c: New file.
14459
14460 2003-09-25  Simon Josefsson  <jas@extundo.com>
14461             Bruno Haible  <bruno@clisp.org>
14462
14463         * modules/getdomainname: New file.
14464         * modules/xgetdomainname: New file.
14465         * MODULES.html.sh (func_all_modules): Add getdomainname,
14466         xgetdomainname.
14467
14468 2003-09-25  Simon Josefsson  <jas@extundo.com>
14469             Bruno Haible  <bruno@clisp.org>
14470
14471         * m4/getdomainname.m4: New file.
14472
14473 2003-09-25  Simon Josefsson  <jas@extundo.com>
14474             Bruno Haible  <bruno@clisp.org>
14475
14476         * lib/getdomainname.h: New file.
14477         * lib/getdomainname.c: New file.
14478
14479 2003-09-25  Karl Berry  <karl@gnu.org>
14480
14481         * lib/argp-fmtstream.c, argp-help.c: update from libc.
14482
14483 2003-09-25  Karl Berry  <karl@gnu.org>
14484
14485         * config/install-sh: update from automake.
14486
14487 2003-09-25  Bruno Haible  <bruno@clisp.org>
14488
14489         * modules/version-etc-2: New file, from modules/version-etc with
14490         modifications.
14491         * MODULES.html.sh (func_all_modules): Add version-etc-2.
14492
14493 2003-09-25  Bruno Haible  <bruno@clisp.org>
14494
14495         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
14496         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
14497
14498 2003-09-24  Simon Josefsson  <jas@extundo.com>
14499
14500         * modules/xgethostname: Add xgethostname.h.
14501
14502 2003-09-24  Paul Eggert  <eggert@twinsun.com>
14503
14504         * lib/linebuffer.c (freebuffer): Don't free the argument, just
14505         the buffer associated with the argument.  Bug reported by
14506         Simon Josefsson.
14507
14508 2003-09-24  Paul Eggert  <eggert@twinsun.com>
14509
14510         * README: Document assumptions that 'int' is at least 32 bits
14511         wide, that integer arithmetic is 2's complement without overflow,
14512         that there are no holes in integer values, that adding sizes of
14513         two nonoverlapping objects can't overflow, and that all-bits-zero
14514         yields scalar zero.  Fix spelling and capitalization typos.
14515
14516 2003-09-19  Karl Berry  <karl@gnu.org>
14517
14518         * lib/argp.h: update from libc.
14519
14520 2003-09-17  Paul Eggert  <eggert@twinsun.com>
14521
14522         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
14523         to avoid spurious warnings like "AC_RUN_IFELSE was called before
14524         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
14525
14526 2003-09-17  Paul Eggert  <eggert@twinsun.com>
14527
14528         * gnulib-tool: Use "test -h", not "test -L", for portability
14529         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
14530         (tags_regexp): Remove, since \| doesn't conform to POSIX.
14531         (sed_extract_prog): Issue s commands one-by-one, rather than
14532         using \| in one s command.
14533
14534 2003-09-16  Paul Eggert  <eggert@twinsun.com>
14535
14536         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
14537         input error, instead of returning NULL the next time we are called
14538         (and therefore losing track of errno).
14539
14540 2003-09-16  Bruno Haible  <bruno@clisp.org>
14541
14542         * gnulib-tool (func_create_testdir): Warn about duplicated
14543         dependencies.
14544
14545 2003-09-15  Paul Eggert  <eggert@twinsun.com>
14546
14547         * modules/argmatch, modules/fatal, modules/obstack,
14548         modules/xalloc, modules/xgethostname: Sort dependencies by
14549         importance, not alphabetically.
14550
14551 2003-09-15  Paul Eggert  <eggert@twinsun.com>
14552
14553         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
14554         fails, so that the caller gets the proper errno.
14555
14556         * lib/readutmp.c (read_utmp): Likewise.
14557         Check for fstat error.  Close stream and free storage
14558         when failing.
14559
14560 2003-09-14  Karl Berry  <karl@gnu.org>
14561
14562         * config/srclist.txt (strdup.c): disable for c89 changes.
14563
14564 2003-09-14  Jim Meyering  <jim@meyering.net>
14565
14566         * lib/getloadavg.c: Correct cpp indentation.
14567         * lib/strdup.c: Likewise.
14568         * lib/vasnprintf.c: Likewise.
14569
14570 2003-09-14  Bruno Haible  <bruno@clisp.org>
14571
14572         * modules/fwriteerror: New file.
14573         * MODULES.html.sh (func_all_modules): Add fwriteerror.
14574
14575 2003-09-14  Bruno Haible  <bruno@clisp.org>
14576
14577         * lib/fwriteerror.h: New file.
14578         * lib/fwriteerror.c: New file.
14579
14580 2003-09-12  Paul Eggert  <eggert@twinsun.com>
14581
14582         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
14583         modules/xgethostname, modules/xalloc: Depend on exit.
14584
14585 2003-09-12  Paul Eggert  <eggert@twinsun.com>
14586
14587         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
14588
14589         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
14590         and AC_MINIX, too, so that their extensions are available.
14591
14592         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
14593         This macro has been superseded by gl_BACKUPFILE.
14594
14595         More patches to assume C89 or better.
14596
14597         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
14598
14599         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
14600         unconditionally.
14601         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
14602         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
14603         Include <string.h>, <stdlib.h> unconditionally.
14604         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
14605         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
14606         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
14607         headers or for string.h.
14608         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
14609         or strtoul.
14610
14611         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
14612         headers.
14613         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
14614         * m4/userspec.m4 (gl_USERSPEC): Likewise.
14615         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
14616         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
14617         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14618         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
14619         memcpy, memset.
14620         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
14621         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
14622         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
14623         strtol.
14624         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
14625         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
14626         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
14627         strtoul.
14628
14629 2003-09-12  Paul Eggert  <eggert@twinsun.com>
14630
14631         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
14632         * lib/obstack.c [!defined _LIBC]: Likewise.
14633         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
14634         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
14635         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
14636
14637         More changes to assume C89 or better.
14638
14639         * lib/error.c (error_tail): Assume vprintf.
14640
14641         * lib/argmatch.c (getenv): Remove decl.
14642         * lib/progreloc.c (get_full_program_name): Define via prototype.
14643         * lib/setenv.c (clearenv): Likewise.
14644         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
14645         needed.
14646         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
14647         (malloc, memcpy): Remove decls.
14648         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
14649         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
14650         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
14651         (memcpy): Remove macro.
14652         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
14653         (__P): Remove.  All uses removed.
14654         (PTR): Remove.  All uses changed to void *.
14655         (CHAR_BIT, NULL): Remove.
14656         (spaces, zeros, memset_space, memset_zero)
14657         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
14658         Remove.
14659         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
14660         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
14661         Define with prototype.
14662         Remove now-unnecessary prototype decl.
14663         (extra_args_spec): Assume ANSI C.  All uses changed.
14664         (extra_args_spec_iso): Remove.
14665         (my_strftime, emacs_strftimeu): Define via prototype.
14666         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
14667         unconditionally.
14668         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
14669         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
14670         (strtoul, strtol): Remove decls.
14671         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
14672         LONG_MAX): Remove.
14673         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
14674         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
14675         (LOCALE_PARAM_PROTO): New macro.
14676         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
14677         (INTERNAL (strtol), strtol): Define with a prototype.
14678         (PARAMS): Remove.  All uses removed.
14679         * lib/tempname.c: Include <string.h> unconditionally.
14680         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
14681         * lib/xgethostname.c (main): Define with a prototype.
14682         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
14683         Include <stdlib.h> unconditionally.
14684         (calloc, malloc, realloc, free): Remove decls.
14685         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
14686         Include <stdlib.h> unconditionally.  Sort include file names.
14687         (strtod): Remove.
14688         (xstrtod): Define with a prototype.
14689         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
14690         (strtol, strtoul): Remove decls.
14691
14692 2003-09-11  Paul Eggert  <eggert@twinsun.com>
14693
14694         More patches to assume C89 or better.
14695         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
14696         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
14697         string.h, memchr, STDC_HEADERS.
14698
14699 2003-09-11  Paul Eggert  <eggert@twinsun.com>
14700
14701         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
14702         Include <stdlib.h>, <string.h> unconditionally.
14703         Remove now-unnecessary cast to char *.
14704         * lib/strnlen.c: Include <string.h> unconditionally.
14705         * lib/yesno.c (yesno): Define with a prototype.
14706
14707 2003-09-11  Bruno Haible  <bruno@clisp.org>
14708
14709         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
14710
14711 2003-09-10  Jim Meyering  <jim@meyering.net>
14712
14713         * lib/error.c: Correct indentation of cpp directives.
14714
14715 2003-09-10  Bruno Haible  <bruno@clisp.org>
14716
14717         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
14718         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
14719         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
14720         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
14721         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
14722         <stdlib.h> and <string.h> checks.
14723         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
14724         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
14725
14726 2003-09-10  Bruno Haible  <bruno@clisp.org>
14727
14728         * lib/strcspn.c: Include <string.h> unconditionally.
14729         * lib/strpbrk.c: Include <string.h> unconditionally.
14730         * lib/strstr.c: Include <string.h> unconditionally.
14731         * lib/unicodeio.c: Include <string.h> unconditionally.
14732         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
14733         * lib/unsetenv.c: Likewise.
14734         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
14735         * lib/yesno.c: Include <stdlib.h> unconditionally.
14736         (rpmatch): Add prototype.
14737
14738 2003-09-09  Paul Eggert  <eggert@twinsun.com>
14739
14740         More patches to assume C89 or better.
14741         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
14742         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
14743         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
14744         or for string.h.
14745         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
14746         stdlib.h.
14747         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
14748         C headers.
14749         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
14750         string.h.
14751         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
14752         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
14753         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
14754         or for string.h.
14755         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
14756         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
14757         C headers.
14758         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
14759         memcpy.
14760         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
14761         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
14762         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
14763         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
14764         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
14765         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
14766         string.h, free.
14767         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
14768         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
14769         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
14770         C headers, or for string.h.
14771         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
14772         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
14773         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
14774         headers, memory.h, stdlib.h, string.h, strings.h.
14775         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
14776         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
14777         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
14778         strchr.
14779         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
14780         headers, memory.h, string.h.
14781         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
14782         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
14783         free.
14784         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
14785         headers.
14786         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
14787         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
14788         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
14789         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
14790         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
14791
14792 2003-09-09  Paul Eggert  <eggert@twinsun.com>
14793
14794         More K&R removal.
14795
14796         * lib/acosl.c (main): Use a prototype.
14797         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
14798         tanl.c: Likewise.
14799
14800         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
14801
14802         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
14803         (getopt, etopt_long, getopt_long_only, _getopt_internal)
14804         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
14805         with a prototype.
14806         * lib/getopt.c (const): Remove macro.
14807         Include <string.h> unconditionally.
14808         (my_index): Remove; all uses changed to strchr.
14809         (strlen): Remove decl.
14810         (exchange): Remove forward decl; no longer needed.
14811         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
14812         Define with prototype.
14813         * lib/getopt1.c (const): Remove macro.
14814         (getopt_long, getopt_long_only, main): Define with prototype.
14815
14816         * lib/getugroups.c: Include <string.h> unconditionally.
14817
14818         * lib/getusershell.c: Include <stdlib.h> unconditionally.
14819         (getusershell, setusershell, endusershell, readname, main):
14820         Define with prototypes.
14821
14822         * lib/group-member.c: Include group-member.h first.
14823         Include <stdlib.h> unconditionally.
14824
14825         * lib/hard-locale.c: Include hard-locale.h first.
14826         Include <stdlib.h>, <string.h> unconditionally.
14827
14828         * lib/hash.c (free, malloc): Remove decls.
14829         Include <stdlib.h> unconditionally.
14830
14831         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
14832         (getenv): Do not declare.
14833
14834         * lib/idcache.c: Include <string.h> unconditionally.
14835
14836         * lib/long-options.c: Include long-options.h first, to test interface.
14837         Include <stdlib.h> unconditionally.
14838
14839         * lib/makepath.c: Include makepath.h first, to test interface.
14840         Include <stdlib.h> and <string.h> unconditionally.
14841
14842         * lib/linebuffer.c: Include <stdlib.h>.
14843         (free): Remove decl.
14844
14845         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
14846         stddef.h. rpl_malloc returns void *, not char *.
14847         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
14848         prototype.
14849
14850         * lib/md5.h: Include <limits.h> unconditionally.
14851         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
14852         (__P): Remove; all uses removed.
14853         * lib/md5.c: Include "md5.h" first.
14854         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
14855         md5_buffer, md5_process_bytes, md5_process_block):
14856         Define with prototypes.
14857         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
14858         * lib/sha.c: Include "sha.h" first.
14859         Include <stdlib.h>, <string.h> unconditionally.
14860
14861         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
14862         * lib/memcmp.c (__ptr_t): Likewise.
14863         * lib/memrchr.c (__ptr_t): Likewise.
14864         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
14865         Include <string.h> unconditionally.
14866         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
14867         * lib/memchr.c: Include <stdlib.h> unconditionally.
14868         * lib/memchr.c (LONG_MAX): Remove.
14869         * lib/memrchr.c (LONG_MAX): Likewise.
14870         * lib/memchr.c (__memchr): Define via a prototype.
14871         * lib/memrchr.c (__memrchr): Likewise.
14872         * lib/memcmp.c (__P): Remove, and remove all uses.
14873         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
14874         Remove forward decls; no longer needed.
14875         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
14876         Use types required by C89 in prototype.
14877
14878         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
14879         * lib/savedir.c: Likewise.
14880         * lib/mkdir.c (free): Remove decl.
14881         * lib/rmdir.c (rmdir): Define with a prototype.
14882         * lib/savedir.c: Include savedir.h first, to test interface.
14883
14884         * lib/mktime.c (STDC_HEADERS): Remove.
14885         Include <stdlib.h>, <string.h> unconditionally.
14886
14887         * lib/modechange.c: Include <stdlib.h> unconditionally.
14888         (malloc): Remove decl.
14889
14890         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
14891         (free): Remove decl.
14892
14893         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
14894         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
14895         (This type really should be intptr_t, but that's a C99ism.)
14896         (_obstack_memcpy): Remove: all uses changed to memcpy.
14897         Include <string.h> unconditionally.
14898         (struct obstack): Assume __STDC__ for types of members
14899         chunkfun, freefun, extra_arg.
14900         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
14901         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
14902         obstack_begin, obstack_specify_allocation,
14903         obstack_specify_allocation_with_arg, obstack_chunkfun,
14904         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
14905         Remove unprototyped decls and the macros that use them.
14906         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
14907         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
14908         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
14909         (defined __STDC__ && __STDC__)]:
14910         Remove nonprototyped code.
14911         Include <stdlib.h> unconditionally.
14912         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
14913         _obstack_allocated_p, _obstack_free, obstack_free,
14914         _obstack_memory_used, print_and_abort):
14915         Define using prototypes.
14916         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
14917         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
14918         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
14919         obstack_next_free, obstack_object_size, obstack_room) [0]:
14920         Remove unused, unprototyped code.
14921
14922         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
14923
14924         * lib/physmem.c (physmem_total, physmem_available, main): Define
14925         with prototypes.
14926
14927         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
14928         (main): Define with a prototype.
14929
14930         * lib/posixver.c (getenv): Remove decl.
14931
14932         * lib/putenv.c (malloc): Returns void *, not char *.
14933         Include <string.h> unconditionally.
14934         (strchr, memcpy, NULL): Do not define.
14935
14936         * lib/readtokens.c: Include readtokens.h first, to test interface.
14937         Include <stdlib.h>, <string.h> unconditionally.
14938         (init_tokenbuffer): Define with a prototype.
14939
14940         * lib/regex.c (PARAMS): Remove.  All uses removed.
14941         All uses of _RE_ARGS removed, too.
14942         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14943         unconditionally.
14944         (bzero): Assume memset exists.
14945         (memcmp, memcpy, NULL): Remove.
14946         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
14947         char, or assignments to local vars of type signed char.
14948         (init_syntax_once, PREFIX(extract_number_and_incr),
14949         PREFIX(print_partial_compiled_pattern),
14950         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
14951         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
14952         PREFIX(regex_grow_registers), PREFIX(regex_compile),
14953         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
14954         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
14955         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
14956         wcs_compile_range, byte_compile_range, truncate_wchar,
14957         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
14958         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
14959         count_mbs_length, wcs_re_match_2_internal,
14960         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
14961         PREFIX(alt_match_null_string_p),
14962         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
14963         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
14964         regfree, PREFIX(extract_number)): Define with prototype.  Remove
14965         now-unnecessary declaration, if any.
14966         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
14967         regcomp, regexec):
14968         Remove now-unnecessary casts among pointer types.
14969         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
14970
14971         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
14972         (free): Remove decl.
14973
14974         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
14975
14976         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
14977         (free): Remove decl.
14978
14979         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
14980         * lib/xgetcwd.c: Likewise.
14981
14982         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
14983         (free): Remove decl.
14984
14985         * lib/strchrnul.c (strchrnul): Define with a prototype.
14986         Fix bug: c_in was not converted to char before searching.
14987
14988         The following changes are not K&R related:
14989
14990         * lib/group-member.h: Include <sys/types.h>, so that this file is
14991         self-contained.
14992         * lib/makepath.h: Likewise.
14993
14994         * lib/getusershell.c (readname, default_index, line_size, readname):
14995         Use size_t, not int, for sizes.
14996         (readname): If the size overflows, report an error instead of
14997         looping forever.
14998
14999 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15000
15001         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
15002         libc.
15003
15004 2003-09-09  Paul Eggert  <eggert@twinsun.com>
15005
15006         * README: New section: portability guidelines.
15007
15008 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15009
15010         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
15011         C89 spec.
15012
15013 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
15014
15015         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
15016
15017 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15018
15019         Assume C89 or better; remove K&R cruft.
15020         A few of these changes were first proposed by Derek Robert Price
15021         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
15022
15023         * lib/addext.c: Include <string.h> unconditionally.
15024         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
15025         Don't declare getenv or malloc.
15026
15027         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
15028         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
15029         (NULL): Remove.
15030         (find_stack_direction, alloca): Use prototypes.
15031
15032         * lib/atexit.c (atexit): Define using a prototype.
15033
15034         * lib/basename.c, dirname.c, stripslash.c:
15035         Include <string.h> unconditionally.
15036
15037         * lib/bcopy.c: Include <stddef.h>.
15038         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
15039
15040         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
15041
15042         * lib/error.h (error, error_at_line, error_print_progname)
15043         [! (defined (__STDC__) && __STDC__)]: Remove decls.
15044         * lib/error.c: Include error.h first, to check interface.
15045         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
15046         (VA_START): Remove; all uses changeed to va_start.
15047         (exit, strerror): Remove decls.
15048         (error_print_progname): Prototype uncondionally.
15049         Don't include <errno.h>; no longer needed.
15050         (private_strerror): Remove.
15051         (error_tail): Always define.
15052         (error, error_at_line): Assume C89 or better; always use prototypes.
15053         * lib/fatal.c: Include "fatal.h" first, to test interface.
15054         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
15055         (VA_START): Remove; all uses changed to va_start.
15056         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
15057         this case.
15058         (exit): Remove decl.
15059         (fatal): Prototype unconditionally.  Assume va_start works.
15060         Abort at end, to pacify gcc.
15061
15062         * lib/euidaccess.c (main): Define with a prototype.
15063
15064         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
15065
15066         * lib/exitfail.c: Include <stdlib.h> unconditionally.
15067
15068         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
15069         prototypes.
15070         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
15071         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
15072         (getenv): Remove decl.
15073         (fnmatch): Define using a prototype.
15074         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
15075         (FCT): Define using a prototype.
15076
15077         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
15078
15079         * lib/gethostname.c: Include <stddef.h>.
15080         (gethostname): Define with prototype.  Length is size_t, not int.
15081
15082 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15083
15084         Assume C89 or better; remove K&R cruft.
15085         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
15086         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
15087         string.h, getenv, malloc.
15088         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
15089         headers.
15090         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
15091         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
15092         do not check for strerror.
15093         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
15094         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
15095         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
15096         do not check for doprnt or vprintf.
15097         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
15098         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
15099
15100 2003-09-08  Paul Eggert  <eggert@twinsun.com>
15101
15102         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
15103         getversion.c should have been removed then, but was accidentally
15104         preserved.
15105
15106         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
15107         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
15108
15109 2003-09-08  Karl Berry  <karl@gnu.org>
15110
15111         * config/config.sub, config.guess, srclistvars.sh: update from savannah
15112                 config, forget about prep.
15113
15114         * config/depcomp, missing: update from automake.
15115
15116 2003-09-07  Paul Eggert  <eggert@twinsun.com>
15117
15118         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
15119         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
15120
15121 2003-09-07  Paul Eggert  <eggert@twinsun.com>
15122
15123         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
15124         copy_tm_result.  Bug reported by Simon Josefsson in
15125         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
15126
15127 2003-09-06  Paul Eggert  <eggert@twinsun.com>
15128
15129         * m4/time_r.m4: New file.
15130         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
15131         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
15132         is. Check for timegm declaration.
15133         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
15134         Do not check for gmtime_r.
15135         Replace mktime if __mktime_internal does not exist and if mktime
15136         hasn't been replaced already.
15137
15138 2003-09-06  Paul Eggert  <eggert@twinsun.com>
15139
15140         * lib/time_r.c, time_r.h: New files.
15141
15142         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
15143         __localtime_r.
15144         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
15145         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
15146
15147         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
15148         __gmtime_r.
15149         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
15150         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
15151         Include <time_r.h>.
15152
15153         * lib/timegm.c: Switch to glibc implementation, with the following
15154         changes:
15155         [defined HAVE_CONFIG_H]: Include <config.h>.
15156         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
15157         (__mktime_internal) [!defined _LIBC]: New decl.
15158         (__gmtime_r) [!defined _LIBC]: New macro and function.
15159         (timegm): Use a prototype, since gnulib assumes C89.
15160         Do not bother declaring tmp to be const, as it's not really usefu.
15161         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
15162         (timegm): Declare only if HAVE_DECL_TIMEGM.
15163
15164 2003-09-06  Paul Eggert  <eggert@twinsun.com>
15165
15166         * MODULES.html.sh (func_all_modules): Add time_r.
15167         * modules/time_r: New file.
15168         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
15169         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
15170
15171 2003-09-03  Paul Eggert  <eggert@twinsun.com>
15172
15173         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
15174         Bug reported by Lute Kamstra in
15175         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
15176
15177         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
15178         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
15179         course with correspondingly smaller numbers for tomorrow and
15180         yesterday.  From Tadayoshi Funaba.  Originally installed into
15181         sh-utils on 1999-08-07, but the patch got lost (I guess during the
15182         coreutils merge?).
15183
15184 2003-08-31  Simon Josefsson  <jas@extundo.com>
15185
15186         * modules/timegm: New file.
15187         * MODULES.html.sh (func_all_modules): Add timegm.
15188
15189 2003-08-31  Simon Josefsson  <jas@extundo.com>
15190
15191         * m4/timegm.m4: New file.
15192
15193 2003-08-31  Simon Josefsson  <jas@extundo.com>
15194
15195         * lib/timegm.h: New file.
15196         * lib/timegm.c: New file.  Based on
15197         wget-1.8.2/src/http.c:mktime_from_utc.
15198
15199 2003-08-31  Karl Berry  <karl@gnu.org>
15200
15201         * lib/argp.h: update from libc.
15202
15203 2003-08-28  Bruno Haible  <bruno@clisp.org>
15204
15205         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
15206         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
15207         followed by '#define fnmatch fnmatch_posix' gives an error.
15208
15209 2003-08-28  Bruno Haible  <bruno@clisp.org>
15210
15211         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
15212         warning on QNX, which defines O_BINARY to 000000.
15213
15214 2003-08-27  Jim Meyering  <jim@meyering.net>
15215
15216         * m4/mkstemp.m4: Require that the system mkstemp be able to create
15217         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
15218         would fail after 32.  Reported by Danny Levinson.  Details here:
15219         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
15220
15221 2003-08-24  Bruno Haible  <bruno@clisp.org>
15222
15223         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
15224         MSVC7 <stdio.h> is included later.
15225
15226 2003-08-22  Simon Josefsson  <jas@extundo.com>
15227
15228         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
15229
15230 2003-08-20  Karl Berry  <karl@gnu.org>
15231
15232         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
15233
15234 2003-08-20  Bruno Haible  <bruno@clisp.org>
15235
15236         * modules/progname: New file.
15237         * MODULES.html.sh (func_all_modules): Add progname.
15238
15239 2003-08-20  Bruno Haible  <bruno@clisp.org>
15240
15241         * lib/progname.h: New file, from GNU gettext.
15242         * lib/progname.c: New file, from GNU gettext.
15243         * lib/progreloc.c: New file, from GNU gettext.
15244
15245 2003-08-19  Jim Meyering  <jim@meyering.net>
15246
15247         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
15248         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
15249
15250 2003-08-19  Bruno Haible  <bruno@clisp.org>
15251
15252         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
15253         more.
15254
15255 2003-08-19  Bruno Haible  <bruno@clisp.org>
15256
15257         * lib/xstrdup.c: Assume <string.h> exists.
15258
15259 2003-08-18  Paul Eggert  <eggert@twinsun.com>
15260
15261         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
15262         in makefile rules.
15263
15264 2003-08-18  Jim Meyering  <jim@meyering.net>
15265
15266         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
15267         * m4/lib-ld.m4: Likewise.
15268
15269 2003-08-18  Jim Meyering  <jim@meyering.net>
15270
15271         * lib/setenv.h: Indent nested cpp directive.
15272         * lib/vasnprintf.c: Remove trailing blanks.
15273
15274 2003-08-17  Simon Josefsson  <jas@extundo.com>
15275
15276         * modules/xstrndup: New file.
15277         * MODULES.html.sh (func_all_modules): Add xstrndup.
15278
15279 2003-08-17  Simon Josefsson  <jas@extundo.com>
15280
15281         * modules/argp: Fix autoconf macro name. Add more dependencies.
15282
15283 2003-08-17  Simon Josefsson  <jas@extundo.com>
15284
15285         * m4/xstrndup.m4: New file.
15286
15287 2003-08-17  Simon Josefsson  <jas@extundo.com>
15288
15289         * m4/argp.m4: New file.
15290
15291 2003-08-17  Simon Josefsson  <jas@extundo.com>
15292             Bruno Haible  <bruno@clisp.org>
15293
15294         * lib/xstrndup.h: New file.
15295         * lib/xstrndup.c: New file.
15296
15297 2003-08-17  Bruno Haible  <bruno@clisp.org>
15298
15299         * modules/strndup (Files, Include): Add lib/strndup.h.
15300
15301 2003-08-17  Bruno Haible  <bruno@clisp.org>
15302
15303         * modules/euidaccess (Files): Add lib/euidaccess.h.
15304
15305 2003-08-17  Bruno Haible  <bruno@clisp.org>
15306
15307         * lib/strndup.h: New file.
15308
15309 2003-08-17  Bruno Haible  <bruno@clisp.org>
15310
15311         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
15312         like AC_GNU_SOURCE.
15313         * modules/extensions (configure.ac): Comment out the invocation of
15314         gl_USE_SYSTEM_EXTENSIONS.
15315
15316 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15317
15318         Merges from coreutils, etc.
15319         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
15320         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
15321         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
15322         fixing a typo.
15323         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
15324         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
15325
15326 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15327
15328         Document merge from coreutils.
15329         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
15330         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
15331         * modules/utime: Add m4/utimes-null.m4.
15332
15333 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15334
15335         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
15336         space, undoing this 2003-08-12 change:
15337         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
15338
15339 2003-08-16  Paul Eggert  <eggert@twinsun.com>
15340
15341         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
15342         strtoul.c from libc, undoing this 2003-08-12 change:
15343         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
15344
15345 2003-08-16  Jim Meyering  <jim@meyering.net>
15346
15347         Merges from coreutils.
15348         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
15349         prefix.  Adjust cache variables similarly.  Create 500 rather than
15350         just 300 files, to exercise bug on Darwin6.5, too.
15351         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
15352         $missing_dir.
15353         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
15354         AM_SYS_POSIX_TERMIOS.
15355         Reported by mkc@mathdogs.com.
15356         Also change use of $am_cv_sys_posix_termios
15357         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
15358         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
15359         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
15360         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
15361         in /proc/mounts until it finds one with matching device number.  This
15362         is unnecessary when the FILE argument *is* a mount point.  No stat call
15363         is necessary in that case.  So, disable the statvfs-testing code on
15364         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
15365         as RedHat bug# 84846.
15366         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
15367         to 1MB, so as not to render systems with no stack size limit (e.g.,
15368         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
15369         Include <unistd.h>.  On some systems,
15370         it is required for the definition of _SC_PAGESIZE.
15371
15372 2003-08-16  Jim Meyering  <jim@meyering.net>
15373
15374         Merge from coreutils.
15375         * lib/xstrtoimax.c: #else #if -> #elif.
15376         * lib/xstrtoumax.c: Likewise.
15377
15378 2003-08-16  Jim Meyering  <jim@meyering.net>
15379
15380         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
15381         * m4/utimes.m4: Removed.
15382         * m4/utimes-null.m4: Renamed from utimes.m4.
15383
15384         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
15385         to 1MB, so as not to render systems with no stack size limit (e.g.,
15386         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
15387         Include <unistd.h>.  On some systems,
15388         it is required for the definition of _SC_PAGESIZE.
15389
15390 2003-08-16  Jim Meyering  <jim@meyering.net>
15391         and Paul Eggert  <eggert@cs.ucla.edu>
15392
15393         Merges from coreutils, etc.
15394
15395         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
15396         using the latest version from cvs.  This avoids problems with #line
15397         directives using a vendor (Sun) compiler.
15398         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
15399         Don't set GETGROUPS_LIB here; now it's
15400         done via getgroups.m4's wrapper function.
15401         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
15402         rather than just in sh-util/configure.in, so that the
15403         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
15404         same.
15405         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
15406         AC_FUNC_GETLOADAVG where to find getloadavg.c.
15407         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
15408         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
15409         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
15410         Remove code that is now done by the newly-required macros.
15411         Append $(EXEEXT) to DF_PROG.
15412         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
15413         Do not invoke or require the following here,
15414         since prereq.m4 or some gnulib .m4 now does this for us:
15415         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
15416         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
15417         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
15418         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
15419         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
15420         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
15421         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
15422         AC_FUNC_OBSTACK.
15423         Do not replace the following functions, as this is now the job
15424         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
15425         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
15426         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
15427         atexit getpass, strdup, getpagesize.
15428         Replace 'raise'.
15429         Do not check for the following functions, as this is now the job
15430         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
15431         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
15432         setregid.
15433         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
15434         Check for sys/sysctl.h.
15435         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
15436         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
15437         of checking for ssize_t ourselves.
15438
15439         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
15440         Require every macro that gnulib/modules/* suggests for us.
15441         (jm_PREREQ_ADDEXT): New macro.
15442         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
15443         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
15444
15445         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
15446         (gl_PHYSMEM): Use it.
15447         Also check for `table' function.
15448         Check for new headers and functions.
15449         Add check for sys/sysmp.h.
15450         With suggestions from Kaveh Ghazi.
15451         Ignore headers that are present but cannot be compiled.  This
15452         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
15453         C 5.4.
15454
15455 2003-08-15  Paul Eggert  <eggert@twinsun.com>
15456
15457         Document merge from coreutils.
15458         * modules/userspec: Depend on posixver.
15459         * modules/strftime: Depend on tzset.
15460
15461 2003-08-15  Paul Eggert  <eggert@twinsun.com>
15462
15463         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
15464         rather than tab, after '#' in shell-script copyright notices.
15465         Suggested by Bruno Haible.
15466
15467 2003-08-15  Paul Eggert  <eggert@twinsun.com>
15468
15469         * config/srclist-update: Use three spaces, rather than tab, after '#'
15470         in shell-script copyright notices.  Suggested by Bruno Haible.
15471         Remove unnecessary parenthesization in regular expression.
15472
15473 2003-08-15  Jim Meyering  <jim@meyering.net>
15474
15475         Merge from coreutils.
15476         * lib/xgethostname.c: Include <stdlib.h>.
15477         (xghostname): Don't exit for anything other than memory-related
15478         failure; just return NULL.
15479         * lib/userspec.c: Include "posixver.h".
15480         (parse_user_spec): Accept `.' as a separator only
15481         in pre-POSIX-200112 mode.
15482         * lib/strtoimax.c: Use #elif rather than #else #if.
15483         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
15484         Remove function, now that we can rely on a working tzset function.
15485         [!_LIBC]: Ensure that the required autoconf test has been run.
15486         [!defined _NL_CURRENT && HAVE_STRFTIME]:
15487         Use underlying_strftime for %r.
15488         * lib/sha.c: Merge in some clean-up and optimization changes from
15489         glibc.
15490         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
15491         Ensure that it is a multiple of 64.
15492         Rearrange loop exit tests so as to avoid performing an
15493         additional fread after encountering an error or EOF.
15494         * lib/realloc.c: Update copyright date.
15495
15496 2003-08-15  Jim Meyering  <jim@meyering.net>
15497         and Paul Eggert  <eggert@twinsun.com>
15498
15499         Merge from coreutils.
15500         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
15501         member but strut utmpx does not.  Needed for AIX 4.3.3.
15502         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
15503
15504 2003-08-15  Jim Meyering  <jim@meyering.net>
15505         and Paul Eggert  <eggert@cs.ucla.edu>
15506
15507         Merges from coreutils, etc.
15508         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
15509         Require gl_FUNC_TZSET_CLOBBER.
15510         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
15511         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
15512         members.
15513
15514 2003-08-14  Paul Eggert  <eggert@twinsun.com>
15515
15516         Help the merge from coreutils.
15517         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
15518         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
15519         * m4/tzset.m4: Use it too.
15520
15521 2003-08-14  Paul Eggert  <eggert@twinsun.com>
15522
15523         * modules/tzset: New file.
15524
15525 2003-08-14  Jim Meyering  <jim@meyering.net>
15526
15527         Merges from coreutils.
15528         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
15529         variable names, rather than @FNMATCH_H@.
15530         * modules/alloca: Likewise for $(ALLOCA_H).
15531
15532         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
15533         the three copies of the literal target, `fnmatch.h'.
15534         * modules/alloca (alloca.h): Likewise.
15535
15536 2003-08-14  Jim Meyering  <jim@meyering.net>
15537
15538         Merge from coreutils.
15539         * m4/tzset.m4: New file.
15540         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
15541         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
15542         otherwise, AIX 5.1 systems would end up using the latter.
15543         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
15544         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
15545         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
15546         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
15547
15548 2003-08-14  Jim Meyering  <jim@meyering.net>
15549
15550         Merge from coreutils.
15551         * lib/obstack.h: Whitespace changes.
15552         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
15553         and xcalloc return values.
15554         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
15555         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
15556         hang on OSF/1 5.1 for DIR on both local and remote file systems.
15557         Reported by (and fix confirmed by) Nelson H. F. Beebe.
15558         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
15559         error from mntctl.
15560         Use mntctl's return value to drive the entry-processing loop, since
15561         we can't rely on the value of the vmt_length member in the last
15562         entry.  On some systems doing so could result in exhausting
15563         virtual memory.  Based in part on a patch from Mike Jetzer.
15564
15565 2003-08-14  Jim Meyering  <jim@meyering.net>
15566         and Paul Eggert  <eggert@twinsun.com>
15567
15568         Merges from coreutils, plus other fixes.
15569         * lib/physmem.c: Merge in portability changes from gcc/libiberty
15570         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
15571         for credits and details.  Thanks to Kaveh Ghazi for helping
15572         to keep these files in sync.
15573         (ARRAY_SIZE): Define it.
15574         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
15575         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
15576         (memcasecmp): Don't assume size_t fits in unsigned int.
15577         Remove casts and duplicate code.
15578         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
15579         (memcpy): Remove definition.
15580         Merge in some clean-up and optimization changes from glibc.
15581         [BLOCKSIZE]: Move definition to top of file.
15582         Ensure that it is a multiple of 64.
15583         Rearrange loop exit tests so as to avoid performing an
15584         additional fread after encountering an error or EOF.
15585         * lib/md5.h (md5_uintptr): Define.
15586         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
15587         return to the initial working directory.  Preserve errno
15588         for caller.
15589         * lib/idcache.c: Include "xalloc.h".
15590         (xmalloc, xrealloc): Remove decls.
15591         (getuser): Remove casts no longer required in C89.
15592         * lib/human.c: Include stdio.h, for sprintf.
15593         * lib/group-member.c: Include "xalloc.h".
15594         (xmalloc, xrealloc): Remove decls.
15595         (get_group_info): Remove casts no longer required in C89.
15596         * lib/getusershell.c (readname): Remove casts no longer required in
15597         C89.
15598         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
15599         * lib/getline.c: Whitespace fix, from coreutils.
15600
15601 2003-08-13  Paul Eggert  <eggert@twinsun.com>
15602
15603         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
15604         Check for isascii.
15605
15606         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
15607         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
15608         Undo previous (whitespace-only) change.
15609
15610 2003-08-13  Paul Eggert  <eggert@twinsun.com>
15611
15612         * lib/exclude.c: Include <ctype.h>
15613         (IN_CTYPE_DOMAIN): New macro.
15614         (is_space): New fn.
15615         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
15616         and empty lines.
15617
15618         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
15619         Undo previous (whitespace-only) change.
15620
15621 2003-08-13  Paul Eggert  <eggert@twinsun.com>
15622
15623         * config/srclist-update: Change update back to the old behavior,
15624         leaving whitespace alone.  Use one 'sed' command rather than a
15625         pipeline.
15626         (fixlicense): Now a variable, not a function.
15627         (remove_trailing_blanks): Remove.
15628         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
15629         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
15630         Undo previous (whitespace-only) change.
15631
15632 2003-08-12  Paul Eggert  <eggert@twinsun.com>
15633
15634         Merge from coreutils.
15635         * modules/euidaccess: Add lib_SOURCES, include for new
15636         file euidaccess.h
15637
15638 2003-08-12  Paul Eggert  <eggert@twinsun.com>
15639
15640         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
15641         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
15642         Normalize leading white space and remove trailing white space.
15643
15644         Merge from coreutils
15645         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
15646
15647         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
15648         0.12.1.  These files are now being upgraded automatically by
15649         ../config/srclist-update.
15650
15651 2003-08-12  Paul Eggert  <eggert@twinsun.com>
15652
15653         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
15654         Normalize leading white space and remove trailing white space.
15655         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
15656         notice, as per ../config/srclist-update.
15657
15658         Merge from coreutils.
15659         * lib/euidaccess.h: New file.
15660         * lib/euidaccess.c: Include it.
15661         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
15662         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
15663         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
15664
15665 2003-08-12  Paul Eggert  <eggert@twinsun.com>
15666
15667         * config/srclist-update: Add copyright notice.
15668         (remove_id_lines, remove_trailing_blanks): New constants.
15669         (fixfile): Use them to normalize spacing a bit in copied files.
15670         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
15671         Normalize leading white space and remove trailing white space.
15672
15673         * config/texinfo.tex: Sync with texinfo.
15674
15675         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
15676         strtoul.c from libc, to merge coreutils whitespace changes.
15677
15678         * config/srclist.txt: Get the following m4 files from gettext:
15679         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
15680         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
15681         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
15682         wint_t.m4.
15683
15684 2003-08-12  Karl Berry  <karl@gnu.org>
15685
15686         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
15687         been made.
15688
15689 2003-08-11  Paul Eggert  <eggert@twinsun.com>
15690
15691         * modules/gnu-source, m4/gnu-source.m4:
15692         Remove; we're assuming Autoconf 2.54 or later now.
15693         Suggested by Bruno Haible.
15694         * MODULES.html.sh (func_all_modules): Remove gnu-source.
15695
15696 2003-08-11  Bruno Haible  <bruno@clisp.org>
15697
15698         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
15699
15700 2003-08-11  Bruno Haible  <bruno@clisp.org>
15701
15702         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
15703         (vasnprintf): Use it instead of wcslen.
15704
15705 2003-08-11  Bruno Haible  <bruno@clisp.org>
15706
15707         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
15708         value to ensure that _Bool promotes to int. Use #define for _Bool when
15709         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
15710
15711 2003-08-10  Karl Berry  <karl@gnu.org>
15712
15713         * lib/regex.h: update from libc (whitespace fix).
15714
15715 2003-08-09  Paul Eggert  <eggert@twinsun.com>
15716
15717         Merge some files from coreutils.  These changes were
15718         originally made by Jim Meyering.
15719         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
15720         many older Unixes require this.
15721         * lib/alloca.c (alloca): Remove cast to argument of free;
15722         no longer needed in C89.
15723         * lib/alloca_.h, regex.h: Fix white space to match
15724         what GNU indent does.
15725
15726 2003-08-09  Paul Eggert  <eggert@twinsun.com>
15727
15728         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
15729         apparently Emacs's Unicode mode got confused before my 2003-08-05
15730         checkin.
15731
15732 2003-08-08  Paul Eggert  <eggert@twinsun.com>
15733
15734         * m4/extensions.m4: New file.
15735         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
15736         Require gl_USE_SYSTEM_EXTENSIONS.
15737         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
15738         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
15739
15740 2003-08-08  Paul Eggert  <eggert@twinsun.com>
15741
15742         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
15743         * modules/extensions, modules/gnu-source: New files.
15744         * modules/timespec, modules/unlocked-io: Depend on extensions.
15745
15746 2003-08-07 Paul Eggert  <eggert@twinsun.com>
15747
15748         * modules/restrict: New file.
15749         * MODULES.html.sh (func_all_modules): Add restrict.
15750         * modules/regex: Depend on restrict.
15751
15752 2003-08-07  Paul Eggert  <eggert@twinsun.com>
15753
15754         * m4/restrict.m4: New file.
15755         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
15756
15757 2003-08-07  Bruno Haible  <bruno@clisp.org>
15758
15759         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
15760         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
15761
15762 2003-08-07  Bruno Haible  <bruno@clisp.org>
15763
15764         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
15765         makes the module 'getndelim2' compatible with the module 'getline'.
15766
15767 2003-08-05  Paul Eggert  <eggert@twinsun.com>
15768
15769         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
15770         byte with "\201" to avoid glitches when editing that source file
15771         with multi-gnome-terminal.
15772
15773 2003-08-05  Paul Eggert  <eggert@twinsun.com>
15774
15775         * lib/bumpalloc.h: Remove.
15776
15777 2003-08-05  Paul Eggert  <eggert@twinsun.com>
15778
15779         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
15780         * modules/bumpalloc: Remove.
15781
15782 2003-08-04  Paul Eggert  <eggert@twinsun.com>
15783
15784         * lib/getloadavg.c: Change copyright notice and spacing to conform to
15785         GNU coding style.
15786
15787         Merge from coreutils.
15788         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
15789         1. From glibc.
15790         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
15791         from Karl Berry, implemented by Jim Meyering.
15792         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
15793         from Dmitry V. Levin.
15794         Remove anachronistic cast of xrealloc.
15795         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
15796         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
15797         type. Otherwise, it wouldn't compile with at least /bin/cc on
15798         ymp-cray-unicos9.0.2.X.
15799         Combine two mostly-identical uses of alloca into one.
15800         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
15801
15802 2003-08-04  Dave Love <d.love@dl.ac.uk>
15803
15804         [From Emacs.]
15805
15806         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
15807         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
15808         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
15809         obsolete NLIST_NAME_UNION.
15810         [__GNU__]: Undef BSD and FSCALE.
15811         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
15812
15813 2003-08-03  Paul Eggert  <eggert@twinsun.com>
15814
15815         * lib/stdbool_.h (_Bool): Make it signed char, instead of
15816         an enum type, so that it's guaranteed to promote to int.  See:
15817         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
15818
15819 2003-08-03  Karl Berry  <karl@gnu.org>
15820
15821         * config/depcomp: update from automake.
15822
15823 2003-07-31  Paul Eggert  <eggert@twinsun.com>
15824
15825         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
15826         (strerror): Don't assume that a printable int fits in 14 bytes.
15827
15828 2003-07-31  Bruno Haible  <bruno@clisp.org>
15829
15830         * modules/getpass-gnu: New file.
15831         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
15832
15833 2003-07-31  Bruno Haible  <bruno@clisp.org>
15834
15835         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
15836
15837 2003-07-24  Karl Berry  <karl@gnu.org>
15838
15839         * config/missing: update from automake.
15840
15841 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
15842             Bruno Haible  <bruno@clisp.org>
15843
15844         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
15845         * lib/getline.c (getline, getdelim): Likewise.
15846         Remove _GNU_SOURCE define; now it's defined in config.h through
15847         m4/getline.m4.
15848
15849 2003-07-23  Karl Berry  <karl@gnu.org>
15850
15851         * config/config.sub: update from prep.
15852
15853 2003-07-22  Paul Eggert  <eggert@twinsun.com>
15854
15855         * modules/xalloc (Depends-on): Add exitfail.
15856         * modules/xmemcoll: Likewise.
15857
15858 2003-07-22  Paul Eggert  <eggert@twinsun.com>
15859
15860         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
15861         over-parenthesization in macros.
15862
15863         Sync with coreutils.
15864
15865         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
15866         required by C99.
15867
15868         Use `exit_failure' for xalloc and xmemcoll instead of their own
15869         private exit-failure variables.
15870         * lib/xalloc.h (xalloc_exit_failure): Remove.
15871         * lib/xmalloc.c: Likewise.  Include exitfail.h.
15872         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
15873         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
15874         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
15875         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
15876
15877 2003-07-20  Jim Meyering  <jim@meyering.net>
15878
15879         * modules/closeout (Depends-on): Add exitfail.
15880         Suggestion from Bruno Haible.
15881
15882 2003-07-19  Karl Berry  <karl@gnu.org>
15883
15884         * config/config.sub: update from prep.
15885
15886 2003-07-18  Paul Eggert  <eggert@twinsun.com>
15887
15888         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
15889         Remove.
15890         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
15891         to test that it can stand by itself.  Include "exitfail.h".
15892         Clients should set exit_failure instead.
15893         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
15894
15895 2003-07-18  Bruno Haible  <bruno@clisp.org>
15896
15897         * modules/getndelim2: New file.
15898         * modules/getline: Share files with module getndelim2.
15899         * modules/getnline: Depend on getndelim2 instead of sharing files with
15900         it. Add getnline.c to lib_SOURCES.
15901         * MODULES.html.sh (func_all_modules): Add getndelim2.
15902
15903 2003-07-18  Bruno Haible  <bruno@clisp.org>
15904
15905         * m4/getndelim2.m4: New file.
15906         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
15907         invoke gl_PREREQ_GETNDELIM2.
15908         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
15909         gl_PREREQ_GETNDELIM2.
15910         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
15911         gl_GETNDELIM2.
15912
15913 2003-07-18  Bruno Haible  <bruno@clisp.org>
15914
15915         * lib/getndelim2.h: New file.
15916         * lib/getndelim2.c: Make into a module of its own. Include config.h,
15917         getndelim2.h.
15918         (getndelim2): Make non-static. Change return type to ssize_t.
15919         * lib/getline.h: Change argument names.
15920         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
15921         * lib/getnline.c: Include getndelim2.h.
15922
15923 2003-07-18  Andreas Schwab  <schwab@suse.de>
15924
15925         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
15926
15927 2003-07-17  Karl Berry  <karl@gnu.org>
15928
15929         * config/config.sub: update from prep.
15930
15931 2003-07-17  Bruno Haible  <bruno@clisp.org>
15932
15933         * modules/getnline: New file.
15934         * modules/getline: Add lib/getndelim2.c to source file list.
15935         * MODULES.html.sh (func_all_modules): Add getnline.
15936
15937 2003-07-17  Bruno Haible  <bruno@clisp.org>
15938
15939         * m4/getnline.m4: New file.
15940
15941 2003-07-17  Bruno Haible  <bruno@clisp.org>
15942
15943         * m4/Makefile.am.in: Remove file.
15944         * m4/Makefile.am: Remove file.
15945         * m4/Makefile.in: Remove file.
15946
15947 2003-07-17  Bruno Haible  <bruno@clisp.org>
15948
15949         * lib/getnline.h: New file.
15950         * lib/getnline.c: New file.
15951         * lib/getndelim2.c: New file, extracted from getline.c.
15952         (getndelim2): Renamed from getdelim2, with added nmax argument.
15953         * lib/getline.c: Include getndelim2.c.
15954         (getdelim2): Moved out to getndelim2.c.
15955         (getline, getdelim): Update.
15956
15957 2003-07-17  Bruno Haible  <bruno@clisp.org>
15958
15959         * lib/Makefile.am: Remove file.
15960         * lib/Makefile.in: Remove file.
15961
15962 2003-07-17  Bruno Haible  <bruno@clisp.org>
15963
15964         * configure.in: Remove file.
15965         * Makefile.in: Remove file.
15966
15967 2003-07-17  Bruno Haible  <bruno@clisp.org>
15968
15969         * MODULES.html.sh: Put the </BODY> right before </HTML>.
15970
15971 2003-07-16  Karl Berry  <karl@gnu.org>
15972
15973         * config/srclist-update: was running fixlicense twice, which caused
15974                 texinfo.tex to be nullified for some reason.  Simplify,
15975                 $gplsrc is no longer needed as far as I can see?
15976
15977 2003-07-16  Jim Meyering  <jim@meyering.net>
15978
15979         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
15980
15981 2003-07-15  Paul Eggert  <eggert@twinsun.com>
15982
15983         * config/srclist.txt: Get the following files from gettext-runtime/intl
15984         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
15985         ref-del.sin.  From Bruno Haible.
15986         * config/srclist-update (fixfile): Change grep pattern again, since the
15987         previous fix didn't work (there was another trailing $).  Use
15988         '[$]' to escape the $s.
15989
15990 2003-07-15  Karl Berry  <karl@gnu.org>
15991
15992         * lib/vasnprintf.c: update from gettext.
15993
15994 2003-07-15  Karl Berry  <karl@gnu.org>
15995
15996         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
15997         gets expanded when surrounded by '$'.
15998
15999 2003-07-15  Jim Meyering  <jim@meyering.net>
16000
16001         * modules/save-cwd: Don't depend on error.  From Derek Price.
16002
16003 2003-07-15  Jim Meyering  <jim@meyering.net>
16004
16005         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
16006
16007 2003-07-14  Simon Josefsson  <jas@extundo.com>
16008
16009         * modules/mempcpy: New file.
16010         * MODULES.html.sh (func_all_modules): Add mempcpy.
16011
16012 2003-07-14  Simon Josefsson  <jas@extundo.com>
16013
16014         * m4/mempcpy.m4: New file.
16015
16016 2003-07-14  Simon Josefsson  <jas@extundo.com>
16017
16018         * lib/mempcpy.h: New file.
16019         * lib/mempcpy.c: New file.
16020
16021 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16022
16023         * modules/getdate, modules/posixtm: Depend on mktime.
16024
16025 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16026
16027         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
16028         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
16029         unicodeio.c, unicodeio.h, unlocked-io.h:
16030         Switch from LGPL to GPL.
16031
16032 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16033
16034         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
16035         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
16036         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
16037         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
16038         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
16039         updated automatically by ../config/srclist-update.  This changes
16040         their license from LPGL to GPL.
16041
16042 2003-07-14  Paul Eggert  <eggert@twinsun.com>
16043
16044         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
16045         assumed to refer to the root of the most recent stable gettext version.
16046         * config/srclistvars.sh: Add defaults for eggert.
16047         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
16048         Match "This program" as well as "The program".  This is needed
16049         for gettext.
16050
16051 2003-07-14  Jim Meyering  <jim@meyering.net>
16052
16053         Don't emit diagnostics.  Let callers do that.
16054         * lib/save-cwd.c: Don't include "error.h".
16055         (save_cwd): Don't call error.  Ensure that errno is valid
16056         when returning nonzero.
16057
16058         * lib/save-cwd.h (restore_cwd): Update prototype.
16059         * lib/save-cwd.c (restore_cwd): Remove two parameters.
16060         Simplify.  Don't call error upon failure.  Let callers do that.
16061         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
16062         when auditing is enabled.  But don't bother updating the #if.
16063
16064 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
16065
16066         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
16067         it breaks C++ compilation.
16068         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
16069
16070 2003-07-10  Simon Josefsson  <jas@extundo.com>
16071
16072         * modules/strchrnul (Makefile.am): Add strchrnul.h.
16073
16074 2003-07-10  Jim Meyering  <jim@meyering.net>
16075
16076         * m4/clock_time.m4: Remove trailing blank.
16077         * m4/intmax_t.m4: Likewise.
16078
16079 2003-07-10  Jim Meyering  <jim@meyering.net>
16080
16081         * lib/vasnprintf.c: Remove trailing blanks.
16082         Make cpp indentation consistent.
16083
16084 2003-07-09  Paul Eggert  <eggert@twinsun.com>
16085
16086         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
16087         posixver.c, strftime.c, strnlen.c, strverscmp.c:
16088         Switch from LGPL to GPL.
16089
16090 2003-07-09  Paul Eggert  <eggert@twinsun.com>
16091
16092         * config/srclist.txt: Sort sublists.  Add
16093         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
16094         that differ from gnulib for one reason or another; we'd like this list
16095         to be smaller but for now let's document what we have.
16096
16097 2003-07-08  Paul Eggert  <eggert@twinsun.com>
16098
16099         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
16100         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
16101         and sweeter "eval x=$x".
16102         * config/srclist.txt: Get lib/argp* from glibc.
16103
16104 2003-07-07  Paul Eggert  <eggert@twinsun.com>
16105
16106         * lib/mktime.c: Fix some boundary cases and remove need for floating
16107         point.
16108
16109         Issue a compile-time diagnostic if time_t is floating point, or if
16110         two's complement arithmetic is not in effect, or if arithmetic
16111         right shift does not propagate the sign.  These assumptions were
16112         all in the original code but they weren't checked.
16113
16114         (TIME_T_MIDPOINT, verify): New macros.
16115         (__isleap): Remove; it has integer overflow problems.
16116         (leapyear): New function, without those problems.
16117         (ydhms_tm_diff): Remove; splitting into two parts.
16118         (ydhms_diff): New function, containing the arithmetic part of
16119         the old ydhms_tm_diff function.  Issue a compile-time
16120         diagnostic if we are not using C99 integer division.
16121         Avoid casts when possible.
16122         (guess_time_tm): New function, containing the checking part of
16123         the old ydhms_tm_diff function.  Return the new value, rather than
16124         the difference between it and the old.  Accept a new argument T
16125         so that *T specifies the old value.  Check for overflow in the result.
16126
16127         (__mktime_internal): Use a time_t offset, not a long int offset.
16128         This undoes the 2003-06-04 change, which is no longer needed now
16129         that we have better overflow checking.
16130         (localtime_offset): Likewise.
16131
16132         (__mktime_internal): Avoid harmful overflow on hosts where time_t
16133         and long are 64-bit but int is only 32-bit.
16134         (ydhms_diff): Use long int to store year1 and yday1.
16135         Issue a compile-time diagnostic if long int is not wide enough.
16136
16137         (__mktime_internal): Use long int to store adjusted year and yday.
16138         Use plain C rather than preprocessor commands, if that doesn't
16139         affect efficiency.
16140         Check for overflow (and try to repair) after each probe
16141         rather than checking only at the very end.  This avoids some bugs
16142         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
16143         does not equal GMT offset at maximum time).
16144         Use integer to check for overflow rather than floating point; this
16145         is more portable to non-IEEE hosts, and is a tad faster.
16146         When we detect that we are oscillating between two values,
16147         don't check whether tm_isdst has the requested value, since
16148         we already know the answer.  When tm_isdst has the wrong value,
16149         use a different heuristic to find the right one, based on the
16150         extreme values actually observed in practice in tz2003a,
16151         rather than the (overly optimistic) "previous 3 calendar quarters".
16152
16153         (not_equal_tm, print_tm, check_result): Use "const T" rather than
16154         "T const" to accommodate glibc style.
16155         (check_result): Use less-confusing report format.  "long" -> "long int.
16156         (main): Likewise.
16157         Don't loop if the iteration overflows time_t.
16158         Allow a negative step in the iteration.
16159
16160 2003-07-06  Karl Berry  <karl@gnu.org>
16161
16162         * config/depcomp: update from automake.
16163         * config/config.sub: update from prep.
16164
16165 2003-07-03  Karl Berry  <karl@gnu.org>
16166
16167         * config/config.guess: update from prep.
16168
16169 2003-07-01  Paul Eggert  <eggert@twinsun.com>
16170
16171         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
16172         xreadlink.c now includes it unconditionally.
16173
16174 2003-07-01  Paul Eggert  <eggert@twinsun.com>
16175
16176         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
16177         having it depend on HAVE_SYS_TYPES_H.
16178
16179 2003-07-01  Bruno Haible  <bruno@clisp.org>
16180
16181         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
16182         <sys/types.h> should be sufficient.
16183         Reported by Paul Eggert.
16184
16185 2003-06-26  Karl Berry  <karl@gnu.org>
16186
16187         * config/depcomp: update from automake.
16188
16189 2003-06-26  Bruno Haible  <bruno@clisp.org>
16190
16191         * modules/human: Depend on module stdbool.
16192
16193 2003-06-25  Bruno Haible  <bruno@clisp.org>
16194
16195         * modules/readlink: New file.
16196         * modules/xreadlink: Depend on it.
16197         * MODULES.html.sh (func_all_modules): Add readlink.
16198
16199 2003-06-25  Bruno Haible  <bruno@clisp.org>
16200
16201         * m4/readlink.m4: New file.
16202
16203 2003-06-25  Bruno Haible  <bruno@clisp.org>
16204
16205         * lib/readlink.c: New file.
16206
16207 2003-06-22  Karl Berry  <karl@gnu.org>
16208
16209         * config/srclist.txt: update mkinstalldirs from automake.
16210         * config/mkinstalldirs: update.
16211
16212 2003-06-22  Bruno Haible  <bruno@clisp.org>
16213
16214         Portability to mingw32.
16215         * m4/ssize_t.m4: New file, from GNU gettext.
16216         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
16217         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
16218
16219 2003-06-22  Bruno Haible  <bruno@clisp.org>
16220
16221         * modules/safe-read: Add m4/ssize_t.m4.
16222         * modules/xreadlink: Add m4/ssize_t.m4.
16223
16224 2003-06-20  Bruno Haible  <bruno@clisp.org>
16225
16226         Assume C89, so PARAMS isn't needed.
16227         * lib/unicodeio.h (PARAMS): Remove.
16228         * lib/unicodeio.c: Don't use PARAMS.
16229
16230 2003-06-18  Karl Berry  <karl@gnu.org>
16231
16232         * config/config.{guess,sub}: update from prep.
16233
16234 2003-06-18  Jim Meyering  <jim@meyering.net>
16235
16236         Merge changes from coreutils.
16237         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
16238         Remove explicit declarations of xmalloc and realloc.
16239         Include xalloc.h.
16240         (read_utmp): Remove anachronistic cast of xmalloc.
16241
16242 2003-06-17  Paul Eggert  <eggert@twinsun.com>
16243
16244         Assume C89, so PARAMS isn't needed.
16245         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
16246         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
16247         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
16248         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
16249         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
16250         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
16251         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
16252         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
16253         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
16254         lib/xstrtod.h, lib/xstrtol.h: Likewise.
16255         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
16256         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
16257         no longer needed. Anyway, config.h should always be included before any
16258         other file.
16259
16260 2003-06-11  Simon Josefsson  <jas@extundo.com>
16261
16262         * modules/sysexits: New file.
16263         * MODULES.html.sh (func_all_modules): Add sysexits.
16264
16265 2003-06-11  Simon Josefsson  <jas@extundo.com>
16266
16267         * lib/sysexit_.h: New file.
16268
16269 2003-06-11  Derek Price  <derek@ximbiot.com>
16270
16271         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
16272         necessary.
16273
16274 2003-06-11  Bruno Haible  <bruno@clisp.org>
16275
16276         * m4/sysexits.m4: New file.
16277
16278 2003-06-10  Simon Josefsson <jas@extundo.com>
16279
16280         * lib/argp.h: New file, from glibc.
16281         * lib/argp-ba.c: New file, from glibc.
16282         * lib/argp-eexst.c: New file, from glibc.
16283         * lib/argp-fmtstream.c: New file, from glibc.
16284         * lib/argp-fmtstream.h: New file, from glibc.
16285         * lib/argp-fs-xinl.c: New file, from glibc.
16286         * lib/argp-help.c: New file, from glibc.
16287         * lib/argp-namefrob.h: New file, from glibc.
16288         * lib/argp-parse.c: New file, from glibc.
16289         * lib/argp-pv.c: New file, from glibc.
16290         * lib/argp-pvh.c: New file, from glibc.
16291         * lib/argp-xinl.c: New file, from glibc.
16292
16293 2003-06-10  Simon Josefsson  <jas@extundo.com>
16294
16295         * modules/strchrnul: New file.
16296
16297 2003-06-10  Simon Josefsson  <jas@extundo.com>
16298
16299         * modules/argp: New file.
16300
16301 2003-06-10  Simon Josefsson  <jas@extundo.com>
16302
16303         * m4/strchrnul.m4: New file.
16304
16305 2003-06-10  Simon Josefsson  <jas@extundo.com>
16306
16307         * lib/strchrnul.h: New file.
16308         * lib/strchrnul.c: New file.
16309
16310 2003-06-10  Bruno Haible  <bruno@clisp.org>
16311
16312         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
16313
16314 2003-06-07  Karl Berry  <karl@gnu.org>
16315
16316         * config/config.{guess,sub}: update from prep.
16317
16318 2003-06-07  Jim Meyering  <jim@meyering.net>
16319
16320         * modules/strtod: Use $(...) notation, not @...@ for
16321         AC_REPLACE'd variables.
16322         * modules/localcharset: Likewise.
16323
16324 2003-06-07  Jim Meyering  <jim@meyering.net>
16325
16326         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
16327         in place of my name in the copyright comment.
16328         Remove definition and uses of __P.
16329
16330         From coreutils.
16331         * lib/stat.c: Don't declare xmalloc explicitly.
16332         Instead, include "xalloc.h".
16333         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
16334         xrealloc, and xcalloc return values.
16335         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
16336         Improve comment.
16337         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
16338
16339 2003-06-07  Bruno Haible  <bruno@clisp.org>
16340
16341         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
16342         avoid AC_CONFIG_LINKS.
16343         * modules/fnmatch (Makefile.am): Use explicit creation rule for
16344         fnmatch.h, to avoid AC_CONFIG_LINKS.
16345         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
16346
16347 2003-06-07  Bruno Haible  <bruno@clisp.org>
16348
16349         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
16350         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
16351         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
16352         directory.
16353         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
16354         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
16355         directory.
16356
16357 2003-06-06  Jim Meyering  <jim@meyering.net>
16358
16359         Merge from coreutils.
16360         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
16361         Consolidate declarations and initializations of *_base* locals.
16362
16363         Merge from coreutils.
16364         This avoids a core dump on systems without GNU putenv,
16365         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
16366         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
16367         (unsetenv): New static function, from GNU libc.
16368         (rpl_putenv): Use it.
16369
16370         * lib/modechange.c: Remove trailing blanks.
16371
16372         Merge from coreutils.
16373         * lib/fsusage.c: Remove declaration of statfs.
16374         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
16375
16376         * lib/posixtm.c: Include <stdbool.h> unconditionally.
16377
16378 2003-06-06  Jim Meyering  <jim@meyering.net>
16379
16380         * lib/stdbool_.h: Renamed from stdbool.h.in.
16381
16382 2003-06-06  Jim Meyering  <jim@meyering.net>
16383             Bruno Haible  <bruno@clisp.org>
16384
16385         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
16386         Adjust Makefile.am snippet not to redirect directly to target.
16387         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
16388
16389 2003-06-05  Paul Eggert  <eggert@twinsun.com>
16390
16391         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
16392         mismatch, look in future quarters as well as past.  This fixes a
16393         bug when processing fall-backwards gaps immediately after a long
16394         period of daylight-saving time.
16395
16396         * lib/mktime.c: Assume freestanding C89 or better.
16397         (HAVE_LIMITS_H): Remove.  Assume it's 1.
16398         (__P): Remove; not used.
16399         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
16400         (mktime, not_equal_tm, print_tm, check_result,
16401         main): Use prototypes.  Use const * where appropriate.
16402         (main): Fix typo in testing code that uncovered by above changes.
16403         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
16404
16405 2003-06-04  Paul Eggert  <eggert@twinsun.com>
16406
16407         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
16408         locale.h, localeconv.  This merges changes from coreutils.
16409
16410         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
16411         It can be removed after the next Autoconf is released.
16412         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
16413         needed.
16414
16415 2003-06-04  Paul Eggert  <eggert@twinsun.com>
16416
16417         * lib/mktime.c: Fix Debian bug 177940
16418         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
16419         (localtime_offset): Now long int, not time_t, because we want it
16420         to be guaranteed to be signed.  All uses changed.
16421         (__mktime_internal): If overflow would occur when adding offset,
16422         don't add it.
16423
16424         Merge 'human' changes from coreutils.  Rewrite to support
16425         locale-specific notations like thousands separators.
16426         * lib/human.c: Simplify authorship notice.
16427         Include human.h immediately after config.h.
16428         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
16429         <limits.h>: Do not include, since human.h does.
16430         (SIZE_MAX, UINTMAX_MAX): New macros.
16431         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
16432         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
16433         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
16434         (power_letter): Renamed from suffixes.
16435         (generate_suffix_backwards): Remove.
16436         (adjust_value): Now takes int style (because of human.h changes)
16437         and long double value (for greater precision on some platforms).
16438         (group_number): New function.
16439         (human_readable): Use it.  Use integer options, not enum.
16440         Put the options before the sizes in the arg list.
16441         Support all the new options.
16442         The old human_readable function has been removed;
16443         use inttostr.h instead.
16444         (human_readable, default_block_size, humblock):
16445         Use uintmax_t, not int, for block sizes.
16446         (human_readable_inexact, block_size_types): Remove.
16447         (block_size_opts): New constant.
16448         (human_options): Renamed from human_block_size, with new signature
16449         that allows block sizes up to UINTMAX_MAX.  All callers changed.
16450         * lib/human.h: Add copyright and authorship notice.
16451         Include <limits.h> and <stdbool.h> unconditionally.
16452         (PARAMS): Remove.  All uses removed.
16453         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
16454         (enum human_inexact_style): Remove tag; now a nameless enum.
16455         (human_floor, human_ceiling, human_round_to_even): Now have
16456         values 2, 0, 1 rather than -1, 1, 0.
16457         (human_group_digits, human_suppress_point_zero, human_autoscale,
16458         human_base_1024, human_SI, human_B): New constants.
16459         (human_readable_inexact, human_block_size): Remove.
16460         (human_readable): Size args are now uintmax_t, not int.
16461         (human_options): New decl.
16462
16463         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
16464         unnecessary now that we assume C89 or better.  This change
16465         imported from coreutils.
16466
16467         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
16468         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
16469         in the 2003-05-30 sync from glibc.
16470
16471         .h files should stand alone, but we shouldn't include <sys/types.h>
16472         if we can get away with just <stddef.h>.
16473
16474         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
16475         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
16476         rather than <sys/types.h>, as we merely need size_t.
16477         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
16478         to get size_t.
16479         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
16480         Include <stdio.h>, to get FILE.
16481         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
16482         memcasecmp.h has included <stddef.h> and all we need is size_t.
16483         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
16484         our interface, instead of including <sys/types.h>
16485
16486 2003-06-04  Paul Eggert  <eggert@twinsun.com>
16487
16488         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
16489         now, as glibc mktime is buggy on non-glibc systems.
16490
16491 2003-06-03  Karl Berry  <karl@gnu.org>
16492
16493         * config/config.sub: update from prep.
16494
16495 2003-06-02  Paul Eggert  <eggert@twinsun.com>
16496
16497         [from coreutils]
16498         Fix some minor time-related bugs with POSIX time arguments.
16499         Some valid time stamps were being rejected (notably -1, and
16500         time stamps before 1900 on 64-bit hosts).  And some invalid
16501         time stamps were being accepted, e.g. September 31.
16502
16503         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
16504         that we can return (time_t) -1 successfully.
16505         * lib/posixtm.c: Likewise.
16506         [HAVE_STDBOOL_H]: Include <stdbool.h>.
16507         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
16508         (t): Remove static var.
16509         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
16510         of static var.  All uses changed.
16511         (year): Do not reject years before 1900; they can occur with
16512         64-bit time_t.
16513         (posix_time_parse): Do not check for out-of-range components;
16514         that is now the caller's responsibility, since our checks were
16515         only approximations.
16516         (posixtime): Use mktime to check for out-of-range components,
16517         since it knows them exactly.
16518         If mktime returns (time_t) -1, check whether an error actually occurred
16519         by invoking localtime on -1.
16520         (main) [TEST_POSIXTIME]: Check for input data errors, and report
16521         posixtime failures better.
16522         Improve the test data (in comments only).
16523
16524 2003-06-02  Karl Berry  <karl@gnu.org>
16525
16526         * config/mkinstalldirs (version): new variable.
16527         (--version): new option.
16528         (usage): improve message.
16529
16530 2003-05-30  Karl Berry  <karl@gnu.org>
16531
16532         * lib/mktime.c: update from libc.
16533
16534 2003-05-30  Bruno Haible  <bruno@clisp.org>
16535
16536         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
16537         * config/config.rpath: Upgrade to gettext-0.12.1.
16538
16539 2003-05-30  Bruno Haible  <bruno@clisp.org>
16540
16541         * m4/gettext.m4: Upgrade to gettext-0.12.1.
16542         * m4/nls.m4: New file, from gettext-0.12.1.
16543         * m4/po.m4: New file, from gettext-0.12.1.
16544         * m4/progtest.m4: Upgrade to gettext-0.12.1.
16545
16546 2003-05-30  Bruno Haible  <bruno@clisp.org>
16547
16548         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
16549         * lib/localcharset.h: Likewise.
16550         * lib/localcharset.c: Likewise.
16551
16552 2003-05-29  Karl Berry  <karl@gnu.org>
16553
16554         * config/config.rpath: update from gettext.
16555
16556 2003-05-28  Paul Eggert  <eggert@twinsun.com>
16557
16558         Assume the headers required for C89 freestanding compilers.
16559         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
16560         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
16561         * m4/human.m4 (gl_HUMAN): Likewise.
16562         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
16563         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
16564         * m4/userspec.m4 (gl_USERSPEC): Likewise.
16565         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
16566         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
16567         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
16568
16569 2003-05-28  Paul Eggert  <eggert@twinsun.com>
16570
16571         Assume the headers required for C89 freestanding compilers.
16572         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
16573         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
16574         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
16575         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
16576         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
16577         define, since <limits.h> is guaranteed to do that.
16578         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
16579         * lib/exclude.c: Include <stdbool.h> unconditionally.
16580         * lib/tempname.c: Include <stddef.h> unconditionally.
16581         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
16582         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
16583         <stddef.h> does that.
16584         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
16585         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
16586         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
16587         needed.
16588         * lib/xstrtol.c: Likewise.
16589         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
16590         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
16591
16592         * lib/addext.c (addext): Use assignment rather than cast, to avoid
16593         warnings on some platforms.
16594
16595         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
16596         arbitrarily.
16597
16598 2003-05-26  Jim Meyering  <jim@meyering.net>
16599
16600         Merge in a change from coreutils:
16601         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
16602         that is guaranteed to be `no'.  Use `no_such_member' to indicate
16603         that condition, rather than `-1' which is slightly misleading.
16604         Change the name of the cache variable to have the gl_ prefix.
16605         Prompted by a patch from Richard Dawe for DJGPP.
16606
16607 2003-05-24  Karl Berry  <karl@gnu.org>
16608
16609         * config/config.guess: update from prep.
16610
16611 2003-05-22  Karl Berry  <karl@gnu.org>
16612
16613         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
16614
16615 2003-05-20  Karl Berry  <karl@gnu.org>
16616
16617         * config/config.guess: update from prep.
16618
16619 2003-05-18  Karl Berry  <karl@gnu.org>
16620
16621         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
16622         might actually be set by the user.
16623
16624         * config/depcomp, install-sh, mdate-sh: update from automake.
16625
16626 2003-05-17  Bruno Haible  <bruno@clisp.org>
16627
16628         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
16629         invalid expansion for AC_EGREP_CPP.
16630         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
16631         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
16632         Suggested by Akim Demaille <akim@epita.fr> in
16633         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
16634
16635 2003-05-12  Jim Meyering  <jim@meyering.net>
16636
16637         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
16638         the space-padded-by-default conversion specifiers, %e, %k, %l.
16639
16640 2003-05-12  Bruno Haible  <bruno@clisp.org>
16641
16642         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
16643         the string is longer than 4 KB.
16644
16645 2003-05-11  Karl Berry  <karl@gnu.org>
16646
16647         * config/config.{guess,sub}: update from prep.
16648
16649 2003-05-09  Bruno Haible  <bruno@clisp.org>
16650
16651         * modules/error: Add m4/strerror_r.m4 to file list.
16652
16653 2003-05-03  Bruno Haible  <bruno@clisp.org>
16654
16655         Upgrade to Unicode-4.0.
16656         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
16657         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
16658         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
16659         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
16660         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
16661         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
16662         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
16663         Change width of U+E0100..U+E01EF from 1 to 0.
16664
16665 2003-04-25  Jim Meyering  <jim@meyering.net>
16666
16667         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
16668         of type size_t, not int.
16669
16670 2003-04-25  Bruno Haible  <bruno@clisp.org>
16671
16672         * lib/copy-file.c: Include <stddef.h>, for size_t.
16673
16674 2003-04-21  Paul Eggert  <eggert@twinsun.com>
16675
16676         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
16677         code which expansion is under static control.  Patch imported from
16678         Akim Demaille's patch to Bison; see
16679         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
16680
16681 2003-04-14  Bruno Haible  <bruno@clisp.org>
16682
16683         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
16684
16685 2003-04-11  Jim Meyering  <jim@meyering.net>
16686
16687         Merge changes from Coreutils.
16688
16689         2003-03-22  Jim Meyering  <jim@meyering.net>
16690
16691         * lib/strftime.c (widen): Cast alloca return value to proper type.
16692
16693         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
16694
16695         From GNU libc.
16696         * lib/strftime.c (my_strftime): Handle very large width
16697         specifications for numeric values correctly.  Improve checks for
16698         overflow.
16699
16700         2003-01-19  Jim Meyering  <jim@meyering.net>
16701
16702         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
16703         definitions.
16704         (nl_get_alt_digit) [! defined my_strftime]: Define.
16705         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
16706         _nl_get_alt_digit and _nl_get_walt_digit.
16707
16708         * lib/strftime.c (my_strftime): Merge in locale-related changes from
16709         libc. These changes have no effect outside of _LIBC.
16710
16711 2003-04-10  Bruno Haible  <bruno@clisp.org>
16712
16713         * modules/findprog: New file.
16714         * MODULES.html.sh (func_all_modules): Add it.
16715
16716 2003-04-10  Bruno Haible  <bruno@clisp.org>
16717
16718         * m4/findprog.m4: New file.
16719         * m4/eaccess.m4: New file.
16720
16721 2003-04-10  Bruno Haible  <bruno@clisp.org>
16722
16723         * lib/findprog.h: New file, from GNU gettext.
16724         * lib/findprog.c: New file, from GNU gettext.
16725
16726 2003-04-05  Jim Meyering  <jim@meyering.net>
16727
16728         Merge changes from Coreutils.
16729
16730         * lib/exclude.h (PARAMS): Remove definition and uses.
16731         * lib/exclude.c: Remove uses of `PARAMS'.
16732
16733         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
16734         Add test-cases for DOS filenames. Declare program_name.
16735         (main): Set up program_name.  Patch by Rich Dawe.
16736
16737         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
16738         error from mntctl.
16739         Use mntctl's return value to drive the entry-processing loop, since
16740         we can't rely on the value of the vmt_length member in the last
16741         entry.  On some systems doing so could result in exhausting
16742         virtual memory.  Based in part on a patch from Mike Jetzer.
16743
16744 2003-04-04  Bruno Haible  <bruno@clisp.org>
16745
16746         * modules/linebreak: New file.
16747         * MODULES.html.sh (func_all_modules): Add it.
16748
16749 2003-04-04  Bruno Haible  <bruno@clisp.org>
16750
16751         * m4/linebreak.m4: New file.
16752
16753 2003-04-04  Bruno Haible  <bruno@clisp.org>
16754
16755         * lib/linebreak.h: New file, from GNU gettext.
16756         * lib/linebreak.c: New file, from GNU gettext with slight
16757         modifications.
16758         * lib/lbrkprop.h: New file, from GNU gettext.
16759
16760 2003-04-03  Bruno Haible  <bruno@clisp.org>
16761
16762         * modules/utf8-ucs4: New file.
16763         * modules/utf16-ucs4: New file.
16764         * modules/ucs4-utf8: New file.
16765         * modules/ucs4-utf16: New file.
16766         * MODULES.html.sh (func_all_modules): Add them.
16767
16768 2003-04-03  Bruno Haible  <bruno@clisp.org>
16769
16770         * m4/utf-ucs4.m4: New file.
16771         * m4/ucs4-utf.m4: New file.
16772
16773 2003-04-03  Bruno Haible  <bruno@clisp.org>
16774
16775         * lib/utf8-ucs4.h: New file, from GNU gettext.
16776         * lib/utf16-ucs4.h: New file, from GNU gettext.
16777         * lib/ucs4-utf8.h: New file, from GNU gettext.
16778         * lib/ucs4-utf16.h: New file, from GNU gettext.
16779
16780 2003-04-02  Bruno Haible  <bruno@clisp.org>
16781
16782         * modules/binary-io: New file.
16783         * MODULES.html.sh (func_all_modules): Add it.
16784
16785 2003-04-02  Bruno Haible  <bruno@clisp.org>
16786
16787         * lib/binary-io.h: New file, from GNU gettext.
16788
16789 2003-04-01  Bruno Haible  <bruno@clisp.org>
16790
16791         * modules/pathname: New file.
16792         * MODULES.html.sh (func_all_modules): Add it.
16793
16794 2003-04-01  Bruno Haible  <bruno@clisp.org>
16795
16796         * lib/pathname.h: New file, from GNU gettext.
16797         * lib/concatpath.c: New file, from GNU gettext.
16798
16799 2003-03-30  Bruno Haible  <bruno@clisp.org>
16800
16801         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
16802
16803 2003-03-30  Bruno Haible  <bruno@clisp.org>
16804
16805         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
16806         function chown() doesn't exist.
16807
16808 2003-03-28  Bruno Haible  <bruno@clisp.org>
16809
16810         * modules/copy-file: New file.
16811         * MODULES.html.sh (func_all_modules): Add it.
16812
16813 2003-03-28  Bruno Haible  <bruno@clisp.org>
16814
16815         * m4/copy-file.m4: New file.
16816
16817 2003-03-28  Bruno Haible  <bruno@clisp.org>
16818
16819         * lib/copy-file.h: New file, from GNU gettext.
16820         * lib/copy-file.c: New file, from GNU gettext.
16821
16822 2003-03-18  Jim Meyering  <jim@meyering.net>
16823
16824         * lib/quote.c (quote_n): Fix typo in comment.
16825
16826 2003-03-18  Bruno Haible  <bruno@clisp.org>
16827
16828         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
16829         checking.
16830         * m4/onceonly_2_57.m4: Likewise.
16831
16832 2003-03-17  Bruno Haible  <bruno@clisp.org>
16833
16834         * m4/onceonly.m4: Require autoconf 2.54 or newer.
16835         (m4_quote): Remove macro.
16836         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
16837
16838 2003-03-14  Jim Meyering  <jim@meyering.net>
16839
16840         Merge changes from Coreutils.
16841         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
16842         to be const, in order to avoid warnings.
16843         (obstack_room): Likewise.
16844         (obstack_empty_p): Likewise.
16845
16846 2003-03-14  Bruno Haible  <bruno@clisp.org>
16847
16848         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
16849         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
16850
16851 2003-03-13  Paul Eggert  <eggert@twinsun.com>
16852
16853         Merge changes from Bison.
16854         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
16855         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
16856         when compiling Bison 1.875's `bitset bset = obstack_alloc
16857         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
16858         * lib/hash.c: Include <stdbool.h> unconditionally.
16859
16860 2003-03-13  Paul Eggert  <eggert@twinsun.com>
16861
16862         * m4/onceonly.m4 (m4_quote): New macro.
16863         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
16864         Quote AC_FOREACH variable-expansions properly.
16865
16866 2003-03-13  Paul Eggert  <eggert@twinsun.com>
16867
16868         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
16869
16870 2003-03-09  Paul Eggert  <eggert@twinsun.com>
16871
16872         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
16873         Reported by Bruce Becker; see:
16874         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
16875
16876 2003-03-03  Paul Eggert  <eggert@twinsun.com>
16877             Bruno Haible  <bruno@clisp.org>
16878
16879         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
16880         Reported by John Hughes, see
16881         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
16882
16883 2003-02-20  Bruno Haible  <bruno@clisp.org>
16884
16885         * MODULES.html.sh (func_all_modules): Add poll.
16886
16887 2003-02-19  Paolo Bonzino  <bonzini@gnu.org>
16888
16889         * modules/poll: New file.
16890
16891 2003-02-19  Paolo Bonzino  <bonzini@gnu.org>
16892
16893         * lib/poll_.h: New file.
16894         * lib/poll.c: New file.
16895
16896 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
16897
16898         * m4/poll.m4: New file.
16899
16900 2003-02-18  Paolo Bonzino  <bonzini@gnu.org>
16901
16902         * modules/mathl: New file.
16903
16904 2003-02-18  Paolo Bonzino  <bonzini@gnu.org>
16905
16906         * lib/mathl.h: New file.
16907         * lib/acosl.c: New file.
16908         * lib/asinl.c: New file.
16909         * lib/atanl.c: New file.
16910         * lib/ceill.c: New file.
16911         * lib/cosl.c: New file.
16912         * lib/expl.c: New file.
16913         * lib/floorl.c: New file.
16914         * lib/frexpl.c: New file.
16915         * lib/ldexpl.c: New file.
16916         * lib/logl.c: New file.
16917         * lib/sincosl.c: New file.
16918         * lib/sinl.c: New file.
16919         * lib/sqrtl.c: New file.
16920         * lib/tanl.c: New file.
16921         * lib/trigl.c: New file.
16922         * lib/trigl.h: New file.
16923
16924 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
16925
16926         * m4/mathl.m4: New file.
16927
16928 2003-02-18  Bruno Haible  <bruno@clisp.org>
16929
16930         * MODULES.html.sh (func_all_modules): Add mathl.
16931
16932 2003-02-17  Bruno Haible  <bruno@clisp.org>
16933
16934         * modules/mkdtemp: New module.
16935         * MODULES.html.sh (func_all_modules): Add it.
16936
16937 2003-02-17  Bruno Haible  <bruno@clisp.org>
16938
16939         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
16940
16941 2003-02-17  Bruno Haible  <bruno@clisp.org>
16942
16943         * lib/mkdtemp.h: New file, from GNU gettext.
16944         * lib/mkdtemp.c: New file, from GNU gettext.
16945
16946 2003-02-02  Jim Meyering  <jim@meyering.net>
16947
16948         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
16949         e.g. glibc-2.2.93.
16950
16951 2003-01-31  Bruno Haible  <bruno@clisp.org>
16952
16953         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
16954         'rpl_rename'.
16955         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
16956         'rpl_strnlen'.
16957         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
16958         'rpl_strtod'.
16959         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
16960         'rpl_utime'.
16961
16962 2003-01-31  Bruno Haible  <bruno@clisp.org>
16963
16964         * lib/rename.c: #undef rename before defining rpl_rename.
16965         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
16966
16967 2003-01-30  Bruno Haible  <bruno@clisp.org>
16968
16969         * modules/vasnprintf, modules/vasprintf: New modules.
16970         * MODULES.html.sh (func_all_modules): Add them.
16971
16972 2003-01-30  Bruno Haible  <bruno@clisp.org>
16973
16974         * m4/signed.m4: New file, from GNU gettext.
16975         * m4/longdouble.m4: New file, from GNU gettext.
16976         * m4/wchar_t.m4: New file, from GNU gettext.
16977         * m4/wint_t.m4: New file, from GNU gettext.
16978         * m4/vasnprintf.m4: New file.
16979         * m4/vasprintf.m4: New file.
16980
16981 2003-01-30  Bruno Haible  <bruno@clisp.org>
16982
16983         * lib/printf-args.h: New file, from GNU gettext.
16984         * lib/printf-args.c: New file, from GNU gettext.
16985         * lib/printf-parse.h: New file, from GNU gettext.
16986         * lib/printf-parse.c: New file, from GNU gettext.
16987         * lib/vasnprintf.h: New file, from GNU gettext.
16988         * lib/vasnprintf.c: New file, from GNU gettext.
16989         * lib/asnprintf.c: New file, from GNU gettext.
16990         * lib/vasprintf.h: New file, from GNU gettext with modifications.
16991         * lib/vasprintf.c: New file, from GNU gettext.
16992         * lib/asprintf.c: New file, from GNU gettext.
16993
16994 2003-01-29  Bruno Haible  <bruno@clisp.org>
16995
16996         * modules/stpncpy: New module.
16997         * MODULES.html.sh (func_all_modules): Add it.
16998
16999 2003-01-29  Bruno Haible  <bruno@clisp.org>
17000
17001         * m4/stpncpy.m4: New file.
17002
17003 2003-01-29  Bruno Haible  <bruno@clisp.org>
17004
17005         * lib/stpncpy.h: New file, from GNU gettext with modifications.
17006         * lib/stpncpy.c: New file, from GNU gettext with modifications.
17007
17008 2003-01-28  Bruno Haible  <bruno@clisp.org>
17009
17010         * modules/c-ctype: New module.
17011         * MODULES.html.sh (func_all_modules): Add it.
17012
17013 2003-01-28  Bruno Haible  <bruno@clisp.org>
17014
17015         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
17016         Paul Eggert.
17017         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
17018         Paul Eggert.
17019
17020 2003-01-27  Bruno Haible  <bruno@clisp.org>
17021
17022         * modules/xsetenv: New module.
17023         * MODULES.html.sh (func_all_modules): Add it.
17024
17025 2003-01-27  Bruno Haible  <bruno@clisp.org>
17026
17027         * lib/xsetenv.h: New file, from GNU gettext.
17028         * lib/xsetenv.c: New file, from GNU gettext.
17029
17030 2003-01-23  Jim Meyering  <jim@meyering.net>
17031
17032         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
17033         from working on systems without dirfd (at least Irix and OSF1/Tru64).
17034
17035 2003-01-23  Bruno Haible  <bruno@clisp.org>
17036
17037         * modules/minmax: New module.
17038         * MODULES.html.sh (func_all_modules): Add it.
17039
17040 2003-01-23  Bruno Haible  <bruno@clisp.org>
17041
17042         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
17043         Eggert.
17044
17045 2003-01-22  Bruno Haible  <bruno@clisp.org>
17046
17047         * modules/exit: New module.
17048         * MODULES.html.sh (func_all_modules): Add it.
17049
17050 2003-01-22  Bruno Haible  <bruno@clisp.org>
17051
17052         * lib/exit.h: New file, from GNU gettext.
17053
17054 2003-01-19  Bruno Haible  <bruno@clisp.org>
17055
17056         * gnulib-tool: Recognize option --extract-maintainer.
17057         (func_get_maintainer): New function.
17058         * modules/*: Add Maintainer entry.
17059
17060 2003-01-16  Jim Meyering  <jim@meyering.net>
17061
17062         * m4/regex.m4: The `regex' struct is both input and output.
17063         Initialize it before each use.  Patch by Tim Waugh.
17064
17065 2003-01-16  Bruno Haible  <bruno@clisp.org>
17066
17067         * MODULES.html.sh: Add a table of contents. Add the module name as
17068         leftmost column. Add hyperlinks.
17069
17070 2003-01-15  Bruno Haible  <bruno@clisp.org>
17071
17072         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
17073
17074 2003-01-15  Bruno Haible  <bruno@clisp.org>
17075
17076         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
17077         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
17078         suffix.
17079
17080 2003-01-15  Bruno Haible  <bruno@clisp.org>
17081
17082         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
17083
17084 2003-01-15  Bruno Haible  <bruno@clisp.org>
17085
17086         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
17087         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
17088
17089 2003-01-14  Jim Meyering  <jim@meyering.net>
17090
17091         * lib/same.c (same_name): Tweak a comment.
17092
17093 2003-01-14  Bruno Haible  <bruno@clisp.org>
17094
17095         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
17096         when a string comparison is sufficient.
17097
17098 2003-01-14  Bruno Haible  <bruno@clisp.org>
17099
17100         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
17101         'unsigned int'.
17102
17103 2003-01-14  Bruno Haible  <bruno@clisp.org>
17104
17105         * lib/hash-pjw.c: Add comment about low quality of this function.
17106
17107 2003-01-13  Bruno Haible  <bruno@clisp.org>
17108
17109         * modules/stpcpy: Distribute lib/stpcpy.h.
17110         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
17111
17112 2003-01-13  Bruno Haible  <bruno@clisp.org>
17113
17114         * modules/*: Add a description.
17115         * modules/strpbrk: Fix Makefile.am snippet.
17116         * modules/strtoimax: Fix dependencies.
17117         * modules/strtoumax: Likewise.
17118
17119 2003-01-13  Bruno Haible  <bruno@clisp.org>
17120
17121         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
17122         * modules/alloca (Makefile.am): All object files depend on alloca.h.
17123         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
17124
17125 2003-01-13  Bruno Haible  <bruno@clisp.org>
17126
17127         * gnulib-tool (func_create_testdir): Store config/* files in the main
17128         directory.
17129         * config.rpath: Move to ...
17130         * config/config.rpath: ... here.
17131         * modules/gettext: Contains config/config.rpath, not config.rpath.
17132         * modules/iconv: Likewise.
17133
17134 2003-01-12  Paul Eggert  <eggert@twinsun.com>
17135
17136         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
17137         to avoid collisions with libcurses and libreadline.
17138
17139         * m4/getstr.m4: Remove.
17140         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
17141
17142 2003-01-12  Paul Eggert  <eggert@twinsun.com>
17143
17144         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
17145         to avoid collisions with libcurses and libreadline.
17146
17147         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
17148         * lib/getstr.h, getstr.c: Remove.
17149         * lib/getline.c: Include "getline.h", to check interface.
17150         Move body of old getstr.c here: this defines MIN_CHUNK and
17151         declares getdelim2, which is renamed from getstr.
17152         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
17153
17154         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
17155         All uses changed.
17156         * lib/linebuffer.h: Likewise.
17157         (readline): Remove backward-compatibility macro.
17158
17159 2003-01-12  Paul Eggert  <eggert@twinsun.com>
17160
17161         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
17162         to avoid collisions with libcurses and libreadline.
17163         * getstr: Remove.
17164         * MODULES.html.sh: Remove getstr.
17165         * modules/getline: Depend on unlocked-io, not getstr.
17166
17167 2003-01-12  Jim Meyering  <jim@meyering.net>
17168
17169         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
17170
17171 2003-01-10  Bruno Haible  <bruno@clisp.org>
17172
17173         * modules/alloca: Change Makefile.am requirements. Simplify Include
17174         requirements. Add lib/alloca_.h to file list.
17175
17176 2003-01-10  Bruno Haible  <bruno@clisp.org>
17177
17178         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
17179
17180 2003-01-10  Bruno Haible  <bruno@clisp.org>
17181
17182         * lib/alloca_.h: New file.
17183         * lib/getdate.y: Unconditionally include alloca.h.
17184         * lib/makepath.c: Likewise.
17185         * lib/setenv.c: Likewise.
17186         * lib/userspec.c: Likewise.
17187
17188 2003-01-09  Karl Berry  <karl@gnu.org>
17189
17190         * MODULES.html.sh: include `dirname $0` in PATH, to find
17191         gnulib-tool.
17192
17193 2003-01-09  Bruno Haible  <bruno@clisp.org>
17194
17195         * modules/stdbool: Change configure.ac, Makefile.am requirements.
17196         Simplify Include requirements. Add lib/stdbool.h.in to file list.
17197
17198 2003-01-09  Bruno Haible  <bruno@clisp.org>
17199
17200         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
17201
17202 2003-01-09  Bruno Haible  <bruno@clisp.org>
17203
17204         * lib/stdbool.h.in: New file.
17205
17206 2003-01-09  Bruno Haible  <bruno@clisp.org>
17207
17208         * gnulib-tool (func_all_modules): Ignore files ending in ~.
17209         * MODULES.html.sh: Likewise.
17210
17211 2003-01-08  Jim Meyering  <jim@meyering.net>
17212
17213         * lib/full-write.c: Undefine and define-away `const' after inclusion
17214         of errno.h, not before.  Suggestion from Bruno Haible.
17215
17216 2003-01-08  Bruno Haible  <bruno@clisp.org>
17217
17218         * modules/full-read: Depend on full-write.
17219
17220 2003-01-08  Bruno Haible  <bruno@clisp.org>
17221
17222         * lib/safe-read.c: Include specification header first, to ensure its
17223         selfcontainedness.
17224         * lib/full-write.c: Likewise.
17225
17226 2003-01-07  Jim Meyering  <jim@meyering.net>
17227
17228         * lib/full-write.c: Rework so that it may serve to define full_read,
17229         too.
17230         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
17231
17232 2003-01-07  Bruno Haible  <bruno@clisp.org>
17233
17234         * lib/strtoimax.c: Include <stdint.h> as an alternative to
17235         <inttypes.h>.
17236         * lib/xstrtol.h: Likewise.
17237         * lib/xstrtoimax.c: Likewise.
17238         * lib/xstrtoumax.c: Likewise.
17239         * lib/human.h: Likewise.
17240
17241         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
17242         on systems that have <inttypes.h> but not <stdint.h>.
17243
17244 2003-01-07  Bruno Haible  <bruno@clisp.org>
17245
17246         * MODULES.html.sh: Add copyright notice.
17247         (missed_files): Omit CVS directory entries.
17248         (func_module): Make it work with sed-3.02.
17249         * MODULES.txt: Remove file.
17250
17251 2003-01-06  Jim Meyering  <jim@meyering.net>
17252
17253         * lib/version-etc.c: Update year in translatable copyright string.
17254
17255 2003-01-03  Karl Berry  <karl@gnu.org>
17256
17257         * config/config.{guess,sub}: update from prep.
17258
17259 2003-01-02  Karl Berry  <karl@gnu.org>
17260
17261         * doc/COPYING.DOC: belatedly updated to 1.2.
17262
17263 2003-01-01  Karl Berry  <karl@gnu.org>
17264
17265         * gnulib-tool (func_verify_module): report module name $module in
17266         error message, not $1.
17267         * gnulib-tool (create-testdir): don't complain if destdir couldn't
17268         be created, only if it doesn't exist.
17269         * gnulib-tool (last_checkin_date): don't expand the $Date here.
17270
17271 2002-12-31  Paul Eggert  <eggert@twinsun.com>
17272
17273         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
17274
17275 2002-12-31  Paul Eggert  <eggert@twinsun.com>
17276
17277         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
17278         memcmp if strcoll doesn't work.
17279
17280 2002-12-31  Bruno Haible  <bruno@clisp.org>
17281
17282         * lib/utime.c (utime_null): No need to call ftruncate if the file was
17283         nonempty.
17284
17285 2002-12-31  Bruno Haible  <bruno@clisp.org>
17286
17287         * lib/memcoll.c (STRCOLL): New macro.
17288         (memcoll): Use it.
17289
17290 2002-12-31  Bruno Haible  <bruno@clisp.org>
17291
17292         * lib/localcharset.h: New file.
17293         * lib/localcharset.c: Include it.
17294         * lib/unicodeio.c: Likewise.
17295
17296 2002-12-31  Bruno Haible  <bruno@clisp.org>
17297
17298         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
17299         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
17300
17301 2002-12-31  Bruno Haible  <bruno@clisp.org>
17302
17303         * lib/getline.h: Include <stddef.h>, for size_t.
17304
17305         * lib/unicodeio.h: Include <stddef.h>, for size_t.
17306         * lib/unicodeio.c: Don't include <stddef.h>.
17307
17308 2002-12-31  Bruno Haible  <bruno@clisp.org>
17309
17310         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
17311         HAVE_TM_ZONE.
17312
17313 2002-12-24  Karl Berry  <karl@gnu.org>
17314
17315         * config/config.guess: update from prep.
17316
17317 2002-12-24  Bruno Haible  <bruno@clisp.org>
17318
17319         General infrasructure.
17320         * m4/README: Rewritten.
17321         * m4/onceonly.m4: New file.
17322         * m4/onceonly_2_57.m4: New file.
17323
17324         Module atexit.
17325         * m4/atexit.m4: New file.
17326
17327         Module strtod.
17328         * m4/strtod.m4: New file.
17329
17330         Module strtol.
17331         * m4/strtol.m4: New file.
17332
17333         Module strtoul.
17334         * m4/strtoul.m4: New file.
17335
17336         Module memchr.
17337         * m4/memchr.m4: New file.
17338
17339         Module memcmp.
17340         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
17341         (jm_FUNC_MEMCMP): Invoke it.
17342
17343         Module memcpy.
17344         * m4/memcpy.m4: New file.
17345
17346         Module memmove.
17347         * m4/memmove.m4: New file.
17348
17349         Module memset.
17350         * m4/memset.m4: New file.
17351
17352         Module strcspn.
17353         * m4/strcspn.m4: New file.
17354
17355         Module strpbrk.
17356         * m4/strpbrk.m4: New file.
17357
17358         Module strstr.
17359         * m4/strstr.m4: New file.
17360
17361         Module strerror.
17362         * m4/strerror.m4: New file.
17363
17364         Module mktime.
17365         * m4/mktime.m4: Renamed from jm-mktime.m4.
17366         (gl_PREREQ_MKTIME): New macro.
17367         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
17368
17369         Module malloc.
17370         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
17371         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
17372         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
17373
17374         Module realloc.
17375         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
17376         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
17377         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
17378
17379         Module strftime.
17380         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
17381         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
17382         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
17383         gl_TM_GMTOFF.
17384         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
17385
17386         Module xalloc.
17387         * m4/xalloc.m4: New file.
17388
17389         Module alloca.
17390         * m4/alloca.m4: New file.
17391
17392         Module putenv.
17393         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
17394         (jm_FUNC_PUTENV): Invoke it.
17395
17396         Module setenv.
17397         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
17398         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
17399         when invoked twice.
17400         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
17401         gt_FUNC_SETENV.
17402
17403         Module memrchr.
17404         * m4/memrchr.m4: New file.
17405
17406         Module stpcpy.
17407         * m4/stpcpy.m4: New file.
17408
17409         Module strcase.
17410         * m4/strcase.m4: New file.
17411
17412         Module strdup.
17413         * m4/strdup.m4: New file.
17414
17415         Module strnlen.
17416         * m4/strnlen.m4: New file.
17417
17418         Module strndup.
17419         * m4/strndup.m4: New file.
17420
17421         Module xstrtod.
17422         * m4/xstrtod.m4: New file.
17423
17424         Module xstrtol.
17425         * m4/xstrtol.m4: New file.
17426
17427         Module getdate.
17428         * m4/getdate.m4: New file.
17429
17430         Module unlocked-io.
17431         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
17432         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
17433         * m4/jm-glibc-io.m4n: Remove file.
17434
17435         Module long-options.
17436         * m4/long-options.m4: New file.
17437
17438         Module md5.
17439         * m4/md5.m4: New file.
17440
17441         Module sha.
17442         * m4/sha.m4: New file.
17443
17444         Module getstr.
17445         * m4/getstr.m4: New file.
17446
17447         Module getline.
17448         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
17449         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
17450         <sys/types.h>, for size_t. Use the function name gnu_getline, not
17451         simply getline. Infoke gl_PREREQ_GETLINE.
17452
17453         Module obstack.
17454         * m4/obstack.m4: New file.
17455
17456         Module hash.
17457         * m4/hash.m4: New file.
17458
17459         Module readtokens.
17460         * m4/readtokens.m4: New file.
17461
17462         Module strverscmp.
17463         * m4/strverscmp.m4: New file.
17464
17465         Module stdbool.
17466         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
17467         OSF/1.
17468
17469         Module strtoll.
17470         * m4/strtoll.m4: New file.
17471
17472         Module strtoull.
17473         * m4/strtoull.m4: New file.
17474
17475         Module strtoimax.
17476         * m4/strtoimax.m4: New file.
17477
17478         Module strtoumax.
17479         * m4/strtoumax.m4: New file.
17480
17481         Module xstrtoimax.
17482         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
17483         jm_AC_PREREQ_XSTRTOIMAX.
17484         Moved the strtol prerequisites to strtol.m4.
17485         Moved the strtoll prerequisites to strtoll.m4.
17486         Moved the strtoimax prerequisites to strtoimax.m4.
17487
17488         Module xstrtoumax.
17489         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
17490         jm_AC_PREREQ_XSTRTOUMAX.
17491         Moved the strtoul prerequisites to strtoul.m4.
17492         Moved the strtoull prerequisites to strtoull.m4.
17493         Moved the strtoumax prerequisites to strtoumax.m4.
17494
17495         Module chown.
17496         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
17497         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
17498
17499         Module dup2.
17500         * m4/dup2.m4: New file.
17501
17502         Module ftruncate.
17503         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
17504         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
17505
17506         Module getgroups.
17507         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
17508         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
17509
17510         Module gettimeofday.
17511         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
17512         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
17513         gl_PREREQ_GETTIMEOFDAY.
17514
17515         Module mkdir.
17516         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
17517         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
17518
17519         Module mkstemp.
17520         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
17521         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
17522         jm_AC_TYPE_UINTMAX_T.
17523         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
17524
17525         Module stat.
17526         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
17527         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
17528
17529         Module lstat.
17530         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
17531         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
17532
17533         Module timespec.
17534         * m4/timespec.m4 (gl_TIMESPEC): New macro.
17535         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
17536         * m4/st_mtim.m4: Indentation.
17537
17538         Module nanosleep.
17539         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
17540         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
17541         gl_PREREQ_NANOSLEEP.
17542
17543         Module regex.
17544         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
17545         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
17546         (gl_REGEX): New macro.
17547
17548         Module rename.
17549         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
17550         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
17551
17552         Module rmdir.
17553         * m4/rmdir.m4: New file.
17554
17555         Module utime.
17556         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
17557         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
17558         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
17559
17560         Module dirname.
17561         * m4/dirname.m4: New file.
17562
17563         Module getopt.
17564         * m4/getopt.m4: New file.
17565
17566         Module unistd-safer.
17567         * m4/unistd-safer.m4: New file.
17568
17569         Module fnmatch.
17570         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
17571         declaration.
17572         (gl_PREREQ_FNMATCH_EXTRA): New macro.
17573         (gl_FUNC_FNMATCH_POSIX): New macro.
17574         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
17575         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
17576         simply fnmatch.
17577
17578         Module exclude.
17579         * m4/exclude.m4: New file.
17580
17581         Module human.
17582         * m4/human.m4: New file.
17583
17584         Module acl.
17585         * m4/acl.m4: Nop.
17586
17587         Module backupfile.
17588         * m4/backupfile.m4: New file.
17589         * m4/d-ino.m4: Indentation.
17590
17591         Module fsusage.
17592         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
17593         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
17594         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
17595
17596         Module dirfd.
17597         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
17598         requirements.
17599
17600         Module euidaccess.
17601         * m4/euidaccess.m4: New file.
17602
17603         Module file-type.
17604         * m4/file-type.m4: New file.
17605
17606         Module fileblocks.
17607         * m4/fileblocks.m4: New file.
17608
17609         Module filemode.
17610         * m4/filemode.m4: New file.
17611
17612         Module isdir.
17613         * m4/isdir.m4: New file.
17614
17615         Module lchown.
17616         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
17617         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
17618
17619         Module makepath.
17620         * m4/makepath.m4: New file.
17621
17622         Module modechange.
17623         * m4/modechange.m4: New file.
17624
17625         Module mountlist.
17626         * m4/mountlist.m4: New file.
17627         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
17628         Indentation.
17629
17630         Module path-concat.
17631         * m4/path-concat.m4: New file.
17632
17633         Module pathmax.
17634         * m4/pathmax.m4: New file.
17635
17636         Module same.
17637         * m4/same.m4: New file.
17638
17639         Module save-cwd.
17640         * m4/save-cwd.m4: New file.
17641
17642         Module savedir.
17643         * m4/savedir.m4: New file.
17644
17645         Module xgetcwd.
17646         * m4/xgetcwd.m4: New file.
17647         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
17648
17649         Module xreadlink.
17650         * m4/xreadlink.m4: New file.
17651
17652         Module safe-read.
17653         * m4/safe-read.m4: New file.
17654
17655         Module safe-write.
17656         * m4/safe-write.m4: New file.
17657
17658         Module closeout.
17659         * m4/closeout.m4: New file.
17660
17661         Module stdio-safer.
17662         * m4/stdio-safer.m4: New file.
17663
17664         Module getpass.
17665         * m4/getpass.m4: New file.
17666
17667         Module getugroups.
17668         * m4/getugroups.m4: New file.
17669
17670         Module group-member.
17671         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
17672         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
17673
17674         Module idcache.
17675         * m4/idcache.m4: New file.
17676
17677         Module userspec.
17678         * m4/userspec.m4: New file.
17679
17680         Module gettime.
17681         * m4/clock_time.m4: New file.
17682         * m4/gettime.m4: New file.
17683
17684         Module settime.
17685         * m4/settime.m4: New file.
17686
17687         Module posixtm.
17688         * m4/posixtm.m4: New file.
17689
17690         Module gethostname.
17691         * m4/gethostname.m4: New file.
17692
17693         Module canon-host.
17694         * m4/canon-host.m4: New file.
17695
17696         Module gettext.
17697         * m4/codeset.m4: New file, from gettext-0.11.5.
17698         * m4/gettext.m4: New file, from gettext-0.11.5.
17699         * m4/glibc21.m4: New file, from gettext-0.11.5.
17700         * m4/iconv.m4: New file, from gettext-0.11.5.
17701         * m4/intdiv0.m4: New file, from gettext-0.11.5.
17702         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
17703         * m4/inttypes.m4: New file, from gettext-0.11.5.
17704         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
17705         * m4/isc-posix.m4: New file, from gettext-0.11.5.
17706         * m4/lcmessage.m4: New file, from gettext-0.11.5.
17707         * m4/lib-ld.m4: New file, from gettext-0.11.5.
17708         * m4/lib-link.m4: New file, from gettext-0.11.5.
17709         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
17710         * m4/progtest.m4: New file, from gettext-0.11.5.
17711         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
17712         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
17713         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
17714
17715         Module localcharset.
17716         * m4/localcharset.m4: New file.
17717
17718         Module hard-locale.
17719         * m4/hard-locale.m4: New file.
17720
17721         Module mbswidth.
17722         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
17723         onceonly macros.
17724         * m4/mbrtowc.m4: Add comment.
17725
17726         Module memcasecmp.
17727         * m4/memcasecmp.m4: New file.
17728
17729         Module memcoll.
17730         * m4/memcoll.m4: New file.
17731
17732         Module unicodeio.
17733         * m4/unicodeio.m4: New file.
17734
17735         Module rpmatch.
17736         * m4/rpmatch.m4: New file.
17737
17738         Module yesno.
17739         * m4/yesno.m4: New file.
17740
17741         Module exitfail.
17742         * m4/exitfail.m4: New file.
17743
17744         Module c-stack.
17745         * m4/c-stack.m4 (gl_C_STACK): New macro.
17746         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
17747
17748         Module error.
17749         * m4/error.m4 (gl_ERROR): New macro.
17750         (jm_PREREQ_ERROR): Use onceonly macros.
17751
17752         Module fatal.
17753         * m4/fatal.m4: New file.
17754
17755         Module getloadavg.
17756         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
17757         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
17758
17759         Module getpagesize.
17760         * m4/getpagesize.m4: New file.
17761
17762         Module getusershell.
17763         * m4/getusershell.m4: New file.
17764
17765         Module physmem.
17766         * m4/physmem.m4: New file.
17767
17768         Module posixver.
17769         * m4/posixver.m4: New file.
17770
17771         Module quotearg.
17772         * m4/quotearg.m4: New file.
17773
17774         Module quote.
17775         * m4/quote.m4: New file.
17776
17777         Module readutmp.
17778         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
17779
17780         Module sig2str.
17781         * m4/sig2str.m4: New file.
17782
17783         Other.
17784         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
17785         ulonglong.m4.
17786         * m4/intmax_t.m4: New file.
17787         * m4/d-type.m4: Indentation.
17788         * m4/jm-macros.m4: Update.
17789         * m4/prereq.m4 (jm_PREREQ): Update.
17790         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
17791         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
17792         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
17793         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
17794         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
17795         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
17796         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
17797         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
17798         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
17799         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
17800         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
17801         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
17802         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
17803         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
17804         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
17805         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
17806         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
17807         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
17808         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
17809
17810 2002-12-24  Bruno Haible  <bruno@clisp.org>
17811
17812         * MODULES.txt: Update according to m4/ changes.
17813
17814         Module gettext.
17815         * config.rpath: New file, from gettext-0.11.5.
17816
17817         * modules/*: New module descriptions.
17818         * gnulib-tool: New file.
17819         * MODULES.html.sh: New file.
17820
17821 2002-12-21  Karl Berry  <karl@gnu.org>
17822
17823         * doc/fdl.texi: update to version 1.2.
17824
17825 2002-12-19  Karl Berry  <karl@gnu.org>
17826
17827         * config/config.guess: update from prep.
17828
17829 2002-12-18  Bruno Haible  <bruno@clisp.org>
17830
17831         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
17832         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
17833
17834 2002-12-17  Bruno Haible  <bruno@clisp.org>
17835
17836         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
17837         stdlib.h, string.h.
17838
17839 2002-12-17  Bruno Haible  <bruno@clisp.org>
17840
17841         * lib/canon-host.c (strdup): Remove unused declaration.
17842
17843         * lib/fsusage.c: Include full_read.h.
17844         (get_fs_usage): Use full_read instead of safe_read.
17845
17846         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
17847
17848 2002-12-12  Karl Berry  <karl@gnu.org>
17849
17850         * config/config.guess: update from prep.
17851
17852 2002-12-11  Bruno Haible  <bruno@clisp.org>
17853
17854         * m4/setenv.m4: New file, from gettext-0.11.5.
17855
17856 2002-12-11  Bruno Haible  <bruno@clisp.org>
17857
17858         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
17859         not unsetenv().
17860         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
17861         modifications:
17862
17863         2002-12-11  Bruno Haible  <bruno@clisp.org>
17864
17865                 * setenv.c (alloca): Fall back to malloc.
17866                 (freea): New macro.
17867                 (setenv): Use freea() to free memory allocated with alloca().
17868
17869         2002-11-13  Bruno Haible  <bruno@clisp.org>
17870
17871                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
17872                 function declarations.
17873                 * unsetenv.c (unsetenv): Likewise.
17874
17875         2002-03-04  Bruno Haible  <bruno@clisp.org>
17876
17877                 Portability to AIX 4.3.3.
17878                 * unsetenv.c: New file, extracted from setenv.c.
17879                 * setenv.c: Move the unsetenv() function to unsetenv.c.
17880
17881         2001-12-20  Bruno Haible  <bruno@clisp.org>
17882
17883                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
17884                 use malloc instead. For SunOS 4.
17885
17886         2001-12-11  Bruno Haible  <bruno@clisp.org>
17887
17888                 * setenv.c: Declare alloca.
17889                 (compar_fn_t): New typedef.
17890                 (KNOWN_VALUE, STORE_VALUE): Use it.
17891
17892         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
17893         setenv.h.
17894
17895 2002-12-10  Paul Eggert  <eggert@twinsun.com>
17896
17897         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
17898         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
17899         Choose values that are less likely to collide with system fnmatch
17900         options.
17901         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
17902         defined (e.g., a pure POSIX system).
17903         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
17904         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
17905
17906 2002-12-06  Paul Eggert  <eggert@twinsun.com>
17907
17908         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
17909         a pain in practice to deal with generated m4 files.  This change
17910         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
17911
17912         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
17913         and jm-glibc-io.m4, as they are no longer a special case.
17914         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
17915         kludge and the auto-generation stuff.  Check only whether the
17916         functions are declared, not whether they exist, since older hosts
17917         that don't declare the functions can't use the optimization anyway.
17918
17919 2002-12-06  Jim Meyering  <jim@meyering.net>
17920
17921         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
17922
17923         Merge in changes from libc's misc/error.c, in preparation
17924         for the merge of gnulib's changes back into libc.
17925
17926         * lib/error.c (_): Define only if not already defined.
17927         Move definition to follow all #include directives.
17928         Include unlocked-io.h only if !_LIBC.
17929         [_LIBC]: Include <libio/libioP.h>.
17930         [USE_IN_LIBIO]: Include <libio/iolibio.h>
17931         (fflush): Tweak definition to use INTUSE.
17932         (putc): Define.
17933
17934 2002-12-05  Paul Eggert  <eggert@twinsun.com>
17935
17936         * lib/alloca.c [defined emacs]: Include "lisp.h".
17937         (xalloc_die) [defined emacs]: New macro.
17938         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
17939         [! defined emacs]: Include <xalloc.h>.
17940         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
17941         (pointer): Typedef to POINTER_TYPE *.
17942         (malloc): Remove decl; we now always use xmalloc.
17943         (alloca): Use old-style definition, since Emacs needs this.
17944         Check for arithmetic overflow when computing combined size.
17945
17946 2002-12-04  Paul Eggert  <eggert@twinsun.com>
17947
17948         Do not generate unlocked-io.h automatically, since it's easier to
17949         maintain it by hand.
17950
17951         * lib/unlocked-io.h: New file, from GNU diffutils,
17952         but with proper copyright notice and attribution.
17953         * lib/gen-uio: Remove.
17954         * lib/Makefile.am: Add copyright notice.
17955         (libfetish_a_SOURCES): Add unlocked-io.h.
17956         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
17957         (DISTCLEANFILES, io_functions): Remove macros.
17958         (EXTRA_DIST): Remove gen_uio.
17959         (unlocked-io.h): Remove rule.
17960
17961 2002-12-04  Jim Meyering  <jim@meyering.net>
17962
17963         Reflect the fact that stat.c and lstat.c are no longer generated.
17964         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
17965         (DISTCLEANFILES): Likewise.
17966         (EXTRA_DIST): Likewise.
17967         (all_local): Don't depend on stat.c or lstat.c.
17968         (stat.c, lstat.c): Remove rules.
17969         (EXTRA_DIST): Remove xstat.in.
17970
17971         * lib/xstat.in: Remove file.  Contents moved into stat.c.
17972         * lib/stat.c: New file.  Contents mostly from xstat.in.
17973         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
17974         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
17975
17976         * lib/safe-read.c: Rework so that it may serve to define safe_write,
17977         too.
17978         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
17979
17980 2002-12-03  Jim Meyering  <jim@meyering.net>
17981
17982         * lib/safe-read.c, safe-write.c: Change variable names and comments,
17983         but not semantics, to minimize the differences between these two files.
17984         (safe_read): Change comment to mention SAFE_READ_ERROR.
17985
17986         * lib/safe-read.c (IS_EINTR): Define.
17987         (safe_read): Use IS_EINTR in place of in-function cpp directives.
17988
17989 2002-12-02  Jim Meyering  <jim@meyering.net>
17990
17991         * lib/safe-read.c (EINTR): Define.
17992         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
17993         (INT_MAX): Provide fallback.
17994         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
17995
17996         * lib/safe-read.h (SAFE_READ_ERROR): Define.
17997
17998 2002-12-02  Bruno Haible  <bruno@clisp.org>
17999
18000         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
18001         Define, taken from safe-read.c.
18002         (INT_MAX): Provide fallback.
18003         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
18004         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
18005
18006         * lib/safe-read.c (EINTR): Remove definition.
18007         (safe_read): Don't use EINTR if it is absent.
18008
18009 2002-12-01  Jim Meyering  <jim@meyering.net>
18010
18011         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
18012         zero.
18013         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
18014
18015 2002-11-27  Paul Eggert  <eggert@twinsun.com>
18016
18017         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
18018         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
18019         with `if (! (value < limit)) abort ();', for readability.
18020
18021 2002-11-26  Karl Berry  <karl@gnu.org>
18022
18023         * lib/strdup.c: copy from libc again, with jim's ok.
18024         * lib/.cppi-disable: re-add strdup.c
18025
18026 2002-11-25  Karl Berry  <karl@gnu.org>
18027
18028         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
18029         instead of "strtol.c".
18030
18031 2002-11-25  Karl Berry  <karl@gnu.org>
18032
18033         * config/install-sh: update from automake for variable quoting, $0 in
18034         error msgs, etc.
18035
18036         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
18037         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
18038         entry.
18039
18040 2002-11-25  Jim Meyering  <jim@meyering.net>
18041
18042         * lib/mktime.c: Sync from libc, now that it has the latest fix.
18043
18044 2002-11-24  Karl Berry  <karl@gnu.org>
18045
18046         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
18047         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
18048
18049 2002-11-24  Jim Meyering  <jim@meyering.net>
18050
18051         Update from coreutils:
18052
18053         * lib/mktime.c: Merge in changes from libc.
18054
18055         Avoid a link-time failure on some Linux systems.
18056         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
18057         (otherwise).
18058         (__mon_yday): Declare with the STATIC attribute.
18059         (__mktime_internal): Likewise.
18060         Based on a report from Greg Schafer.
18061
18062 2002-11-23  Jim Meyering  <jim@meyering.net>
18063
18064         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
18065         Use `unsigned', not `int', as type of index.
18066
18067         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
18068
18069         * lib/fsusage.c: Remove unneeded parentheses around operands of
18070         `defined'.
18071
18072 2002-11-22  Paul Eggert  <eggert@twinsun.com>
18073
18074         * lib/quotearg.h: Allow multiple inclusion by surrounding with
18075         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
18076         so that we can be included first.
18077         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
18078         * lib/quotearg.c: Include quotearg.h immediately after config.h.
18079         No need to include stddef.h or sys/types.h any more.
18080         Surround local include files with "", not "<>".
18081         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
18082         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
18083         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
18084         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
18085         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
18086         (ISPRINT): Remove; no longer needed now that we assume C89.
18087
18088         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
18089         Preserve errno.
18090
18091         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
18092         quotearg_char): Use SIZE_MAX rather than
18093         (size_t) -1 when we are talking about "infinity".
18094
18095         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
18096
18097 2002-11-22  Paul Eggert  <eggert@twinsun.com>
18098
18099         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
18100         hint that one should use `if (! x) abort ();' rather than `assert
18101         (x);', and anyway it's one less thing to worry about configuring.
18102         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
18103         hash_rehash, hash_insert): Use abort rather than assert.
18104
18105 2002-11-22  Bruno Haible  <bruno@clisp.org>
18106
18107         * lib/safe-read.h: Assume C89. Add comments.
18108         (safe_read): Change return type to size_t.
18109         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
18110         byte counts > SSIZE_MAX correctly.
18111         * lib/safe-write.h: New file.
18112         * lib/safe-write.c: New file.
18113         * lib/full-read.h: New file.
18114         * lib/full-read.c: New file.
18115         * lib/full-write.h: Assume C89. Add comments.
18116         * lib/full-write.c: Include safe-write.h.
18117         (full_write): Rewritten to use safe_write.
18118         Suggested by Jim Meyering and Paul Eggert.
18119
18120 2002-11-21  Jim Meyering  <jim@meyering.net>
18121
18122         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
18123
18124         Merge in changes from the coreutils.
18125
18126         2002-09-25  Paul Eggert  <eggert@twinsun.com>
18127         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
18128         <stdint.h>.
18129         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
18130         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
18131         int.  Work more efficiently if X is the same width as uintmax_t.
18132         Do not compare X to -1, to avoid bogus compiler warning.
18133         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
18134         Don't assume that f_frsize and f_bsize are the same type.
18135
18136         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
18137         warning on FreeBSD.
18138
18139         * lib/makepath.c (make_path): Restore umask *before* creating the final
18140         component.
18141         (make_path): Minor reformatting.
18142
18143         * lib/xmalloc.c: Adjust to work with new autoconf macros,
18144         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
18145         HAVE_MALLOC/HAVE_REALLOC.
18146
18147         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
18148         dummy ones.  At least on GNU/Linux systems, `auto' means something
18149         else.
18150         From Michael Stone.
18151
18152 2002-11-21  Bruno Haible  <bruno@clisp.org>
18153
18154         Remove case insensitive option matching.
18155         * lib/argmatch.h (argcasematch): Remove declaration.
18156         (ARGCASEMATCH): Remove macro.
18157         (__xargmatch_internal): Remove case_sensitive argument.
18158         (XARGMATCH): Update.
18159         (XARGCASEMATCH): Remove macro.
18160         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
18161         case_sensitive argument.
18162         (argcasematch): Remove function.
18163         (__xargmatch_internal): Remove case_sensitive argument.
18164         (main): Use XARGMATCH instead of XARGCASEMATCH.
18165
18166         * lib/xmalloc.c: Change compile-time error message. Add comment about
18167         required autoconf version.
18168
18169 2002-11-20  Paul Eggert  <eggert@twinsun.com>
18170
18171         Merge argmatch cleanups from Bison.  Assume C89.
18172
18173         * lib/argmatch.c: Include config.h here, not in argmatch.h.
18174         Include stdlib.h, for EXIT_FAILURE.
18175         Always include <string.h>, since we assume C89.
18176         (EXIT_FAILURE): Remove pre-C89 bug workaround.
18177         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
18178         Include <stddef.h> instead, since it's all we need for size_t.
18179         (PARAMS): Remove.  All uses removed.
18180         (ARRAY_CARDINALITY): Do not bother to #undef.
18181         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
18182         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
18183         Remove unnecessary parentheses.
18184         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
18185         Insert necessary parentheses.
18186         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
18187         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
18188
18189 2002-11-19  Bruno Haible  <bruno@clisp.org>
18190
18191         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
18192         * lib/mbswidth.h: Include <stddef.h>, for size_t.
18193
18194         * lib/mbswidth.h (PARAMS): Remove macro.
18195         (mbswidth, mbsnwidth): Use ANSI C function declarations.
18196         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
18197
18198         * lib/gcd.h (PARAMS): Remove macro.
18199         (gcd): Use ANSI C function declarations.
18200         * lib/gcd.c (gcd): Likewise.
18201
18202 2002-11-15  Bruno Haible  <bruno@clisp.org>
18203
18204         * lib/strcspn.c: Include <stddef.h>.
18205         (strcspn): Use ANSI C function declaration. Change return type to
18206         size_t. Use NULL.
18207         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
18208         (strpbrk): Use NULL.
18209         * lib/strpbrk.h (PARAMS): Remove macro.
18210         (strpbrk): Use ANSI C function declaration.
18211         * lib/strstr.c: Don't include <sys/types.h>.
18212         * lib/strstr.h (PARAMS): Remove macro.
18213         (strstr): Use ANSI C function declarations.
18214
18215 2002-11-14  Karl Berry  <karl@gnu.org>
18216
18217         * config/mkinstalldirs: `do' on separate line, instead of
18218         `for var; do'.
18219
18220 2002-11-06  Bruno Haible  <bruno@clisp.org>
18221
18222         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
18223         * lib/gcd.c (gcd): Likewise.
18224
18225 2002-11-05  Bruno Haible  <bruno@clisp.org>
18226
18227         * lib/gcd.h: New file, from gettext-0.11.5.
18228         * lib/gcd.c: New file, from gettext-0.11.5.
18229
18230 2002-11-05  Bruno Haible  <bruno@clisp.org>
18231
18232         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18233         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18234         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18235         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
18236
18237         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
18238         <libintl.h>.
18239         * lib/makepath.c: Include gettext.h instead of <locale.h> and
18240         <libintl.h>.
18241
18242         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
18243         * lib/human.c: Include gettext.h instead of <libintl.h>.
18244         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
18245         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
18246         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
18247         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
18248         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
18249         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
18250         (textdomain): Remove definition.
18251         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
18252
18253         * lib/long-options.c: Remove include of <libintl.h> and definition of
18254         _.
18255         * lib/same.c: Remove include of <libintl.h> and definition of _.
18256
18257 2002-11-04  Owen Taylor  <otaylor@redhat.com>
18258
18259         * lib/config.charset: A few additions for Solaris.
18260
18261 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
18262
18263         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
18264         * lib/localcharset.c (locale_charset): Declare as extern "C".
18265
18266 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
18267
18268         * lib/config.charset: msdos in uk_UA uses CP1125.
18269
18270 2002-11-04  Bruno Haible  <bruno@clisp.org>
18271
18272         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
18273         * lib/strcase.h: New file, from GNU gettext-0.11.5.
18274         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
18275         * lib/strstr.h: New file, from GNU gettext-0.11.5.
18276         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
18277
18278 2002-11-04  Bruno Haible  <bruno@clisp.org>
18279
18280         * lib/localcharset.c (locale_charset): Don't return an empty string.
18281
18282 2002-11-04  Bruno Haible  <bruno@clisp.org>
18283
18284         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
18285         aliases.
18286
18287 2002-11-04  Bruno Haible  <bruno@clisp.org>
18288
18289         * lib/config.charset: Update for newest glibc. Add canonical names
18290         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
18291
18292 2002-11-04  Bruno Haible  <bruno@clisp.org>
18293
18294         * lib/config.charset: Add support for NetBSD.
18295
18296 2002-11-04  Bruno Haible  <bruno@clisp.org>
18297
18298         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
18299
18300 2002-11-01  Bruno Haible  <bruno@clisp.org>
18301
18302         * configure.in: Add AC_CONFIG_AUX_DIR call.
18303         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
18304         test/Makefile.
18305         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
18306
18307 2002-09-28  Karl Berry  <karl@gnu.org>
18308
18309         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
18310         installed automake until the next release, since changes have been
18311         made.
18312
18313 2002-09-25  Karl Berry  <karl@gnu.org>
18314
18315         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
18316         * lib/getopt*: copy from libc/posix.
18317         * lib/gettext.h: copy from gettext.
18318         * lib/.cppi-disable: add strdup.c, gettext.h.
18319
18320 2002-09-25  Karl Berry  <karl@gnu.org>
18321
18322         * config/srclist.txt: enable gettext.h check.
18323         * config/config.{guess,sub}: update from prep.
18324         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
18325                 from automake 1.6.3.
18326         See srclist*.
18327
18328 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
18329
18330         * regex.c (PATFETCH): Remove the translating fetch.
18331         (PATFETCH_RAW): Rename to PATFETCH.
18332         (set_image_of_range): New fun.
18333         (SET_RANGE_TABLE_WORK_AREA): Use it.
18334         (regex_compile): Don't translate the pattern chars so eagerly.
18335         Only do it when inserting an `exactn' bytecode or when handling
18336         a char-range.
18337         (mutually_exclusive_p): Avoid empty statement.
18338
18339 2002-07-06  Jim Meyering  <meyering@lucent.com>
18340
18341         * m4/README: Don't mention Makefile.am.in.
18342         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
18343
18344 2002-07-01  Jim Meyering  <meyering@lucent.com>
18345
18346         * lib/c-stack.c: Include sys/time.h.
18347         From Volker Borchert.
18348
18349 2002-06-26  Paul Eggert  <eggert@twinsun.com>
18350
18351         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
18352
18353 2002-06-26  Paul Eggert  <eggert@twinsun.com>
18354
18355         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
18356         New macro.  Use it uniformly instead of
18357         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
18358         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
18359         reported by Vin Shelton.
18360
18361 2002-06-22  Paul Eggert  <eggert@twinsun.com>
18362
18363         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
18364         Do not assume SA_SIGINFO behavior.
18365         Bug reported by Jim Meyering on NetBSD 1.5.2.
18366
18367 2002-06-22  Jim Meyering  <meyering@lucent.com>
18368
18369         * m4/c-stack.m4: New file, from diffutils-2.8.2.
18370         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
18371
18372         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
18373         now that configure.ac uses AC_GNU_SOURCE.
18374         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
18375         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
18376
18377         Update to latest tools.  Suggestions from Paul Eggert.
18378         * m4/stdbool.m4: New file, from diffutils-2.8.2.
18379         * m4/gnu-source.m4: Update from diffutils-2.8.2.
18380         * m4/fnmatch.m4: Likewise.
18381         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
18382         to AC_HEADER_STDBOOL
18383
18384 2002-06-22  Jim Meyering  <meyering@lucent.com>
18385
18386         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
18387         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
18388
18389 2002-06-22  Jim Meyering  <meyering@lucent.com>
18390
18391         * lib/c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
18392
18393         * lib/exitfail.c, exitfail.h: Likewise.
18394         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
18395
18396         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
18397         of fnmatch.h.
18398         (EXTRA_DIST): Add fnmatch_loop.c.
18399         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
18400
18401         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
18402         * lib/fnmatch.c: Update from diffutils-2.8.2.
18403         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
18404         * lib/fnmatch.h: Remove file.
18405
18406 2002-06-21  Jim Meyering  <meyering@lucent.com>
18407
18408         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
18409         * m4/mbrtowc.m4: Likewise.
18410
18411         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
18412         * m4/mbswidth.m4: Reflect name change:
18413         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
18414         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
18415
18416         * m4/lib-link.m4: Update from gettext-0.11.2.
18417         * m4/gettext.m4: Likewise.
18418
18419         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
18420         From Alfred M. Szmidt.
18421
18422 2002-06-18  Paul Eggert  <eggert@twinsun.com>
18423
18424         * lib/file-type.h: Report an error if neither S_ISREG nor
18425         S_IFREG is defined, instead of using a test specific to glibc
18426         2.2.  This should be safe, since POSIX requires S_ISREG and
18427         Unix Version 7 had S_IFREG.  We don't need to check for
18428         <sys/types.h> since we don't use any symbols that it defines.
18429
18430 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
18431
18432         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
18433         $@-t, so that each temporary file name is unique and valid in the first
18434         8 characters, for operation under DOS.
18435
18436 2002-06-15  Paul Eggert  <eggert@twinsun.com>
18437
18438         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
18439
18440 2002-06-15  Jim Meyering  <meyering@lucent.com>
18441
18442         Work even with DJGPP 2.03, which lacks support for symlinks.
18443         From Richard Dawe.
18444         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
18445         is defined.
18446         * lib/lchown.c (S_ISLNK): Likewise.
18447
18448 2002-06-15  Jim Meyering  <meyering@lucent.com>
18449
18450         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
18451         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
18452         have been included before this file.
18453
18454 2002-06-14  Jim Meyering  <meyering@lucent.com>
18455
18456         * lib/file-type.h: Use the version from diffutils-2.8.2.
18457         * lib/file-type.c: Likewise.
18458
18459 2002-06-07  Jim Meyering  <meyering@lucent.com>
18460
18461         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
18462         They're needed at least for NetBSD 1.5.2.
18463         ($statxfs_includes): Include those same headers.
18464         ($statxfs_includes): Include sys/vfs.h if available.
18465         ($statxfs_includes): Likewise for sys/statvfs.h.
18466         Check for the following members in both structs statfs and statvfs:
18467         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
18468
18469 2002-06-01  Jim Meyering  <meyering@lucent.com>
18470
18471         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
18472         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
18473
18474 2002-05-28  Jim Meyering  <meyering@lucent.com>
18475
18476         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
18477         Reported by Volker Borchert.
18478
18479 2002-05-27  Jim Meyering  <meyering@lucent.com>
18480
18481         Fix a problem seen only on nonconforming systems whereby ls.c's
18482         use of localtime, and then of gettimeofday would cause trouble:
18483         the localtime call used to initialize rpl_gettimeofday's save
18484         mechanism would clobber ls's current local time information so
18485         that in any long listing the first file would always be listed
18486         with date 1970-01-01.  Analysis by Volker Borchert.
18487
18488         * lib/gettimeofday.c (localtime): Undefine.
18489         (rpl_localtime): New function.
18490
18491 2002-05-27  Jim Meyering  <meyering@lucent.com>
18492
18493         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
18494         localtime.
18495
18496         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
18497         use the replacement function; it wouldn't resolve at link time.
18498         Reported by Volker Borchert.
18499
18500 2002-05-22  Jim Meyering  <meyering@lucent.com>
18501
18502         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
18503         file-type.h.
18504         * lib/file-type.h: New file.
18505         * lib/file-type.c (file_type): New file/function.  Extracted from
18506         diffutils.
18507
18508 2002-04-30  Jim Meyering  <meyering@lucent.com>
18509
18510         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
18511
18512 2002-04-29  Paul Eggert  <eggert@twinsun.com>
18513
18514         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
18515
18516 2002-04-29  Paul Eggert  <eggert@twinsun.com>
18517
18518         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
18519         Do not check for alloca.h (no longer used) or stdbool.h (was never
18520         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
18521
18522 2002-04-29  Paul Eggert  <eggert@twinsun.com>
18523
18524         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
18525
18526 2002-04-29  Jim Meyering  <meyering@lucent.com>
18527
18528         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
18529         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
18530         Use AC_FUNC_STRNLEN here instead.
18531
18532         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
18533         With autoconf-2.53a, it's part of AC_PROG_CC.
18534
18535 2002-04-28  Paul Eggert  <eggert@twinsun.com>
18536
18537         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
18538         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
18539
18540 2002-04-28  Paul Eggert  <eggert@twinsun.com>
18541
18542         * lib/sig2str.h, sig2str.c: New files.
18543         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
18544
18545 2002-04-28  Paul Eggert  <eggert@twinsun.com>
18546
18547         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
18548         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
18549         of 127, since 64 is the largest conceivable number for ancient
18550         nonstandard hosts.
18551         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
18552
18553 2002-04-28  Jim Meyering  <meyering@lucent.com>
18554
18555         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
18556
18557 2002-04-24  Jim Meyering  <meyering@lucent.com>
18558
18559         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
18560         (jm_PREREQ): Use it.
18561
18562         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
18563         mach/mach.h fcntl.h.
18564         Check for this function: setlocale.
18565
18566 2002-04-24  Jim Meyering  <meyering@lucent.com>
18567
18568         * lib/gettext.h: New file, from Gettext.
18569         * lib/Makefile.am (INCLUDES): Remove -I../intl.
18570         (libfetish_a_SOURCES): Add gettext.h.
18571
18572 2002-04-16  Jim Meyering  <meyering@lucent.com>
18573
18574         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
18575         ut_pid, ut_id, ut_exit.
18576
18577 2002-04-16  Jim Meyering  <meyering@lucent.com>
18578
18579         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
18580         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
18581         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
18582
18583 2002-04-12  Jim Meyering  <meyering@lucent.com>
18584
18585         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
18586         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
18587         existence of the getmntinfo function.  Needed for Darwin 5.3.
18588
18589         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
18590         This is necessary at least on Darwin 5.3.
18591
18592         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
18593         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
18594         strnlen.o in the library, and that makes some versions of ranlib
18595         object.
18596
18597 2002-04-12  Jim Meyering  <meyering@lucent.com>
18598
18599         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
18600
18601 2002-04-09  Jim Meyering  <meyering@lucent.com>
18602
18603         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
18604         to be more precise.  Rather than saying we're checking whether the
18605         function `works', say what we're testing.
18606         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
18607         Reported by Bruno Haible.
18608
18609 2002-03-10  Jim Meyering  <meyering@lucent.com>
18610
18611         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
18612         Suggestion from Santiago Vila.
18613
18614 2002-03-08  Jim Meyering  <meyering@lucent.com>
18615
18616         * lib/rename.c: Mention that this wrapper is needed also on
18617         mips-dec-ultrix4.4 systems.
18618
18619 2002-03-02  Jim Meyering  <meyering@lucent.com>
18620
18621         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
18622         not HAVE_CLOCK_SETTIME.
18623
18624 2002-02-27  Paul Eggert  <eggert@twinsun.com>
18625
18626         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
18627         Check for clock_settime.
18628
18629 2002-02-27  Paul Eggert  <eggert@twinsun.com>
18630
18631         * lib/nanosleep.h: Rename to....
18632         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
18633
18634         * lib/gettime.c: New file.
18635         * lib/settime.c: New file.
18636         * lib/stime.c: Remove.
18637
18638         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
18639         timespec.h.  Remove nanosleep.h.
18640
18641 2002-02-25  Paul Eggert  <eggert@twinsun.com>
18642
18643         * m4/acl.m4: New file.
18644         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
18645         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
18646
18647 2002-02-25  Paul Eggert  <eggert@twinsun.com>
18648
18649         * lib/acl.c, acl.h: New files.
18650         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
18651
18652 2002-02-24  Jim Meyering  <meyering@lucent.com>
18653
18654         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
18655         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
18656         cause trouble.  Reported by Nelson Beebe.
18657
18658 2002-02-23  Paul Eggert  <eggert@twinsun.com>
18659
18660         * lib/path-concat.c (xpath_concat): Reorder code to pacify
18661         compilers that don't know that xalloc_die never returns.
18662
18663 2002-02-20  Jim Meyering  <meyering@lucent.com>
18664
18665         * lib/getdate.c: Regenerate using bison-1.33.
18666
18667 2002-02-17  Jim Meyering  <meyering@lucent.com>
18668
18669         * config/config.guess (main): Don't use `head -1'; it's no longer
18670         portable. Use `sed 1q' instead.
18671
18672 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
18673
18674         * m4/codeset.m4: Upgrade to gettext-0.11.
18675         * m4/gettext.m4: Upgrade to gettext-0.11.
18676         * m4/glibc21.m4: Upgrade to gettext-0.11.
18677         * m4/iconv.m4: Upgrade to gettext-0.11.
18678         * m4/isc-posix.m4: Upgrade to gettext-0.11.
18679         * m4/lcmessage.m4: Upgrade to gettext-0.11.
18680         * m4/lib-ld.m4: New file, from gettext-0.11.
18681         * m4/lib-link.m4: New file, from gettext-0.11.
18682         * m4/lib-prefix.m4: New file, from gettext-0.11.
18683         * m4/progtest.m4: Upgrade to gettext-0.11.
18684
18685 2002-02-15  Paul Eggert  <eggert@twinsun.com>
18686
18687         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
18688         (jm_PREREQ): Use it.
18689
18690 2002-02-15  Paul Eggert  <eggert@twinsun.com>
18691
18692         * lib/posixver.c, posixver.h: New files.
18693         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
18694
18695 2002-02-02  Paul Eggert  <eggert@twinsun.com>
18696             Bruno Haible  <bruno@clisp.org>
18697
18698         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
18699         (fwrite_success_callback): New declaration.
18700         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
18701         print_unicode_char. Call failure callback instead of error.
18702         (fwrite_success_callback): New function.
18703         (exit_failure_callback): New function.
18704         (fallback_failure_callback): New function.
18705         (print_unicode_char): Call unicode_to_mb.
18706
18707 2002-01-26  Jim Meyering  <meyering@lucent.com>
18708
18709         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
18710         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
18711
18712 2002-01-26  Jim Meyering  <meyering@lucent.com>
18713
18714         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
18715
18716 2002-01-22  Paul Eggert  <eggert@twinsun.com>
18717
18718         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
18719
18720 2002-01-22  Jim Meyering  <meyering@lucent.com>
18721
18722         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
18723         Otherwise, some versions of automake would omit the rule that makes
18724         Makefile from Makefile.in.
18725
18726 2002-01-21  Paul Eggert  <eggert@twinsun.com>
18727
18728         * lib/xmemcoll.h, xmemcoll.c: New files.
18729         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
18730         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
18731         (memcoll): Set errno to zero if there is no error.
18732
18733         * lib/quotearg.c (quotearg_buffer_restyled):
18734         Fix bug with quoting buffers containing NUL when backslashing escapes.
18735         This bug was exposed by the other changes in this patch.
18736         (quotearg_n_options): New arg ARGSIZE.
18737         All callers changed.
18738         (quoting_options_from_style): New function.
18739         (quotearg_n_style): Use it.
18740         (quotearg_n_style_mem): New function.
18741
18742         * lib/quotearg.h (quotearg_n_style_mem): New function.
18743
18744 2002-01-19  Jim Meyering  <meyering@lucent.com>
18745
18746         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
18747         Remove useless quotes: DF_PROG="df".
18748         * m4/strnlen.m4: New file.
18749
18750 2002-01-16  Paul Eggert  <eggert@twinsun.com>
18751
18752         * lib/backupfile.c (ISDIGIT): Comment fix.
18753         * lib/getdate.y (ISDIGIT): Likewise.
18754         * lib/posixtm.c (ISDIGIT, year): Likewise.
18755         * lib/strverscmp.c (ISDIGIT): Likewise.
18756         * lib/userspec.c (ISDIGIT): Likewise.
18757
18758 2002-01-16  Jim Meyering  <meyering@lucent.com>
18759
18760         * lib/getdate.y: Add three semicolons, each just before a closing
18761         brace. Bison (as of version 1.31) no longer papers over that mistake.
18762
18763 2002-01-05  Jim Meyering  <meyering@lucent.com>
18764
18765         * lib/version-etc.c (version_etc_copyright): Update copyright year.
18766
18767 2001-12-19  Paul Eggert  <eggert@twinsun.com>
18768
18769         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
18770         not silently exit merely because the output buffer happens to
18771         have nothing pending.
18772
18773 2001-12-18  Paul Eggert  <eggert@twinsun.com>
18774
18775         See the big note in ../ChangeLog.
18776         * lib/human.c (suffixes): Prefer K to k for 1024.
18777         (generate_suffix_backwards): New function.
18778         (human_readable_inexact): Use it.
18779         * lib/xstrtol.c (__xstrtol): If there is no number but there
18780         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
18781         Accept 'K' as well as 'k'.
18782
18783 2001-12-15  Jim Meyering  <meyering@lucent.com>
18784
18785         * lib/regex.h (__restrict_arr): Update from libc.
18786
18787         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
18788         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
18789         (STREQ): Define.
18790
18791 2001-12-14  Jim Meyering  <meyering@lucent.com>
18792
18793         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
18794         Suggestion from Bruno Haible.
18795
18796 2001-12-10  Jim Meyering  <meyering@lucent.com>
18797
18798         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
18799         xrealloc, Instead, include "xalloc.h".
18800         (initbuffer): Don't cast xmalloc return value to char*.
18801         (readline): Reword comment.
18802         Don't cast xrealloc return value to char*
18803         Return NULL, not 0.
18804
18805 2001-12-09  Jim Meyering  <meyering@lucent.com>
18806
18807         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
18808         about `signed and unsigned type in conditional expression'.
18809         * lib/posixtm.c (posix_time_parse): Likewise.
18810
18811         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
18812
18813         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
18814         to avoid a pedantic warning.
18815
18816         * lib/getstr.c: Don't include assert.h.
18817         (getstr): Remove warning-evoking assertions.
18818         Return -1 if offset parameter is out of bounds.
18819         Change the type of a local from int to size_t.
18820
18821         * lib/strftime.c (my_strftime_localtime_r): Include this function
18822         definition in the `#if ! HAVE_TM_GMTOFF' block.
18823
18824         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
18825         Include xalloc.h instead.
18826
18827 2001-12-02  Jim Meyering  <meyering@lucent.com>
18828
18829         * lib/tempname.c: Don't declare getenv, thus reverting the change of
18830         2001-11-18.  It's no longer necessary, now that stdlib.h is always
18831         included.
18832
18833         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
18834         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
18835
18836 2001-11-30  Akim Demaille  <akim@epita.fr>
18837
18838         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
18839         before being defined.
18840
18841 2001-11-27  Paul Eggert  <eggert@twinsun.com>
18842
18843         * lib/quotearg.h (quotearg_n, quotearg_n_style):
18844         First arg is int, not unsigned.
18845         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
18846         (SIZE_MAX, UINT_MAX): New macros.
18847         (quotearg_n_options): Abort if N is negative.
18848         Avoid overflow check on hosts where size_t is 64 bits and int
18849         is 32 bits, as overflow is impossible there.
18850         Fix off-by-one typo that caused unnecessary reallocation.
18851
18852 2001-11-27  Jim Meyering  <meyering@lucent.com>
18853
18854         * lib/tempname.c: Merge with version from libc.
18855         * lib/regex.c: Likewise.
18856
18857         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
18858         systems for which STDC_HEADERS is 0, it was not included, resulting in
18859         a warning about an integer-to-pointer conversion problem with getenv.
18860         Reported by Volker Borchert.
18861
18862 2001-11-26  Jim Meyering  <meyering@lucent.com>
18863
18864         * lib/gtod.h: Remove file.
18865         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
18866         * lib/gettimeofday.c: Don't include gtod.h.
18867         (GTOD_init): Remove function.
18868         (rpl_gettimeofday): Do its job here instead, rather than aborting.
18869         Suggestion from Volker Borchert.
18870
18871 2001-11-23  Jim Meyering  <meyering@lucent.com>
18872
18873         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
18874         it.
18875         * lib/hash.c (struct hash_table): Define it here instead.
18876
18877 2001-11-22  Jim Meyering  <meyering@lucent.com>
18878
18879         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
18880
18881 2001-11-20  Jim Meyering  <meyering@lucent.com>
18882
18883         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
18884         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
18885
18886 2001-11-19  Jim Meyering  <meyering@lucent.com>
18887
18888         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
18889         directory.  Use "conftestXXXXXX" as the template.
18890         Suggestion from Paul Eggert.
18891
18892         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
18893         immediately, so the test doesn't mistakenly hit the max-open-files
18894         limit.
18895
18896 2001-11-18  Paul Eggert  <eggert@twinsun.com>
18897
18898         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
18899         (TEMPORARIES): New macro.
18900         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
18901         removes an artificial limitation (e.g. HP-UX 10.20, where
18902         TMP_MAX is 17576).
18903
18904 2001-11-18  Jim Meyering  <meyering@lucent.com>
18905
18906         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
18907
18908 2001-11-18  Jim Meyering  <meyering@lucent.com>
18909
18910         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
18911         on SunOS 4.
18912
18913         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
18914         files will be created before anything else.
18915
18916 2001-11-17 Paul Eggert  <eggert@twinsun.com>
18917
18918         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
18919         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
18920
18921 2001-11-17  Jim Meyering  <meyering@lucent.com>
18922
18923         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
18924         Prompted by a report from Bob Proulx.
18925
18926         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
18927         Instead, require UTILS_FUNC_MKSTEMP.
18928
18929 2001-11-17  Jim Meyering  <meyering@lucent.com>
18930
18931         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
18932         Now, that's done as part of AC_FUNC_STRTOD.
18933
18934 2001-11-17  Jim Meyering  <meyering@lucent.com>
18935
18936         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
18937         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
18938         rather than group writable.  Patch by Juan F. Codagnone.
18939
18940         * lib/readtokens.c: Remove explicit declarations of xmalloc and
18941         xrealloc, Instead, include "xalloc.h".
18942
18943         * lib/mountlist.c: Include unlocked-io.h after all system headers.
18944         Remove explicit declarations of xmalloc, xrealloc,
18945         and xstrdup.  Instead, include "xalloc.h".
18946
18947         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
18948         unlocked-io.h.
18949         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
18950         Likewise.
18951         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
18952
18953         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
18954         Reported by Padraig Brady.
18955
18956         * lib/mkstemp.c: #undef mkstemp.
18957         Include config.h.
18958         (rpl_mkstemp): Rename from mkstemp.
18959         Protoize.
18960
18961 2001-11-16  Jim Meyering  <meyering@lucent.com>
18962
18963         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
18964         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
18965         determine the amount of total physical memory, use pstat_getstatic.
18966         HPUX-11 doesn't define _SC_PHYS_PAGES.
18967         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
18968         If sysconf couldn't be used to determine the amount of available
18969         physical memory, use both pstat_getstatic and pstat_getdynamic.
18970         Based on a patch from Bob Proulx.
18971
18972 2001-11-10  Jim Meyering  <meyering@lucent.com>
18973
18974         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
18975         (jm_PREREQ): Use it.
18976
18977 2001-11-09  Jim Meyering  <meyering@lucent.com>
18978
18979         * m4/jm-macros.m4: Require autoconf-2.52f.
18980         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
18981         Use these AC_-prefixed names, not the AM_-prefixed ones.
18982
18983         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
18984
18985 2001-11-05  Jim Meyering  <meyering@lucent.com>
18986
18987         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
18988
18989 2001-11-04  Jim Meyering  <meyering@lucent.com>
18990
18991         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
18992         $DEFS.
18993
18994 2001-11-03  Jim Meyering  <meyering@lucent.com>
18995
18996         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
18997         of AC_DEFUN.
18998
18999         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
19000         know the name of the variable in the macro definition.
19001
19002 2001-11-03  Jim Meyering  <meyering@lucent.com>
19003
19004         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
19005         in argmatch_to_argument call.
19006
19007         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
19008         argument.
19009
19010         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
19011         e.g., a fault due to an attempt to free a NULL pointer.
19012
19013 2001-11-01  Jim Meyering  <meyering@lucent.com>
19014
19015         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
19016         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
19017
19018 2001-11-01  Jim Meyering  <meyering@lucent.com>
19019
19020         * lib/dirfd.c, dirfd.h: New files.
19021         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
19022
19023         * lib/hash.c (hash_print) [TESTING]: Clean up.
19024
19025 2001-10-22  Paul Eggert  <eggert@twinsun.com>
19026
19027         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
19028         to avoid a warning if -Wall.
19029
19030 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
19031
19032         * README: New file
19033         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
19034         (per RMS's instructions, this is now the canonical source)
19035         * lgpl/, gpl/: New directories.
19036
19037 2001-10-21  Paul Eggert  <eggert@twinsun.com>
19038
19039         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
19040
19041 2001-10-21  Jim Meyering  <meyering@lucent.com>
19042
19043         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
19044         this code would end up calling gettext even in packages built
19045         with --disable-nls.
19046         * lib/getopt.c (_): Likewise.
19047         * lib/regex.c (_): Likewise.
19048
19049 2001-10-20  Paul Eggert  <eggert@twinsun.com>
19050
19051         * m4/error.m4 (jm_PREREQ_ERROR):
19052         Do not invoke AC_CHECK_FUNCS with strerror_r, as
19053         AC_FUNC_STRERROR_R does that.
19054         Check for strerror declaration.
19055
19056         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
19057         are supposed to have them these days.
19058         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
19059         Merge changes from latest Autoconf CVS.
19060         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
19061         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
19062         POSIX decided to standardize on the int flavor of strerror_r.
19063
19064 2001-10-20  Paul Eggert  <eggert@twinsun.com>
19065
19066         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
19067         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
19068         Use strerror_r that is only a macro, even if it is not a function.
19069         (strerror): Check for HAVE_DECL_STRERROR before declaring.
19070         (private_strerror): Use prototypes, not old-style function definition.
19071         (print_errno_message): New function.
19072         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
19073         char*-flavored one.
19074         (error_tail, error, error_at_line): Use it.
19075
19076 2001-10-11  Jim Meyering  <meyering@lucent.com>
19077
19078         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
19079         and quote_n (1, ... to avoid clobbering a buffer.
19080
19081 2001-10-05  Jim Meyering  <meyering@lucent.com>
19082
19083         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
19084         hash-pjw.h.
19085         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
19086         * lib/hash-pjw.h: New file.
19087
19088 2001-09-30  Jim Meyering  <meyering@lucent.com>
19089
19090         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
19091         `struct fsstat' has the `f_fstypename' member.
19092         Use that to define FS_TYPE, which is now used to make
19093         the getfsstat link test tighter.
19094
19095 2001-09-30  Jim Meyering  <meyering@lucent.com>
19096
19097         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
19098         Include <sys/ucred.h>, for Apple Darwin.
19099         Include sys/mount.h and sys/fs_types.h only if available.
19100         (FS_TYPE): Define.
19101         (read_filesystem_list): Use FS_TYPE.
19102
19103 2001-09-29  Paul Eggert  <eggert@twinsun.com>
19104
19105         * lib/exclude.c (excluded_filename): 0 -> false, since it's
19106         a boolean context.
19107
19108 2001-09-29  Jim Meyering  <meyering@lucent.com>
19109
19110         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
19111         [one-argument getmntent function]): Include stdio.h before mntent.h.
19112         SunOS 4.1.x needs it for the declaration of `FILE'.
19113         Patch by Volker Borchert.
19114
19115         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
19116         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
19117         sys/fs_types.h, and make the link-test for getfsstat guard #include
19118         directives with appropriate #if HAVE_*_H tests so that we can
19119         detect getfsstat on Apple Darwin1.3.7 systems.
19120         Reported by Nelson Beebe.
19121         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
19122
19123 2001-09-28  Paul Eggert  <eggert@twinsun.com>
19124
19125         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
19126         #defines strtoimax.  Also treat the other strto* functions
19127         like strtoimax.
19128
19129         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
19130         Check for strtoul and strtoumax,
19131         as those declarations are made even in the signed case.
19132         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
19133         Likewise, for strtol and strtoimax.
19134
19135 2001-09-28  Paul Eggert  <eggert@twinsun.com>
19136
19137         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
19138         #defines strtoimax.  Also treat the other strto* functions
19139         like strtoimax.
19140
19141         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
19142         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
19143         (strtoimax, strtoumax): Do not declare if already defined as a macro.
19144
19145 2001-09-26  Jim Meyering  <meyering@lucent.com>
19146
19147         Most macros in unlocked-io.h had the wrong number of arguments.
19148         * lib/gen-uio: New script.
19149         (USE_UNLOCKED_IO): Define to 1 if not already defined.
19150         * lib/unlocked-io.hin: Remove file.
19151         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
19152         rather than trying to embed it here.
19153         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
19154         Reported by Padraig Brady.
19155
19156 2001-09-25  Volker Borchert  <bt@teknon.de>
19157
19158         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
19159         `result'.
19160
19161 2001-09-24  Jim Meyering  <meyering@lucent.com>
19162
19163         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
19164
19165 2001-09-23  Jim Meyering  <meyering@lucent.com>
19166
19167         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
19168         instead of the mere test for existence of mntent.h.  The latter
19169         would get a false-positive on AIX 3.4 systems.
19170         In the outer getmntent if-block, don't die if neither of the getmntent
19171         tests succeeds.  Instead, just fall through and continue with the
19172         remaining tests.
19173
19174 2001-09-23  Jim Meyering  <meyering@lucent.com>
19175
19176         * lib/mountlist.c: Remove useless parentheses in #if directives.
19177         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
19178         the deprecated MOUNTED symbol is no longer defined in mntent.h.
19179
19180 2001-09-22  Jim Meyering  <meyering@lucent.com>
19181
19182         * m4/gettext.m4: New file.  From gettext.
19183         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
19184         * m4/progtest.m4: Likewise
19185         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
19186         * m4/glibc21.m4: Likewise.
19187
19188         * m4/libintl.m4: Remove.  No longer used.
19189
19190 2001-09-22  Jim Meyering  <meyering@lucent.com>
19191
19192         * lib/localcharset.c: Update from latest gettext.
19193         * lib/config.charset: Likewise.
19194
19195 2001-09-20  Jim Meyering  <meyering@lucent.com>
19196
19197         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
19198         strtoimax.
19199         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
19200         strtoumax.
19201
19202 2001-09-20  Jim Meyering  <meyering@lucent.com>
19203
19204         * lib/xstrtol.c (strtoimax): Guard declaration with
19205         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
19206         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
19207         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
19208         (strtoumax): Likewise, for completeness (it wasn't necessary).
19209
19210 2001-09-17  Paul Eggert  <eggert@twinsun.com>
19211
19212         * lib/strtoimax.c (HAVE_LONG_LONG):
19213         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
19214         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
19215         to work around bug in IBM C compiler.
19216
19217 2001-09-17  Jim Meyering  <meyering@lucent.com>
19218
19219         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
19220         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
19221         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
19222         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
19223         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
19224         whenever the right hand side need not be expanded by the shell.
19225
19226 2001-09-16  Paul Eggert  <eggert@twinsun.com>
19227
19228         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
19229         library.  It's not correct, as some older glibcs are buggy.
19230         fnmatch wasn't fixed until glibc 2.2.
19231
19232         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
19233         special shell magic here.
19234
19235 2001-09-16  Jim Meyering  <meyering@lucent.com>
19236
19237         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
19238         * m4/jm-macros.m4: Require it.
19239
19240 2001-09-16  Jim Meyering  <meyering@lucent.com>
19241
19242         * lib/mkdir.c: New file.
19243
19244 2001-09-15  Jim Meyering  <meyering@lucent.com>
19245
19246         * m4/jm-macros.m4: Check for help2man.
19247
19248 2001-09-11  Jim Meyering  <meyering@lucent.com>
19249
19250         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
19251         The body, by Paul Eggert, was moved here from configure.in.
19252         * m4/jm-macros.m4: Require UTILS_HOST_OS.
19253
19254 2001-09-04  Paul Eggert  <eggert@twinsun.com>
19255
19256         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
19257         (jm_PREREQ): Use it.
19258
19259 2001-09-04  Paul Eggert  <eggert@twinsun.com>
19260
19261         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
19262         Use ssize_t, not int, to store result of readlink.
19263         Check for ssize_t overflow as well as size_t overflow,
19264         as POSIX says the result of readlink is implementation-defined
19265         when ssize_t overflows.
19266         Remove unnecessary cast to char*.
19267         Use free+malloc instead of realloc, as the storage doesn't need
19268         to be preserved and it's clearer and can be more efficient that way.
19269         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
19270         * lib/xreadlink.h (xreadlink): Update prototype.
19271
19272 2001-09-04  Paul Eggert  <eggert@twinsun.com>
19273
19274         * lib/xgetcwd.c: Revert some of the previous change; intead,
19275         fix the HAVE_GETCWD_NULL code to behave more like the
19276         !HAVE_GETCWD_NULL code used to.
19277
19278         Include "xalloc.h".
19279         (xgetcwd): Do not return NULL when memory is exhausted; instead,
19280         invoke xalloc_die.
19281
19282 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19283
19284         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
19285         sys/param.h, as pathmax.h includes them.
19286
19287 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19288
19289         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
19290         (jm_PREREQ_XGETCWD): New macro.
19291
19292         * m4/getcwd.m4: New file.
19293
19294 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19295
19296         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
19297         like the HAVE_GETCWD_NULL code.
19298         Include pathmax.h if not HAVE_GETCWD.
19299         Do not include xalloc.h.
19300         (INITIAL_BUFFER_SIZE): New symbol.
19301         Do not use xmalloc / xrealloc, since the caller is responsible for
19302         handling errors.  Preserve errno around `free' during failure.
19303         Do not overrun buffer when using getwd.
19304
19305 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19306
19307         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
19308         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
19309         getcwd (NULL, 0).
19310
19311 2001-09-03  Paul Eggert  <eggert@twinsun.com>
19312
19313         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
19314         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
19315         spotted by Jim Meyering.
19316
19317 2001-09-03  Jim Meyering  <meyering@lucent.com>
19318
19319         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
19320         failure.
19321
19322 2001-09-02  Jim Meyering  <meyering@lucent.com>
19323
19324         * lib/error.c: Update from GNU libc.
19325
19326 2001-09-01  Jim Meyering  <meyering@lucent.com>
19327
19328         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
19329         Used by df.
19330
19331 2001-09-01  Jim Meyering  <meyering@lucent.com>
19332
19333         * lib/xreadlink.c: New file.
19334         * lib/xreadlink.h: New file.
19335         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
19336         xreadlink.h.
19337
19338         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
19339         doesn't conflict with sparc Solaris 7's definition in
19340         /usr/include/sys/int_types.h.
19341
19342         * lib/exclude.c: Use `""', not `<>' to #include non-system header
19343         files.
19344         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
19345         and strncasecmp as r-values.  Unixware didn't have declarations.
19346
19347 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19348
19349         * lib/xstrtol.h: Add copyright notice.
19350         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
19351         LONGINT_INVALID_SUFFIX_CHAR.
19352
19353 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19354
19355         * lib/xstrtol.c (strtoimax): New decl.
19356
19357 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19358
19359         * lib/xgetcwd.c: Don't include pathmax.h.
19360         Include stdlib.h and unistd.h if available.
19361         Include xalloc.h.
19362         (xmalloc, xstrdup, free): Remove decls.
19363         (xgetcwd): Don't assume sizes fit in unsigned.
19364         Check for overflow when computing sizes.
19365         Simplify reallocation code.
19366
19367 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19368
19369         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
19370         a directory's st_size can have an arbitrary value, so the old
19371         usage could waste an arbitrary amount of memory.  All uses
19372         changed.
19373         * lib/savedir.h: Update prototype.
19374
19375 2001-08-31  Paul Eggert  <eggert@twinsun.com>
19376
19377         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
19378
19379         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
19380         old strtoimax.c.
19381
19382         Also, make the following further changes to make this file's
19383         configuration more similar to that of strtol.c:
19384         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
19385         (strtoumax, uintmax_t, strtoull, strtol): Remove.
19386         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
19387         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
19388         changed to signed values.
19389
19390         And make the following changes as well:
19391         Fix copyright notice, as 1999 was missing.
19392         (verify): New macro.
19393         (strtoimax): Check sizes at compile-time, not run-time.
19394         Prefer strtol to strtoll if both work.
19395         (main): Remove; it was not that useful and was a pain to maintain.
19396
19397         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
19398
19399 2001-08-31  Jim Meyering  <meyering@lucent.com>
19400
19401         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
19402         Use an initial, malloc'd, buffer of length 128 rather than
19403         a statically allocated one of length 1024.
19404
19405 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19406
19407         Simplify code, partly by assuming autoconf 2.52 semantics.
19408
19409         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
19410
19411         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
19412         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
19413         All uses removed.
19414         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
19415         Move AC_REQUIRE to next-to-top level, to avoid confusion.
19416         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
19417         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
19418         jm_AC_HEADER_INTTYPES_H.
19419         * m4/jm-macros.m4 (jm_MACROS): Likewise.
19420
19421         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
19422
19423         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
19424         Quote first arg of AC_DEFUN.
19425         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
19426         since they are needed to parse the include file even if we need
19427         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
19428         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
19429         but with opposite signedness.
19430
19431 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19432
19433         Merge 'exclude' changes from tar 1.13.22.
19434         This fixes one or two unlikely storage allocation overflow bugs,
19435         but doesn't change user-visible behavior otherwise.
19436
19437 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19438
19439         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
19440         (jm_PREREQ_EXCLUDE): New macro.
19441
19442 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19443
19444         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
19445         tm to be declared.
19446
19447 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19448
19449         * lib/hash.c: Remove '2001' from copyright notice.
19450
19451 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19452
19453         * lib/full-write.h: New file.
19454         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
19455         * lib/full-write.c: Correct credits, as cccp.c no longer
19456         exists and anyway it was so heavily changed from the old cccp
19457         code as to be unrecognizable.  Include full-write.h.
19458         (full_write) Return size_t, with short writes meaning failure.
19459         All callers changed.  This fixes a bug with large buffers
19460         on 64-bit hosts.
19461         * lib/utime.c: Include full-write.h.
19462
19463 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19464
19465         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
19466         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
19467         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
19468         Include if available.
19469         (<xalloc.h>): Include
19470         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
19471         (verify): New macro.  Use it to verify that EXCLUDE macros do not
19472         collide with FNM macros.
19473         (struct patopts): New struct.
19474         (struct exclude): Use it, as exclude patterns now come with options.
19475         (new_exclude): Support above changes.
19476         (new_exclude, add_exclude_file):
19477         Initial size must now be a power of two to simplify overflow checking.
19478         (free_exclude, fnmatch_no_wildcards): New function.
19479         (excluded_filename): No longer requires options arg, as the options
19480         are determined by add_exclude.  Now returns bool, not int.
19481         (excluded_filename, add_exclude):
19482         Add support for the fancy new exclusion options.
19483         (add_exclude, add_exclude_file): Now takes int options arg.
19484         Check for arithmetic overflow when computing sizes.
19485         (add_exclude_file): xrealloc might modify errno, so don't
19486         realloc until after errno might be used.
19487
19488         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
19489         New macros.
19490         (free_exclude): New decl.
19491         (add_exclude, add_exclude_file): Now takes int options arg.
19492         (excluded_filename): No longer requires options arg, as the options
19493         are determined by add_exclude.  Now returns bool, not int.
19494
19495 2001-08-30  Paul Eggert  <eggert@twinsun.com>
19496
19497         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
19498
19499 2001-08-27  Jim Meyering  <meyering@lucent.com>
19500
19501         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
19502
19503         * lib/version-etc.c (N_): Remove definition.
19504         Revert most of last change.
19505         Instead, simply don't mark the `Copyright...' string for translation.
19506         Based on advice from Paul Eggert.
19507
19508         * lib/strtoxmax.c: Tweak comment.
19509
19510 2001-08-26  Jim Meyering  <meyering@lucent.com>
19511
19512         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
19513
19514         * m4/xstrtoimax.m4: New file.
19515         * m4/xstrtoumax.m4: Add comments explaining why we
19516         AC_REPLACE_FUNCS(strtol).
19517
19518 2001-08-26  Jim Meyering  <meyering@lucent.com>
19519
19520         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
19521         of copyright with `%s' so translators don't get an untranslated
19522         message in 2002.
19523         (COPYRIGHT_YEAR): Define.
19524         (version_etc): Use fprintf rather than fputs.
19525         Suggestion from Ulrich Drepper.
19526
19527         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
19528
19529         * lib/strtoll.c: New file, from GNU libc.
19530         * lib/xstrtoimax.c: New file.
19531
19532         * lib/xstrtol.h: Add xstrtoimax.
19533         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
19534         * lib/strtoimax.c: New file.  Likewise, but first define
19535         STRTOUXMAX_SIGNED.
19536
19537         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
19538         ...
19539         * lib/strtoxmax.c: ... then renamed to this.
19540
19541 2001-08-18  Paul Eggert  <eggert@twinsun.com>
19542
19543         * m4/inttypes.m4: Add AC_PREREQ(2.13).
19544         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
19545         (jm_AC_TYPE_INTMAX_T): New macro.
19546         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
19547
19548         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
19549
19550         * m4/longlong.m4: Renamed from ulonglong.m4.
19551         * m4/inttypes.m4: Renamed from inttypes_h.m4.
19552         * m4/uintmax_t.m4: Removed.
19553
19554 2001-08-13  Paul Eggert  <eggert@twinsun.com>
19555
19556         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
19557         Port to Solaris 8, where 'sed' requires a space after the 'r'
19558         command, and where sh dislikes "$/".  Clean up the spacing a bit.
19559         Redirect output to $tmp just once.
19560
19561 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
19562
19563         * lib/addext.c (<errno.h>): Include.
19564         (errno): Declare if not defined.
19565         (addext): Work correctly when pathconf returns -1 and leaves
19566         errno alone because there is no limit.  Also, work even if
19567         pathconf returns a value greater than SIZE_MAX.
19568
19569 2001-08-12  Jim Meyering  <meyering@lucent.com>
19570
19571         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
19572         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
19573         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
19574         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
19575         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
19576         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
19577         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
19578         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
19579         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
19580         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
19581         utime.m4, utimes.m4, xstrtoumax.m4:
19582         Quote the first argument in each use of AC_DEFUN.
19583
19584 2001-08-12  Jim Meyering  <meyering@lucent.com>
19585
19586         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
19587         Simply `return getcwd (NULL, 0);'.
19588         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
19589         Use 1300 as initial value for length, not PATH_MAX.
19590
19591         * lib/pathmax.h: Clean up cpp syntax.
19592
19593 2001-08-12  Jim Meyering  <meyering@lucent.com>
19594
19595         * lib/gettimeofday.c: New file.
19596         * lib/gtod.h: New file.
19597         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
19598
19599 2001-08-05  Jim Meyering  <meyering@lucent.com>
19600
19601         * m4/jm-macros.m4: Require autoconf-2.52.
19602
19603 2001-08-04  Jim Meyering  <meyering@lucent.com>
19604
19605         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
19606         stmt, to get in sync with glibc.
19607
19608 2001-08-03  Paul Eggert  <eggert@twinsun.com>
19609
19610         The following changes are from gettext 0.10.39 as maintained by
19611         Bruno Haible.
19612
19613         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
19614         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
19615         with inverted sense.  All uses changed.
19616
19617         * lib/mbswidth.c: Don't include <limits.h>.
19618         Include <stdlib.h> and <string.h> unconditionally.
19619         (iswcntrl, mbsinit, ISCNTRL): New macros.
19620         (mbsnwidth): Use K&R style function declarations.
19621         Don't bother checking for MB_LEN_MAX == 1, since the compiler
19622         can optimize it when MB_CUR_MAX == 1.
19623         The width of control characters is zero, not 1.
19624
19625 2001-08-03  Paul Eggert  <eggert@twinsun.com>
19626
19627         The following changes are from gettext 0.10.39 as maintained by
19628         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
19629
19630         * m4/codeset.m4: Upgrade to serial AM1.
19631         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
19632         all uses changed.  Quote first arg of AC_DEFUN.
19633         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
19634
19635         * m4/iconv.m4: Upgrade to serial AM2.
19636         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
19637         Add --with-libconv-prefix.
19638         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
19639         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
19640         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
19641         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
19642         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
19643
19644         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
19645         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
19646         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
19647         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
19648         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
19649         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
19650         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
19651         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
19652         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
19653
19654         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
19655         string.h any more.
19656
19657         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
19658         not the default value.
19659
19660         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
19661         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
19662         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
19663         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
19664         Also check for iswcntrl, used for wcwidth fallback.
19665         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
19666         to Autoconf 2.13.
19667
19668 2001-08-03  Jim Meyering  <meyering@lucent.com>
19669
19670         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
19671         as it was in the original.  Reported by Paul Eggert.
19672
19673 2001-07-16  Jim Meyering  <meyering@lucent.com>
19674
19675         * m4/gettimeofday.m4: New file.
19676         Prompted by a report from Bernhard Baehr.
19677
19678 2001-07-15  Jim Meyering  <meyering@lucent.com>
19679
19680         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
19681         stuff. Now it's in ../Makefile.cfg.
19682
19683 2001-07-15  Jim Meyering  <meyering@lucent.com>
19684
19685         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
19686         (BUILT_SOURCES): Add unlocked-io.h.
19687         (io_functions): Define.
19688         (unlocked-io.h): New rule.
19689         (DISTCLEANFILES): Add unlocked-io.h.
19690         (all-local): Depend on unlocked-io.h, to ensure it is created.
19691
19692         * lib/unlocked-io.hin: New file
19693
19694         * lib/regex.c: Update from glibc.
19695
19696 2001-07-05  Jim Meyering  <meyering@lucent.com>
19697
19698         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
19699         recommendation.
19700         (libfetish_a_SOURCES): Put all .h files here instead.
19701         Remove a thus-exposed (better checks in automake) duplicate and
19702         two unnecessary .h files.
19703
19704 2001-07-04  Jim Meyering  <meyering@lucent.com>
19705
19706         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
19707         that generates jm-glibc-io.m4 so that it doesn't trigger any make
19708         distcheck failure.
19709
19710 2001-07-02  Jim Meyering  <meyering@lucent.com>
19711
19712         The following changes were prompted by suggestions from Bruno Haible.
19713
19714         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
19715         is now generated.
19716         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
19717         definition of EXTRA_DIST.
19718         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
19719         ensure that the generated file is created/updated whenever the list
19720         of $(unlocked_functions) is changed.
19721         (jm-glibc-io.m4): New rule.
19722         (unlocked-io.h): New rule -- currently unused.
19723
19724 2001-06-24  Jim Meyering  <meyering@lucent.com>
19725
19726         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
19727         unmatched right bracket, rather than kludging it with an extra,
19728         falsely-matching quote in a comment.  Patch by Akim Demaille.
19729
19730 2001-06-11  Jim Meyering  <meyering@lucent.com>
19731
19732         * lib/regex.c: Update from GNU libc.
19733
19734 2001-05-27  Jim Meyering  <meyering@lucent.com>
19735
19736         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
19737         Check for ut_type in struct utmp.
19738
19739 2001-05-27  Jim Meyering  <meyering@lucent.com>
19740
19741         * lib/readutmp.h (UT_TYPE): Define.
19742
19743 2001-05-24  Jim Meyering  <meyering@lucent.com>
19744
19745         * lib/argmatch.c: Include "quote.h".
19746         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
19747         quote function.  Reported by Göran Uddeborg.
19748
19749 2001-05-22  Jim Meyering  <meyering@lucent.com>
19750
19751         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
19752         now that we use the package-supplied version unconditionally.
19753         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
19754
19755 2001-05-21  Jim Meyering  <meyering@lucent.com>
19756
19757         * m4/regex.m4: Change a couple backticks to single quotes to avoid
19758         shell syntax errors.
19759
19760 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
19761
19762         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
19763
19764 2001-05-20  Paul Eggert  <eggert@twinsun.com>
19765
19766         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
19767         Don't bother to check library strftime, since
19768         we'll be using our own my_strftime function anyway.
19769         Define my_strftime instead of strftime.
19770
19771 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
19772
19773         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
19774         which is not yet declared.
19775
19776 2001-05-15  Jim Meyering  <meyering@lucent.com>
19777
19778         * m4/regex.m4: Use proper quoting so brackets appear in the test
19779         program.
19780         Reported by, and with help from, Bruno Haible.
19781
19782 2001-05-13  Jim Meyering  <meyering@lucent.com>
19783
19784         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
19785         undefined.
19786
19787 2001-05-11  Paul Eggert  <eggert@twinsun.com>
19788
19789         dirname code cleanup.  base_name now behaves more compatibly
19790         with POSIX basename when given file names that have trailing
19791         slashes, and similarly for dir_name.  Add new primitives
19792         base_len and dir_len.  Put the directory-name-related decls
19793         into dirname.h.
19794
19795         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
19796         * lib/backupfile.c (base_name): Likewise.
19797         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
19798         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
19799         * lib/makepath.c (strip_trailing_slashes): Likewise.
19800         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
19801         ISSLASH): Likewise.
19802         * lib/rename.c (strip_trailing_slashes): Likewise.
19803         * lib/same.c (base_name): Likewise.
19804         * lib/stripslash.c (ISSLASH): Likewise.
19805
19806         * lib/addext.c: Include <dirname.h> after size_t is defined.
19807         * lib/backupfile.c: Likewise.
19808
19809         * lib/addext.c (addext): Use base_len to trim redundant
19810         trailing slashes instead of doing it ourselves.
19811         But do not trim the last slash if it is not redundant.
19812
19813         * lib/backupfile.c (find_backup_file_name,
19814         max_backup_version): Use base_len instead of rolling it ourselves.
19815         Handle the case of "" and (on DOS) "C:" correctly.
19816
19817         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
19818         needed. Include <string.h>, <dirname.h>.
19819         (base_name): Allow file names ending in slashes, other than names
19820         that are all slashes.  In this case, return the basename followed
19821         by the slashes.  This is more general, and can be used in places
19822         where the original base_name purposely had an assertion failure.
19823         (base_len): New function.
19824
19825         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
19826         Do not include <assert.h>; no longer needed.
19827         Include xalloc.h.
19828         (memrchr): Remove decl.
19829         (dir_name_r): Remove.
19830         (dir_len): Renamed from dirlen.  All callers changed.
19831         Rewrite in terms of base_name, for simplicity and consistency.
19832         (dir_name): Never return NULL.  All callers changed.
19833         Do not include <stdlib.h> in test program; no longer needed.
19834         return 0; is fine for test program.
19835
19836         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
19837         New macros.
19838         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
19839
19840         * lib/path-concat.c (path_concat): Use base_len to compute
19841         base length, not strlen; this means we cannot rely on memcpy
19842         to null-terminate.
19843
19844         * lib/same.c (STREQ): Remove.
19845         (same_name): Handle the case where the basename ends in trailing '/'.
19846
19847         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
19848         a slash was stripped.  Do not strip the last slash after a
19849         file system prefix.
19850
19851 2001-05-11  Paul Eggert  <eggert@twinsun.com>
19852
19853         * lib/Makefile.am (libfetish_a_SOURCES):
19854         Add strftime.c, since we now compile it on all hosts.
19855
19856         * lib/strftime.c (my_strftime):
19857         Define to nstrftime if emacs, but only if my_strftime is not defined.
19858         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
19859         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
19860         Add one more extra argument: a nanoseconds value.
19861         All uses changed.
19862         (ns): New macro.
19863         (my_strftime function): Add %N format.
19864         (emacs_strftimeu): Renamed from emacs_strftime,
19865         with extra ut argument.
19866
19867 2001-05-09  Paul Eggert  <eggert@twinsun.com>
19868
19869         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
19870
19871 2001-04-21  Jim Meyering  <meyering@lucent.com>
19872
19873         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
19874         doesn't interfere.
19875
19876 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
19877
19878         * m4/ftruncate.m4: Check for chsize.
19879         Link with ftruncate.o unconditionally if ftruncate is missing.
19880         This was required when cross-compiling to i586-mingw32msvc.
19881
19882 2001-04-08  Jim Meyering  <meyering@lucent.com>
19883
19884         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
19885         recomputed; that's necessary when the offset spans a DST transition.
19886         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
19887
19888 2001-04-02  Jim Meyering  <meyering@lucent.com>
19889
19890         * lib/regex.h, regex.c: Update from GNU libc.
19891
19892 2001-03-24  Jim Meyering  <meyering@lucent.com>
19893
19894         * m4/jm-macros.m4: Require autoconf-2.49d.
19895
19896 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
19897
19898         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
19899
19900 2001-03-19  Paul Eggert  <eggert@twinsun.com>
19901
19902         * lib/version-etc.c (version_etc_copyright): Update to 2001.
19903
19904 2001-03-17  Jim Meyering  <meyering@lucent.com>
19905
19906         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
19907         now that the version in autoconf is equivalent.
19908         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
19909
19910         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
19911         Suggestion from Akim Demaille.
19912
19913         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
19914         (jm_PREREQ_TEMPNAME): New function.
19915
19916 2001-03-16  Paul Eggert  <eggert@twinsun.com>
19917
19918         * lib/tempname.c (uint64_t): Define to uintmax_t if
19919         not defined, and if UINT64_MAX is not defined.
19920         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
19921         Reported by John David Anglin.
19922
19923 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
19924
19925         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
19926         resolve alias if codeset is empty.
19927         * lib/config.charset (BeOS): Use wildcard syntax.
19928
19929 2001-03-13  Jim Meyering  <meyering@lucent.com>
19930
19931         * lib/path-concat.c (path_concat)
19932         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
19933         concatenating e.g., `C:' and `foo'.
19934         From Bruno Haible.
19935
19936 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
19937
19938         * lib/localcharset.c (locale_charset): Don't use
19939         setlocale(LC_CTYPE,NULL). Don't return NULL.
19940         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
19941
19942 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
19943
19944         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
19945         support for DOS/DJGPP.
19946
19947 2001-03-01  Paul Eggert  <eggert@twinsun.com>
19948
19949         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
19950         lacks mkstemp.  Compile our own tempname.c if we compile our own
19951         mkstemp.c, as mkstemp relies on tempname.
19952
19953 2001-03-01  Jim Meyering  <meyering@lucent.com>
19954
19955         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
19956         AH_VERBATIM really does output its argument verbatim.
19957
19958 2001-02-28  Paul Eggert  <eggert@twinsun.com>
19959
19960         * lib/Makefile.am (libfetish_a_SOURCES):
19961         Add dup-safer.c, fopen-safer.c.
19962         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
19963
19964         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h,
19965         lib/unistd-safer.h: New files.
19966
19967 2001-02-25  Paul Eggert  <eggert@twinsun.com>
19968
19969         The mkstemp replacement is taken from glibc 2.2.2, with some
19970         portability fixes for use outside glibc, as follows:
19971
19972         * lib/tempname.c (struct_stat64): New macro.
19973         (direxists, __gen_tempname): Use it.
19974         This avoids a portability problem with Solaris 8.
19975
19976         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
19977         (<stddef.h>, <stdint.h>, <string.h>):
19978         Include only if STDC_HEADERS || _LIBC.
19979         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
19980         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
19981         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
19982         (__set_errno): Define this macro if <errno.h> doesn't.
19983         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
19984         Define these macros if <stdio.h> doesn't.
19985         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
19986         Define these macros if <sys/stat.h>
19987         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
19988         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
19989         __xstat64): Define if not _LIBC.
19990         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
19991         (__gen_tempname): Invoke gettimeofday only if
19992         HAVE_GETTIMEOFDAY || _LIBC;
19993         otherwise, fall back on plain "time".
19994         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
19995
19996         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
19997
19998         * lib/mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
19999
20000 2001-02-18  Paul Eggert  <eggert@twinsun.com>
20001
20002         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
20003
20004 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20005
20006         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
20007         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
20008         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
20009         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20010
20011 2001-02-17  Paul Eggert  <eggert@twinsun.com>
20012
20013         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
20014         Remove workaround macros for hosts that have mbrtowc but not
20015         mbstate_t, as we now insist on proper declarations for both
20016         before using mbrtowc.
20017
20018 2001-02-17  Jim Meyering  <meyering@lucent.com>
20019
20020         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
20021         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
20022         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
20023         UnixWare 7.1.1.
20024
20025         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
20026         rather than AC_CACHE_VAL.
20027
20028 2001-02-17  Jim Meyering  <meyering@lucent.com>
20029
20030         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
20031         around included file name.
20032
20033         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
20034
20035         * lib/strftime.c: Update from GNU libc (the only changes were to
20036         comments).
20037
20038 2001-02-17  Jim Meyering  <meyering@lucent.com>
20039
20040         * lib/regex.c: Update from libc.
20041
20042 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
20043
20044         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
20045         clash.
20046
20047 2001-02-16  Paul Eggert  <eggert@twinsun.com>
20048
20049         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
20050         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
20051         Reported by Mark Hounschell via Paul Eggert.
20052
20053 2001-02-07  Jim Meyering  <meyering@lucent.com>
20054
20055         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
20056
20057 2001-02-05  Jim Meyering  <meyering@lucent.com>
20058
20059         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
20060         it includes the patch required for `large file' support with at least
20061         HP-UX's 10.20 /bin/cc.
20062
20063 2001-02-03  Jim Meyering  <meyering@lucent.com>
20064
20065         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
20066         AS_IF, now that it works once again (mysteriously).
20067         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
20068
20069 2001-01-30  Jim Meyering  <meyering@lucent.com>
20070
20071         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
20072         * m4/chown.m4: Rename conftestchown to conftest.chown.
20073         * m4/rename.m4: s/conftestdir/conftest.d1/ and
20074         s/conftestdir2/conftest.d2/.
20075         * m4/utimes.m4: s/conftestdata/conftest.data/
20076         Inspired by Pavel Roskin's change in autoconf.
20077
20078 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
20079
20080         * lib/config.charset: Update for FreeBSD 4.2.
20081
20082 2001-01-27  Jim Meyering  <meyering@lucent.com>
20083
20084         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
20085         a use of AS_IF.
20086         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
20087
20088 2001-01-26  Jim Meyering  <meyering@lucent.com>
20089
20090         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
20091         quotearg.c includes it.
20092
20093 2001-01-26  Jim Meyering  <meyering@lucent.com>
20094
20095         * lib/quotearg.c: Include stddef.h.
20096         * lib/quote.c: Include stddef.h.
20097         Reported by Axel Kittenberger.
20098
20099         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
20100         line in double quotes so that it evokes a better diagnostic.
20101         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
20102         Reported by Axel Kittenberger.
20103
20104 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
20105
20106         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
20107         as if it was a `charset'.
20108
20109 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
20110
20111         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
20112         has const.
20113
20114 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
20115
20116         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
20117         to avoid a warning.  Add back 'const' to inptr.
20118
20119 2001-01-20  Jim Meyering  <meyering@lucent.com>
20120
20121         Be sure that headers are checked before used in code compiled
20122         for the type checks.
20123         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
20124         In place of that, invoke jm_CHECK_ALL_TYPES.
20125         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
20126         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
20127         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
20128         The check for ssize_t was mistakenly run before the test for unistd.h.
20129
20130         The configure-time check for stdbool.h was missing.
20131         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
20132         (jm_PREREQ_HASH): New function.
20133
20134 2001-01-17  Jim Meyering  <meyering@lucent.com>
20135
20136         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
20137         for autoconf-2.49c.
20138         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
20139
20140 2001-01-16  Jim Meyering  <meyering@lucent.com>
20141
20142         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
20143         From Bruno Haible.
20144
20145 2001-01-14  Jim Meyering  <meyering@lucent.com>
20146
20147         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
20148         foo and bar.  Create conftestdir/ in the script, not in the C code.
20149         Remove directories in the script, not in the C code.
20150         Remove conftestdir{,2} before trying to create the directory.
20151         Make the entire configure script fail if the mkdir fails.
20152
20153 2001-01-14  Jim Meyering  <meyering@lucent.com>
20154
20155         * lib/rename.c: New file.  From Volker Borchert.
20156         Include stdlib.h, string.h or strings.h, and xalloc.h.
20157         Use strip_trailing_slashes rather than open-coding it.
20158
20159 2001-01-03  Paul Eggert  <eggert@twinsun.com>
20160
20161         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
20162
20163 2001-01-03  Jim Meyering  <meyering@lucent.com>
20164
20165         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
20166         of local `inptr' to avoid warning with some system declarations of
20167         iconv.
20168
20169 2001-01-02  Volker Borchert  <bt@teknon.de>
20170
20171         * m4/rename.m4: New file.
20172         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
20173
20174 2001-01-01  Jim Meyering  <meyering@lucent.com>
20175
20176         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
20177         even on systems with utmpx.h.  It's necessary for the declaration of
20178         utmp's ut_user member.  Reported by Andreas Jaeger.
20179
20180         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
20181         available. They are required for the declarations of getgrgid and
20182         getpwuid resp.
20183         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
20184         Reported by Andreas Jaeger.
20185
20186 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
20187
20188         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
20189         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
20190         so `make install' also works in VPATH builds.
20191
20192 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
20193
20194         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
20195         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
20196         can be used in subdirectories.
20197
20198 2000-12-29  Paul Eggert  <eggert@twinsun.com>
20199
20200         * lib/modechange.c: Do not assume that mode_t uses the
20201         traditional octal encoding.  E.g. "chmod 1 FOO" should set
20202         the other-execute bit of FOO even if S_IXOTH != 1.
20203
20204         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
20205         WOTH, XOTH, ALLM): New macros.
20206         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
20207          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
20208         Use them.
20209         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
20210         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
20211         (mode_compile):
20212         No need to use uintmax_t; unsigned long is long enough.
20213         Don't bother to get suffix since we don't use it.
20214
20215 2000-12-26  Jim Meyering  <meyering@lucent.com>
20216
20217         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
20218         better with autoheader.
20219
20220 2000-12-24  Jim Meyering  <meyering@lucent.com>
20221
20222         * lib/hash.c (is_prime): Return explicit boolean values.
20223         (hash_get_first): Return NULL to appease Irix5.6's 89.
20224         Reported by Nelson Beebe.
20225
20226 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
20227
20228         * lib/localcharset.c (locale_charset): Add support for Win32.
20229
20230 2000-12-18  Paul Eggert  <eggert@twinsun.com>
20231
20232         * lib/physmem.h, physmem.c: New files.
20233
20234         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
20235         (noinst_HEADERS): Add physmem.h.
20236
20237         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
20238         't' for compatibility with Solaris 8 sort.
20239
20240 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
20241
20242         * lib/config.charset: Add support for BeOS.
20243
20244 2000-12-17  Jim Meyering  <meyering@lucent.com>
20245
20246         * m4/dos.m4 (jm_AC_DOS): New file and macro.
20247         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
20248
20249 2000-12-16  Jim Meyering  <meyering@lucent.com>
20250
20251         This bug had a serious impact on chown: `chown N:M FILE' (for integer
20252         N and M) would have treated it like `chown N:N FILE'.
20253
20254         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
20255
20256 2000-12-16  Jim Meyering  <meyering@lucent.com>
20257
20258         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
20259         SHELLS_FILE to a file name that's useful on djgpp systems.
20260         Include stdlib.h.
20261         (ADDITIONAL_DEFAULT_SHELLS): Define.
20262         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
20263         Based mostly on a patch from Prashant TR.
20264
20265 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
20266
20267         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
20268         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
20269         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
20270
20271 2000-12-08  Andreas Schwab  <schwab@suse.de>
20272
20273         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
20274         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
20275
20276 2000-12-07  Jim Meyering  <meyering@lucent.com>
20277
20278         * lib/stripslash.c (ISSLASH): Define.
20279         (strip_trailing_slashes): Use ISSLASH rather than comparing against
20280         `/'.
20281         From Prashant TR.
20282
20283         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
20284         (dir_name_r): Declare this function as static.
20285         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
20286         manifest itself on a name containing a mix of slashes and
20287         backslashes.
20288         Make this function work with names starting with a DOS-style
20289         drive letter and colon prefix.
20290         (dir_name): Append `.' if necessary.
20291         Based mostly on patches from Prashant TR and Eli Zaretskii.
20292
20293         * lib/dirname.h (dir_name_r): Remove prototype.
20294
20295 2000-12-06  Paul Eggert  <eggert@twinsun.com>
20296
20297         * m4/off_t-format.m4: Remove this file.
20298         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
20299
20300 2000-12-06  Jim Meyering  <meyering@lucent.com>
20301
20302         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
20303         replacement strtoull, we may well need the replacement strtoul, too.
20304         Check for declarations of strtoul and strtoull.
20305         Check for strtol.  Mainly as a cue to cause automake to include
20306         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
20307         Check for limits.h -- strtol.c needs it.
20308
20309 2000-12-05  Jim Meyering  <meyering@lucent.com>
20310
20311         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
20312
20313 2000-12-04  Jim Meyering  <meyering@lucent.com>
20314
20315         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
20316         Also include memory.h, stdlib.h, unistd.h if appropriate.
20317         Reported by Andreas Jaeger (conflicting declaration of malloc).
20318
20319 2000-12-02  Jim Meyering  <meyering@lucent.com>
20320
20321         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
20322         * m4/jm-macros.m4 (jm_MACROS): require it.
20323
20324 2000-12-02  Jim Meyering  <meyering@lucent.com>
20325
20326         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
20327
20328 2000-12-01  Paul Eggert  <eggert@twinsun.com>
20329
20330         * lib/memrchr.c: Include <config.h> before any system include file.
20331
20332 2000-11-30  Jim Meyering  <meyering@lucent.com>
20333
20334         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
20335
20336 2000-11-30  Jim Meyering  <meyering@lucent.com>
20337
20338         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
20339
20340 2000-11-29  Paul Eggert  <eggert@twinsun.com>
20341
20342         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
20343
20344 2000-11-26  Jim Meyering  <meyering@lucent.com>
20345
20346         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
20347
20348 2000-11-22  Paul Eggert  <eggert@twinsun.com>
20349
20350         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
20351         size of (size_t) -1; it's not portable.
20352
20353 2000-11-17  Jim Meyering  <meyering@lucent.com>
20354
20355         * lib/strstr.c: Update from GNU libc.
20356
20357 2000-11-17  Akim Demaille  <akim@epita.fr>
20358
20359         * lib/obstack.h: Formatting changes.
20360         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
20361         prevent type checking.
20362         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
20363         cast the value to (void *): assigning a `foo *' to a `void *'
20364         variable is valid.
20365         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
20366
20367 2000-11-16  Jim Meyering  <meyering@lucent.com>
20368
20369         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
20370
20371 2000-11-11  Jim Meyering  <meyering@lucent.com>
20372
20373         * lib/error.c: Add a couple #includes, merging from GNU libc version.
20374
20375 2000-11-10  Jim Meyering  <meyering@lucent.com>
20376
20377         * lib/obstack.h: Update from GNU libc.
20378         * lib/obstack.c: Likewise.
20379
20380 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
20381
20382         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
20383
20384 2000-11-06  Paul Eggert  <eggert@twinsun.com>
20385
20386         * lib/getusershell.c (setusershell): Use rewind rather than
20387         fseek/fseeko, to avoid configuration hassles with fseeko.
20388         Don't bother opening SHELLS_FILE if shellstream is NULL;
20389         it's not necessary.
20390
20391 2000-11-05  Jim Meyering  <meyering@lucent.com>
20392
20393         * lib/makepath.h (make_dir): Declare.
20394         * lib/makepath.c (make_dir): Remove `static' attribute.
20395         Tweak a comment.
20396
20397 2000-11-04  Jim Meyering  <meyering@lucent.com>
20398
20399         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
20400
20401 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
20402
20403         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
20404         last one in a bucket, advance to the next bucket.
20405
20406 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
20407
20408         * lib/fnmatch.c: Do not comment out all the code if we are using
20409         the GNU C library, because in some cases we are replacing buggy
20410         code in the GNU C library itself.
20411
20412 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
20413
20414         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
20415         (regex_compile): Catch bogus \(\1\).
20416
20417 2000-10-30  Paul Eggert  <eggert@twinsun.com>
20418
20419         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
20420         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
20421         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
20422
20423 2000-10-30  Paul Eggert  <eggert@twinsun.com>
20424
20425         * lib/error.h, getline.h, modechange.h:
20426         Remove "2000" from Copyright line, as the file hasn't been
20427         changed this year other than in the copyright notice.
20428
20429         * lib/xalloc.h: Add "2000" to Copyright line, as this file
20430         was changed this year.
20431
20432 2000-10-29  Jim Meyering  <meyering@lucent.com>
20433
20434         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
20435         renaming.
20436         * m4/ls-mntd-fs.m4: Likewise
20437
20438 2000-10-29  Jim Meyering  <meyering@lucent.com>
20439
20440         * lib/xstat.in: Fix grammar in comment.
20441
20442 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
20443
20444         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
20445         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
20446         doesn't define __restrict_arr.
20447
20448 2000-10-28  Jim Meyering  <meyering@lucent.com>
20449
20450         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
20451         (jm_PREREQ_MEMCHR): New function.
20452
20453 2000-10-28  Jim Meyering  <meyering@lucent.com>
20454
20455         * lib/memchr.c: Update from libc.
20456         Adjust for portability:
20457         [HAVE_STDLIB_H]: Include stdlib.h.
20458         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
20459         Undef __memchr, too.
20460         [!weak_alias]: Define __memchr to memchr.
20461
20462         * lib/regex.c: Update from libc.
20463         * lib/regex.h: Likewise.
20464         * lib/getopt1.c: Likewise.
20465         * lib/memcmp.c: Likewise.
20466
20467         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
20468         Avoid using fseek, when possible -- it's broken by design.
20469         Patch by Ulrich Drepper.
20470
20471 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
20472
20473         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
20474         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
20475         Giving in to popular pressure to shut up the compiler with casts.
20476
20477 2000-10-26  Jim Meyering  <meyering@lucent.com>
20478
20479         * lib/strftime.c: Update from libc.
20480
20481 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
20482
20483         * regex.c: More `unsigned char' -> `re_char' changes.
20484         Also change several `int' into `re_wchar_t'.
20485         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
20486         (PUSH_FAILURE_POINTER): Don't cast any more.
20487         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
20488         We want GCC to complain, since this piece of code makes
20489         re_match non-reentrant, which *should* be fixed.
20490         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
20491         (EXTEND_BUFFER): Use RETALLOC.
20492         (SET_LIST_BIT): Don't cast.
20493         (re_wchar_t): New type.
20494         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
20495         that those two functions will always properly return.
20496         (IMMEDIATE_QUIT_CHECK): Cast to void.
20497         (analyse_first): Use recursion rather than an explicit stack.
20498         (re_compile_fastmap): Can't fail anymore.
20499         (re_search_2): Don't check re_compile_fastmap for failure.
20500         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
20501         Now also sets the new value (passed in a new argument).
20502         (re_match_2_internal): Use it.
20503         Also, use a new var `reg' of type size_t when looping through regs
20504         rather than reuse the inappropriate `mcnt'.
20505
20506 2000-10-25  Jim Meyering  <meyering@lucent.com>
20507
20508         * lib/obstack.c: Update from libc.
20509
20510 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
20511
20512         * regex.c (regex_compile): Change the way of handling a range from
20513         a char less than 256 to a char not less than 256.
20514
20515 2000-10-24  Andrew Innes  <andrewi@gnu.org>
20516
20517         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
20518         NT-Emacs only.
20519         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
20520         so that re_search functions only quit when callers expect them to.
20521
20522 2000-10-23  Jim Meyering  <meyering@lucent.com>
20523
20524         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
20525         wrong.  That set_locale call must not have any side effects.
20526         From Paul Eggert.
20527
20528 2000-10-22  Jim Meyering  <meyering@lucent.com>
20529
20530         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
20531         [CYCLIC]: Remove now-unused definition.
20532
20533         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
20534         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
20535         Suggestion from Ulrich Drepper.
20536
20537 2000-10-21  Jim Meyering  <meyering@lucent.com>
20538
20539         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
20540         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
20541         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
20542
20543 2000-10-21  Jim Meyering  <meyering@lucent.com>
20544
20545         * lib/dirname.c (memrchr): Declare if necessary.
20546         (dir_name): Remove the restriction that there be no
20547         trailing slashes.  Now, this code skips past them, effectively
20548         ignoring them.
20549         [TEST_DIRNAME] (main): New unit tests.
20550
20551         * lib/memrchr.c: New file from GNU libc.
20552         Undef __memrchr, too.
20553         [!weak_alias]: Define __memrchr to memrchr.
20554         Guard weak_alias use with `#ifdef weak_alias'.
20555
20556 2000-10-21  Jim Meyering  <meyering@lucent.com>
20557
20558         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
20559         (dir_name): Use dir_name_r.
20560         * lib/dirname.h (dir_name_r): Declare it.
20561
20562 2000-10-17  Jim Meyering  <meyering@lucent.com>
20563
20564         * lib/quote.h (PARAMS): Define and use.
20565         Reported by Akim Demaille.
20566
20567         * lib/getopt.c: Update from libc.
20568
20569 2000-10-16  Jim Meyering  <meyering@lucent.com>
20570
20571         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
20572         setlocale.
20573         From Jan Fedak.
20574
20575 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
20576
20577         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
20578
20579 2000-09-25  Jim Meyering  <meyering@lucent.com>
20580
20581         * lib/md5.h (rol): Define (from GnuPG).
20582
20583         * lib/sha.c: Give credit (GnuPG) where due.
20584         (M): Use rol rather than open-coding it.
20585         Add a FIXME comment.
20586
20587 2000-09-21  Jim Meyering  <meyering@lucent.com>
20588
20589         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
20590         Reported by Michael Stone.
20591
20592 2000-09-20  Jim Meyering  <meyering@lucent.com>
20593
20594         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
20595         (noinst_HEADERS): Add sha.h.
20596         Based on code from Scott G. Miller and from GnuPG.
20597
20598 2000-09-18  Jim Meyering  <meyering@lucent.com>
20599
20600         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
20601         LIBS. Otherwise, everyone ends up linking with -lelf for some
20602         configurations.
20603         Reported by Mike Stone.
20604
20605 2000-09-15  Jim Meyering  <meyering@lucent.com>
20606
20607         * lib/regex.c: Update from libc.
20608
20609 2000-09-10  Jim Meyering  <meyering@lucent.com>
20610
20611         * lib/getopt.c (_getopt_internal): Update from glibc.
20612
20613 2000-09-09  Jim Meyering  <meyering@lucent.com>
20614
20615         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
20616         think it should be used as a general replacement for isascii.
20617         * lib/fnmatch.c: Likewise.
20618         * lib/mbswidth.c: Likewise
20619         * lib/regex.c: Likewise.
20620
20621         Don't use atoi.
20622         * lib/userspec.c: Include sys/param.h and limits.h.
20623         Include xstrtol.h.
20624         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
20625         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
20626         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
20627         UID, GID.  Check range.
20628
20629 2000-09-06  Jim Meyering  <meyering@lucent.com>
20630
20631         * lib/getopt.c (_getopt_internal): Update from glibc.
20632
20633 2000-08-30  Jim Meyering  <meyering@lucent.com>
20634
20635         * lib/strftime.c: Merge in changes from GNU libc.
20636
20637 2000-08-26  Jim Meyering  <meyering@lucent.com>
20638
20639         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
20640         * m4/fpending.m4: New file.
20641
20642 2000-08-26  Jim Meyering  <meyering@lucent.com>
20643
20644         * lib/closeout.c: Include "__fpending.h".
20645         (close_stdout_status): Return right away if there's nothing to flush.
20646
20647         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
20648         * lib/__fpending.c: New file.
20649         * lib/__fpending.h: New file.
20650
20651 2000-08-20  Jim Meyering  <meyering@lucent.com>
20652
20653         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
20654         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
20655         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
20656
20657 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
20658
20659         Improve fileutils installation on systems where running
20660         programs (like install) can't be unlinked.
20661         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
20662         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
20663
20664 2000-08-07  Paul Eggert  <eggert@twinsun.com>
20665
20666         Standardize on "memory exhausted" instead of "Memory exhausted"
20667         or "virtual memory exhausted".
20668         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
20669         "virtual memory exhausted".
20670         * lib/same.c (same_name): Invoke xalloc_die instead of printing
20671         our own message.
20672         * lib/userspec.c (parse_user_spec): Likewise.
20673         * lib/bumpalloc.h: comment fix
20674         * lib/same.c, userspec.c: Include xalloc.h.
20675
20676         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
20677         not char *const and pointing to a constant array.
20678         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
20679         (xrealloc): Comment fix.
20680
20681         * lib/userspec.c (parse_user_spec):
20682         Don't translate a message until just before returning,
20683         to avoid unnecessary translation.
20684
20685 2000-08-07  Jim Meyering  <meyering@lucent.com>
20686
20687         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
20688         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
20689         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
20690         getgroups.c, gethostname.c, getopt.h, group-member.c,
20691         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
20692         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
20693         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
20694         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
20695         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
20696         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
20697         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
20698         yesno.c: Back out Copyright date changes for each file with no change
20699         this year.  This eases coordination with other programs using the same
20700         source code modules.  From Paul Eggert.
20701
20702 2000-08-06  Paul Eggert  <eggert@twinsun.com>
20703
20704         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
20705         not char, for compatibility with glibc 2.1.3 strftime.c.
20706
20707 2000-08-03  Greg McGary  <greg@mcgary.org>
20708
20709         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
20710         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
20711         (EXTEND_BUFFER): Use them.
20712
20713 2000-08-01  Jim Meyering  <meyering@lucent.com>
20714
20715         * lib/dirname.c (ISSLASH): Define.
20716         (BACKSLASH_IS_PATH_SEPARATOR): Define.
20717         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
20718         both `\' and `/' may be use as path separators.
20719         Based on a patch from Prashant TR.
20720
20721 2000-07-31  Paul Eggert  <eggert@twinsun.com>
20722
20723         * lib/quotearg.c (quotearg_n_options): Don't make the initial
20724         slot vector a constant, since it might get modified.
20725
20726 2000-07-31  Jim Meyering  <meyering@lucent.com>
20727
20728         * lib/xmalloc.c: Use `virtual memory exhausted', not
20729         `Memory exhausted'.
20730         * lib/obstack.c (print_and_abort): Likewise.
20731
20732 2000-07-30  Paul Eggert  <eggert@twinsun.com>
20733
20734         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
20735         buffer, so that the caller can always quote one small
20736         component of a "memory exhausted" message in slot 0.
20737         From a suggestion by Jim Meyering.
20738
20739 2000-07-30  Jim Meyering  <meyering@lucent.com>
20740
20741         * lib/makepath.c (make_path): Quote the other instance, too.
20742
20743         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
20744         (STATIC_BUF_SIZE): Define.
20745         (quotearg_n_options): Use only statically allocated storage when
20746         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
20747         than STATIC_BUF_SIZE.
20748
20749 2000-07-29  Jim Meyering  <meyering@lucent.com>
20750
20751         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
20752         * lib/dirname.c (dir_name): Likewise.
20753
20754         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
20755         `/'.
20756
20757         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
20758         (dir_name): Assert that there are no trailing slashes.
20759
20760 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
20761
20762         * lib/mbswidth.h (mbswidth): Add a flags argument.
20763         (mbswidth): New declaration.
20764         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
20765         * lib/mbswidth.c (mbswidth): Add a flags argument.
20766         (mbsnwidth): New function.
20767
20768 2000-07-24  Jim Meyering  <meyering@lucent.com>
20769
20770         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
20771
20772 2000-07-23  Paul Eggert  <eggert@twinsun.com>
20773
20774         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
20775
20776 2000-07-23  Paul Eggert  <eggert@twinsun.com>
20777
20778         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
20779         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
20780         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
20781         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
20782         invoke multibyte primitives.
20783
20784 2000-07-23  Paul Eggert  <eggert@twinsun.com>
20785
20786         * lib/quotearg.c:
20787         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
20788         so that mbstate_t is always defined.
20789
20790         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
20791         be 1 in at least one GCC installation, and this configuration
20792         error is likely to be common.  Ignoring MB_LEN_MAX hurts
20793         performance on hosts that have mbrtowc but have only unibyte
20794         locales, but I assume these hosts are rare.
20795
20796 2000-07-23  Paul Eggert  <eggert@twinsun.com>
20797
20798         * lib/mbswidth.c (_XOPEN_SOURCE):
20799         Don't define; this causes problems on Solaris 7.
20800         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
20801
20802 2000-07-23  Jim Meyering  <meyering@lucent.com>
20803
20804         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
20805         too: getgrgid, getpwuid, getuid.
20806
20807 2000-07-23  Jim Meyering  <meyering@lucent.com>
20808
20809         * lib/basename.c (base_name): Add an assertion.
20810
20811 2000-07-23  Bruno Haible  <clisp.cons.org>
20812
20813         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
20814         shadow its mbsinit function.
20815
20816 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
20817
20818         * lib/mbswidth.h: New file.
20819         * lib/mbswidth.c: New file.
20820         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
20821         (noinst_HEADERS): Add mbswidth.h.
20822
20823 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
20824
20825         * lib/config.charset: Add support for FreeBSD. Improve support for
20826         HP-UX and IRIX 6.
20827
20828 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
20829
20830         * m4/mbswidth.m4: New file.
20831         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
20832
20833 2000-07-15  Jim Meyering  <meyering@lucent.com>
20834
20835         * lib/makepath.c: Include quote.h.
20836         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
20837         corresponding argument in a `quote (...)' call.
20838         Give better diagnostics.
20839
20840         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
20841         (noinst_HEADERS): Add quote.h.
20842
20843         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
20844         from tar's src/misc.c.
20845         * lib/quote.h: New file.  Prototypes for same.
20846
20847 2000-07-14  Paul Eggert  <eggert@twinsun.com>
20848
20849         From a suggestion by Bruno Haible.
20850         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
20851         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
20852         to decide whether to define the BeOS workaround macro;
20853         this adjusts to the change to AC_MBSTATE_T.
20854
20855 2000-07-14  Jim Meyering  <meyering@lucent.com>
20856
20857         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
20858         jm_AC_TYPE_UINTMAX_T.
20859
20860 2000-07-13  Paul Eggert  <eggert@twinsun.com>
20861
20862         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
20863
20864         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
20865         quotearg_buffer_restyled): Add support for
20866         clocale_quoting_style.  Undo previous change to
20867         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
20868         and "{RIGHT QUOTATION MARK}" msgids.
20869
20870 2000-07-10  Paul Eggert  <eggert@twinsun.com>
20871
20872         From a suggestion by Bruno Haible.
20873         * m4/mbstate_t.m4 (AC_MBSTATE_T):
20874         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
20875         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
20876         and mbstate_t, to a single-part test that simply defines mbstate_t.
20877         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
20878         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
20879
20880 2000-07-10  Jim Meyering  <meyering@lucent.com>
20881
20882         * m4/strerror_r.m4: Mirror the correction made in autoconf.
20883
20884         * m4/gnu-source.m4: Output to confdefs.h directly.
20885         Suggestion from Akim Demaille.
20886
20887 2000-07-09  Paul Eggert  <eggert@twinsun.com>
20888
20889         The old behavior of quoting `like this' doesn't look good with
20890         newer, ISO-style fonts.  See:
20891         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
20892
20893         Instead, quote "like this" by default.  Let the translator
20894         tailor the locale-specific quoting behavior by providing
20895         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
20896
20897         * lib/quotearg.c (N_): New macro.
20898         (gettext_default): New function.
20899         (quotearg_buffer_restyled): Use
20900         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
20901         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
20902
20903 2000-07-09  Jim Meyering  <meyering@lucent.com>
20904
20905         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
20906         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
20907
20908         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
20909         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
20910
20911 2000-07-09  Jim Meyering  <meyering@lucent.com>
20912
20913         * lib/Most files: Update copyright dates to include 2000.
20914
20915 2000-07-08  Jim Meyering  <meyering@lucent.com>
20916
20917         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
20918         if not defined.
20919         (xgethostname): Remove now-unnecessary #ifdef.
20920         Move declaration of `err' into loop where it's used.
20921
20922 2000-07-05  Paul Eggert  <eggert@twinsun.com>
20923         and Bruno Haible  <haible@clisp.cons.org>
20924
20925         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
20926         only if the test for an object-type mbstate_t fails.  This
20927         prevents us from mistakenly reporting that mbstate_t is a
20928         system object type after we "#define mbstate_t int" to work
20929         around its lack.
20930
20931 2000-07-05  Paul Eggert  <eggert@twinsun.com>
20932         and Bruno Haible  <haible@clisp.cons.org>
20933
20934         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
20935
20936 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
20937
20938         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
20939         to strerror_r.
20940         Include <ctype.h> for use of isalpha.
20941
20942 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
20943
20944         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
20945         by allocating a larger buffer. Test the gethostname return value for
20946         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
20947         returns an error and ENAMETOOLONG isn't defined.
20948
20949 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
20950
20951         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
20952         dimension.
20953
20954 2000-07-04  Jim Meyering  <meyering@lucent.com>
20955
20956         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
20957         of the deprecated AC_CHECKING.
20958
20959 2000-07-04  Jim Meyering  <meyering@lucent.com>
20960
20961         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
20962         Reported by Bruno Haible.
20963
20964 2000-07-04  Jim Meyering  <meyering@lucent.com>
20965
20966         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
20967         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
20968         lacks mbrtowc.
20969
20970 2000-07-03  Paul Eggert  <eggert@twinsun.com>
20971
20972         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
20973         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
20974
20975 2000-07-03  Paul Eggert  <eggert@twinsun.com>
20976         and Bruno Haible  <haible@clisp.cons.org>
20977
20978         * lib/quotearg.c (mbrtowc):
20979         Assign to *pwc, and return 1 only if result is nonzero.
20980         (iswprint): Use ISPRINT when substituting our own mbrtowc.
20981
20982 2000-07-03  Jim Meyering  <meyering@lucent.com>
20983
20984         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
20985
20986 2000-07-03  Jim Meyering  <meyering@lucent.com>
20987
20988         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
20989         This is necessary to get a definition of e.g., UTMP_FILE on
20990         HP-UX 10.20.
20991         From Bob Proulx.
20992
20993 2000-07-02  Jim Meyering  <meyering@lucent.com>
20994
20995         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
20996
20997         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
20998         AC_LIBOBJ(function_name).
20999         * m4/chown.m4: Likewise.
21000         * m4/fnmatch.m4: Likewise.
21001         * m4/ftruncate.m4: Likewise.
21002         * m4/getgroups.m4: Likewise.
21003         * m4/getline.m4: Likewise.
21004         * m4/group-member.m4: Likewise.
21005         * m4/jm-macros.m4: Likewise.
21006         * m4/lstat.m4: Likewise.
21007         * m4/malloc.m4: Likewise.
21008         * m4/memcmp.m4: Likewise.
21009         * m4/nanosleep.m4: Likewise.
21010         * m4/putenv.m4: Likewise.
21011         * m4/realloc.m4: Likewise.
21012         * m4/regex.m4: Likewise.
21013         * m4/stat.m4: Likewise.
21014         * m4/strftime.m4: Likewise.
21015
21016 2000-07-02  Jim Meyering  <meyering@lucent.com>
21017
21018         * lib/quotearg.c (mbstate_t): Don't define here.
21019
21020 2000-07-02  Jim Meyering  <meyering@lucent.com>
21021
21022         * lib/nanosleep.c (SIGCONT): Define if not already defined.
21023
21024 2000-07-01  Jim Meyering  <meyering@lucent.com>
21025
21026         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
21027
21028 2000-07-01  Jim Meyering  <meyering@lucent.com>
21029
21030         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
21031         problem.
21032
21033 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
21034
21035         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
21036         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
21037
21038 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
21039
21040         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
21041         per change in ../m4/ls-mntd-fs.m4.
21042         (read_filesystem_list): Ignore symbolic links.
21043
21044 2000-06-29  Jim Meyering  <meyering@lucent.com>
21045
21046         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
21047         for declaration of strcmp.
21048
21049         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
21050
21051         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
21052         Avoid warning by casting result to `char *' to remove `const'.
21053
21054 2000-06-28  Jim Meyering  <meyering@lucent.com>
21055
21056         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
21057         included by quotearg.c, for which we perform this test.  From
21058         Bruno Haible.
21059
21060 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
21061
21062         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
21063         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
21064         <utmpx.h> exists, put readutmp.o into LIBOBJS.
21065
21066 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
21067
21068         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
21069
21070 2000-06-26  Paul Eggert  <eggert@twinsun.com>
21071
21072         savedir now sets errno on failure and invokes xmalloc to get memory.
21073         Fix a couple of other minor bugs while we're at it.
21074
21075         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
21076         (NAMLEN): Remove macro.
21077         (malloc, realloc): Remove decls.
21078         (stpcpy): Likewise.
21079         ("xalloc.h"): Include.
21080         (NAME_SIZE_DEFAULT): New macro.
21081         (savedir): Use xmalloc / xrealloc to allocate memory.
21082         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
21083         Skip "" directory entries.
21084         Use strlen to calculate directory entry length, since the old method
21085         is rarely used these days and isn't worth supporting.
21086         Don't use a pointer after freeing it.
21087         Check for integer overflow when calculating allocation size.
21088         Use memcpy to copy entries, instead of stpcpy.
21089         Set errno properly when returning NULL.
21090         Check for readdir error.
21091
21092 2000-06-26  Jim Meyering  <meyering@lucent.com>
21093
21094         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
21095
21096 2000-06-25  Jim Meyering  <meyering@lucent.com>
21097
21098         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
21099         Linux header bug when _XOPEN_SOURCE is defined to 500.
21100
21101 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
21102
21103         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
21104         deficiency.
21105
21106 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
21107
21108         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
21109         Include xalloc.h.
21110         Don't include <stdlib.h>.  Don't declare malloc, realloc.
21111
21112 2000-06-24  Jim Meyering  <meyering@lucent.com>
21113
21114         * m4/strerror_r.m4: Revive this file -- to try out an experimental
21115         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
21116         for which strerror does return char*, but which lacks a conveniently
21117         accessible declaration of the function.  If the compile-test says
21118         strerror_r doesn't work, then resort to a `run'-test that works on
21119         BeOS and segfaults on DEC Unix.
21120
21121 2000-06-24  Jim Meyering  <meyering@lucent.com>
21122
21123         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
21124
21125 2000-06-23  Paul Eggert  <eggert@twinsun.com>
21126
21127         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
21128         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
21129
21130 2000-06-23  Paul Eggert  <eggert@twinsun.com>
21131
21132         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
21133         (mbrtowc, mbstate_t): Define substitutes if
21134         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
21135         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
21136         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
21137
21138 2000-06-23  Jim Meyering  <meyering@lucent.com>
21139
21140         * m4/afs.m4: Add missing AC_MSG_RESULT.
21141         Reported by Bruno Haible.
21142
21143         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
21144         Suggestion from Bruno Haible.
21145
21146 2000-06-23  Jim Meyering  <meyering@lucent.com>
21147
21148         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
21149
21150 2000-06-21  Jim Meyering  <meyering@lucent.com>
21151
21152         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
21153
21154 2000-06-21  Jim Meyering  <meyering@lucent.com>
21155
21156         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
21157         (noinst_HEADERS): Add getstr.h.
21158
21159         * lib/getline.c (getstr): Move into a separate file.
21160         * lib/getstr.c (getstr): New file, extracted from getline.c, with
21161         the following changes: new parameter, delim2; both delim[12]
21162         parameters have type `int', not `char'.  The latter would lose
21163         with 8-bit delimiters.
21164         * lib/getstr.h: New file.
21165
21166 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
21167
21168         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
21169         than 1024, return a memory chunk of least possible size, instead
21170         of size PATH_MAX + 2. In the loop, increment the size proportionally.
21171         Use free/xmalloc instead of xrealloc to avoid copying for very long
21172         paths.
21173
21174 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
21175
21176         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
21177         the empty string.
21178
21179 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
21180
21181         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
21182         address, not strdup.  Include <stdlib.h> and don't declare free().
21183
21184 2000-06-19  Jim Meyering  <meyering@lucent.com>
21185
21186         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
21187
21188 2000-06-18  Jim Meyering  <meyering@lucent.com>
21189
21190         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
21191
21192         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
21193         `checking whether...' message to be consistent with that of the
21194         lstat test.
21195
21196 2000-06-18  Jim Meyering  <meyering@lucent.com>
21197
21198         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
21199         Besides, these days every porting target provides a mkdir function.
21200
21201         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
21202         needed. (this snippet comes from src/system.h).
21203
21204 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
21205
21206         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
21207
21208 2000-06-15  Paul Eggert  <eggert@twinsun.com>
21209
21210         * lib/human.c (adjust_value): New function.
21211         (human_readable_inexact): Apply rounding style even when
21212         printing approximate values.
21213
21214 2000-06-14  Paul Eggert  <eggert@twinsun.com>
21215
21216         * lib/human.c (human_readable_inexact): Allow an input block
21217         size that is not a multiple of the output block size, and vice versa.
21218         Reported by Piergiorgio Sartor.
21219
21220 2000-06-14  Paul Eggert  <eggert@twinsun.com>
21221
21222         * lib/getdate.y (get_date): Apply relative times after time
21223         zone indicator, not before.  Reported by Todd A. Jacobs.
21224
21225 2000-06-13  Jim Meyering  <meyering@lucent.com>
21226
21227         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
21228
21229         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
21230
21231 2000-06-12  Paul Eggert  <eggert@twinsun.com>
21232
21233         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
21234
21235 2000-06-12  Jim Meyering  <meyering@lucent.com>
21236
21237         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
21238         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
21239         optional argument.
21240         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
21241         the optional argument, `lib'.
21242
21243 2000-06-08  Jim Meyering  <meyering@lucent.com>
21244
21245         * m4/largefile.m4: Remove file (now that it's part of autoconf).
21246
21247 2000-06-04  Paul Eggert  <eggert@twinsun.com>
21248
21249         Rewrite largefile configuration so that we don't need to run
21250         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
21251         AC_CANONICAL_HOST in configure.in -- jmm]
21252
21253         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
21254         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
21255         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
21256         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
21257         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
21258         All uses changed.
21259         Instead of inspecting the output of getconf, try to compile the
21260         test program without and with the macro definition.
21261         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
21262         for getconf.  Instead, check for the needed flags by compiling
21263         test programs.
21264
21265 2000-06-04  Paul Eggert  <eggert@twinsun.com>
21266
21267         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
21268
21269 2000-06-04  Jim Meyering  <meyering@lucent.com>
21270
21271         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
21272         SunOS 4.1.4 for which gid_t is an unsigned type.
21273
21274 2000-06-03  Jim Meyering  <meyering@lucent.com>
21275
21276         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
21277         now that autoconf requires that.
21278
21279         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
21280         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
21281         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
21282
21283 2000-06-03  Jim Meyering  <meyering@lucent.com>
21284
21285         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
21286
21287 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
21288
21289         * m4/glibc21.m4: New file.
21290         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
21291
21292 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
21293
21294         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
21295         newer, don't install charset.alias.
21296         * lib/config.charset: Change the Linux/glibc rules so they become empty
21297         on glibc-2.1 or newer.
21298
21299 2000-06-02  Jim Meyering  <meyering@lucent.com>
21300
21301         * lib/mountlist.c: Back out last change.  Instead, do this...
21302         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
21303         me_dummy member using the same `ignore'-testing code.
21304         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
21305         fs_type strings.
21306         From Mark D. Roth.
21307
21308 2000-05-29  Jim Meyering  <meyering@lucent.com>
21309
21310         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
21311         mounts with the `ignore' attribute.  Based on a patch from
21312         Mark D. Roth.
21313
21314 2000-05-28  Jim Meyering  <meyering@lucent.com>
21315
21316         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
21317         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
21318         * m4/stat.m4: Likewise.
21319         * m4/lstat.m4: Likewise.
21320         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
21321
21322         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
21323         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
21324
21325 2000-05-26  Jim Meyering  <meyering@lucent.com>
21326
21327         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
21328
21329 2000-05-24  Jim Meyering  <meyering@lucent.com>
21330
21331         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
21332         autoconf requires that.
21333         * m4/lib-check.m4: Likewise.
21334         * m4/jm-macros.m4: Likewise.
21335         * m4/strftime.m4: Likewise.
21336
21337         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
21338         AC_CHECK_DECLS, now that autoconf requires that.
21339
21340 2000-05-22  Jim Meyering  <meyering@lucent.com>
21341
21342         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
21343         * m4/lstat.m4: Likewise.
21344
21345 2000-05-22  Jim Meyering  <meyering@lucent.com>
21346
21347         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
21348
21349 2000-05-20  Jim Meyering  <meyering@lucent.com>
21350
21351         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
21352         (jm_PREREQ): Use it.
21353
21354 2000-05-18  Jim Meyering  <meyering@lucent.com>
21355
21356         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
21357         back, too, since it may have been modified by allocate_entry.
21358         (hash_delete): Rewrite to use neither the assignment operator
21359         nor the comma operator in an if-expression.
21360
21361 2000-05-15  Paul Eggert  <eggert@twinsun.com>
21362
21363         * lib/closeout.c:
21364         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
21365         Remove; no longer needed.
21366         "quotearg.h": Add include.
21367         (file_name): Do not bother to explicitly initialize to NULL; it's less
21368         efficient on some hosts.
21369         (close_stdout_status): Remove test as to whether stdout was already
21370         closed; it breaks for the case "echo x | sort >&-".
21371         Quote file name colons.
21372         Do not assume that _("write error") lacks format strings.
21373
21374 2000-05-15  Jim Meyering  <meyering@lucent.com>
21375
21376         * lib/version-etc.c (version_etc_copyright): Update the copyright
21377         string used in all --version output.
21378
21379 2000-05-14  Jim Meyering  <meyering@lucent.com>
21380
21381         * lib/closeout.c (close_stdout_set_file_name): New function.
21382         (close_stdout_status): Use new file-scoped global.
21383         Return right away if fstat says the stdout file descriptor is invalid.
21384         * lib/closeout.h (close_stdout_set_file_name): Declare.
21385
21386 2000-05-10  Jim Meyering  <meyering@lucent.com>
21387
21388         * lib/closeout.c [default_exit_status]: New file-scoped variable.
21389         (close_stdout_set_status): New function.
21390         * lib/closeout.h (close_stdout_set_status): Declare.
21391
21392 2000-05-09  Jim Meyering  <meyering@lucent.com>
21393
21394         * m4/gettext.m4: Rename this...
21395         * m4/libintl.m4: ...to this.
21396
21397 2000-05-08  Jim Meyering  <meyering@lucent.com>
21398
21399         * lib/long-options.c: Don't include closeout.h.
21400         (parse_long_options): Don't call close_stdout for --version.
21401
21402 2000-05-06  Paul Eggert  <eggert@twinsun.com>
21403
21404         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
21405         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
21406         2.1.3 bug.  This avoids a clash when files like regex.c define
21407         _GNU_SOURCE.
21408
21409 2000-05-06  Jim Meyering  <meyering@lucent.com>
21410
21411         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
21412         (AC_REPLACE_FUNCS): Add strnlen.
21413
21414         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
21415         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
21416
21417         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
21418         AC_SEARCH_LIBS call for nanosleep.
21419         (LIB_NANOSLEEP): Set and AC_SUBST.
21420
21421 2000-05-06  Jim Meyering  <meyering@lucent.com>
21422
21423         * lib/strnlen.c: Undefine __strnlen and strnlen.
21424         [!weak_alias]: Define __strnlen to strnlen.
21425
21426         * lib/atexit.c: New file, from libiberty.
21427
21428 2000-05-06  Jim Meyering  <meyering@lucent.com>
21429
21430         * lib/closeout.c (close_stdout_status): Also check for errors on the
21431         stderr stream.
21432
21433 2000-05-05  Jim Meyering  <meyering@lucent.com>
21434
21435         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
21436         AC_SEARCH_LIBS call for clock_gettime.
21437         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
21438
21439         * m4/search-libs.m4: Update from autoconf.
21440
21441         su doesn't work on Solaris 2.6.
21442         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
21443         <shadow.h>.  Reported by Dragos Harabor.
21444
21445 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
21446
21447         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
21448         memcpy instead of xmalloc, xrealloc, path_concat.
21449         (locale_charset): Treat empty environment variables as absent.
21450         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
21451
21452 2000-05-04  Jim Meyering  <meyering@lucent.com>
21453
21454         * lib/getopt.c: Update from glibc.
21455         * lib/obstack.c: Likewise.
21456         * lib/obstack.h: Likewise.
21457         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
21458         file
21459
21460         * lib/regex.h: Likewise.
21461         * lib/strndup.c: Likewise.
21462         * lib/strnlen.c: New file, from glibc.
21463
21464 2000-05-03  Jim Meyering  <meyering@lucent.com>
21465
21466         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
21467
21468 2000-05-02  Paul Eggert  <eggert@twinsun.com>
21469
21470         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
21471         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
21472         compile-time test, rather than inspecting host and OS, to
21473         decide whether to define _LARGEFILE_SOURCE.
21474
21475 2000-05-01  Jim Meyering  <meyering@lucent.com>
21476
21477         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
21478
21479         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
21480         Based on a patch from Bruno Haible.
21481
21482 2000-05-01  Jim Meyering  <meyering@lucent.com>
21483
21484         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
21485
21486 2000-04-29  Jim Meyering  <meyering@lucent.com>
21487
21488         * lib/path-concat.c: Declare strdup only if it's not defined.
21489         * lib/canon-host.c: Likewise.
21490
21491 2000-04-28  Jim Meyering  <meyering@lucent.com>
21492
21493         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
21494         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
21495         is included first, then limits.h is included by locale.h by libintl.h.
21496         From John David Anglin.
21497
21498 2000-04-25  Jim Meyering  <meyering@lucent.com>
21499
21500         * lib/makepath.c (S_IRWXUGO): Define.
21501         (make_path): Always perform explicit chmod if MODE specifies any
21502         of the `special' permission bits.  Prompted by a bug report against
21503         install from Mate Wierdl and Joost van Baal.
21504
21505 2000-04-18  Jim Meyering  <meyering@lucent.com>
21506
21507         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
21508         (jm_PREREQ): Use it.
21509
21510 2000-04-18  Jim Meyering  <meyering@lucent.com>
21511
21512         * lib/README: New file.
21513
21514         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
21515         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
21516
21517 2000-04-17  Jim Meyering  <meyering@lucent.com>
21518
21519         Get it right :-)
21520         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
21521         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
21522         Suggestion from Akim Demaille.
21523
21524 2000-04-17  Jim Meyering  <meyering@lucent.com>
21525
21526         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
21527         the definition of it to rpl_strftime also defined-away the system's
21528         declaration.
21529
21530 2000-04-15  Jim Meyering  <meyering@lucent.com>
21531
21532         Use `C' to denote so-called `contiguous' files, the same way
21533         that tar does.
21534         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
21535         (ftypelet): Use S_ISCTG.
21536         From Michael Deutschmann.
21537
21538 2000-04-14  Jim Meyering  <meyering@lucent.com>
21539
21540         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
21541         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
21542         clobbered.
21543
21544 2000-04-14  Jim Meyering  <meyering@lucent.com>
21545
21546         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
21547
21548 2000-04-13  Jim Meyering  <meyering@lucent.com>
21549
21550         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
21551         AH_VERBATIM to insert required #ifndef into config.h.in.
21552         Suggestion from Akim Demaille.
21553
21554 2000-04-12  Jim Meyering  <meyering@lucent.com>
21555
21556         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
21557         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
21558         Christian Krackowizer.
21559
21560         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
21561         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
21562         (AC_SYS_LARGEFILE): Require.
21563         (AM_C_PROTOTYPES): Require.
21564
21565 2000-04-08  Jim Meyering  <meyering@lucent.com>
21566
21567         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
21568         names don't conflict.  Reported by Eli Zaretskii.
21569
21570 2000-04-07  Jim Meyering  <meyering@lucent.com>
21571
21572         * lib/putenv.c: Move inclusion of errno.h so it follows that of
21573         sys/types.h, to work around system header problems on AIX 3.2.5.
21574         From Bruno Haible.
21575
21576 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
21577
21578         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
21579         bug.  Deal with the different error behavior of Irix iconv.
21580
21581 2000-04-05  Paul Eggert  <eggert@twinsun.com>
21582
21583         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
21584         IRIX if the installer said otherwise.
21585
21586 2000-04-05  Jim Meyering  <meyering@lucent.com>
21587
21588         Portability tweaks required for ultrix4.3.
21589         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
21590         (jm_CHECK_DECLS): Add getutent to the list of functions.
21591         (_jm_DECL_HEADERS): Add utmpx.h.
21592         From John David Anglin.
21593
21594         * m4/strftime.m4: Back out the 2000-04-02 change.
21595         Instead of that change, simply undefine putenv in the test program.
21596
21597 2000-04-05  Jim Meyering  <meyering@lucent.com>
21598
21599         Portability tweaks required for ultrix4.3.
21600         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
21601         getutent.
21602         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
21603         * lib/canon-host.c: Declare strdup.
21604         * lib/path-concat.c: Likewise.
21605         From John David Anglin.
21606
21607 2000-04-04  Jim Meyering  <meyering@lucent.com>
21608
21609         Be more DOS 8.3-friendly.
21610         * lib/ref-add.sin: Renamed from ref-add.sed.in.
21611         * lib/ref-del.sin: Renamed from ref-del.sed.in.
21612         * lib/Makefile.am: Reflect renaming.
21613         Reported by Eli Zaretskii.
21614
21615         Use a temporary file name that won't clash with `charset.alias'
21616         in the DOS 8.3 name space.
21617         * lib/Makefile.am (charset_tmp): Define.
21618         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
21619         (uninstall-local): Likewise.
21620         Reported by Eli Zaretskii.
21621
21622 2000-04-03  Jim Meyering  <meyering@lucent.com>
21623
21624         * m4/gettext.m4: Fix typo in comment.
21625
21626         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
21627         textutils/configure.in).  Suggestion from Paul Eggert.
21628         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
21629
21630 2000-04-02  Paul Eggert  <eggert@twinsun.com>
21631
21632         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
21633         variable in the shell rather than using putenv, which isn't
21634         portable.  This avoids the configure-time inter-test dependency
21635         on the potentially-renamed putenv function.
21636
21637 2000-03-30  Paul Eggert  <eggert@twinsun.com>
21638
21639         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
21640         before checking struct stat.st_blksize, so that
21641         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
21642
21643 2000-03-29  Paul Eggert  <eggert@twinsun.com>
21644
21645         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
21646         since strftime.c uses HAVE_STRFTIME to decide whether to use
21647         the underlying strftime.
21648
21649 2000-03-29  Paul Eggert  <eggert@twinsun.com>
21650
21651         * lib/time/strftime.c (my_strftime): Make sure we call the system
21652         strftime, not ourselves, when invoking the underlying strftime.
21653
21654 2000-03-24  Jim Meyering  <meyering@lucent.com>
21655
21656         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
21657         (charset_alias): Define.
21658         (install-exec-local): Factor out common code.
21659         (uninstall-local): Split lines longer than 80.
21660         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
21661         (SUFFIXES): Define.
21662         (.sed.in.sed): New rule.  Don't redirect directly to $@.
21663         (CLEANFILES): Add ref-add.sed and ref-del.sed.
21664
21665 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
21666
21667         * lib/config.charset: Output a line containing "Packages using this
21668         file".
21669         * lib/ref-add.sed.in, ref-del.sed.in: New files.
21670         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
21671         ref-del.sed): New rules.
21672
21673 2000-03-17  Jim Meyering  <meyering@lucent.com>
21674
21675         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
21676         Otherwise, include <strings.h>
21677
21678 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
21679
21680         * lib/unicodeio.c (utf8_wctomb): New function.
21681         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
21682         format instead of in UCS-4 with platform dependent endianness.
21683
21684 2000-03-10  Jim Meyering  <meyering@lucent.com>
21685
21686         * m4/lib-check.m4: Look for getspnam in -lgen, too.
21687         From Marco Franzen.
21688
21689 2000-03-07  Paul Eggert  <eggert@twinsun.com>
21690
21691         * lib/savedir.c (savedir): Work even if directory size is
21692         negative; this can happen with some screwy NFS configurations.
21693
21694 2000-03-06  Jim Meyering  <meyering@lucent.com>
21695
21696         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
21697         if it's NULL (because we ran out of memory).  From Bruno Haible.
21698
21699 2000-03-05  Jim Meyering  <meyering@lucent.com>
21700
21701         * lib/localcharset.c ("path-concat.h"): Include.
21702         (get_charset_aliases): Use path_concat instead of ANSI string
21703         concatenation.
21704
21705         * lib/unicodeio.h (PARAMS): Define.
21706         Use it to guard prototype.
21707
21708 2000-03-04  Jim Meyering  <meyering@lucent.com>
21709
21710         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
21711         for lib/localcharset.c.
21712
21713 2000-03-04  Jim Meyering  <meyering@lucent.com>
21714
21715         * lib/Makefile.am (install-exec-local): Create $(libdir) before
21716         installing into it.
21717         (uninstall-local): Uncomment this rule so `make distcheck' works
21718         once again.
21719
21720         * lib/unicodeio.c (<errno.h>): Include it.
21721         (errno): Declare if not defined.
21722
21723         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
21724
21725         * lib/config.charset: New version, incorporating remarks from a linux
21726         i18n mailing list.  From Bruno Haible.
21727
21728 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
21729
21730         * m4/codeset.m4: New file.
21731         * m4/iconv.m4: New file.
21732         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
21733
21734 2000-03-03  Jim Meyering  <meyering@lucent.com>
21735
21736         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
21737
21738 2000-03-02  Jim Meyering  <meyering@lucent.com>
21739
21740         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
21741         the messages come out on separate lines.
21742
21743         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
21744         rather than jm_CHECK_DECLARATIONS.
21745         * m4/decl.m4: Remove now-unused file.
21746
21747         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
21748         geteuid.
21749
21750 2000-03-02  Jim Meyering  <meyering@lucent.com>
21751
21752         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
21753
21754 2000-03-01  Jim Meyering  <meyering@lucent.com>
21755
21756         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
21757         * lib/unicodeio.c: Likewise.
21758
21759 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
21760
21761         * lib/config.charset: New file.
21762         * lib/localcharset.c: New file.
21763         * lib/unicodeio.h, unicodeio.c: New files.
21764         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
21765         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
21766         (noinst_HEADERS): Add unicodeio.h.
21767         (all-local, install-exec-local, charset.alias): New targets.
21768
21769 2000-02-28  Paul Eggert  <eggert@twinsun.com>
21770
21771         * lib/quotearg.c (ALERT_CHAR): New macro.
21772         (quotearg_buffer_restyled): Use it.
21773
21774 2000-02-27  Jim Meyering  <meyering@lucent.com>
21775
21776         * m4/check-decl.m4: Add getenv to the list.
21777
21778 2000-02-27  Jim Meyering  <meyering@lucent.com>
21779
21780         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
21781         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
21782
21783         * lib/backupfile.c: Guard inclusion of stdlib.h with
21784         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
21785         Declare malloc if needed.
21786
21787         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
21788         `#ifndef HAVE_DECL..'
21789         now that autoconf always defines the HAVE_DECL_ symbols.
21790         * lib/human.c: Likewise.
21791         * lib/same.c: Likewise.
21792         * lib/strtoumax.c: Likewise.
21793
21794         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
21795         declaration check was not run.
21796         * lib/hash.c: Likewise.
21797         * lib/human.c: Likewise.
21798         * lib/same.c: Likewise.
21799         * lib/strtoumax.c: Likewise.
21800
21801         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
21802         `.', then first look up the entire `.'-containing string as a login
21803         name.
21804
21805 2000-02-23  Jim Meyering  <meyering@lucent.com>
21806
21807         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
21808         in place of my hack.
21809
21810 2000-02-18  Paul Eggert  <eggert@twinsun.com>
21811
21812         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
21813         (textint): New typedef.
21814         (parser_control): Member year changed from int to textint.
21815         All uses changed.
21816         (YYSTYPE): Removed; replaced by %union with int and textint members.
21817         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
21818         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
21819         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
21820         (tSNUMBER, tUNUMBER): Now of type <textintval>.
21821         (date, number, to_year): Use width of number in digits, not its value,
21822         to determine whether it's a 2-digit year, or a 2-digit time.
21823         (yylex): Store number of digits of numeric tokens.
21824         Reported by John Kendall.
21825
21826         (parser_control): Changed from struct parser_control to typedef (for
21827         consistency).  All uses changed.
21828
21829         (tID): Removed; not used.
21830         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
21831
21832 2000-02-14  Paul Eggert  <eggert@twinsun.com>
21833
21834         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
21835         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
21836
21837 2000-02-12  Jim Meyering  <meyering@lucent.com>
21838
21839         * lib/userspec.c (ISDIGIT): Define it.
21840         (isdigit): Remove definition.
21841         (is_number): Use ISDIGIT, not isdigit.
21842         <libintl.h>: Include.
21843         (_ and N_): Define.
21844         (parse_user_spec): Mark translatable strings.
21845
21846 2000-02-10  Jim Meyering  <meyering@lucent.com>
21847
21848         With these changes, nanosleep.[ch] are finally enough like the other
21849         lib/* replacement files to compile on a few more losing systems.
21850
21851         * lib/nanosleep.h: Don't include config.h.
21852         Remove prototype from declaration of nanosleep.
21853         (PARAMS): Remove now-unneeded definition.
21854         * lib/nanosleep.c: #undef nanosleep.
21855         (rpl_nanosleep): Rename from nanosleep.
21856
21857 2000-02-10  Jim Meyering  <meyering@lucent.com>
21858
21859         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
21860         gnu_nanosleep to rpl_nanosleep.
21861
21862 2000-02-09  Jim Meyering  <meyering@lucent.com>
21863
21864         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
21865         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
21866
21867 2000-02-08  Akim Demaille  <akim@epita.fr>
21868
21869         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
21870         `[' and `]' and remove uses of `changequote'.
21871         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
21872         (AC_SYS_LARGEFILE): Likewise.
21873         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
21874         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
21875         of changequote.
21876         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
21877         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
21878         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
21879         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
21880
21881 2000-02-05  Jim Meyering  <meyering@lucent.com>
21882
21883         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
21884         Remove explicit use of AC_HEADER_TIME.  It is required by
21885         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
21886         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
21887         in autoconf whereby the expansion of the latter ended up preceding
21888         the expansion of its prerequisite, AC_HEADER_TIME.
21889         Reported by Volker Borchert.
21890
21891 2000-02-03  Jim Meyering  <meyering@lucent.com>
21892
21893         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
21894
21895 2000-02-03  Jim Meyering  <meyering@lucent.com>
21896
21897         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
21898         rather than with `#if HAVE_UTMPNAME'.
21899
21900 2000-02-02  Jim Meyering  <meyering@lucent.com>
21901
21902         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
21903         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
21904         Reported by Eli Zaretskii.
21905
21906 2000-02-01  Jim Meyering  <meyering@lucent.com>
21907
21908         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
21909
21910 2000-01-31  Jim Meyering  <meyering@lucent.com>
21911
21912         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
21913         functions.  Add the time.h and sys/time.h headers along with the
21914         AC_REQUIRE'ment of AC_HEADER_TIME.
21915
21916 2000-01-31  Jim Meyering  <meyering@lucent.com>
21917
21918         * lib/nanosleep.h (nanosleep): Guard declaration with
21919         `#if ! HAVE_DECL_NANOSLEEP'.
21920         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
21921         the declaration in that vendor's sys/timers.h.
21922         Reported by Christian Krackowizer.
21923
21924         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
21925         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
21926         (ISPRINT): Likewise.
21927         Reported by Tom Tromey.
21928
21929 2000-01-30  Jim Meyering  <meyering@lucent.com>
21930
21931         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
21932
21933         * m4/prereq.m4 (utmp_includes): Define.
21934         Check for ut_user and ut_name members in both struct utmpx
21935         and struct utmp.
21936
21937 2000-01-30  Jim Meyering  <meyering@lucent.com>
21938
21939         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
21940         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
21941         header files where only utmpx.ut_user is declared.
21942
21943         * lib/readutmp.h (UT_USER): Define.
21944
21945 2000-01-29  Jim Meyering  <meyering@lucent.com>
21946
21947         * m4/lib-check.m4: New file containing library-related checks from
21948         fileutils and sh-utils (textutils had none).
21949
21950 2000-01-28  Jim Meyering  <meyering@lucent.com>
21951
21952         * m4/perl.m4: Change format of warning message to look more like that
21953         from the missing script.  Suggestion from François Pinard.
21954
21955 2000-01-25  Jim Meyering  <meyering@lucent.com>
21956
21957         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
21958         well as time.h in the compile check.
21959         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
21960         Fix typo in cross-compiling case: s/yes/no/.
21961
21962 2000-01-23  Jim Meyering  <meyering@lucent.com>
21963
21964         * m4/jm-macros.m4: Move df-related tests here from
21965         fileutils/configure.in
21966
21967         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
21968         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
21969
21970         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
21971         s/space/ac_fsusage_space/.
21972         (jm_FILE_SYSTEM_USAGE): Take two parameters.
21973
21974         * m4/ftruncate.m4: New file (derived from part of
21975         fileutils/configure.in).
21976         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
21977         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
21978
21979         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
21980         AC_SUBST these here, rather than just in sh-util/configure.in, so
21981         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
21982         all the same.
21983         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
21984         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
21985         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
21986         (AC_SUBST(POW_LIBM)): Likewise.
21987         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
21988
21989 2000-01-23  Jim Meyering  <meyering@lucent.com>
21990
21991         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
21992         obstack.c.
21993
21994 2000-01-22  Jim Meyering  <meyering@lucent.com>
21995
21996         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
21997
21998         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
21999
22000         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
22001         configure.in
22002         (AC_CHECK_HEADERS): Likewise for sh-utils.
22003         (AC_CHECK_HEADERS): Likewise for textutils.
22004         Merge the three lists of headers.
22005
22006         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
22007         from fileutils' configure.in.
22008
22009         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
22010         code. Moved tests into their own function (_jm_DECL_HEADERS) in
22011         check-decl.m4.
22012
22013         * m4/check-decl.m4: Use #if rather than #ifdef.
22014         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
22015         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
22016         (_jm_DECL_HEADERS): Define new function.
22017         (jm_CHECK_DECLARATIONS): Require it.
22018
22019 2000-01-22  Jim Meyering  <meyering@lucent.com>
22020
22021         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
22022         [! HAVE_DECL_STRTOULL]: Declare strtoull.
22023         Required for some AIX systems.  Reported by Christian Krackowizer.
22024         [TESTING] (main): New function.
22025
22026         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
22027         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
22028         letters.
22029
22030         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
22031         iswprint.
22032
22033         * lib/strverscmp.c (ISDIGIT): Define.
22034         (strverscmp): Use ISDIGIT, not isdigit.
22035
22036 2000-01-19  Jim Meyering  <meyering@lucent.com>
22037
22038         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
22039         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
22040         defines `struct timespec' in <sys/time.h>
22041
22042         * m4/c-bs-a.m4: Remove uses of changequote altogether.
22043         Thanks to Akim for explaining.
22044
22045 2000-01-17  Paul Eggert  <eggert@twinsun.com>
22046
22047         * lib/nanosleep.c (nanosleep):
22048         Don't use SA_INTERRUPT to decide whether to call sigaction, as
22049         POSIX.1 doesn't require SA_INTERRUPT and some systems
22050         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
22051         it's been part of POSIX.1 since day 1 (in 1988).
22052
22053 2000-01-17  Jim Meyering  <meyering@lucent.com>
22054
22055         * lib/interlock: Remove unused file.  Reported by François Pinard.
22056
22057 2000-01-16  Paul Eggert  <eggert@twinsun.com>
22058
22059         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
22060         alert, backslash, formfeed, and vertical tab unnecessarily in
22061         shell quoting style.
22062
22063 2000-01-16  Jim Meyering  <meyering@lucent.com>
22064
22065         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
22066         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
22067         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
22068         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
22069
22070 2000-01-16  Jim Meyering  <meyering@lucent.com>
22071
22072         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
22073         because the latter didn't work.
22074
22075 2000-01-15  Jim Meyering  <meyering@lucent.com>
22076
22077         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
22078         (AC_REPLACE_FUNCS): Add memcpy and memset.
22079         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
22080         Add strpbrk.
22081         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
22082
22083 2000-01-12  Jim Meyering  <meyering@lucent.com>
22084
22085         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
22086         (jm_PREREQ): Use it.
22087         (jm_PREREQ_READUTMP): New macro.
22088         (jm_PREREQ): Use it.
22089
22090 2000-01-11  Paul Eggert  <eggert@twinsun.com>
22091
22092         Quote multibyte characters correctly.
22093         * m4/c-bs-a.m4: New file.
22094         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
22095         (jm_PREREQ): Use it.
22096
22097 2000-01-11  Paul Eggert  <eggert@twinsun.com>
22098
22099         * m4/uintmax_t.m4: Port to autoconf 2.13.
22100
22101 2000-01-08  Jim Meyering  <meyering@ascend.com>
22102
22103         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
22104         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
22105
22106 2000-01-04  Jim Meyering  <meyering@ascend.com>
22107
22108         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
22109         jm_STRUCT_DIRENT_D_TYPE.
22110         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
22111         jm_STRUCT_DIRENT_D_INO.
22112         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
22113         jm_STRUCT_UTIMBUF.
22114         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
22115         renamings.
22116         * m4/utime.m4: Likewise.
22117
22118         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
22119         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
22120
22121 2000-01-03  Paul Eggert  <eggert@twinsun.com>
22122
22123         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
22124         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
22125
22126 2000-01-02  Jim Meyering  <meyering@ascend.com>
22127
22128         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
22129         remember if this is necessary.
22130
22131 1999-12-26  Jim Meyering  <meyering@ascend.com>
22132
22133         * m4/jm-macros.m4: Use it here.
22134         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
22135
22136 1999-12-23  Jim Meyering  <meyering@ascend.com>
22137
22138         * m4/jm-macros.m4: Check for clock_gettime (moved from
22139         fileutils/configure.in)
22140         Check for gettimeofday.
22141
22142 1999-12-20  Jim Meyering  <meyering@ascend.com>
22143
22144         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
22145         autoconf-2.14a-1999-12-20.
22146
22147 1999-12-19  Jim Meyering  <meyering@ascend.com>
22148
22149         * m4/lstat-slash.m4: New file.
22150         * m4/jm-macros.m4: Use the new macro:
22151         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
22152
22153 1999-12-07  Jim Meyering  <meyering@ascend.com>
22154
22155         * m4/perl.m4: Require that File::Compare be available, too.
22156         Too many systems seem to lack it.
22157
22158         * m4/strftime.m4: Add checks for most of the cpp macros tested in
22159         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
22160
22161 1999-11-18  Paul Eggert  <eggert@twinsun.com>
22162
22163         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
22164         problem with the QNX 4.25 shell, which doesn't propagate exit
22165         status of failed commands inside shell assignments.
22166
22167 1999-11-17  Jim Meyering  <meyering@ascend.com>
22168
22169         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
22170
22171 1999-11-07  Jim Meyering  <meyering@ascend.com>
22172
22173         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
22174
22175 1999-11-06  Jim Meyering  <meyering@ascend.com>
22176
22177         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
22178         * m4/jm-macros.m4 (jm_MACROS): Use it here.
22179
22180 1999-11-05  Jim Meyering  <meyering@ascend.com>
22181
22182         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
22183         configure.in of textutils, fileutils, and sh-utils into this one
22184         (shared between those packages) file.
22185         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
22186         AC_STRUCT_ST_BLKSIZE.
22187
22188 1999-11-03  Jim Meyering  <meyering@ascend.com>
22189
22190         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
22191         of AC_CHECK_TYPE checks includes unistd.h.
22192         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
22193         Suggestion from Akim Demaille.
22194
22195 1999-10-30  Jim Meyering  <meyering@ascend.com>
22196
22197         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
22198         m4-quoted string.
22199         * m4/ls-mntd-fs.m4: Likewise.
22200         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
22201         * m4/jm-winsz1.m4: Likewise.
22202
22203         * m4/const.m4: Remove file, since the fix made it into the experimental
22204         version of autoconf.
22205         * m4/mktime.m4: Likewise.
22206
22207         * m4/check-type.m4: Remove file, now that the latest version of
22208         AC_CHECK_TYPE takes a third arg to specify additional #includes.
22209
22210         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
22211         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
22212         AC_CHECK_TYPE.
22213
22214 1999-10-04  Jim Meyering  <meyering@ascend.com>
22215
22216         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
22217
22218 1999-09-22  Paul Eggert  <eggert@twinsun.com>
22219
22220         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
22221         2.95.1 bug with HP-UX 10.20.
22222
22223 1999-09-17  Jim Meyering  <meyering@ascend.com>
22224
22225         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
22226         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
22227         due to missing strdup (against sh-utils-2.0).
22228
22229 1999-08-29  Jim Meyering  <meyering@ascend.com>
22230
22231         * m4/jm-macros.m4: Require jm_BISON.
22232         * m4/bison.m4: New file.
22233
22234 1999-08-17  Paul Eggert  <eggert@twinsun.com>
22235
22236         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
22237         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
22238
22239 1999-08-05  Jim Meyering  <meyering@ascend.com>
22240
22241         * m4/getline.m4: Rename test file from conftestdata to conftest.data
22242         to avoid conflicts with `conftest' on 8+3 filesystems.
22243         Suggestion from Eli Zaretskii.
22244
22245 1999-08-04  Jim Meyering  <meyering@ascend.com>
22246
22247         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
22248         fileutils and sh-utils (textutils's getline test was inadequate).
22249         (AM_FUNC_GETLINE): Run this test.
22250         (AC_CHECK_FUNCS): Check for getdelim.
22251         Reported by Bob Proulx.
22252
22253 1999-08-02  Jim Meyering  <meyering@ascend.com>
22254
22255         * m4/jm-macros.m4: Add a comment.
22256
22257 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22258
22259         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
22260         <inttypes.h> defines strtoumax as a macro (and not as a
22261         function).
22262
22263 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22264
22265         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
22266         that we can shift, multiply and divide unsigned long long
22267         values; Ultrix cc can't do it.
22268
22269 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22270
22271         * m4/mktime.m4: New file, which is a preview of what should appear
22272         in the next public autoconf release.
22273
22274 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22275
22276         * m4/lfs.m4: Remove this file.
22277         * m4/largefile.m4: New file.  It contains the old contents of
22278         lfs.m4, except that all names with prefix AC_LFS have been
22279         changed to use the prefix AC_SYS_LARGEFILE instead, to be
22280         compatible with future autoconf versions.  Also, some minor m4
22281         quoting problems have been fixed.
22282
22283 1999-08-01  Paul Eggert  <eggert@twinsun.com>
22284
22285         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
22286         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
22287         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
22288         and simplify the shell code.
22289
22290 1999-08-01  Jim Meyering  <meyering@ascend.com>
22291
22292         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
22293         m4.
22294
22295 1999-07-20  Jim Meyering  <meyering@ascend.com>
22296
22297         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
22298
22299 1999-07-15  Jim Meyering  <meyering@ascend.com>
22300
22301         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
22302
22303 1999-05-22  Jim Meyering  <meyering@ascend.com>
22304
22305         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
22306
22307 1999-05-20  Jim Meyering  <meyering@ascend.com>
22308
22309         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
22310         Add a colon after each `then' in case $4 is empty.
22311
22312 1999-05-16  Jim Meyering  <meyering@ascend.com>
22313
22314         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
22315
22316 1999-05-10  Jim Meyering  <meyering@ascend.com>
22317
22318         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
22319
22320         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
22321         AC_FUNC_MKTIME.
22322
22323 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
22324
22325         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
22326
22327 1999-05-04  Paul Eggert  <eggert@twinsun.com>
22328
22329         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
22330         not CPPFLAGS, so that linking works correctly in IRIX.
22331
22332 1999-04-30  Paul Eggert  <eggert@twinsun.com>
22333
22334         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
22335
22336 1999-04-20  Paul Eggert  <eggert@twinsun.com>
22337
22338         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
22339         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
22340         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
22341         jm_AC_TYPE_UNSIGNED_LONG_LONG.
22342         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
22343
22344         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
22345
22346 1999-04-20  Jim Meyering  <meyering@ascend.com>
22347
22348         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
22349         AC_REPLACE xstroull if necessary.  From Paul Eggert.
22350         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
22351
22352 1999-04-18  Jim Meyering  <meyering@ascend.com>
22353
22354         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
22355         * m4/jm-macros.m4: Use it.
22356
22357 1999-04-06  Jim Meyering  <meyering@ascend.com>
22358
22359         * m4/strftime.m4: Remove test for %f.
22360
22361 1999-03-29  Jim Meyering  <meyering@ascend.com>
22362
22363         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
22364         superset of the AC_TYPE_* checks in the textutils, fileutils,
22365         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
22366         AC_TYPE_PID_T.
22367
22368 1999-03-28  Jim Meyering  <meyering@ascend.com>
22369
22370         * m4/jm-macros.m4: Define GNU_PACKAGE here.
22371         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
22372         replaced e.g., in the *.sh files of the sh-utils.
22373
22374 1999-03-20  Jim Meyering  <meyering@ascend.com>
22375
22376         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
22377         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
22378         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
22379
22380 1999-03-19  Jim Meyering  <meyering@ascend.com>
22381
22382         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
22383
22384 1999-03-12  Jim Meyering  <meyering@ascend.com>
22385
22386         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
22387
22388 1999-03-07  Jim Meyering  <meyering@ascend.com>
22389
22390         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
22391         declared.
22392
22393 1999-02-17  Jim Meyering  <meyering@ascend.com>
22394
22395         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
22396         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
22397
22398 1999-02-07  Jim Meyering  <meyering@ascend.com>
22399
22400         * m4/group-member.m4: New file -- extracted from sh-utils'
22401         configure.in.
22402
22403         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
22404         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
22405
22406 1999-02-06  Jim Meyering  <meyering@ascend.com>
22407
22408         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
22409         * m4/fnmatch.m4: Likewise.
22410         * m4/getgroups.m4: Likewise.
22411         * m4/lstat.m4: Likewise.
22412         * m4/malloc.m4: Likewise.
22413         * m4/putenv.m4: Likewise.
22414         * m4/realloc.m4: Likewise.
22415         * m4/regex.m4: Likewise.
22416         * m4/stat.m4: Likewise.
22417         * m4/strftime.m4: Likewise.
22418         Suggestion from Alain Magloire.
22419
22420         * m4/chown.m4: Use `.$ac_objext', not `.o'.
22421         * m4/fnmatch.m4: Likewise.
22422         * m4/getgroups.m4: Likewise.
22423         * m4/getline.m4: Likewise.
22424         * m4/lstat.m4: Likewise.
22425         * m4/malloc.m4: Likewise.
22426         * m4/memcmp.m4: Likewise.
22427         * m4/putenv.m4: Likewise.
22428         * m4/realloc.m4: Likewise.
22429         * m4/regex.m4: Likewise.
22430         * m4/stat.m4: Likewise.
22431         * m4/strftime.m4: Likewise.
22432         Suggestion from Alain Magloire.
22433
22434         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
22435         an argument.
22436
22437         * m4/regex.m4: Add a run-time Test for proper operation of
22438         re_compile_pattern.
22439
22440 1999-01-31  Jim Meyering  <meyering@ascend.com>
22441
22442         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
22443
22444 1999-01-30  Jim Meyering  <meyering@ascend.com>
22445
22446         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
22447
22448         * m4/jm-mktime.m4: Make this a wrapper around the official
22449         AM_FUNC_MKTIME rather than my private copy, now that the official one
22450         is up to date.
22451         * m4/mktime.m4: Remove file.
22452
22453         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
22454         * m4/uptime.m4: Likewise.
22455         * m4/uintmax_t.m4: Likewise.
22456
22457 1999-01-28  Jim Meyering  <meyering@ascend.com>
22458
22459         * m4/jm-macros.m4: Use jm_AFS.
22460         * m4/afs.m4: New file (from fileutils' configure.in).
22461
22462         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
22463         * m4/chown.m4: Likewise.
22464         * m4/d-ino.m4: Likewise.
22465         * m4/d-type.m4: Likewise.
22466         * m4/fnmatch.m4: Likewise.
22467         * m4/getgroups.m4: Likewise.
22468         * m4/gettext.m4: Likewise.
22469         * m4/jm-mktime.m4: Likewise.
22470         * m4/jm-winsz2.m4: Likewise.
22471         * m4/lcmessage.m4: Likewise.
22472         * m4/ls-mntd-fs.m4: Likewise.
22473         * m4/malloc.m4: Likewise.
22474         * m4/memcmp.m4: Likewise.
22475         * m4/putenv.m4: Likewise.
22476         * m4/realloc.m4: Likewise.
22477         * m4/st_mtim.m4: Likewise.
22478         * m4/strftime.m4: Likewise.
22479
22480 1999-01-16  Jim Meyering  <meyering@ascend.com>
22481
22482         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
22483         (ARGMATCH_DIE_DECL): Define.
22484
22485 1999-01-12  Jim Meyering  <meyering@ascend.com>
22486
22487         * m4/Makefile.am.in: Rewrite to avoid using fmt.
22488         Reported by Lars Hecking.
22489
22490 1999-01-10  Jim Meyering  <meyering@ascend.com>
22491
22492         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
22493         gross kludge.
22494         * m4/inttypes_h.m4: Likewise.
22495         * m4/lstat.m4: Likewise.
22496         * m4/malloc.m4: Likewise.
22497         * m4/readdir.m4: Likewise.
22498         * m4/realloc.m4: Likewise.
22499         * m4/st_dm_mode.m4: Likewise.
22500         * m4/stat.m4: Likewise.
22501         * m4/utimbuf.m4: Likewise.
22502         * m4/utimes.m4: Likewise.
22503
22504         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
22505         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
22506         comments in config.h.in are meaningful.
22507
22508         * m4/jm-macros.m4: Require autoconf-2.13 here.
22509
22510         * m4/regex.m4: By default, don't use the included regex.c on systems
22511         with glibc 2.  Suggestion from Uli Drepper.
22512
22513 1999-01-02  Jim Meyering  <meyering@ascend.com>
22514
22515         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
22516
22517 1998-12-18  Jim Meyering  <meyering@ascend.com>
22518
22519         * m4/Makefile.am.in (Makefile.am): Simplify rule.
22520         Based on a suggestion from Lars Hecking.
22521
22522 1998-11-16  Paul Eggert  <eggert@twinsun.com>
22523
22524         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
22525
22526 1998-11-16  Jim Meyering  <meyering@ascend.com>
22527
22528         * m4/lfs.m4: Double-quote the `uname...` expression.
22529
22530 1998-11-14  Jim Meyering  <meyering@ascend.com>
22531
22532         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
22533         * m4/stat.m4: Likewise.
22534
22535 1998-11-03  Jim Meyering  <meyering@ascend.com>
22536
22537         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
22538         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
22539
22540 1998-10-18  Jim Meyering  <meyering@ascend.com>
22541
22542         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
22543
22544 1998-10-17  Jim Meyering  <meyering@ascend.com>
22545
22546         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
22547         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
22548         calls for those previously hard-coded headers.  Instead, take a new
22549         parameter.
22550         (jm_CHECK_DECLARATIONS): Reflect interface change.
22551         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
22552         (jm_CHECK_DECL_LOCALTIME_R): New macro.
22553
22554         * m4/mktime.m4: Test for spring-forward gap before long-running test.
22555
22556 1998-10-14  Jim Meyering  <meyering@ascend.com>
22557
22558         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
22559         instead of "TZ=America/Vancouver".  From Paul Eggert.
22560
22561 1998-10-11  Jim Meyering  <meyering@ascend.com>
22562
22563         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
22564         This adds a test for a recently added compatibility fix for mktime.c.
22565         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
22566
22567 1998-09-27  Jim Meyering  <meyering@ascend.com>
22568
22569         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
22570
22571         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
22572         ../configure.in, including a change from Gordon Matzigkeit to allow
22573         cross-compiling for the Hurd.
22574
22575         * m4/glibc.m4: New file/macro to test for the GNU C Library
22576         versions 1 and 2.  From Gordon Matzigkeit.
22577         Indent.
22578
22579 1998-09-21  Jim Meyering  <meyering@ascend.com>
22580
22581         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
22582
22583 1998-08-18  Paul Eggert  <eggert@twinsun.com>
22584
22585         Port nanosecond-resolution times to UnixWare 2.1.2 and
22586         pedantic Solaris 2.6.
22587
22588         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
22589         AC_STRUCT_ST_MTIM.
22590         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
22591         Generate name of ns member, instead of just 1 or undef.
22592         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
22593
22594 1998-08-15  Jim Meyering  <meyering@ascend.com>
22595
22596         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
22597         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
22598         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
22599         instead of jm_TYPE_SSIZE_T.
22600
22601 1998-08-12  Jim Meyering  <meyering@ascend.com>
22602
22603         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
22604
22605 1998-08-02  Jim Meyering  <meyering@ascend.com>
22606
22607         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
22608         in acconfig.h manually.
22609
22610 1998-07-31  Paul Eggert  <eggert@twinsun.com>
22611
22612         * m4/st_mtim.m4: New file.
22613
22614 1998-07-28  Jim Meyering  <meyering@ascend.com>
22615
22616         * m4/utimes.m4: Undef stat.
22617
22618 1998-07-25  Jim Meyering  <meyering@ascend.com>
22619
22620         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
22621         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
22622
22623 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
22624
22625         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
22626         uid and gid actually remain unchanged.
22627
22628 1998-07-07  Jim Meyering  <meyering@ascend.com>
22629
22630         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
22631
22632 1998-07-04  Jim Meyering  <meyering@ascend.com>
22633
22634         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
22635         to prove that this macro can be used in packages without regex.c.
22636
22637 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
22638
22639         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
22640         is to be used.
22641
22642 1998-07-03  Jim Meyering  <meyering@ascend.com>
22643
22644         * m4/gettext.m4: Add -lintl if it's found to be necessary.
22645
22646         * m4/gettext.m4: New file -- from gettext-0.10.35.
22647         * m4/lcmessage.m4: Likewise.
22648         * m4/progtest.m4: Likewise.
22649
22650         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
22651         * m4/jm-macros.m4: Require the new macro.
22652
22653 1998-06-29  Jim Meyering  <meyering@ascend.com>
22654
22655         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
22656         for the definition of NGROUPS (used in a system header included
22657         by sys/mount.h).
22658
22659 1998-06-28  Jim Meyering  <meyering@ascend.com>
22660
22661         * m4/ls-mntd-fs.m4: New file.
22662         * m4/fstypename.m4: New file.
22663
22664         * m4/jm-macros.m4: Require the new macro.
22665         * m4/jm-glibc-io.m4: New file.
22666
22667 1998-05-19  Jim Meyering  <meyering@ascend.com>
22668
22669         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
22670         * m4/lchown.m4: New file.
22671
22672         * m4/Makefile.am.in: New file.
22673         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
22674
22675 1998-05-14  Jim Meyering  <meyering@ascend.com>
22676
22677         * m4/Makefile.am (EXTRA_DIST): Add them.
22678         * m4/jm-macros.m4: New file.
22679         * m4/utimbuf.m4: New file.
22680
22681 1998-05-12  Jim Meyering  <meyering@ascend.com>
22682
22683         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
22684
22685 1998-05-11  Jim Meyering  <meyering@ascend.com>
22686
22687         * m4/isc-posix.m4: New file.
22688
22689 1998-05-10  Jim Meyering  <meyering@ascend.com>
22690
22691         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
22692
22693 1998-05-09  Jim Meyering  <meyering@ascend.com>
22694
22695         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
22696         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
22697         with automake.
22698
22699         * m4/ssize_t.m4: New file.
22700         * m4/mktime.m4: Remove file -- the new automake has this now.
22701
22702 1998-04-26  Jim Meyering  <meyering@ascend.com>
22703
22704         * m4/assert.m4: New file.
22705         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
22706
22707 1998-04-05  Jim Meyering  <meyering@ascend.com>
22708
22709         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
22710         (jm_PREREQ): Use it here.
22711
22712 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
22713
22714         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
22715         in acconfig.h.
22716
22717 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
22718
22719         * m4/prereq.m4: New file.
22720         * m4/error.m4: New file.
22721         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
22722
22723 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
22724
22725         * m4/getline.m4: Don't set am_cv_func_working_getline before the
22726         cache-check for the same variable -- that defeated the purpose of
22727         the test; the test program was never run.  This was a problem only
22728         on systems with losing getline functions -- HP-UX 10.20 is one.
22729         Reported by Bjorn Helgaas.
22730
22731 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
22732
22733         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
22734
22735 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
22736
22737         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
22738
22739         * m4/const.m4: New file.  Use an initializer in this declaration
22740         typedef int charset[2]; const charset x;
22741         Reported by Bob Glickstein.
22742
22743 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
22744
22745         * m4/chown.m4: Fix reversed types on -1 args to chown.
22746         From Kaveh Ghazi.
22747
22748 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
22749
22750         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
22751         Add lseek and memchr.
22752
22753         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
22754         T.E.Dickey <dickey@clark.net> said that some older preprocessors
22755         have a 20-character limit on names.
22756
22757 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
22758
22759         * m4/inttypes_h.m4: New file.
22760         * m4/uintmax_t.m4: New file.
22761         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
22762
22763 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
22764   Free Software Foundation, Inc.
22765 Copying and distribution of this file, with or without modification,
22766 are permitted provided the copyright notice and this notice are preserved.