4eb66fc40333bff28b2dad4de905a73739f271c3
[gnulib.git] / lib / ChangeLog
1 2003-11-24  Bruno Haible  <bruno@clisp.org>
2
3         * xallocsa.h: New file, from GNU gettext.
4         * xallocsa.c: New file, from GNU gettext.
5
6 2003-11-24  Bruno Haible  <bruno@clisp.org>
7
8         * allocsa.h: New file, from GNU gettext.
9         * allocsa.c: New file, from GNU gettext.
10
11 2003-11-24  Bruno Haible  <bruno@clisp.org>
12
13         * eealloc.h: New file.
14
15 2004-01-15  Jim Meyering  <jim@meyering.net>
16
17         Merge from coreutils.
18
19         * md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
20         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
21         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
22
23         * posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
24         optional configure-time default.
25
26         * version-etc.c (version_etc_copyright): Update copyright date.
27
28         * xreadlink.c (xreadlink): Correct outdated comment.
29
30 2004-01-15  Paul Eggert  <eggert@twinsun.com>
31
32         Merge from coreutils.
33
34         * posixver.c: Include posixver.h.
35
36         * same.c: Include <stdbool.h>, <limits.h>.
37         (_POSIX_NAME_MAX): Define if not defined.
38         (MIN): New macro.
39         (same_name): If file names are silently truncated, report
40         that the file names are the same if they are the same after
41         the silent truncation.
42
43         * xstrtod.h (xstrtod): Accept an extra arg, specifying the
44         conversion function.
45         * xstrtod.c (xstrtod): Likewise.  All callers changed to
46         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
47         longer needed.
48
49 2004-01-14  Paul Eggert  <eggert@twinsun.com>
50
51         * fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
52         with like-named macro in fnmatch.c.
53         (EXT): Use an internal constant instead.
54
55         Merge fnmatch patches from glibc.
56         * fnmatch.c (mbsinit): Remove define.
57         Add libc_hidden_ver (__fnmatch, fnmatch).
58         * fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
59         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
60
61 2003-12-14  Karl Berry  <karl@gnu.org>
62
63         * config.charset: update from gettext-runtime.
64
65 2003-12-03  Paul Eggert  <eggert@twinsun.com>
66
67         * getgroups.c (getgroups): xmalloc takes one argument, not two.
68         Bug reported by Alfred M. Szmidt.
69
70 2003-11-29  Karl Berry  <karl@gnu.org>
71
72         * argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
73
74 2003-11-23  Paul Eggert  <eggert@twinsun.com>
75             Bruno Haible  <bruno@clisp.org>
76
77         * printf-parse.h: Don't include sys/types.h.
78         (ARG_NONE): New macro.
79         (char_directive): Change type of *arg_index fields to size_t.
80         * printf-parse.c: Don't include sys/types.h.
81         (SSIZE_MAX): Remove macro.
82         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
83         Remove unnecessary overflow check.
84         * vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
85         fields.
86
87 2003-11-24  Paul Eggert  <eggert@twinsun.com>
88
89         * alloca.c: Remove dependency on xalloc module.
90         (xalloc_die): Remove.
91         (memory_full) [!defined emacs]: New macro.
92         [!defined emacs]: Don't include xalloc.h.
93         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
94         address arithmetic overflows.  Change datatypes a bit to avoid
95         unnecessary casts.
96
97 2003-11-22  Jim Meyering  <jim@meyering.net>
98
99         * xmalloc.c (x2nrealloc_inline): Fix typos in comments: s/size/size_t/.
100
101 2003-11-17  Bruno Haible  <bruno@clisp.org>
102
103         * vasnprintf.c (alloca): Remove fallback definition.
104         (freea): Remove definition.
105         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
106         Reported by Paul Eggert.
107
108 2003-11-17  Jim Meyering  <jim@meyering.net>
109
110         On systems without utime and without a utimes function capable of
111         dealing with a NULL struct utimbuf* argument, this utime replacement
112         could -- in unusual circumstances -- leak a file descriptor.
113         * utime.c: Include <unistd.h> and <errno.h>.
114         (utime_null): Be sure to close `fd' and to preserve errno.
115         Reported by Geoff Collyer via Arnold Robbins.
116
117 2003-11-16  Paul Eggert  <eggert@twinsun.com>
118             Bruno Haible  <bruno@clisp.org>
119
120         Protect against address arithmetic overflow.
121         * printf-args.h: Include stddef.h.
122         (arguments): Change type of field 'count' to size_t.
123         * printf-args.c (printf_fetchargs): Use size_t instead of
124         'unsigned int' where appropriate.
125         * printf-parse.h: Include sys/types.h.
126         (char_directive): Change type of *arg_index fields to ssize_t.
127         (char_directives): Change type of fields 'count', max_*_length to
128         size_t.
129         * printf-parse.c: Include sys/types.h and xsize.h.
130         (SSIZE_MAX): Define fallback value.
131         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
132         instead of 'int' where appropriate. Check a_allocated, d_allocated
133         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
134         * vasnprintf.c: Include xsize.h.
135         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
136         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
137         overflow. Avoid wraparound when converting a width or precision from
138         decimal to binary.
139
140 2003-11-16  Bruno Haible  <bruno@clisp.org>
141
142         Update from GNU gettext.
143         * printf-parse.c: Generalize to it can be compiled for wide strings.
144         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
145         * vasnprintf.c: Generalize to it can be compiled for wide strings.
146         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
147         SNPRINTF): New macros.
148         Don't include <alloca.h> if the file is used inside libintl.
149         (local_wcslen): New function, for Solaris 2.5.1.
150         (VASNPRINTF): Use it instead of wcslen.
151
152 2003-11-16  Bruno Haible  <bruno@clisp.org>
153
154         * xsize.h (xmax): New function.
155         (xsum, xsum3, xsum4): Declare as "pure" functions.
156
157 2003-11-12  Paul Eggert  <eggert@twinsun.com>
158
159         * xalloc.h: Do not include <limits.h> or <stdint.h>.
160         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
161         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
162         heuristic is just as accurate as far as we know, and it removes a
163         dependency on size_max.m4 and ptrdiff_max.m4.
164
165 2003-11-12  Paul Eggert  <eggert@twinsun.com>
166
167         * xstrtol.c (__xstrtol): Remove "break" immediately after
168         "return", to pacify some unknown compiler.  Problem reported
169         by Joerg Schilling.
170
171 2003-11-11  Bruno Haible  <bruno@clisp.org>
172
173         * xsize.h (SIZE_MAX): Remove fallback definition.
174         * xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
175         defined.
176
177 2003-11-10  Paul Eggert  <eggert@twinsun.com>
178
179         * xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
180         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
181         rejected some allocations of exactly SIZE_MAX - 2 bytes.
182         From Bruno Haible.
183         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
184         not (size_t) -1, since it's defined here.
185
186 2003-11-06  Paul Eggert  <eggert@twinsun.com>
187
188         * xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
189         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
190         Reject sizes of exactly SIZE_MAX bytes.
191         * xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
192         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
193
194 2003-11-05  Bruno Haible  <bruno@clisp.org>
195
196         * xsize.h: Include limits.h, to avoid a possible collision with
197         SIZE_MAX defined in <limits.h> on Solaris.
198
199 2003-11-04  Bruno Haible  <bruno@clisp.org>
200
201         * xsize.h: New file.
202         * linebreak.c: Include xsize.h.
203         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
204         argument for overflow.
205         Suggested by Paul Eggert.
206
207 2003-10-31  Bruno Haible  <bruno@clisp.org>
208
209         * wait-process.c (wait_process): Use waitid with WNOWAIT if available,
210         to avoid (extremely rare) race condition.
211         Suggested by Paul Eggert.
212
213 2003-11-03  Jim Meyering  <jim@meyering.net>
214
215         * userspec.c: Include "userspec.h".
216         * userspec.h: New file.
217
218 2003-10-31  Paul Eggert  <eggert@twinsun.com>
219
220         * mountlist.h (struct mount_entry.me_type_malloced): New member.
221         * mountlist.c (SIZE_MAX): Define if not defined already.
222         (read_filesystem_list): Set and use me_type_malloced.
223         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
224         whatever the type happens to be), for brevity and consistency.
225         Check for size calculation overflow on Alphas running OSF/1.
226
227 2003-10-31  Jim Meyering  <jim@meyering.net>
228
229         * hash.c: Include "xalloc.h" for use of xalloc_oversized.
230
231         * linebuffer.c: Include <string.h> for declaration of memset.
232
233 2003-10-30  Paul Eggert  <eggert@twinsun.com>
234             Bruno Haible  <bruno@clisp.org>
235
236         * vasprintf.c: Include <limits.h>, <stdlib.h>.
237         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
238
239 2003-10-29  Paul Eggert  <eggert@twinsun.com>
240
241         * xalloc.h (xalloc_oversized): Now a macro, not a function,
242         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
243         no longer needed.
244         * quotearg.c (quotearg_n_options): Use it.
245         * group-member.c: Include <stdbool.h>.
246         (free_group_info): Arg is now const *; don't free arg.
247         (get_group_info): Now returns bool and accepts struct group_info *,
248         rather than returning a malloc'ed struct group_info *.
249         All uses changed.  Check for overflow in internal size calculation.
250
251         * getusershell.c (readname): Simplify the code by using x2nrealloc
252         rather than xmalloc/xrealloc.
253         * linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
254         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
255         conformance bug: the old code used a pointer after freeing the
256         storage that it addressed.
257         * hash.c (hash_initialize): Simplify the code by using xalloc_oversized
258         rather than doing it by hand.
259         * getgroups.c (getgroups): Don't use xrealloc, since we don't need
260         the buffer preserved.  Use free and xmalloc instead.
261         * quotearg.c (quotearg_n_options): Likewise.
262         Use a simpler test for size overflow.  Don't use xalloc_oversized
263         because unsigned int might be wider than size_t (!); this suggests
264         that we should switch from unsigned int to size_t for slot numbers.
265
266 2003-10-27  Bruno Haible  <bruno@clisp.org>
267
268         * stdbool_.h: Better support for BeOS.
269
270 2003-10-27  Paul Eggert  <eggert@twinsun.com>
271
272         * exclude.c (new_exclude): Use xzalloc rather than xmalloc
273         to allocate the returned structure.  Do not allocate a subarray,
274         as x2nrealloc will do that.
275         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
276         instead of xnrealloc.
277         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
278
279 2003-10-26  Paul Eggert  <eggert@twinsun.com>
280
281         * xalloc.h (xalloc_oversized): New static inline function, for
282         callers that want to do their own size-overflow checking.  Include
283         <stdbool.h>, since xalloc_oversized returns bool.
284         * xalloc.c (array_size_overflow): Remove.  All callers changed
285         to use xalloc_oversized.
286
287         Add two functions x2realloc, x2nrealloc, for programs that grow
288         arrays dynamically by doubling their sizes.
289         * xalloc.h (x2realloc, x2nrealloc): New decls.
290         * xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
291         New functions.
292
293         Port to C99 semantics for 'inline' of external functions.
294         Bug reported by Bruno Haible.
295         * xmalloc.c (xnmalloc_inline): New static inline function,
296         with the old contents of xnmalloc.
297         (xnmalloc, xmalloc): Use it.
298         (xnrealloc_inline): New static inline function,
299         with the old contents of xnrealloc.
300         (xnrealloc, xrealloc): Use it.
301
302         * alloc.c (alloca): xmalloc cannot return NULL, so don't test for that.
303
304 2003-10-25  Paul Eggert  <eggert@twinsun.com>
305
306         Fix several address-calculation bugs in the hash modules,
307         plus some minor code cleanup.
308
309         * hash.h: Include <stdbool.h>, for bool.
310         * hash.c: Don't include <stdbool.h>, since hash.h does it now.
311         * hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
312         hash_get_n_entries, hash_get_max_bucket_length,
313         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
314         hash_rehash): Use size_t rather than unsigned.
315         * hash.c (struct hash_table, hash_get_n_buckets,
316         hash_get_n_buckets_used, hash_get_n_entries,
317         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
318         hash_get_entries, hash_do_for_each, hash_string, is_prime,
319         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
320         Likewise.
321         (SIZE_MAX): Define if not defined.
322         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
323         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
324         hash_print):
325         Use const * when possible.
326         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
327         (check_tuning): Fix bug: if tuning parameters were very close to
328         0 or 1, rounding errors could have caused subscript violations.
329         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
330         (hash_initialize): Add 'fail:' label
331         to free table and return NULL, and use it to simplify code.
332         Use calloc rather than clearing the storage ourself.
333         (hash_initialize, hash_rehash): Check for arithmetic overflow in
334         buffer size calculations.
335         * hash-pjw.h (hash_pjw): Use size_t, not unsigned.
336         Include <stddef.h>, for size_t.
337         * hash-pjw.c (hash_pjw): Likewise.
338         Switch to method described by Bruno Haible.
339         Include <limits.h>, for CHAR_BIT.
340         (SIZE_BITS): New macro.
341
342 2003-10-21  Paul Eggert  <eggert@twinsun.com>
343
344         * getndelim2.c (getndelim2): When size calculation overflows,
345         ceiling the allocation at NMAX bytes rather than silently
346         discarding input bytes before NMAX is reached.  This makes
347         a difference only if NMAX exceeds SIZE_MAX / 2.
348
349         * obstack.c: Merge from glibc.
350         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
351         Add libc_hidden_def (_obstack_newchunk).
352         (_obstack_free) [! defined _LIBC]: Remove.
353         [defined _LIBC]: Make a strong alias from obstack_free, rather than
354         a clone of the function body.
355         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
356         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
357
358         * obstack.h: Indenting cleanup, to make it easier to merge with glibc.
359         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
360         arg to memcpy.
361
362         * obstack.h (obstack_1grow_fast): Properly parenthesize arg.
363         (obstack_ptr_grow_fast, obstack_int_grow_fast):
364         Don't use lvalue casts, as GCC plans to remove support for them
365         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
366         was also present in the non-GCC version, indicating that this
367         code had always been buggy and had never been widely used.
368         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
369         Use the fast variant of each macro, rather than copying the
370         definiens of the fast variant; that way, we'll be more likely to
371         catch future bugs in the fast variants.
372
373 2003-10-20  Bruno Haible  <bruno@clisp.org>
374
375         * wait-process.h: New file, from GNU gettext.
376         * wait-process.c: New file, from GNU gettext.
377
378 2003-10-19  Jim Meyering  <jim@meyering.net>
379
380         * vasnprintf.c (vasnprintf): Work around losing snprintf on HPUX 10.20.
381
382 2003-10-16  Paul Eggert  <eggert@twinsun.com>
383
384         * getgroups.c: Include <errno.h>, <stdlib.h>.
385         (getgroups): First arg is int, not size_t.
386         Don't let 'free' mangle errno.
387
388 2003-10-16  Jim Meyering  <jim@meyering.net>
389
390         * xmalloc.c: Include <string.h>, for declarations of memset and memcpy.
391
392 2003-10-15  Paul Eggert  <eggert@twinsun.com>
393
394         * exclude.c: Do not include <inttypes.h> or <stdint.h>.
395         (SIZE_MAX): Remove.
396         (new_exclude, add_exclude_file): Initial size no longer needs to
397         be a power of 2.
398         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
399         our own address arithmetic overflow checking.
400
401         * fnmatch.c (SIZE_MAX): Define if standard headers don't.
402         (fnmatch): Do not alloca more than 2000 wide characters;
403         instead, use malloc for large buffers.
404         Check for address arithmetic overflow, and return -1
405         with errno set to ENOMEM in that case.
406         * fnmatch_loop.c (ALLOCA_LIMIT): New macro.
407         (NEW_PATTERN): Do not alloca more than 8000 bytes;
408         instead, return -1.  Check for address arithmetic overflow.
409
410 2003-10-14  Paul Eggert  <eggert@twinsun.com>
411
412         Handle invalid suffixes and overflow independently, so that
413         callers can treat them independently as needed.  Fix some bugs in
414         suffix handling, e.g., "100k@" was not diagnosed as an invalid
415         suffix for a human-readable blocksize.  The major caller-visible
416         change is the addition of a new
417         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
418         that both overflow and suffix chars were found.
419
420         * human.c (humblock): Don't check separately for invalid suffix
421         char; that is xstrtoumax's job (now that its bug is fixed).
422         * xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
423         INTMAX_MAX]: New macros.
424         * xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
425         TYPE_MAXIMUM): New macros.
426         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
427         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
428         if overflow occurs, as it's what __strtol does and it's more useful
429         in practice.
430         (__xstrtol): If __strtol reports some error other than ERANGE,
431         reflect it to the caller as LONGINT_INVALID.  If it reports
432         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
433         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
434         * xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
435         value.
436         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
437         * xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
438         * xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
439         [defined UINTMAX_MAX]: New macros.
440
441 2003-10-14  Bruno Haible  <bruno@clisp.org>
442
443         * fatal-signal.h: Improved comments. Suggested by Paul Eggert.
444         * fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
445         Also use volatile where needed.
446
447 2003-10-12  Paul Eggert  <eggert@twinsun.com>
448
449         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
450         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
451         and define in terms of the other primitives.
452         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
453         (SIZE_MAX): Define if not already defined.
454         (array_size_overflow): New function.
455         (xalloc_die): Abort instead of exiting if 'error' returns.
456         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
457         (xmalloc, xrealloc): Use them.
458         (xcalloc): Check for address arithmetic overflow.
459         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
460         a bit faster than strcpy.
461
462 2003-10-08  Paul Eggert  <eggert@twinsun.com>
463
464         Merge getpass from libc, plus a few fixes.
465
466         * getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
467         Include <stdbool.h>.
468         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
469         __fsetlocking to empty.
470         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
471         do include <bits/libc-lock.h>.
472         Do not include <fcntl.h>; not needed.
473         [_LIBC]: Include <wchar.h>.
474         (NOTCANCEL_MODE): New macro.
475         (flockfile, funlockfile) [_LIBC]: New macros.
476         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
477         [!_LIBC]: New macros.
478         (call_fclose): New function.
479         (getpass): Use it.  Save tty stream separately; this simplifies the
480         code and makes it more reliable if stdin happens to equal stdout.
481         Invoke __fsetlocking on tty.
482         Handle thread cancellation if needed.
483         Namespace cleanup (use __tcgetattr, __getline).
484         Use bool for Booleans.
485         [USE_IN_LIBIO]: Handle wide streams.
486         [!_LIBC]: Unconditionally do the fseek, since we don't know what
487         stream might go where.
488
489         * unlocked-io.h: Include <stdio.h>, so that the caller
490         doesn't have to include <stdio.h> before us.
491         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
492         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
493         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
494         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
495         if not declared, so that we can use getpass.c code from libc without
496         rewriting it.
497         (flockfile, ftrylockfile, funlockfile): New macros.
498
499 2003-10-06  Bruno Haible  <bruno@clisp.org>
500
501         * version-etc-2.h: Remove file.
502         * version-etc-2.c: Remove file.
503
504 2003-09-25  Jim Meyering  <jim@meyering.net>
505             Bruno Haible  <bruno@clisp.org>
506
507         This lets translators provide better translations for the
508         "Written by ..." part of --version output.
509         * version-etc.h: Include stdarg.h.
510         (version_etc_copyright): Declare as readonly.
511         (version_etc): Make this function variadic with a NULL-terminated list
512         of author name strings.
513         (version_etc_va): New declaration.
514         * version-etc.c: Include stdarg.h, stdlib.h.
515         (version_etc_copyright): Declare as readonly.
516         (version_etc_va): New function. Provide a different translatable string
517         for each possible number of authors < 10. Abbreviate when there are 10
518         authors or more.
519         (version_etc): Make this function variadic. Call version_etc_va.
520         Suggestion from Gary V. Vaughan.
521
522         * long-options.h (parse_long_options): Change prototype: the authors
523         string is moved to the end and becomes variadic.
524         * long-options.c: Include stdarg.h.
525         (parse_long_options): Make this function variadic, too.
526         Call version_etc_va, not version_etc.
527
528 2003-10-06  Bruno Haible  <bruno@clisp.org>
529
530         * fatal-signal.h: New file, from GNU gettext.
531         * fatal-signal.c: New file, from GNU gettext.
532
533 2003-10-04  Karl Berry  <karl@gnu.org>
534
535         * argp*: update from libc.
536
537 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
538
539         * getpass.c (getpass): Use a no-op fseek when switching from input to
540         output mode on the same stream.
541
542 2003-09-29  Paul Eggert  <eggert@twinsun.com>
543
544         * strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
545         Fix arg typo in previous patch.
546
547 2003-09-28  Jim Meyering  <jim@meyering.net>
548
549         * error.c: Correct cpp indentation.
550
551 2003-09-27  Paul Eggert  <eggert@twinsun.com>
552
553         * minmax.h (MIN, MAX) [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
554         Omit the special code that used __typeof__, since we worry that
555         it could be more trouble than it's worth.  See:
556         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
557         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
558
559         * free.c: New file.
560
561 2003-09-26  Jim Meyering  <jim@meyering.net>
562
563         * error.c (error_tail): Move some declarations
564         into inner scope where the local variables are used.
565
566 2003-09-26  Bruno Haible  <bruno@clisp.org>
567
568         * stpncpy.h (gnu_stpncpy): New declaration.
569         (stpncpy): Define as alias for gnu_stpncpy.
570         * stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
571
572 2003-09-26  Paul Eggert  <eggert@twinsun.com>
573
574         * error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
575         (error_tail): Do not loop, reallocating temporary buffer, since
576         the output cannot contain more wide characters than the input
577         contains bytes, the size must be big enough already.  This avoids
578         one potential size overflow calculation.  Check for size overflow
579         when calculating temporary buffer size.  Free temporary buffer
580         when done, if it was allocated with malloc; this plugs a memory
581         leak.  Remove casts from void * to pointers, that are no longer
582         needed now that we're assuming C89 or better.
583
584         Merge error changes from glibc.
585
586         * error.c, error.h: Update copyright notice header to match glibc.
587         * error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
588         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
589         Disable cancellation while printing error.
590         * error.h: Prepend __ to parameter names.
591
592 2003-09-25  Karl Berry  <karl@gnu.org>
593
594         * argp-fmtstream.c, argp-help.c: update from libc.
595
596 2003-09-25  Bruno Haible  <bruno@clisp.org>
597
598         * version-etc-2.h: New file, from version-etc.h with modifications.
599         * version-etc-2.c: New file, from version-etc.c with modifications.
600
601 2003-09-25  Simon Josefsson  <jas@extundo.com>
602
603         * xgetdomainname.h: New file.
604         * xgetdomainname.c: New file.
605
606 2003-09-25  Simon Josefsson  <jas@extundo.com>
607             Bruno Haible  <bruno@clisp.org>
608
609         * getdomainname.h: New file.
610         * getdomainname.c: New file.
611
612 2003-09-24  Paul Eggert  <eggert@twinsun.com>
613
614         * linebuffer.c (freebuffer): Don't free the argument, just
615         the buffer associated with the argument.  Bug reported by
616         Simon Josefsson.
617
618 2003-09-19  Karl Berry  <karl@gnu.org>
619
620         * argp.h: update from libc.
621
622 2003-09-16  Paul Eggert  <eggert@twinsun.com>
623
624         * linebuffer.c (readlinebuffer): Return NULL immediately upon
625         input error, instead of returning NULL the next time we are called
626         (and therefore losing track of errno).
627
628 2003-09-15  Paul Eggert  <eggert@twinsun.com>
629
630         * getndelim2.c (getndelim2): Don't trash errno when a read
631         fails, so that the caller gets the proper errno.
632
633         * readutmp.c (read_utmp): Likewise.
634         Check for fstat error.  Close stream and free storage
635         when failing.
636
637 2003-09-14  Bruno Haible  <bruno@clisp.org>
638
639         * fwriteerror.h: New file.
640         * fwriteerror.c: New file.
641
642 2003-09-14  Jim Meyering  <jim@meyering.net>
643
644         * getloadavg.c: Correct cpp indentation.
645         * strdup.c: Likewise.
646         * vasnprintf.c: Likewise.
647
648 2003-09-12  Paul Eggert  <eggert@twinsun.com>
649
650         * argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
651         * obstack.c [!defined _LIBC]: Likewise.
652         * argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
653         * exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
654         * exitfail.c: Don't include stdlib.h; no longer needed.
655
656         More changes to assume C89 or better.
657
658         * error.c (error_tail): Assume vprintf.
659
660         * argmatch.c (getenv): Remove decl.
661         * progreloc.c (get_full_program_name): Define via prototype.
662         * setenv.c (clearenv): Likewise.
663         * stpncpy.c: Do not include <string.h> or <sys/types.h>; not
664         needed.
665         * strdup.c: Include <stdlib.h>, <string.h> unconditionally.
666         (malloc, memcpy): Remove decls.
667         * strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
668         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
669         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
670         (memcpy): Remove macro.
671         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
672         (__P): Remove.  All uses removed.
673         (PTR): Remove.  All uses changed to void *.
674         (CHAR_BIT, NULL): Remove.
675         (spaces, zeros, memset_space, memset_zero)
676         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
677         Remove.
678         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
679         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
680         Define with prototype.
681         Remove now-unnecessary prototype decl.
682         (extra_args_spec): Assume ANSI C.  All uses changed.
683         (extra_args_spec_iso): Remove.
684         (my_strftime, emacs_strftimeu): Define via prototype.
685         * strtod.c: Include <float.h>, <stdlib.h>, <string.h>
686         unconditionally.
687         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
688         * strtoimax.c: Include <stdlib.h> unconditionally.
689         (strtoul, strtol): Remove decls.
690         * strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
691         LONG_MAX): Remove.
692         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
693         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
694         (LOCALE_PARAM_PROTO): New macro.
695         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
696         (INTERNAL (strtol), strtol): Define with a prototype.
697         (PARAMS): Remove.  All uses removed.
698         * tempname.c: Include <string.h> unconditionally.
699         * userspec.c: Include <stdlib.h>, <string.h> unconditionally.
700         * xgethostname.c (main): Define with a prototype.
701         * xmalloc.c: Include "xalloc.h" first, to check interface.
702         Include <stdlib.h> unconditionally.
703         (calloc, malloc, realloc, free): Remove decls.
704         * xstrtod.c: Include "xstrtod.h" first, to check interface.
705         Include <stdlib.h> unconditionally.  Sort include file names.
706         (strtod): Remove.
707         (xstrtod): Define with a prototype.
708         * xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
709         (strtol, strtoul): Remove decls.
710
711 2003-09-11  Paul Eggert  <eggert@twinsun.com>
712
713         * strndup.c: Don't include <stdio.h>, <sys/types.h>.
714         Include <stdlib.h>, <string.h> unconditionally.
715         Remove now-unnecessary cast to char *.
716         * strnlen.c: Include <string.h> unconditionally.
717         * yesno.c (yesno): Define with a prototype.
718
719 2003-09-10  Bruno Haible  <bruno@clisp.org>
720
721         * strcspn.c: Include <string.h> unconditionally.
722         * strpbrk.c: Include <string.h> unconditionally.
723         * strstr.c: Include <string.h> unconditionally.
724         * unicodeio.c: Include <string.h> unconditionally.
725         * setenv.c: Include <stdlib.h> and <string.h> unconditionally.
726         * unsetenv.c: Likewise.
727         * xreadlink.c: Include <stdlib.h> unconditionally.
728         * yesno.c: Include <stdlib.h> unconditionally.
729         (rpmatch): Add prototype.
730
731 2003-09-10  Jim Meyering  <jim@meyering.net>
732
733         * error.c: Correct indentation of cpp directives.
734
735 2003-09-09  Paul Eggert  <eggert@twinsun.com>
736
737         More K&R removal.
738
739         * acosl.c (main): Use a prototype.
740         * asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
741         tanl.c: Likewise.
742
743         * getloadavg.c (getloadavg, main): Define via prototypes.
744
745         * getopt.h (struct option.name): Assume C89, and use 'const'.
746         (getopt, etopt_long, getopt_long_only, _getopt_internal)
747         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
748         with a prototype.
749         * getopt.c (const): Remove macro.
750         Include <string.h> unconditionally.
751         (my_index): Remove; all uses changed to strchr.
752         (strlen): Remove decl.
753         (exchange): Remove forward decl; no longer needed.
754         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
755         Define with prototype.
756         * getopt1.c (const): Remove macro.
757         (getopt_long, getopt_long_only, main): Define with prototype.
758
759         * getugroups.c: Include <string.h> unconditionally.
760
761         * getusershell.c: Include <stdlib.h> unconditionally.
762         (getusershell, setusershell, endusershell, readname, main):
763         Define with prototypes.
764
765         * group-member.c: Include group-member.h first.
766         Include <stdlib.h> unconditionally.
767
768         * hard-locale.c: Include hard-locale.h first.
769         Include <stdlib.h>, <string.h> unconditionally.
770
771         * hash.c (free, malloc): Remove decls.
772         Include <stdlib.h> unconditionally.
773
774         * human.c: Include <stdlib.h>, <string.h> unconditionally.
775         (getenv): Do not declare.
776
777         * idcache.c: Include <string.h> unconditionally.
778
779         * long-options.c: Include long-options.h first, to test interface.
780         Include <stdlib.h> unconditionally.
781
782         * makepath.c: Include makepath.h first, to test interface.
783         Include <stdlib.h> and <string.h> unconditionally.
784
785         * linebuffer.c: Include <stdlib.h>.
786         (free): Remove decl.
787
788         * malloc.c: Include <stdlib.h>, for malloc; don't bother with stddef.h.
789         rpl_malloc returns void *, not char *.
790         * realloc.c (rpl_realloc): Likewise.  Also, define with a prototype.
791
792         * md5.h: Include <limits.h> unconditionally.
793         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
794         (__P): Remove; all uses removed.
795         * md5.c: Include "md5.h" first.
796         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
797         md5_buffer, md5_process_bytes, md5_process_block):
798         Define with prototypes.
799         * sha.h (__P): Remove all uses.  (It wasn't defined??)
800         * sha.c: Include "sha.h" first.
801         Include <stdlib.h>, <string.h> unconditionally.
802
803         * memchr.c (__ptr_t): Remove; all uses changed to void *.
804         * memcmp.c (__ptr_t): Likewise.
805         * memrchr.c (__ptr_t): Likewise.
806         * memchr.c, memcmp.c, memcoll.c, memrchr.c:
807         Include <string.h> unconditionally.
808         * memchr.c, memrchr.c: Include <limits.h> unconditionally.
809         * memchr.c: Include <stdlib.h> unconditionally.
810         * memchr.c (LONG_MAX): Remove.
811         * memrchr.c (LONG_MAX): Likewise.
812         * memchr.c (__memchr): Define via a prototype.
813         * memrchr.c (__memrchr): Likewise.
814         * memcmp.c (__P): Remove, and remove all uses.
815         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
816         Remove forward decls; no longer needed.
817         * memcpy.c, memmove.c, memset.c: Include <stddef.h>.
818         Use types required by C89 in prototype.
819
820         * mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
821         * savedir.c: Likewise.
822         * mkdir.c (free): Remove decl.
823         * rmdir.c (rmdir): Define with a prototype.
824         * savedir.c: Include savedir.h first, to test interface.
825
826         * mktime.c (STDC_HEADERS): Remove.
827         Include <stdlib.h>, <string.h> unconditionally.
828
829         * modechange.c: Include <stdlib.h> unconditionally.
830         (malloc): Remove decl.
831
832         * mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
833         (free): Remove decl.
834
835         * obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
836         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
837         (This type really should be intptr_t, but that's a C99ism.)
838         (_obstack_memcpy): Remove: all uses changed to memcpy.
839         Include <string.h> unconditionally.
840         (struct obstack): Assume __STDC__ for types of members
841         chunkfun, freefun, extra_arg.
842         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
843         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
844         obstack_begin, obstack_specify_allocation,
845         obstack_specify_allocation_with_arg, obstack_chunkfun,
846         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
847         Remove unprototyped decls and the macros that use them.
848         * obstack.c (POINTER): Remove.  All uses changed to void *.
849         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
850         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
851         (defined __STDC__ && __STDC__)]:
852         Remove nonprototyped code.
853         Include <stdlib.h> unconditionally.
854         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
855         _obstack_allocated_p, _obstack_free, obstack_free,
856         _obstack_memory_used, print_and_abort):
857         Define using prototypes.
858         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
859         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
860         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
861         obstack_next_free, obstack_object_size, obstack_room) [0]:
862         Remove unused, unprototyped code.
863
864         * path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
865
866         * physmem.c (physmem_total, physmem_available, main): Define
867         with prototypes.
868
869         * posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
870         (main): Define with a prototype.
871
872         * posixver.c (getenv): Remove decl.
873
874         * putenv.c (malloc): Returns void *, not char *.
875         Include <string.h> unconditionally.
876         (strchr, memcpy, NULL): Do not define.
877
878         * readtokens.c: Include readtokens.h first, to test interface.
879         Include <stdlib.h>, <string.h> unconditionally.
880         (init_tokenbuffer): Define with a prototype.
881
882         * regex.c (PARAMS): Remove.  All uses removed.
883         All uses of _RE_ARGS removed, too.
884         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
885         unconditionally.
886         (bzero): Assume memset exists.
887         (memcmp, memcpy, NULL): Remove.
888         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
889         char, or assignments to local vars of type signed char.
890         (init_syntax_once, PREFIX(extract_number_and_incr),
891         PREFIX(print_partial_compiled_pattern),
892         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
893         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
894         PREFIX(regex_grow_registers), PREFIX(regex_compile),
895         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
896         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
897         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
898         wcs_compile_range, byte_compile_range, truncate_wchar,
899         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
900         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
901         count_mbs_length, wcs_re_match_2_internal,
902         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
903         PREFIX(alt_match_null_string_p),
904         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
905         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
906         regfree, PREFIX(extract_number)): Define with prototype.  Remove
907         now-unnecessary declaration, if any.
908         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
909         regcomp, regexec):
910         Remove now-unnecessary casts among pointer types.
911         * regex.h (_RE_ARGS): Remove.  All uses removed.
912
913         * rename.c: Include <stdlib.h>, <string.h> unconditionally.
914         (free): Remove decl.
915
916         * rpmatch.c: Include <stdlib.h> unconditionally.
917
918         * same.c: Include <stdlib.h>, <string.h> unconditionally.
919         (free): Remove decl.
920
921         * save-cwd.c: Include <stdlib.h> unconditionally.
922         * xgetcwd.c: Likewise.
923
924         * stat.c: Include <stdlib.h>, <string.h> unconditionally.
925         (free): Remove decl.
926
927         * strchrnul.c (strchrnul): Define with a prototype.
928         Fix bug: c_in was not converted to char before searching.
929
930         The following changes are not K&R related:
931
932         * group-member.h: Include <sys/types.h>, so that this file is
933         self-contained.
934         * makepath.h: Likewise.
935
936         * getusershell.c (readname, default_index, line_size, readname):
937         Use size_t, not int, for sizes.
938         (readname): If the size overflows, report an error instead of
939         looping forever.
940
941 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
942
943         * getndelim2.c: Assume stdlib.h per the C89 spec.
944
945 2003-09-08  Paul Eggert  <eggert@twinsun.com>
946
947         Assume C89 or better; remove K&R cruft.
948         A few of these changes were first proposed by Derek Robert Price
949         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
950
951         * addext.c: Include <string.h> unconditionally.
952         * backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
953         Don't declare getenv or malloc.
954
955         * alloca.c: Include <string.h>, <stdlib.h> unconditionally.
956         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
957         (NULL): Remove.
958         (find_stack_direction, alloca): Use prototypes.
959
960         * atexit.c (atexit): Define using a prototype.
961
962         * basename.c, dirname.c, stripslash.c:
963         Include <string.h> unconditionally.
964
965         * bcopy.c: Include <stddef.h>.
966         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
967
968         * canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
969
970         * error.h (error, error_at_line, error_print_progname)
971         [! (defined (__STDC__) && __STDC__)]: Remove decls.
972         * error.c: Include error.h first, to check interface.
973         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
974         (VA_START): Remove; all uses changeed to va_start.
975         (exit, strerror): Remove decls.
976         (error_print_progname): Prototype uncondionally.
977         Don't include <errno.h>; no longer needed.
978         (private_strerror): Remove.
979         (error_tail): Always define.
980         (error, error_at_line): Assume C89 or better; always use prototypes.
981         * fatal.c: Include "fatal.h" first, to test interface.
982         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
983         (VA_START): Remove; all uses changed to va_start.
984         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
985         this case.
986         (exit): Remove decl.
987         (fatal): Prototype unconditionally.  Assume va_start works.
988         Abort at end, to pacify gcc.
989
990         * euidaccess.c (main): Define with a prototype.
991
992         * exclude.c: Include <stdlib.h>, <string.h> unconditionally.
993
994         * exitfail.c: Include <stdlib.h> unconditionally.
995
996         * fnmatch_.h (__P): Remove.  All uses changed to assume
997         prototypes.
998         * fnmatch.c: Include fnmatch.h first, to test interface.
999         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
1000         (getenv): Remove decl.
1001         (fnmatch): Define using a prototype.
1002         * fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
1003         (FCT): Define using a prototype.
1004
1005         * getdate.y: Include <stdlib.h>, <string.h> unconditionally.
1006
1007         * gethostname.c: Include <stddef.h>.
1008         (gethostname): Define with prototype.  Length is size_t, not int.
1009
1010 2003-09-08  Paul Eggert  <eggert@twinsun.com>
1011
1012         * getversion.c: Remove; was migrated to backupfile.c in 1997.
1013         getversion.c should have been removed then, but was accidentally
1014         preserved.
1015
1016         * utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
1017         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
1018
1019 2003-09-07  Paul Eggert  <eggert@twinsun.com>
1020
1021         * time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
1022         copy_tm_result.  Bug reported by Simon Josefsson in
1023         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
1024
1025 2003-09-06  Paul Eggert  <eggert@twinsun.com>
1026
1027         * time_r.c, time_r.h: New files.
1028
1029         * mktime.c (my_mktime_localtime_r): Remove; all uses changed to
1030         __localtime_r.
1031         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
1032         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
1033
1034         * strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
1035         __gmtime_r.
1036         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
1037         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
1038         Include <time_r.h>.
1039
1040         * timegm.c: Switch to glibc implementation, with the following changes:
1041         [defined HAVE_CONFIG_H]: Include <config.h>.
1042         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
1043         (__mktime_internal) [!defined _LIBC]: New decl.
1044         (__gmtime_r) [!defined _LIBC]: New macro and function.
1045         (timegm): Use a prototype, since gnulib assumes C89.
1046         Do not bother declaring tmp to be const, as it's not really usefu.
1047         * timegm.h: Hoist "#include <time.h>" out of #ifdef.
1048         (timegm): Declare only if HAVE_DECL_TIMEGM.
1049
1050 2003-09-03  Paul Eggert  <eggert@twinsun.com>
1051
1052         * human.c (human_readable): Fix bug that rounded 10501 to 10k.
1053         Bug reported by Lute Kamstra in
1054         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
1055
1056         * getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
1057         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
1058         course with correspondingly smaller numbers for tomorrow and
1059         yesterday.  From Tadayoshi Funaba.  Originally installed into
1060         sh-utils on 1999-08-07, but the patch got lost (I guess during the
1061         coreutils merge?).
1062
1063 2003-08-31  Simon Josefsson  <jas@extundo.com>
1064
1065         * timegm.h: New file.
1066         * timegm.c: New file.  Based on wget-1.8.2/src/http.c:mktime_from_utc.
1067
1068 2003-08-31  Karl Berry  <karl@gnu.org>
1069
1070         * argp.h: update from libc.
1071
1072 2003-08-28  Bruno Haible  <bruno@clisp.org>
1073
1074         * binary-io.h: Undefine O_BINARY before defining it. This avoids a
1075         warning on QNX, which defines O_BINARY to 000000.
1076
1077 2003-08-24  Bruno Haible  <bruno@clisp.org>
1078
1079         * binary-io.h: Include <stdio.h>, to avoid a compilation error when
1080         MSVC7 <stdio.h> is included later.
1081
1082 2003-08-20  Bruno Haible  <bruno@clisp.org>
1083
1084         * progname.h: New file, from GNU gettext.
1085         * progname.c: New file, from GNU gettext.
1086         * progreloc.c: New file, from GNU gettext.
1087
1088 2003-08-19  Bruno Haible  <bruno@clisp.org>
1089
1090         * xstrdup.c: Assume <string.h> exists.
1091
1092 2003-08-18  Jim Meyering  <jim@meyering.net>
1093
1094         * setenv.h: Indent nested cpp directive.
1095         * vasnprintf.c: Remove trailing blanks.
1096
1097 2003-08-17  Simon Josefsson  <jas@extundo.com>
1098             Bruno Haible  <bruno@clisp.org>
1099
1100         * xstrndup.h: New file.
1101         * xstrndup.c: New file.
1102
1103 2003-08-17  Bruno Haible  <bruno@clisp.org>
1104
1105         * strndup.h: New file.
1106
1107 2003-08-16  Paul Eggert  <eggert@twinsun.com>
1108
1109         * regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
1110         space, undoing this 2003-08-12 change:
1111         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
1112
1113 2003-08-16  Jim Meyering  <jim@meyering.net>
1114
1115         Merge from coreutils.
1116         * xstrtoimax.c: #else #if -> #elif.
1117         * xstrtoumax.c: Likewise.
1118
1119 2003-08-15  Paul Eggert  <eggert@twinsun.com>
1120
1121         * config.charset, ref-add.sin, ref-del.sin: Use three spaces,
1122         rather than tab, after '#' in shell-script copyright notices.
1123         Suggested by Bruno Haible.
1124
1125 2003-08-15  Jim Meyering  <jim@meyering.net>
1126         and Paul Eggert  <eggert@twinsun.com>
1127
1128         Merge from coreutils.
1129         * readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
1130         member but strut utmpx does not.  Needed for AIX 4.3.3.
1131         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
1132
1133 2003-08-15  Jim Meyering  <jim@meyering.net>
1134
1135         Merge from coreutils.
1136         * xgethostname.c: Include <stdlib.h>.
1137         (xghostname): Don't exit for anything other than memory-related
1138         failure; just return NULL.
1139         * userspec.c: Include "posixver.h".
1140         (parse_user_spec): Accept `.' as a separator only
1141         in pre-POSIX-200112 mode.
1142         * strtoimax.c: Use #elif rather than #else #if.
1143         * strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
1144         Remove function, now that we can rely on a working tzset function.
1145         [!_LIBC]: Ensure that the required autoconf test has been run.
1146         [!defined _NL_CURRENT && HAVE_STRFTIME]:
1147         Use underlying_strftime for %r.
1148         * sha.c: Merge in some clean-up and optimization changes from glibc.
1149         * sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
1150         Ensure that it is a multiple of 64.
1151         Rearrange loop exit tests so as to avoid performing an
1152         additional fread after encountering an error or EOF.
1153         * realloc.c: Update copyright date.
1154
1155 2003-08-14  Jim Meyering  <jim@meyering.net>
1156
1157         Merge from coreutils.
1158         * obstack.h: Whitespace changes.
1159         * mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
1160         and xcalloc return values.
1161         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
1162         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
1163         hang on OSF/1 5.1 for DIR on both local and remote file systems.
1164         Reported by (and fix confirmed by) Nelson H. F. Beebe.
1165         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
1166         error from mntctl.
1167         Use mntctl's return value to drive the entry-processing loop, since
1168         we can't rely on the value of the vmt_length member in the last
1169         entry.  On some systems doing so could result in exhausting
1170         virtual memory.  Based in part on a patch from Mike Jetzer.
1171
1172 2003-08-14  Jim Meyering  <jim@meyering.net>
1173         and Paul Eggert  <eggert@twinsun.com>
1174
1175         Merges from coreutils, plus other fixes.
1176         * physmem.c: Merge in portability changes from gcc/libiberty
1177         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
1178         for credits and details.  Thanks to Kaveh Ghazi for helping
1179         to keep these files in sync.
1180         (ARRAY_SIZE): Define it.
1181         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
1182         * memcasecmp.c: Remove unnecessary parentheses after 'defined'.
1183         (memcasecmp): Don't assume size_t fits in unsigned int.
1184         Remove casts and duplicate code.
1185         * md5.c: Include <string.h> and <stdlib.h> unconditionally.
1186         (memcpy): Remove definition.
1187         Merge in some clean-up and optimization changes from glibc.
1188         [BLOCKSIZE]: Move definition to top of file.
1189         Ensure that it is a multiple of 64.
1190         Rearrange loop exit tests so as to avoid performing an
1191         additional fread after encountering an error or EOF.
1192         * md5.h (md5_uintptr): Define.
1193         * makepath.c (CLEANUP_CWD): Report an error if we failed to
1194         return to the initial working directory.  Preserve errno
1195         for caller.
1196         * idcache.c: Include "xalloc.h".
1197         (xmalloc, xrealloc): Remove decls.
1198         (getuser): Remove casts no longer required in C89.
1199         * human.c: Include stdio.h, for sprintf.
1200         * group-member.c: Include "xalloc.h".
1201         (xmalloc, xrealloc): Remove decls.
1202         (get_group_info): Remove casts no longer required in C89.
1203         * getusershell.c (readname): Remove casts no longer required in C89.
1204         * gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
1205         * getline.c: Whitespace fix, from coreutils.
1206
1207 2003-08-13  Paul Eggert  <eggert@twinsun.com>
1208
1209         * exclude.c: Include <ctype.h>
1210         (IN_CTYPE_DOMAIN): New macro.
1211         (is_space): New fn.
1212         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
1213         and empty lines.
1214
1215         * argp-help.c, argp-parse.c, config.charset, getopt.h:
1216         Undo previous (whitespace-only) change.
1217
1218 2003-08-12  Paul Eggert  <eggert@twinsun.com>
1219
1220         * argp-help.c, argp-parse.c, config.charset, getopt.h:
1221         Normalize leading white space and remove trailing white space.
1222         * ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
1223         notice, as per ../config/srclist-update.
1224
1225         Merge from coreutils.
1226         * euidaccess.h: New file.
1227         * euidaccess.c: Include it.
1228         * .cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
1229         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
1230         * regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
1231
1232 2003-08-11  Bruno Haible  <bruno@clisp.org>
1233
1234         * vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
1235         (vasnprintf): Use it instead of wcslen.
1236
1237 2003-08-11  Bruno Haible  <bruno@clisp.org>
1238
1239         * stdbool_.h (_Bool): Undo last change; instead use a negative enum
1240         value to ensure that _Bool promotes to int. Use #define for _Bool when
1241         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
1242
1243 2003-08-10  Karl Berry  <karl@gnu.org>
1244
1245         * regex.h: update from libc (whitespace fix).
1246
1247 2003-08-09  Paul Eggert  <eggert@twinsun.com>
1248
1249         Merge some files from coreutils.  These changes were
1250         originally made by Jim Meyering.
1251         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
1252         many older Unixes require this.
1253         * lib/alloca.c (alloca): Remove cast to argument of free;
1254         no longer needed in C89.
1255         * lib/alloca_.h, lib/regex.h: Fix white space to match
1256         what GNU indent does.
1257
1258 2003-08-05  Paul Eggert  <eggert@twinsun.com>
1259
1260         * bumpalloc.h: Remove.
1261
1262 2003-08-04  Paul Eggert  <eggert@twinsun.com>
1263
1264         * getloadavg.c: Change copyright notice and spacing to conform to
1265         GNU coding style.
1266
1267         Merge from coreutils.
1268         * error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is 1.
1269         From glibc.
1270         * getdate.y (date): Also accept dates like May-23-2003; suggestion
1271         from Karl Berry, implemented by Jim Meyering.
1272         * getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
1273         from Dmitry V. Levin.
1274         Remove anachronistic cast of xrealloc.
1275         * fnmatch_.h (__const): Remove.  Use 'const'.
1276         * fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
1277         type. Otherwise, it wouldn't compile with at least /bin/cc on
1278         ymp-cray-unicos9.0.2.X.
1279         Combine two mostly-identical uses of alloca into one.
1280         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
1281
1282 2003-08-04  Dave Love <d.love@dl.ac.uk>
1283
1284         [From Emacs.]
1285
1286         * getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
1287         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
1288         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
1289         obsolete NLIST_NAME_UNION.
1290         [__GNU__]: Undef BSD and FSCALE.
1291         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
1292
1293 2003-08-03  Paul Eggert  <eggert@twinsun.com>
1294
1295         * stdbool_.h (_Bool): Make it signed char, instead of
1296         an enum type, so that it's guaranteed to promote to int.  See:
1297         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
1298
1299 2003-07-31  Paul Eggert  <eggert@twinsun.com>
1300
1301         * strerror.c: Include config.h, limits.h.  Declare sprintf.
1302         (strerror): Don't assume that a printable int fits in 14 bytes.
1303
1304 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
1305             Bruno Haible  <bruno@clisp.org>
1306
1307         * getline.h (getline, getdelim): Change return type to ssize_t.
1308         * getline.c (getline, getdelim): Likewise.
1309         Remove _GNU_SOURCE define; now it's defined in config.h through
1310         m4/getline.m4.
1311
1312 2003-07-22  Paul Eggert  <eggert@twinsun.com>
1313
1314         * xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
1315         over-parenthesization in macros.
1316
1317         Sync with coreutils.
1318
1319         * xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
1320         required by C99.
1321
1322         Use `exit_failure' for xalloc and xmemcoll instead of their own
1323         private exit-failure variables.
1324         * xalloc.h (xalloc_exit_failure): Remove.
1325         * xmalloc.c: Likewise.  Include exitfail.h.
1326         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
1327         * xmemcoll.h (xmemcoll_exit_failure): Remove.
1328         * xmemcoll.c: Likewise.  Include exitfail.h.
1329         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
1330
1331 2003-07-18  Paul Eggert  <eggert@twinsun.com>
1332
1333         * closeout.h (close_stdout_set_status, close_stdout_status): Remove.
1334         * closeout.c: Likewise.  Include "closeout.h" right after config.h,
1335         to test that it can stand by itself.  Include "exitfail.h".
1336         Clients should set exit_failure instead.
1337         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
1338
1339 2003-07-18  Andreas Schwab  <schwab@suse.de>
1340
1341         * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
1342
1343 2003-07-18  Bruno Haible  <bruno@clisp.org>
1344
1345         * getndelim2.h: New file.
1346         * getndelim2.c: Make into a module of its own. Include config.h,
1347         getndelim2.h.
1348         (getndelim2): Make non-static. Change return type to ssize_t.
1349         * getline.h: Change argument names.
1350         * getline.c: Include getndelim2.h instead of getndelim2.c.
1351         * getnline.c: Include getndelim2.h.
1352
1353 2003-07-17  Bruno Haible  <bruno@clisp.org>
1354
1355         * Makefile.am: Remove file.
1356         * Makefile.in: Remove file.
1357
1358 2003-07-17  Bruno Haible  <bruno@clisp.org>
1359
1360         * getnline.h: New file.
1361         * getnline.c: New file.
1362         * getndelim2.c: New file, extracted from getline.c.
1363         (getndelim2): Renamed from getdelim2, with added nmax argument.
1364         * getline.c: Include getndelim2.c.
1365         (getdelim2): Moved out to getndelim2.c.
1366         (getline, getdelim): Update.
1367
1368 2003-07-15    <karl@gnu.org>
1369
1370         * vasnprintf.c: update from gettext.
1371
1372 2003-07-15  Jim Meyering  <jim@meyering.net>
1373
1374         * makepath.c (make_path): Enclose diagnostic in _(...).
1375
1376 2003-07-14  Paul Eggert  <eggert@twinsun.com>
1377
1378         * asnprintf.c, asprintf.c, config.charset, gettext.h,
1379         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
1380         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
1381         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
1382         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
1383         updated automatically by ../config/srclist-update.  This changes
1384         their license from LPGL to GPL.
1385
1386 2003-07-14  Jim Meyering  <jim@meyering.net>
1387
1388         Don't emit diagnostics.  Let callers do that.
1389         * save-cwd.c: Don't include "error.h".
1390         (save_cwd): Don't call error.  Ensure that errno is valid
1391         when returning nonzero.
1392
1393         * save-cwd.h (restore_cwd): Update prototype.
1394         * save-cwd.c (restore_cwd): Remove two parameters.
1395         Simplify.  Don't call error upon failure.  Let callers do that.
1396         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
1397         when auditing is enabled.  But don't bother updating the #if.
1398
1399 2003-07-14  Simon Josefsson  <jas@extundo.com>
1400
1401         * mempcpy.h: New file.
1402         * mempcpy.c: New file.
1403
1404 2003-07-14  Paul Eggert  <eggert@twinsun.com>
1405
1406         * ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
1407         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
1408         unicodeio.c, unicodeio.h, unlocked-io.h:
1409         Switch from LGPL to GPL.
1410
1411 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
1412
1413         * obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
1414         it breaks C++ compilation.
1415         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
1416
1417 2003-07-10  Jim Meyering  <jim@meyering.net>
1418
1419         * vasnprintf.c: Remove trailing blanks.
1420         Make cpp indentation consistent.
1421
1422 2003-07-09  Paul Eggert  <eggert@twinsun.com>
1423
1424         * alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
1425         posixver.c, strftime.c, strnlen.c, strverscmp.c:
1426         Switch from LGPL to GPL.
1427
1428 2003-07-07  Paul Eggert  <eggert@twinsun.com>
1429
1430         * mktime.c: Fix some boundary cases and remove need for floating point.
1431
1432         Issue a compile-time diagnostic if time_t is floating point, or if
1433         two's complement arithmetic is not in effect, or if arithmetic
1434         right shift does not propagate the sign.  These assumptions were
1435         all in the original code but they weren't checked.
1436
1437         (TIME_T_MIDPOINT, verify): New macros.
1438         (__isleap): Remove; it has integer overflow problems.
1439         (leapyear): New function, without those problems.
1440         (ydhms_tm_diff): Remove; splitting into two parts.
1441         (ydhms_diff): New function, containing the arithmetic part of
1442         the old ydhms_tm_diff function.  Issue a compile-time
1443         diagnostic if we are not using C99 integer division.
1444         Avoid casts when possible.
1445         (guess_time_tm): New function, containing the checking part of
1446         the old ydhms_tm_diff function.  Return the new value, rather than
1447         the difference between it and the old.  Accept a new argument T
1448         so that *T specifies the old value.  Check for overflow in the result.
1449
1450         (__mktime_internal): Use a time_t offset, not a long int offset.
1451         This undoes the 2003-06-04 change, which is no longer needed now
1452         that we have better overflow checking.
1453         (localtime_offset): Likewise.
1454
1455         (__mktime_internal): Avoid harmful overflow on hosts where time_t
1456         and long are 64-bit but int is only 32-bit.
1457         (ydhms_diff): Use long int to store year1 and yday1.
1458         Issue a compile-time diagnostic if long int is not wide enough.
1459
1460         (__mktime_internal): Use long int to store adjusted year and yday.
1461         Use plain C rather than preprocessor commands, if that doesn't
1462         affect efficiency.
1463         Check for overflow (and try to repair) after each probe
1464         rather than checking only at the very end.  This avoids some bugs
1465         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
1466         does not equal GMT offset at maximum time).
1467         Use integer to check for overflow rather than floating point; this
1468         is more portable to non-IEEE hosts, and is a tad faster.
1469         When we detect that we are oscillating between two values,
1470         don't check whether tm_isdst has the requested value, since
1471         we already know the answer.  When tm_isdst has the wrong value,
1472         use a different heuristic to find the right one, based on the
1473         extreme values actually observed in practice in tz2003a,
1474         rather than the (overly optimistic) "previous 3 calendar quarters".
1475
1476         (not_equal_tm, print_tm, check_result): Use "const T" rather than
1477         "T const" to accommodate glibc style.
1478         (check_result): Use less-confusing report format.  "long" -> "long int.
1479         (main): Likewise.
1480         Don't loop if the iteration overflows time_t.
1481         Allow a negative step in the iteration.
1482
1483 2003-07-01  Paul Eggert  <eggert@twinsun.com>
1484
1485         * xreadlink.c: Include <sys/types.h> unconditionally, instead of
1486         having it depend on HAVE_SYS_TYPES_H.
1487
1488 2003-06-25  Bruno Haible  <bruno@clisp.org>
1489
1490         * readlink.c: New file.
1491
1492 2003-06-20  Bruno Haible  <bruno@clisp.org>
1493
1494         Assume C89, so PARAMS isn't needed.
1495         * unicodeio.h (PARAMS): Remove.
1496         * unicodeio.c: Don't use PARAMS.
1497
1498 2003-06-18  Jim Meyering  <jim@meyering.net>
1499
1500         Merge changes from coreutils.
1501         * readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
1502         Remove explicit declarations of xmalloc and realloc.
1503         Include xalloc.h.
1504         (read_utmp): Remove anachronistic cast of xmalloc.
1505
1506 2003-06-17  Paul Eggert  <eggert@twinsun.com>
1507
1508         Assume C89, so PARAMS isn't needed.
1509         * backupfile.h (PARAMS): Remove.  All uses removed.
1510         * closeout.h, dirname.h, filemode.h, fsusage.h, getdate.h, getline.h,
1511         group-member.h, hard-locale.h, hash.h, linebuffer.h, long-options.h,
1512         makepath.h, memcasecmp.h, memcoll.h, modechange.h, mountlist.h,
1513         path-concat.h, physmem.h, posixtm.h, quote.h, readutmp.h, same.h,
1514         save-cwd.h, savedir.h, stdio-safer.h, strtoimax.c, strverscmp.h,
1515         unistd-safer.h, version-etc.h, xalloc.h, xreadlink.h, xstrtod.h,
1516         xstrtol.h: Likewise.
1517         * filemode.h, hard-locale.h, memcoll.h, modechange.h, physmem.h,
1518         same.h, strverscmp.h: Do not include config.h; no longer needed.
1519         Anyway, config.h should always be included before any other file.
1520
1521 2003-06-11  Simon Josefsson  <jas@extundo.com>
1522
1523         * sysexit_.h: New file.
1524
1525 2003-05-20  Derek Price  <derek@ximbiot.com>
1526
1527         * stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is necessary.
1528
1529 2003-06-10  Simon Josefsson  <jas@extundo.com>
1530
1531         * strchrnul.h: New file.
1532         * strchrnul.c: New file.
1533
1534 2003-06-10  Simon Josefsson <jas@extundo.com>
1535
1536         * argp.h: New file, from glibc.
1537         * argp-ba.c: New file, from glibc.
1538         * argp-eexst.c: New file, from glibc.
1539         * argp-fmtstream.c: New file, from glibc.
1540         * argp-fmtstream.h: New file, from glibc.
1541         * argp-fs-xinl.c: New file, from glibc.
1542         * argp-help.c: New file, from glibc.
1543         * argp-namefrob.h: New file, from glibc.
1544         * argp-parse.c: New file, from glibc.
1545         * argp-pv.c: New file, from glibc.
1546         * argp-pvh.c: New file, from glibc.
1547         * argp-xinl.c: New file, from glibc.
1548
1549 2003-06-07  Jim Meyering  <jim@meyering.net>
1550
1551         * readtokens.h: Put `Free Software Foundation, Inc.'
1552         in place of my name in the copyright comment.
1553         Remove definition and uses of __P.
1554
1555         From coreutils.
1556         * stat.c: Don't declare xmalloc explicitly.
1557         Instead, include "xalloc.h".
1558         * readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
1559         xrealloc, and xcalloc return values.
1560         * xgetcwd.c (xgetcwd): Include "xgetcwd.h".
1561         Improve comment.
1562         * xgetcwd.h: Remove definition/uses of PARAMS.
1563
1564 2003-06-06  Jim Meyering  <jim@meyering.net>
1565
1566         * stdbool_.h: Renamed from stdbool.h.in.
1567
1568 2003-06-06  Jim Meyering  <jim@meyering.net>
1569
1570         Merge from coreutils.
1571         * same.c: (same_name): Declare *_basename locals to be `const'.
1572         Consolidate declarations and initializations of *_base* locals.
1573
1574         Merge from coreutils.
1575         This avoids a core dump on systems without GNU putenv,
1576         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
1577         * putenv.c (__set_errno, LOCK, UNLOCK): Define.
1578         (unsetenv): New static function, from GNU libc.
1579         (rpl_putenv): Use it.
1580
1581         * modechange.c: Remove trailing blanks.
1582
1583         Merge from coreutils.
1584         * fsusage.c: Remove declaration of statfs.
1585         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
1586
1587         * posixtm.c: Include <stdbool.h> unconditionally.
1588
1589 2003-06-05  Paul Eggert  <eggert@twinsun.com>
1590
1591         * mktime.c (__mktime_internal): When resolving a tm_isdst
1592         mismatch, look in future quarters as well as past.  This fixes a
1593         bug when processing fall-backwards gaps immediately after a long
1594         period of daylight-saving time.
1595
1596         * mktime.c: Assume freestanding C89 or better.
1597         (HAVE_LIMITS_H): Remove.  Assume it's 1.
1598         (__P): Remove; not used.
1599         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
1600         (mktime, not_equal_tm, print_tm, check_result,
1601         main): Use prototypes.  Use const * where appropriate.
1602         (main): Fix typo in testing code that uncovered by above changes.
1603         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
1604
1605 2003-06-04  Paul Eggert  <eggert@twinsun.com>
1606
1607         * mktime.c: Fix Debian bug 177940
1608         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
1609         (localtime_offset): Now long int, not time_t, because we want it
1610         to be guaranteed to be signed.  All uses changed.
1611         (__mktime_internal): If overflow would occur when adding offset,
1612         don't add it.
1613
1614         Merge 'human' changes from coreutils.  Rewrite to support
1615         locale-specific notations like thousands separators.
1616         * human.c: Simplify authorship notice.
1617         Include human.h immediately after config.h.
1618         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
1619         <limits.h>: Do not include, since human.h does.
1620         (SIZE_MAX, UINTMAX_MAX): New macros.
1621         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
1622         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
1623         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
1624         (power_letter): Renamed from suffixes.
1625         (generate_suffix_backwards): Remove.
1626         (adjust_value): Now takes int style (because of human.h changes)
1627         and long double value (for greater precision on some platforms).
1628         (group_number): New function.
1629         (human_readable): Use it.  Use integer options, not enum.
1630         Put the options before the sizes in the arg list.
1631         Support all the new options.
1632         The old human_readable function has been removed;
1633         use inttostr.h instead.
1634         (human_readable, default_block_size, humblock):
1635         Use uintmax_t, not int, for block sizes.
1636         (human_readable_inexact, block_size_types): Remove.
1637         (block_size_opts): New constant.
1638         (human_options): Renamed from human_block_size, with new signature
1639         that allows block sizes up to UINTMAX_MAX.  All callers changed.
1640         * human.h: Add copyright and authorship notice.
1641         Include <limits.h> and <stdbool.h> unconditionally.
1642         (PARAMS): Remove.  All uses removed.
1643         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
1644         (enum human_inexact_style): Remove tag; now a nameless enum.
1645         (human_floor, human_ceiling, human_round_to_even): Now have
1646         values 2, 0, 1 rather than -1, 1, 0.
1647         (human_group_digits, human_suppress_point_zero, human_autoscale,
1648         human_base_1024, human_SI, human_B): New constants.
1649         (human_readable_inexact, human_block_size): Remove.
1650         (human_readable): Size args are now uintmax_t, not int.
1651         (human_options): New decl.
1652
1653         * exclude.c: (new_exclude, add_exclude): Remove casts that are
1654         unnecessary now that we assume C89 or better.  This change
1655         imported from coreutils.
1656
1657         * mktime.c (__mktime_internal): Do not reject negative timestamps
1658         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
1659         in the 2003-05-30 sync from glibc.
1660
1661         .h files should stand alone, but we shouldn't include <sys/types.h>
1662         if we can get away with just <stddef.h>.
1663
1664         * __fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
1665         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
1666         rather than <sys/types.h>, as we merely need size_t.
1667         * dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
1668         to get size_t.
1669         * hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
1670         Include <stdio.h>, to get FILE.
1671         * memcasecmp.c: Don't include <sys/types.h>, as we can assume
1672         memcasecmp.h has included <stddef.h> and all we need is size_t.
1673         * memcoll.c: Include "memcoll.h", which gets us size_t and checks
1674         our interface, instead of including <sys/types.h>
1675
1676 2003-06-02  Paul Eggert  <eggert@twinsun.com>
1677
1678         [from coreutils]
1679         Fix some minor time-related bugs with POSIX time arguments.
1680         Some valid time stamps were being rejected (notably -1, and
1681         time stamps before 1900 on 64-bit hosts).  And some invalid
1682         time stamps were being accepted, e.g. September 31.
1683
1684         * posixtm.h (posixtime): Return bool instead of time_t, so
1685         that we can return (time_t) -1 successfully.
1686         * posixtm.c: Likewise.
1687         [HAVE_STDBOOL_H]: Include <stdbool.h>.
1688         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
1689         (t): Remove static var.
1690         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
1691         of static var.  All uses changed.
1692         (year): Do not reject years before 1900; they can occur with
1693         64-bit time_t.
1694         (posix_time_parse): Do not check for out-of-range components;
1695         that is now the caller's responsibility, since our checks were
1696         only approximations.
1697         (posixtime): Use mktime to check for out-of-range components,
1698         since it knows them exactly.
1699         If mktime returns (time_t) -1, check whether an error actually occurred
1700         by invoking localtime on -1.
1701         (main) [TEST_POSIXTIME]: Check for input data errors, and report
1702         posixtime failures better.
1703         Improve the test data (in comments only).
1704
1705 2003-05-30    <karl@gnu.org>
1706
1707         * mktime.c: update from libc.
1708
1709 2003-05-30  Bruno Haible  <bruno@clisp.org>
1710
1711         * config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
1712         * localcharset.h: Likewise.
1713         * localcharset.c: Likewise.
1714
1715 2003-05-28  Paul Eggert  <eggert@twinsun.com>
1716
1717         Assume the headers required for C89 freestanding compilers.
1718         * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h,
1719         rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h>
1720         without checking for HAVE_LIMITS_H.
1721         * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c,
1722         xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed
1723         to do that.
1724         * fatal.c: Include <stdarg.h> without checking for __STDC__.
1725         * exclude.c: Include <stdbool.h> unconditionally.
1726         * tempname.c: Include <stddef.h> unconditionally.
1727         * hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
1728         * modechange.c, rpmatch.c (NULL): Don't define, since
1729         <stddef.h> does that.
1730         * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
1731         * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
1732         * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
1733         * xstrtol.c: Likewise.
1734         * safe-read.c: Remove TYPE_SIGNED; no longer needed.
1735         * savedir.c: Include <stddef.h> instead of defining NULL.
1736
1737         * addext.c (addext): Use assignment rather than cast, to avoid
1738         warnings on some platforms.
1739
1740         * mktime.c (__mktime_internal): Do not reject negative timestamps
1741         arbitrarily.
1742
1743 2003-05-10  Bruno Haible  <bruno@clisp.org>
1744
1745         * linebreak.c (iconv_string_length): Don't return -1 just because the
1746         string is longer than 4 KB.
1747
1748 2003-05-12  Jim Meyering  <jim@meyering.net>
1749
1750         * strftime.c (my_strftime): Let the `-' (no-pad) flag affect
1751         the space-padded-by-default conversion specifiers, %e, %k, %l.
1752
1753 2003-05-03  Bruno Haible  <bruno@clisp.org>
1754
1755         Upgrade to Unicode-4.0.
1756         * linebreak.c (nonspacing_table_data): Change width of U+00AD,
1757         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
1758         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
1759         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
1760         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
1761         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
1762         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
1763         Change width of U+E0100..U+E01EF from 1 to 0.
1764
1765 2003-04-25  Bruno Haible  <bruno@clisp.org>
1766
1767         * copy-file.c: Include <stddef.h>, for size_t.
1768
1769 2003-04-25  Jim Meyering  <jim@meyering.net>
1770
1771         * copy-file.c (copy_file_preserving): Declare buf_size to be
1772         of type size_t, not int.
1773
1774 2003-04-11  Jim Meyering  <jim@meyering.net>
1775
1776         Merge changes from Coreutils.
1777
1778         2003-03-22  Jim Meyering  <jim@meyering.net>
1779
1780         * strftime.c (widen): Cast alloca return value to proper type.
1781
1782         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
1783
1784         From GNU libc.
1785         * strftime.c (my_strftime): Handle very large width
1786         specifications for numeric values correctly.  Improve checks for
1787         overflow.
1788
1789         2003-01-19  Jim Meyering  <jim@meyering.net>
1790
1791         * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions.
1792         (nl_get_alt_digit) [! defined my_strftime]: Define.
1793         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
1794         _nl_get_alt_digit and _nl_get_walt_digit.
1795
1796         * strftime.c (my_strftime): Merge in locale-related changes from libc.
1797         These changes have no effect outside of _LIBC.
1798
1799 2003-04-10  Bruno Haible  <bruno@clisp.org>
1800
1801         * findprog.h: New file, from GNU gettext.
1802         * findprog.c: New file, from GNU gettext.
1803
1804 2003-04-05  Jim Meyering  <jim@meyering.net>
1805
1806         Merge changes from Coreutils.
1807
1808         * exclude.h (PARAMS): Remove definition and uses.
1809         * exclude.c: Remove uses of `PARAMS'.
1810
1811         * dirname.c [TEST_DIRNAME]: Update build instructions for test.
1812         Add test-cases for DOS filenames. Declare program_name.
1813         (main): Set up program_name.  Patch by Rich Dawe.
1814
1815         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
1816         error from mntctl.
1817         Use mntctl's return value to drive the entry-processing loop, since
1818         we can't rely on the value of the vmt_length member in the last
1819         entry.  On some systems doing so could result in exhausting
1820         virtual memory.  Based in part on a patch from Mike Jetzer.
1821
1822 2003-04-04  Bruno Haible  <bruno@clisp.org>
1823
1824         * linebreak.h: New file, from GNU gettext.
1825         * linebreak.c: New file, from GNU gettext with slight modifications.
1826         * lbrkprop.h: New file, from GNU gettext.
1827
1828 2003-04-03  Bruno Haible  <bruno@clisp.org>
1829
1830         * utf8-ucs4.h: New file, from GNU gettext.
1831         * utf16-ucs4.h: New file, from GNU gettext.
1832         * ucs4-utf8.h: New file, from GNU gettext.
1833         * ucs4-utf16.h: New file, from GNU gettext.
1834
1835 2003-04-02  Bruno Haible  <bruno@clisp.org>
1836
1837         * binary-io.h: New file, from GNU gettext.
1838
1839 2003-04-01  Bruno Haible  <bruno@clisp.org>
1840
1841         * pathname.h: New file, from GNU gettext.
1842         * concatpath.c: New file, from GNU gettext.
1843
1844 2003-03-30  Bruno Haible  <bruno@clisp.org>
1845
1846         * copy-file.c (copy_file_preserving): Don't set owner if the function
1847         chown() doesn't exist.
1848
1849 2003-03-28  Bruno Haible  <bruno@clisp.org>
1850
1851         * copy-file.h: New file, from GNU gettext.
1852         * copy-file.c: New file, from GNU gettext.
1853
1854 2003-03-18  Jim Meyering  <jim@meyering.net>
1855
1856         * quote.c (quote_n): Fix typo in comment.
1857
1858 2003-03-14  Jim Meyering  <jim@meyering.net>
1859
1860         Merge changes from Coreutils.
1861         * obstack.h (obstack_object_size): Declare temporary, __o,
1862         to be const, in order to avoid warnings.
1863         (obstack_room): Likewise.
1864         (obstack_empty_p): Likewise.
1865
1866 2003-03-13  Paul Eggert  <eggert@twinsun.com>
1867
1868         Merge changes from Bison.
1869         * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
1870         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
1871         when compiling Bison 1.875's `bitset bset = obstack_alloc
1872         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
1873         * hash.c: Include <stdbool.h> unconditionally.
1874
1875 2003-03-09  Paul Eggert  <eggert@twinsun.com>
1876
1877         * argmatch.c (EXIT_FAILURE): Define if the system doesn't.
1878         Reported by Bruce Becker; see:
1879         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
1880
1881 2003-03-03  Paul Eggert  <eggert@twinsun.com>
1882             Bruno Haible  <bruno@clisp.org>
1883
1884         * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
1885         Reported by John Hughes, see
1886         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
1887
1888 2003-02-19  Paolo Bonzino  <bonzini@gnu.org>
1889
1890         * poll_.h: New file.
1891         * poll.c: New file.
1892
1893 2003-02-18  Paolo Bonzino  <bonzini@gnu.org>
1894
1895         * mathl.h: New file.
1896         * acosl.c: New file.
1897         * asinl.c: New file.
1898         * atanl.c: New file.
1899         * ceill.c: New file.
1900         * cosl.c: New file.
1901         * expl.c: New file.
1902         * floorl.c: New file.
1903         * frexpl.c: New file.
1904         * ldexpl.c: New file.
1905         * logl.c: New file.
1906         * sincosl.c: New file.
1907         * sinl.c: New file.
1908         * sqrtl.c: New file.
1909         * tanl.c: New file.
1910         * trigl.c: New file.
1911         * trigl.h: New file.
1912
1913 2003-02-17  Bruno Haible  <bruno@clisp.org>
1914
1915         * mkdtemp.h: New file, from GNU gettext.
1916         * mkdtemp.c: New file, from GNU gettext.
1917
1918 2003-01-31  Bruno Haible  <bruno@clisp.org>
1919
1920         * rename.c: #undef rename before defining rpl_rename.
1921         * strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
1922
1923 2003-01-30  Bruno Haible  <bruno@clisp.org>
1924
1925         * printf-args.h: New file, from GNU gettext.
1926         * printf-args.c: New file, from GNU gettext.
1927         * printf-parse.h: New file, from GNU gettext.
1928         * printf-parse.c: New file, from GNU gettext.
1929         * vasnprintf.h: New file, from GNU gettext.
1930         * vasnprintf.c: New file, from GNU gettext.
1931         * asnprintf.c: New file, from GNU gettext.
1932         * vasprintf.h: New file, from GNU gettext with modifications.
1933         * vasprintf.c: New file, from GNU gettext.
1934         * asprintf.c: New file, from GNU gettext.
1935
1936 2003-01-29  Bruno Haible  <bruno@clisp.org>
1937
1938         * stpncpy.h: New file, from GNU gettext with modifications.
1939         * stpncpy.c: New file, from GNU gettext with modifications.
1940
1941 2003-01-28  Bruno Haible  <bruno@clisp.org>
1942
1943         * c-ctype.h: New file, from GNU gettext, with changes suggested by
1944         Paul Eggert.
1945         * c-ctype.c: New file, from GNU gettext, with changes suggested by
1946         Paul Eggert.
1947
1948 2003-01-27  Bruno Haible  <bruno@clisp.org>
1949
1950         * xsetenv.h: New file, from GNU gettext.
1951         * xsetenv.c: New file, from GNU gettext.
1952
1953 2003-01-23  Bruno Haible  <bruno@clisp.org>
1954
1955         * minmax.h: New file, from GNU gettext, with comments from Paul Eggert.
1956
1957 2003-01-22  Bruno Haible  <bruno@clisp.org>
1958
1959         * exit.h: New file, from GNU gettext.
1960
1961 2003-01-11  Bruno Haible  <bruno@clisp.org>
1962
1963         * stpcpy.h (stpcpy): Use ANSI C function declarations.
1964         * strcase.h (strcasecmp, strncasecmp): Likewise.
1965
1966 2003-01-14  Jim Meyering  <jim@meyering.net>
1967
1968         * same.c (same_name): Tweak a comment.
1969
1970 2003-01-11  Bruno Haible  <bruno@clisp.org>
1971
1972         * same.c (same_name): Reorder tests so as to avoid calling stat()
1973         when a string comparison is sufficient.
1974
1975 2003-01-11  Bruno Haible  <bruno@clisp.org>
1976
1977         * readtokens.c (readtoken): Cast character to 'unsigned char', not
1978         'unsigned int'.
1979
1980 2003-01-11  Bruno Haible  <bruno@clisp.org>
1981
1982         * hash-pjw.c: Add comment about low quality of this function.
1983
1984 2003-01-12  Paul Eggert  <eggert@twinsun.com>
1985
1986         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
1987         to avoid collisions with libcurses and libreadline.
1988
1989         * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
1990         * getstr.h, getstr.c: Remove.
1991         * getline.c: Include "getline.h", to check interface.
1992         Move body of old getstr.c here: this defines MIN_CHUNK and
1993         declares getdelim2, which is renamed from getstr.
1994         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
1995
1996         * linebuffer.c (readlinebuffer): Renamed from readline.
1997         All uses changed.
1998         * linebuffer.h: Likewise.
1999         (readline): Remove backward-compatibility macro.
2000
2001 2003-01-12  Jim Meyering  <jim@meyering.net>
2002
2003         * makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
2004
2005 2003-01-10  Bruno Haible  <bruno@clisp.org>
2006
2007         * alloca_.h: New file.
2008         * getdate.y: Unconditionally include alloca.h.
2009         * makepath.c: Likewise.
2010         * setenv.c: Likewise.
2011         * userspec.c: Likewise.
2012
2013 2003-01-09  Bruno Haible  <bruno@clisp.org>
2014
2015         * stdbool.h.in: New file.
2016
2017 2003-01-08  Bruno Haible  <bruno@clisp.org>
2018
2019         * safe-read.c: Include specification header first, to ensure its
2020         selfcontainedness.
2021         * full-write.c: Likewise.
2022
2023 2003-01-08  Jim Meyering  <jim@meyering.net>
2024
2025         * full-write.c: Undefine and define-away `const' after inclusion
2026         of errno.h, not before.  Suggestion from Bruno Haible.
2027
2028 2003-01-07  Jim Meyering  <jim@meyering.net>
2029
2030         * full-write.c: Rework so that it may serve to define full_read, too.
2031         * full-read.c: Simply #define FULL_READ and include full-write.c.
2032
2033 2003-01-06  Jim Meyering  <jim@meyering.net>
2034
2035         * version-etc.c: Update year in translatable copyright string.
2036
2037 2002-12-25  Bruno Haible  <bruno@clisp.org>
2038
2039         * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
2040         * xstrtol.h: Likewise.
2041         * xstrtoimax.c: Likewise.
2042         * xstrtoumax.c: Likewise.
2043         * human.h: Likewise.
2044
2045         * tempname.c: Include <inttypes.h> too. Avoids a compilation error
2046         on systems that have <inttypes.h> but not <stdint.h>.
2047
2048 2002-12-31  Paul Eggert  <eggert@twinsun.com>
2049
2050         * memcoll.c (memcoll): Fall back on a simple algorithm using
2051         memcmp if strcoll doesn't work.
2052
2053 2002-12-23  Bruno Haible  <bruno@clisp.org>
2054
2055         * localcharset.h: New file.
2056         * localcharset.c: Include it.
2057         * unicodeio.c: Likewise.
2058
2059 2002-12-22  Bruno Haible  <bruno@clisp.org>
2060
2061         * utime.c (utime_null): No need to call ftruncate if the file was
2062         nonempty.
2063
2064 2002-12-23  Bruno Haible  <bruno@clisp.org>
2065
2066         * memcoll.c (STRCOLL): New macro.
2067         (memcoll): Use it.
2068
2069 2002-12-22  Bruno Haible  <bruno@clisp.org>
2070
2071         * getstr.h (getstr): Define, to avoid clash with libcurses.
2072         * linebuffer.h (readline): Define, to avoid clash with libreadline.
2073
2074 2002-12-22  Bruno Haible  <bruno@clisp.org>
2075
2076         * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
2077
2078 2002-12-23  Bruno Haible  <bruno@clisp.org>
2079
2080         * getline.h: Include <stddef.h>, for size_t.
2081
2082         * unicodeio.h: Include <stddef.h>, for size_t.
2083         * unicodeio.c: Don't include <stddef.h>.
2084
2085 2002-12-17  Bruno Haible  <bruno@clisp.org>
2086
2087         * canon-host.c (strdup): Remove unused declaration.
2088
2089         * fsusage.c: Include full_read.h.
2090         (get_fs_usage): Use full_read instead of safe_read.
2091
2092         * utime.c (utime_null): Use SAFE_READ_ERROR.
2093
2094 2002-12-11  Bruno Haible  <bruno@clisp.org>
2095
2096         * setenv.h: Rewritten to cope with systems that have setenv() but not
2097         unsetenv().
2098         * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
2099         modifications:
2100
2101         2002-12-11  Bruno Haible  <bruno@clisp.org>
2102
2103                 * setenv.c (alloca): Fall back to malloc.
2104                 (freea): New macro.
2105                 (setenv): Use freea() to free memory allocated with alloca().
2106
2107         2002-11-13  Bruno Haible  <bruno@clisp.org>
2108
2109                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
2110                 function declarations.
2111                 * unsetenv.c (unsetenv): Likewise.
2112
2113         2002-03-04  Bruno Haible  <bruno@clisp.org>
2114
2115                 Portability to AIX 4.3.3.
2116                 * unsetenv.c: New file, extracted from setenv.c.
2117                 * setenv.c: Move the unsetenv() function to unsetenv.c.
2118
2119         2001-12-20  Bruno Haible  <bruno@clisp.org>
2120
2121                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
2122                 use malloc instead. For SunOS 4.
2123
2124         2001-12-11  Bruno Haible  <bruno@clisp.org>
2125
2126                 * setenv.c: Declare alloca.
2127                 (compar_fn_t): New typedef.
2128                 (KNOWN_VALUE, STORE_VALUE): Use it.
2129
2130         * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
2131         setenv.h.
2132
2133 2002-12-10  Paul Eggert  <eggert@twinsun.com>
2134
2135         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
2136         * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
2137         Choose values that are less likely to collide with system fnmatch
2138         options.
2139         * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
2140         defined (e.g., a pure POSIX system).
2141         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
2142         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
2143
2144 2002-12-06  Jim Meyering  <jim@meyering.net>
2145
2146         * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
2147
2148         Merge in changes from libc's misc/error.c, in preparation
2149         for the merge of gnulib's changes back into libc.
2150
2151         * error.c (_): Define only if not already defined.
2152         Move definition to follow all #include directives.
2153         Include unlocked-io.h only if !_LIBC.
2154         [_LIBC]: Include <libio/libioP.h>.
2155         [USE_IN_LIBIO]: Include <libio/iolibio.h>
2156         (fflush): Tweak definition to use INTUSE.
2157         (putc): Define.
2158
2159 2002-12-05  Paul Eggert  <eggert@twinsun.com>
2160
2161         * alloca.c [defined emacs]: Include "lisp.h".
2162         (xalloc_die) [defined emacs]: New macro.
2163         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
2164         [! defined emacs]: Include <xalloc.h>.
2165         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
2166         (pointer): Typedef to POINTER_TYPE *.
2167         (malloc): Remove decl; we now always use xmalloc.
2168         (alloca): Use old-style definition, since Emacs needs this.
2169         Check for arithmetic overflow when computing combined size.
2170
2171 2002-12-04  Paul Eggert  <eggert@twinsun.com>
2172
2173         Do not generate unlocked-io.h automatically, since it's easier to
2174         maintain it by hand.
2175
2176         * unlocked-io.h: New file, from GNU diffutils,
2177         but with proper copyright notice and attribution.
2178         * gen-uio: Remove.
2179         * Makefile.am: Add copyright notice.
2180         (libfetish_a_SOURCES): Add unlocked-io.h.
2181         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
2182         (DISTCLEANFILES, io_functions): Remove macros.
2183         (EXTRA_DIST): Remove gen_uio.
2184         (unlocked-io.h): Remove rule.
2185
2186 2002-12-04  Jim Meyering  <jim@meyering.net>
2187
2188         Reflect the fact that stat.c and lstat.c are no longer generated.
2189         * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
2190         (DISTCLEANFILES): Likewise.
2191         (EXTRA_DIST): Likewise.
2192         (all_local): Don't depend on stat.c or lstat.c.
2193         (stat.c, lstat.c): Remove rules.
2194         (EXTRA_DIST): Remove xstat.in.
2195
2196         * xstat.in: Remove file.  Contents moved into stat.c.
2197         * stat.c: New file.  Contents mostly from xstat.in.
2198         * stat.c: Rework so that it may serve to define rpl_lstat, too.
2199         * lstat.c: New file. Simply #define LSTAT and include stat.c.
2200
2201         * safe-read.c: Rework so that it may serve to define safe_write, too.
2202         * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
2203
2204 2002-12-03  Jim Meyering  <jim@meyering.net>
2205
2206         * safe-read.c, safe-write.c: Change variable names and comments, but
2207         not semantics, to minimize the differences between these two files.
2208         (safe_read): Change comment to mention SAFE_READ_ERROR.
2209
2210         * safe-read.c (IS_EINTR): Define.
2211         (safe_read): Use IS_EINTR in place of in-function cpp directives.
2212
2213 2002-12-02  Bruno Haible  <bruno@clisp.org>
2214
2215         * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
2216         Define, taken from safe-read.c.
2217         (INT_MAX): Provide fallback.
2218         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
2219         * safe-write.h (SAFE_WRITE_ERROR): Define.
2220
2221         * safe-read.c (EINTR): Remove definition.
2222         (safe_read): Don't use EINTR if it is absent.
2223
2224 2002-12-02  Jim Meyering  <jim@meyering.net>
2225
2226         * safe-read.c (EINTR): Define.
2227         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
2228         (INT_MAX): Provide fallback.
2229         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
2230
2231         * safe-read.h (SAFE_READ_ERROR): Define.
2232
2233 2002-12-01  Jim Meyering  <jim@meyering.net>
2234
2235         * safe-read.c: (safe_read): Also exit the loop when read returns zero.
2236         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
2237
2238 2002-11-27  Paul Eggert  <eggert@twinsun.com>
2239
2240         * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
2241         hash_rehash): Replace `if (limit <= value) abort ();' with
2242         `if (! (value < limit)) abort ();', for readability.
2243
2244 2002-11-26    <karl@gnu.org>
2245
2246         * strdup.c: copy from libc again, with jim's ok.
2247         * .cppi-disable: re-add strdup.c
2248
2249 2002-11-25    <karl@gnu.org>
2250
2251         * strtoll.c: copy from libc, meaning we now #include <strtol.c>
2252         instead of "strtol.c".
2253
2254 2002-11-25  Jim Meyering  <jim@meyering.net>
2255
2256         * mktime.c: Sync from libc, now that it has the latest fix.
2257
2258 2002-11-24    <karl@gnu.org>
2259
2260         * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
2261         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
2262
2263 2002-11-24  Jim Meyering  <jim@meyering.net>
2264
2265         Update from coreutils:
2266
2267         * mktime.c: Merge in changes from libc.
2268
2269         Avoid a link-time failure on some Linux systems.
2270         * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
2271         (__mon_yday): Declare with the STATIC attribute.
2272         (__mktime_internal): Likewise.
2273         Based on a report from Greg Schafer.
2274
2275 2002-11-23  Jim Meyering  <jim@meyering.net>
2276
2277         * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
2278         Use `unsigned', not `int', as type of index.
2279
2280         * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
2281
2282         * fsusage.c: Remove unneeded parentheses around operands of `defined'.
2283
2284 2002-11-22  Paul Eggert  <eggert@twinsun.com>
2285
2286         * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
2287         hint that one should use `if (! x) abort ();' rather than `assert
2288         (x);', and anyway it's one less thing to worry about configuring.
2289         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
2290         hash_rehash, hash_insert): Use abort rather than assert.
2291
2292 2002-11-22  Paul Eggert  <eggert@twinsun.com>
2293
2294         * quotearg.h: Allow multiple inclusion by surrounding with
2295         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
2296         so that we can be included first.
2297         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
2298         * quotearg.c: Include quotearg.h immediately after config.h.
2299         No need to include stddef.h or sys/types.h any more.
2300         Surround local include files with "", not "<>".
2301         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
2302         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
2303         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
2304         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
2305         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
2306         (ISPRINT): Remove; no longer needed now that we assume C89.
2307
2308         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
2309         Preserve errno.
2310
2311         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
2312         quotearg_char): Use SIZE_MAX rather than
2313         (size_t) -1 when we are talking about "infinity".
2314
2315         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
2316
2317 2002-11-22  Bruno Haible  <bruno@clisp.org>
2318
2319         * safe-read.h: Assume C89. Add comments.
2320         (safe_read): Change return type to size_t.
2321         * safe-read.c (safe_read): Change return type to size_t. Handle byte
2322         counts > SSIZE_MAX correctly.
2323         * safe-write.h: New file.
2324         * safe-write.c: New file.
2325         * full-read.h: New file.
2326         * full-read.c: New file.
2327         * full-write.h: Assume C89. Add comments.
2328         * full-write.c: Include safe-write.h.
2329         (full_write): Rewritten to use safe_write.
2330         Suggested by Jim Meyering and Paul Eggert.
2331
2332 2002-11-21  Bruno Haible  <bruno@clisp.org>
2333
2334         Remove case insensitive option matching.
2335         * argmatch.h (argcasematch): Remove declaration.
2336         (ARGCASEMATCH): Remove macro.
2337         (__xargmatch_internal): Remove case_sensitive argument.
2338         (XARGMATCH): Update.
2339         (XARGCASEMATCH): Remove macro.
2340         * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
2341         case_sensitive argument.
2342         (argcasematch): Remove function.
2343         (__xargmatch_internal): Remove case_sensitive argument.
2344         (main): Use XARGMATCH instead of XARGCASEMATCH.
2345
2346         * xmalloc.c: Change compile-time error message. Add comment about
2347         required autoconf version.
2348
2349 2002-11-21  Jim Meyering  <jim@meyering.net>
2350
2351         * strdup.c (strdup): Tweak comment and initial #if/#include.
2352
2353         Merge in changes from the coreutils.
2354
2355         2002-09-25  Paul Eggert  <eggert@twinsun.com>
2356         * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
2357         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
2358         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
2359         int.  Work more efficiently if X is the same width as uintmax_t.
2360         Do not compare X to -1, to avoid bogus compiler warning.
2361         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
2362         Don't assume that f_frsize and f_bsize are the same type.
2363
2364         * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
2365         on FreeBSD.
2366
2367         * makepath.c (make_path): Restore umask *before* creating the final
2368         component.
2369         (make_path): Minor reformatting.
2370
2371         * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
2372         and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
2373
2374         * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
2375         ones.  At least on GNU/Linux systems, `auto' means something else.
2376         From Michael Stone.
2377
2378 2002-11-20  Paul Eggert  <eggert@twinsun.com>
2379
2380         Merge argmatch cleanups from Bison.  Assume C89.
2381
2382         * argmatch.c: Include config.h here, not in argmatch.h.
2383         Include stdlib.h, for EXIT_FAILURE.
2384         Always include <string.h>, since we assume C89.
2385         (EXIT_FAILURE): Remove pre-C89 bug workaround.
2386         * argmatch.h: Do not include <config.h> or <sys/types.h>.
2387         Include <stddef.h> instead, since it's all we need for size_t.
2388         (PARAMS): Remove.  All uses removed.
2389         (ARRAY_CARDINALITY): Do not bother to #undef.
2390         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
2391         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
2392         Remove unnecessary parentheses.
2393         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
2394         Insert necessary parentheses.
2395         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
2396         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
2397
2398 2002-11-19  Bruno Haible  <bruno@clisp.org>
2399
2400         * mbswidth.c: Include mbswidth.h right at the beginning.
2401         * mbswidth.h: Include <stddef.h>, for size_t.
2402
2403         * mbswidth.h (PARAMS): Remove macro.
2404         (mbswidth, mbsnwidth): Use ANSI C function declarations.
2405         * mbswidth.c (mbswidth, mbsnwidth): Likewise.
2406
2407         * gcd.h (PARAMS): Remove macro.
2408         (gcd): Use ANSI C function declarations.
2409         * gcd.c (gcd): Likewise.
2410
2411 2002-11-15  Bruno Haible  <bruno@clisp.org>
2412
2413         * strcspn.c: Include <stddef.h>.
2414         (strcspn): Use ANSI C function declaration. Change return type to
2415         size_t. Use NULL.
2416         * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
2417         (strpbrk): Use NULL.
2418         * strpbrk.h (PARAMS): Remove macro.
2419         (strpbrk): Use ANSI C function declaration.
2420         * strstr.c: Don't include <sys/types.h>.
2421         * strstr.h (PARAMS): Remove macro.
2422         (strstr): Use ANSI C function declarations.
2423
2424 2002-11-06  Bruno Haible  <bruno@clisp.org>
2425
2426         * gcd.h (gcd): Change argument type to 'unsigned long'.
2427         * gcd.c (gcd): Likewise.
2428
2429 2002-11-05  Bruno Haible  <bruno@clisp.org>
2430
2431         * gcd.h: New file, from gettext-0.11.5.
2432         * gcd.c: New file, from gettext-0.11.5.
2433
2434 2002-11-05  Bruno Haible  <bruno@clisp.org>
2435
2436         * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2437         * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2438         * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2439         * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
2440
2441         * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
2442         * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
2443
2444         * closeout.c: Include gettext.h instead of <libintl.h>.
2445         * human.c: Include gettext.h instead of <libintl.h>.
2446         * quotearg.c: Include gettext.h instead of <libintl.h>.
2447         * rpmatch.c: Include gettext.h instead of <libintl.h>.
2448         * unicodeio.c: Include gettext.h instead of <libintl.h>.
2449         * userspec.c: Include gettext.h instead of <libintl.h>.
2450         * version-etc.c: Include gettext.h instead of <libintl.h>.
2451         * xmalloc.c: Include gettext.h instead of <libintl.h>.
2452         (textdomain): Remove definition.
2453         * xmemcoll.c: Include gettext.h instead of <libintl.h>.
2454
2455         * long-options.c: Remove include of <libintl.h> and definition of _.
2456         * same.c: Remove include of <libintl.h> and definition of _.
2457
2458 2002-11-04  Bruno Haible  <bruno@clisp.org>
2459
2460         * stpcpy.h: New file, from GNU gettext-0.11.5.
2461         * strcase.h: New file, from GNU gettext-0.11.5.
2462         * strpbrk.h: New file, from GNU gettext-0.11.5.
2463         * strstr.h: New file, from GNU gettext-0.11.5.
2464         * xgetcwd.h: New file, from GNU gettext-0.11.5.
2465
2466 2002-05-09  Bruno Haible  <bruno@clisp.org>
2467
2468         * config.charset: Update for newest glibc. Add canonical names
2469         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
2470
2471 2002-05-09  Bruno Haible  <bruno@clisp.org>
2472
2473         * localcharset.c (get_charset_aliases): Add more Windows specific
2474         aliases.
2475
2476 2002-05-08  Owen Taylor  <otaylor@redhat.com>
2477
2478         * config.charset: A few additions for Solaris.
2479
2480 2001-12-05  Bruno Haible  <bruno@clisp.org>
2481
2482         * localcharset.c (locale_charset): Don't return an empty string.
2483
2484 2001-10-23  Bruno Haible  <haible@clisp.cons.org>
2485
2486         * config.charset: msdos in uk_UA uses CP1125.
2487
2488 2001-08-05  Bruno Haible  <haible@clisp.cons.org>
2489
2490         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
2491         * localcharset.c (locale_charset): Declare as extern "C".
2492
2493 2002-02-15  Bruno Haible  <bruno@clisp.org>
2494
2495         * config.charset [msdosdjgpp]: For Russian, use CP866.
2496
2497 2002-02-11  Bruno Haible  <bruno@clisp.org>
2498
2499         * config.charset: Add support for NetBSD.
2500
2501 2002-09-25    <karl@gnu.org>
2502
2503         * strdup.c: copy from libc/string (via ../config/srclist*).
2504         * getopt*: copy from libc/posix.
2505         * gettext.h: copy from gettext.
2506         * .cppi-disable: add strdup.c, gettext.h.
2507
2508 2002-07-01  Jim Meyering  <meyering@lucent.com>
2509
2510         * c-stack.c: Include sys/time.h.
2511         From Volker Borchert.
2512
2513 2002-06-11  Paul Eggert  <eggert@twinsun.com>
2514
2515         * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
2516         New macro.  Use it uniformly instead of
2517         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
2518         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
2519         reported by Vin Shelton.
2520
2521 2002-06-22  Jim Meyering  <meyering@lucent.com>
2522
2523         * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
2524         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
2525
2526 2002-06-22  Paul Eggert  <eggert@twinsun.com>
2527
2528         * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
2529         Do not assume SA_SIGINFO behavior.
2530         Bug reported by Jim Meyering on NetBSD 1.5.2.
2531
2532 2002-06-22  Jim Meyering  <meyering@lucent.com>
2533
2534         * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
2535
2536         * exitfail.c, exitfail.h: Likewise.
2537         * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
2538
2539         * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
2540         of fnmatch.h.
2541         (EXTRA_DIST): Add fnmatch_loop.c.
2542         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
2543
2544         * fnmatch_loop.c: New file, from diffutils-2.8.2.
2545         * fnmatch.c: Update from diffutils-2.8.2.
2546         * fnmatch_.h: New file.  From diffutils-2.8.2.
2547         * fnmatch.h: Remove file.
2548
2549 2002-06-18  Paul Eggert  <eggert@twinsun.com>
2550
2551         * file-type.h: Report an error if neither S_ISREG nor
2552         S_IFREG is defined, instead of using a test specific to glibc
2553         2.2.  This should be safe, since POSIX requires S_ISREG and
2554         Unix Version 7 had S_IFREG.  We don't need to check for
2555         <sys/types.h> since we don't use any symbols that it defines.
2556
2557 2002-06-15  Jim Meyering  <meyering@lucent.com>
2558
2559         * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
2560         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
2561         have been included before this file.
2562
2563 2002-06-13  Richard Dawe  <richdawe@bigfoot.com>
2564
2565         * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
2566         so that each temporary file name is unique and valid in the first
2567         8 characters, for operation under DOS.
2568
2569 2002-06-15  Jim Meyering  <meyering@lucent.com>
2570
2571         Work even with DJGPP 2.03, which lacks support for symlinks.
2572         From Richard Dawe.
2573         * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
2574         is defined.
2575         * lchown.c (S_ISLNK): Likewise.
2576
2577 2002-06-14  Jim Meyering  <meyering@lucent.com>
2578
2579         * file-type.h: Use the version from diffutils-2.8.2.
2580         * file-type.c: Likewise.
2581
2582 2002-05-27  Jim Meyering  <meyering@lucent.com>
2583
2584         Fix a problem seen only on nonconforming systems whereby ls.c's
2585         use of localtime, and then of gettimeofday would cause trouble:
2586         the localtime call used to initialize rpl_gettimeofday's save
2587         mechanism would clobber ls's current local time information so
2588         that in any long listing the first file would always be listed
2589         with date 1970-01-01.  Analysis by Volker Borchert.
2590
2591         * gettimeofday.c (localtime): Undefine.
2592         (rpl_localtime): New function.
2593
2594 2002-05-22  Jim Meyering  <meyering@lucent.com>
2595
2596         * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
2597         * file-type.h: New file.
2598         * file-type.c (file_type): New file/function.  Extracted from diffutils.
2599
2600 2002-04-29  Paul Eggert  <eggert@twinsun.com>
2601
2602         * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
2603
2604 2002-04-28  Paul Eggert  <eggert@twinsun.com>
2605
2606         * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
2607         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
2608         of 127, since 64 is the largest conceivable number for ancient
2609         nonstandard hosts.
2610         * sig2str.c: Do not include <sys/wait.h>; no longer needed.
2611
2612 2002-04-28  Jim Meyering  <meyering@lucent.com>
2613
2614         * sig2str.c (WTERMSIG): Remove definition (unused).
2615
2616 2002-04-28  Paul Eggert  <eggert@twinsun.com>
2617
2618         * sig2str.h, sig2str.c: New files.
2619         * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
2620
2621 2002-04-24  Jim Meyering  <meyering@lucent.com>
2622
2623         * gettext.h: New file, from Gettext.
2624         * Makefile.am (INCLUDES): Remove -I../intl.
2625         (libfetish_a_SOURCES): Add gettext.h.
2626
2627 2002-04-16  Jim Meyering  <meyering@lucent.com>
2628
2629         * readutmp.h (UT_TYPE): Remove definition (now in who.c).
2630         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
2631         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
2632
2633 2002-04-12  Jim Meyering  <meyering@lucent.com>
2634
2635         * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
2636
2637 2002-03-10  Jim Meyering  <meyering@lucent.com>
2638
2639         * makepath.c (make_path): Remove a comma from a diagnostic.
2640         Suggestion from Santiago Vila.
2641
2642 2002-03-08  Jim Meyering  <meyering@lucent.com>
2643
2644         * rename.c: Mention that this wrapper is needed also on
2645         mips-dec-ultrix4.4 systems.
2646
2647 2002-03-02  Jim Meyering  <meyering@lucent.com>
2648
2649         * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
2650         not HAVE_CLOCK_SETTIME.
2651
2652 2002-02-27  Paul Eggert  <eggert@twinsun.com>
2653
2654         * nanosleep.h: Rename to....
2655         * timespec.h: New name for nanosleep.h.  All uses changed.
2656
2657         * gettime.c: New file.
2658         * settime.c: New file.
2659         * stime.c: Remove.
2660
2661         * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
2662         timespec.h.  Remove nanosleep.h.
2663
2664 2002-02-25  Paul Eggert  <eggert@twinsun.com>
2665
2666         * acl.c, acl.h: New files.
2667         * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
2668
2669 2002-02-24  Jim Meyering  <meyering@lucent.com>
2670
2671         * strnlen.c (strnlen): Define-away/undef so that an inconsistent
2672         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
2673         cause trouble.  Reported by Nelson Beebe.
2674
2675 2002-02-23  Paul Eggert  <eggert@twinsun.com>
2676
2677         * path-concat.c (xpath_concat): Reorder code to pacify
2678         compilers that don't know that xalloc_die never returns.
2679
2680 2002-02-20  Jim Meyering  <meyering@lucent.com>
2681
2682         * getdate.c: Regenerate using bison-1.33.
2683
2684 2002-02-15  Paul Eggert  <eggert@twinsun.com>
2685
2686         * posixver.c, posixver.h: New files.
2687         * Makefile.am (libfetish_a_SOURCES): Add them.
2688
2689 2002-02-02  Paul Eggert  <eggert@twinsun.com>
2690             Bruno Haible  <bruno@clisp.org>
2691
2692         * unicodeio.h (print_unicode_char): Add exit_on_error argument.
2693         (fwrite_success_callback): New declaration.
2694         * unicodeio.c (unicode_to_mb): New function, extracted from
2695         print_unicode_char. Call failure callback instead of error.
2696         (fwrite_success_callback): New function.
2697         (exit_failure_callback): New function.
2698         (fallback_failure_callback): New function.
2699         (print_unicode_char): Call unicode_to_mb.
2700
2701 2002-01-26  Jim Meyering  <meyering@lucent.com>
2702
2703         * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
2704
2705 2002-01-22  Jim Meyering  <meyering@lucent.com>
2706
2707         * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
2708         Otherwise, some versions of automake would omit the rule that makes
2709         Makefile from Makefile.in.
2710
2711 2001-01-21  Paul Eggert  <eggert@twinsun.com>
2712
2713         * xmemcoll.h, xmemcoll.c: New files.
2714         * Makefile.am (libfetish_a_SOURCES): Add them.
2715         * memcoll.c: Include errno.h, and declare errno if not defined.
2716         (memcoll): Set errno to zero if there is no error.
2717
2718         * quotearg.c (quotearg_buffer_restyled):
2719         Fix bug with quoting buffers containing NUL when backslashing escapes.
2720         This bug was exposed by the other changes in this patch.
2721         (quotearg_n_options): New arg ARGSIZE.
2722         All callers changed.
2723         (quoting_options_from_style): New function.
2724         (quotearg_n_style): Use it.
2725         (quotearg_n_style_mem): New function.
2726
2727         * quotearg.h (quotearg_n_style_mem): New function.
2728
2729 2002-01-16  Jim Meyering  <meyering@lucent.com>
2730
2731         * getdate.y: Add three semicolons, each just before a closing brace.
2732         Bison (as of version 1.31) no longer papers over that mistake.
2733
2734 2002-02-14  Paul Eggert  <eggert@twinsun.com>
2735
2736         * backupfile.c (ISDIGIT): Comment fix.
2737         * getdate.y (ISDIGIT): Likewise.
2738         * posixtm.c (ISDIGIT, year): Likewise.
2739         * strverscmp.c (ISDIGIT): Likewise.
2740         * userspec.c (ISDIGIT): Likewise.
2741
2742 2002-01-05  Jim Meyering  <meyering@lucent.com>
2743
2744         * version-etc.c (version_etc_copyright): Update copyright year.
2745
2746 2001-01-19  Paul Eggert  <eggert@twinsun.com>
2747
2748         * closeout.c (close_stdout_status): If ferror (stdout), do
2749         not silently exit merely because the output buffer happens to
2750         have nothing pending.
2751
2752 2001-12-18  Paul Eggert  <eggert@twinsun.com>
2753
2754         See the big note in ../ChangeLog.
2755         * human.c (suffixes): Prefer K to k for 1024.
2756         (generate_suffix_backwards): New function.
2757         (human_readable_inexact): Use it.
2758         * xstrtol.c (__xstrtol): If there is no number but there
2759         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
2760         Accept 'K' as well as 'k'.
2761
2762 2001-12-15  Jim Meyering  <meyering@lucent.com>
2763
2764         * regex.h (__restrict_arr): Update from libc.
2765
2766         * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
2767         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
2768         (STREQ): Define.
2769
2770 2001-12-10  Jim Meyering  <meyering@lucent.com>
2771
2772         * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
2773         Instead, include "xalloc.h".
2774         (initbuffer): Don't cast xmalloc return value to char*.
2775         (readline): Reword comment.
2776         Don't cast xrealloc return value to char*
2777         Return NULL, not 0.
2778
2779 2001-12-09  Jim Meyering  <meyering@lucent.com>
2780
2781         * modechange.c (mode_compile): Add cast to avoid pedantic warning about
2782         `signed and unsigned type in conditional expression'.
2783         * posixtm.c (posix_time_parse): Likewise.
2784
2785         * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
2786
2787         * readtokens.c (readtoken): Declare an index to be of type unsigned
2788         to avoid a pedantic warning.
2789
2790         * getstr.c: Don't include assert.h.
2791         (getstr): Remove warning-evoking assertions.
2792         Return -1 if offset parameter is out of bounds.
2793         Change the type of a local from int to size_t.
2794
2795         * strftime.c (my_strftime_localtime_r): Include this function
2796         definition in the `#if ! HAVE_TM_GMTOFF' block.
2797
2798         * xgethostname.c: Remove declarations of xmalloc and xrealloc.
2799         Include xalloc.h instead.
2800
2801 2001-12-02  Jim Meyering  <meyering@lucent.com>
2802
2803         * tempname.c: Don't declare getenv, thus reverting the change of
2804         2001-11-18.  It's no longer necessary, now that stdlib.h is always
2805         included.
2806
2807         * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
2808         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
2809
2810 2001-11-30  Akim Demaille  <akim@epita.fr>
2811
2812         * xstrdup.c: Include xalloc.h, so that xstrdup is declared
2813         before being defined.
2814
2815 2001-11-27  Paul Eggert  <eggert@twinsun.com>
2816
2817         * quotearg.h (quotearg_n, quotearg_n_style):
2818         First arg is int, not unsigned.
2819         * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
2820         (SIZE_MAX, UINT_MAX): New macros.
2821         (quotearg_n_options): Abort if N is negative.
2822         Avoid overflow check on hosts where size_t is 64 bits and int
2823         is 32 bits, as overflow is impossible there.
2824         Fix off-by-one typo that caused unnecessary reallocation.
2825
2826 2001-11-27  Jim Meyering  <meyering@lucent.com>
2827
2828         * tempname.c: Merge with version from libc.
2829         * regex.c: Likewise.
2830
2831         * tempname.c: Include stdlib.h unconditionally.  On some old systems
2832         for which STDC_HEADERS is 0, it was not included, resulting in a
2833         warning about an integer-to-pointer conversion problem with getenv.
2834         Reported by Volker Borchert.
2835
2836 2001-11-26  Jim Meyering  <meyering@lucent.com>
2837
2838         * gtod.h: Remove file.
2839         * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
2840         * gettimeofday.c: Don't include gtod.h.
2841         (GTOD_init): Remove function.
2842         (rpl_gettimeofday): Do its job here instead, rather than aborting.
2843         Suggestion from Volker Borchert.
2844
2845 2001-11-23  Jim Meyering  <meyering@lucent.com>
2846
2847         * hash.h (struct hash_table): Don't define here.  Merely declare it.
2848         * hash.c (struct hash_table): Define it here instead.
2849
2850 2001-11-22  Jim Meyering  <meyering@lucent.com>
2851
2852         * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
2853
2854 2001-11-18  Paul Eggert  <eggert@twinsun.com>
2855
2856         * tempname.c (TMP_MAX): Remove; no longer needed.
2857         (TEMPORARIES): New macro.
2858         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
2859         removes an artificial limitation (e.g. HP-UX 10.20, where
2860         TMP_MAX is 17576).
2861
2862 2001-11-18  Jim Meyering  <meyering@lucent.com>
2863
2864         * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
2865         on SunOS 4.
2866
2867         * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
2868         files will be created before anything else.
2869
2870 2001-11-17  Jim Meyering  <meyering@lucent.com>
2871
2872         * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
2873         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
2874         rather than group writable.  Patch by Juan F. Codagnone.
2875
2876         * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
2877         Instead, include "xalloc.h".
2878
2879         * mountlist.c: Include unlocked-io.h after all system headers.
2880         Remove explicit declarations of xmalloc, xrealloc,
2881         and xstrdup.  Instead, include "xalloc.h".
2882
2883         * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
2884         * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
2885         * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
2886
2887         * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
2888         Reported by Padraig Brady.
2889
2890         * mkstemp.c: #undef mkstemp.
2891         Include config.h.
2892         (rpl_mkstemp): Rename from mkstemp.
2893         Protoize.
2894
2895 2001-11-16  Jim Meyering  <meyering@lucent.com>
2896
2897         * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
2898         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
2899         determine the amount of total physical memory, use pstat_getstatic.
2900         HPUX-11 doesn't define _SC_PHYS_PAGES.
2901         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
2902         If sysconf couldn't be used to determine the amount of available
2903         physical memory, use both pstat_getstatic and pstat_getdynamic.
2904         Based on a patch from Bob Proulx.
2905
2906 2001-11-05  Jim Meyering  <meyering@lucent.com>
2907
2908         * xstat.in (slash_aware_lstat): Correct a misleading comment.
2909
2910 2001-11-03  Jim Meyering  <meyering@lucent.com>
2911
2912         * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
2913         in argmatch_to_argument call.
2914
2915         * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
2916         argument.
2917
2918         * hash.c (hash_clear): Fix a bug that could lead to an infloop or
2919         e.g., a fault due to an attempt to free a NULL pointer.
2920
2921 2001-11-01  Jim Meyering  <meyering@lucent.com>
2922
2923         * dirfd.c, dirfd.h: New files.
2924         * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
2925
2926         * hash.c (hash_print) [TESTING]: Clean up.
2927
2928 2001-10-22  Paul Eggert  <eggert@twinsun.com>
2929
2930         * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
2931         to avoid a warning if -Wall.
2932
2933 2001-10-21  Paul Eggert  <eggert@twinsun.com>
2934
2935         * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
2936
2937 2001-10-21  Jim Meyering  <meyering@lucent.com>
2938
2939         * obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
2940         this code would end up calling gettext even in packages built
2941         with --disable-nls.
2942         * getopt.c (_): Likewise.
2943         * regex.c (_): Likewise.
2944
2945 2001-10-20  Paul Eggert  <eggert@twinsun.com>
2946
2947         * error.c (strerror_r): Do not declare unless !_LIBC.
2948         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
2949         Use strerror_r that is only a macro, even if it is not a function.
2950         (strerror): Check for HAVE_DECL_STRERROR before declaring.
2951         (private_strerror): Use prototypes, not old-style function definition.
2952         (print_errno_message): New function.
2953         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
2954         char*-flavored one.
2955         (error_tail, error, error_at_line): Use it.
2956
2957 2001-10-11  Jim Meyering  <meyering@lucent.com>
2958
2959         * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
2960         and quote_n (1, ... to avoid clobbering a buffer.
2961
2962 2001-10-05  Jim Meyering  <meyering@lucent.com>
2963
2964         * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
2965         * hash-pjw.c: New file (factored out of fileutils' remove.c).
2966         * hash-pjw.h: New file.
2967
2968 2001-09-30  Jim Meyering  <meyering@lucent.com>
2969
2970         * mountlist.c [MOUNTED_GETFSSTAT]:
2971         Include <sys/ucred.h>, for Apple Darwin.
2972         Include sys/mount.h and sys/fs_types.h only if available.
2973         (FS_TYPE): Define.
2974         (read_filesystem_list): Use FS_TYPE.
2975
2976 2001-09-29  Paul Eggert  <eggert@twinsun.com>
2977
2978         * exclude.c (excluded_filename): 0 -> false, since it's
2979         a boolean context.
2980
2981 2001-09-28  Paul Eggert  <eggert@twinsun.com>
2982
2983         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
2984         #defines strtoimax.  Also treat the other strto* functions
2985         like strtoimax.
2986
2987         * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
2988         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
2989         (strtoimax, strtoumax): Do not declare if already defined as a macro.
2990
2991 2001-09-26  Jim Meyering  <meyering@lucent.com>
2992
2993         Most macros in unlocked-io.h had the wrong number of arguments.
2994         * gen-uio: New script.
2995         (USE_UNLOCKED_IO): Define to 1 if not already defined.
2996         * unlocked-io.hin: Remove file.
2997         * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
2998         rather than trying to embed it here.
2999         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
3000         Reported by Padraig Brady.
3001
3002 2001-09-25  Volker Borchert  <bt@teknon.de>
3003
3004         * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
3005
3006 2001-09-23  Jim Meyering  <meyering@lucent.com>
3007
3008         * mountlist.c: Remove useless parentheses in #if directives.
3009         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
3010         the deprecated MOUNTED symbol is no longer defined in mntent.h.
3011
3012 2001-09-22  Jim Meyering  <meyering@lucent.com>
3013
3014         * localcharset.c: Update from latest gettext.
3015         * config.charset: Likewise.
3016
3017 2001-09-20  Jim Meyering  <meyering@lucent.com>
3018
3019         * xstrtol.c (strtoimax): Guard declaration with
3020         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
3021         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
3022         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
3023         (strtoumax): Likewise, for completeness (it wasn't necessary).
3024
3025 2001-09-06  Paul Eggert  <eggert@twinsun.com>
3026
3027         * strtoimax.c (HAVE_LONG_LONG):
3028         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
3029         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
3030         to work around bug in IBM C compiler.
3031
3032 2001-09-16  Jim Meyering  <meyering@lucent.com>
3033
3034         * mkdir.c: New file.
3035
3036 2001-09-04  Paul Eggert  <eggert@twinsun.com>
3037
3038         * xgetcwd.c: Revert some of the previous change; intead,
3039         fix the HAVE_GETCWD_NULL code to behave more like the
3040         !HAVE_GETCWD_NULL code used to.
3041
3042         Include "xalloc.h".
3043         (xgetcwd): Do not return NULL when memory is exhausted; instead,
3044         invoke xalloc_die.
3045
3046 2001-09-04  Paul Eggert  <eggert@twinsun.com>
3047
3048         * xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
3049         Use ssize_t, not int, to store result of readlink.
3050         Check for ssize_t overflow as well as size_t overflow,
3051         as POSIX says the result of readlink is implementation-defined
3052         when ssize_t overflows.
3053         Remove unnecessary cast to char*.
3054         Use free+malloc instead of realloc, as the storage doesn't need
3055         to be preserved and it's clearer and can be more efficient that way.
3056         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
3057         * xreadlink.h (xreadlink): Update prototype.
3058
3059 2001-09-03  Paul Eggert  <eggert@twinsun.com>
3060
3061         * exclude.c (fnmatch_no_wildcards): Fix confusion between
3062         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
3063         spotted by Jim Meyering.
3064
3065 2001-09-03  Jim Meyering  <meyering@lucent.com>
3066
3067         * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
3068
3069 2001-09-03  Paul Eggert  <eggert@twinsun.com>
3070
3071         * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
3072         like the HAVE_GETCWD_NULL code.
3073         Include pathmax.h if not HAVE_GETCWD.
3074         Do not include xalloc.h.
3075         (INITIAL_BUFFER_SIZE): New symbol.
3076         Do not use xmalloc / xrealloc, since the caller is responsible for
3077         handling errors.  Preserve errno around `free' during failure.
3078         Do not overrun buffer when using getwd.
3079
3080 2001-09-03  Paul Eggert  <eggert@twinsun.com>
3081
3082         * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
3083         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
3084
3085 2001-09-02  Jim Meyering  <meyering@lucent.com>
3086
3087         * error.c: Update from GNU libc.
3088
3089 2001-09-01  Jim Meyering  <meyering@lucent.com>
3090
3091         * xreadlink.c: New file.
3092         * xreadlink.h: New file.
3093         * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
3094
3095         * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
3096         doesn't conflict with sparc Solaris 7's definition in
3097         /usr/include/sys/int_types.h.
3098
3099         * exclude.c: Use `""', not `<>' to #include non-system header files.
3100         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
3101         and strncasecmp as r-values.  Unixware didn't have declarations.
3102
3103 2001-08-31  Jim Meyering  <meyering@lucent.com>
3104
3105         * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
3106         Use an initial, malloc'd, buffer of length 128 rather than
3107         a statically allocated one of length 1024.
3108
3109 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3110
3111         * xgetcwd.c: Don't include pathmax.h.
3112         Include stdlib.h and unistd.h if available.
3113         Include xalloc.h.
3114         (xmalloc, xstrdup, free): Remove decls.
3115         (xgetcwd): Don't assume sizes fit in unsigned.
3116         Check for overflow when computing sizes.
3117         Simplify reallocation code.
3118
3119 2001-08-28  Paul Eggert  <eggert@twinsun.com>
3120
3121         * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
3122
3123         * strtoimax.c: Renamed from strtoxmax.c, removing the
3124         old strtoimax.c.
3125
3126         Also, make the following further changes to make this file's
3127         configuration more similar to that of strtol.c:
3128         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
3129         (strtoumax, uintmax_t, strtoull, strtol): Remove.
3130         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
3131         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
3132         changed to signed values.
3133
3134         And make the following changes as well:
3135         Fix copyright notice, as 1999 was missing.
3136         (verify): New macro.
3137         (strtoimax): Check sizes at compile-time, not run-time.
3138         Prefer strtol to strtoll if both work.
3139         (main): Remove; it was not that useful and was a pain to maintain.
3140
3141         * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
3142
3143 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3144
3145         * savedir.c (savedir): Remove size parameter, as POSIX says that
3146         a directory's st_size can have an arbitrary value, so the old
3147         usage could waste an arbitrary amount of memory.  All uses
3148         changed.
3149         * savedir.h: Update prototype.
3150
3151 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3152
3153         * xstrtol.c (strtoimax): New decl.
3154
3155 2001-08-28  Paul Eggert  <eggert@twinsun.com>
3156
3157         * xstrtol.h: Add copyright notice.
3158         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
3159         LONGINT_INVALID_SUFFIX_CHAR.
3160
3161 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3162
3163         * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
3164         tm to be declared.
3165
3166 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3167
3168         * hash.c: Remove '2001' from copyright notice.
3169
3170 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3171
3172         * full-write.h: New file.
3173         * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
3174         * full-write.c: Correct credits, as cccp.c no longer
3175         exists and anyway it was so heavily changed from the old cccp
3176         code as to be unrecognizable.  Include full-write.h.
3177         (full_write) Return size_t, with short writes meaning failure.
3178         All callers changed.  This fixes a bug with large buffers
3179         on 64-bit hosts.
3180         * utime.c: Include full-write.h.
3181
3182 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3183
3184         Merge 'exclude' changes from tar 1.13.22.
3185         This fixes one or two unlikely storage allocation overflow bugs,
3186         but doesn't change user-visible behavior otherwise.
3187
3188 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3189
3190         * exclude.c (bool): Declare, perhaps by including stdbool.h.
3191         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
3192         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
3193         Include if available.
3194         (<xalloc.h>): Include
3195         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
3196         (verify): New macro.  Use it to verify that EXCLUDE macros do not
3197         collide with FNM macros.
3198         (struct patopts): New struct.
3199         (struct exclude): Use it, as exclude patterns now come with options.
3200         (new_exclude): Support above changes.
3201         (new_exclude, add_exclude_file):
3202         Initial size must now be a power of two to simplify overflow checking.
3203         (free_exclude, fnmatch_no_wildcards): New function.
3204         (excluded_filename): No longer requires options arg, as the options
3205         are determined by add_exclude.  Now returns bool, not int.
3206         (excluded_filename, add_exclude):
3207         Add support for the fancy new exclusion options.
3208         (add_exclude, add_exclude_file): Now takes int options arg.
3209         Check for arithmetic overflow when computing sizes.
3210         (add_exclude_file): xrealloc might modify errno, so don't
3211         realloc until after errno might be used.
3212
3213         * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
3214         New macros.
3215         (free_exclude): New decl.
3216         (add_exclude, add_exclude_file): Now takes int options arg.
3217         (excluded_filename): No longer requires options arg, as the options
3218         are determined by add_exclude.  Now returns bool, not int.
3219
3220 2001-08-30  Paul Eggert  <eggert@twinsun.com>
3221
3222         * alloca.c (alloca): Arg is of type size_t, not unsigned.
3223
3224 2001-08-27  Jim Meyering  <meyering@lucent.com>
3225
3226         * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
3227
3228         * version-etc.c (N_): Remove definition.
3229         Revert most of last change.
3230         Instead, simply don't mark the `Copyright...' string for translation.
3231         Based on advice from Paul Eggert.
3232
3233         * strtoxmax.c: Tweak comment.
3234
3235 2001-08-26  Jim Meyering  <meyering@lucent.com>
3236
3237         * version-etc.c (version_etc_copyright_fmt): Replace literal year
3238         of copyright with `%s' so translators don't get an untranslated
3239         message in 2002.
3240         (COPYRIGHT_YEAR): Define.
3241         (version_etc): Use fprintf rather than fputs.
3242         Suggestion from Ulrich Drepper.
3243
3244         * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
3245
3246         * strtoll.c: New file, from GNU libc.
3247         * xstrtoimax.c: New file.
3248
3249         * xstrtol.h: Add xstrtoimax.
3250         * strtoumax.c: New file.  Simply include "strtoumax.c".
3251         * strtoimax.c: New file.  Likewise, but first define STRTOUXMAX_SIGNED.
3252
3253         * strtoumax.c: Factor to work both for unsigned and signed types, ...
3254         * strtoxmax.c: ... then renamed to this.
3255
3256 2001-08-13  Paul Eggert  <eggert@twinsun.com>
3257
3258         * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
3259         Port to Solaris 8, where 'sed' requires a space after the 'r'
3260         command, and where sh dislikes "$/".  Clean up the spacing a bit.
3261         Redirect output to $tmp just once.
3262
3263 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
3264
3265         * addext.c (<errno.h>): Include.
3266         (errno): Declare if not defined.
3267         (addext): Work correctly when pathconf returns -1 and leaves
3268         errno alone because there is no limit.  Also, work even if
3269         pathconf returns a value greater than SIZE_MAX.
3270
3271 2001-08-12  Jim Meyering  <meyering@lucent.com>
3272
3273         * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
3274         Simply `return getcwd (NULL, 0);'.
3275         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
3276         Use 1300 as initial value for length, not PATH_MAX.
3277
3278         * pathmax.h: Clean up cpp syntax.
3279
3280 2001-08-12  Jim Meyering  <meyering@lucent.com>
3281
3282         * gettimeofday.c: New file.
3283         * gtod.h: New file.
3284         * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
3285
3286 2001-08-04  Jim Meyering  <meyering@lucent.com>
3287
3288         * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
3289         to get in sync with glibc.
3290
3291 2001-08-03  Paul Eggert  <eggert@twinsun.com>
3292
3293         The following changes are from gettext 0.10.39 as maintained by
3294         Bruno Haible.
3295
3296         * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
3297         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
3298         with inverted sense.  All uses changed.
3299
3300         * mbswidth.c: Don't include <limits.h>.
3301         Include <stdlib.h> and <string.h> unconditionally.
3302         (iswcntrl, mbsinit, ISCNTRL): New macros.
3303         (mbsnwidth): Use K&R style function declarations.
3304         Don't bother checking for MB_LEN_MAX == 1, since the compiler
3305         can optimize it when MB_CUR_MAX == 1.
3306         The width of control characters is zero, not 1.
3307
3308 2001-07-15  Jim Meyering  <meyering@lucent.com>
3309
3310         * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
3311         (BUILT_SOURCES): Add unlocked-io.h.
3312         (io_functions): Define.
3313         (unlocked-io.h): New rule.
3314         (DISTCLEANFILES): Add unlocked-io.h.
3315         (all-local): Depend on unlocked-io.h, to ensure it is created.
3316
3317         * unlocked-io.hin: New file
3318
3319         * regex.c: Update from glibc.
3320
3321 2001-07-05  Jim Meyering  <meyering@lucent.com>
3322
3323         * Makefile.am (noinst_HEADERS): Remove definition, per new automake
3324         recommendation.
3325         (libfetish_a_SOURCES): Put all .h files here instead.
3326         Remove a thus-exposed (better checks in automake) duplicate and
3327         two unnecessary .h files.
3328
3329 2001-06-11  Jim Meyering  <meyering@lucent.com>
3330
3331         * regex.c: Update from GNU libc.
3332
3333 2001-05-27  Jim Meyering  <meyering@lucent.com>
3334
3335         * readutmp.h (UT_TYPE): Define.
3336
3337 2001-05-24  Jim Meyering  <meyering@lucent.com>
3338
3339         * argmatch.c: Include "quote.h".
3340         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
3341         quote function.  Reported by Göran Uddeborg.
3342
3343 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
3344
3345         * dirname.c (dir_name): Compute append_dot using path, not newpath
3346         which is not yet declared.
3347
3348 2001-05-11  Paul Eggert  <eggert@twinsun.com>
3349
3350         * Makefile.am (libfetish_a_SOURCES):
3351         Add strftime.c, since we now compile it on all hosts.
3352
3353         * strftime.c (my_strftime):
3354         Define to nstrftime if emacs, but only if my_strftime is not defined.
3355         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
3356         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
3357         Add one more extra argument: a nanoseconds value.
3358         All uses changed.
3359         (ns): New macro.
3360         (my_strftime function): Add %N format.
3361         (emacs_strftimeu): Renamed from emacs_strftime,
3362         with extra ut argument.
3363
3364 2001-05-11  Paul Eggert  <eggert@twinsun.com>
3365
3366         dirname code cleanup.  base_name now behaves more compatibly
3367         with POSIX basename when given file names that have trailing
3368         slashes, and similarly for dir_name.  Add new primitives
3369         base_len and dir_len.  Put the directory-name-related decls
3370         into dirname.h.
3371
3372         * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
3373         * backupfile.c (base_name): Likewise.
3374         * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
3375         * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
3376         * makepath.c (strip_trailing_slashes): Likewise.
3377         * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
3378         Likewise.
3379         * rename.c (strip_trailing_slashes): Likewise.
3380         * same.c (base_name): Likewise.
3381         * stripslash.c (ISSLASH): Likewise.
3382
3383         * addext.c: Include <dirname.h> after size_t is defined.
3384         * backupfile.c: Likewise.
3385
3386         * addext.c (addext): Use base_len to trim redundant
3387         trailing slashes instead of doing it ourselves.
3388         But do not trim the last slash if it is not redundant.
3389
3390         * backupfile.c (find_backup_file_name,
3391         max_backup_version): Use base_len instead of rolling it ourselves.
3392         Handle the case of "" and (on DOS) "C:" correctly.
3393
3394         * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
3395         Include <string.h>, <dirname.h>.
3396         (base_name): Allow file names ending in slashes, other than names
3397         that are all slashes.  In this case, return the basename followed
3398         by the slashes.  This is more general, and can be used in places
3399         where the original base_name purposely had an assertion failure.
3400         (base_len): New function.
3401
3402         * dirname.c: Include <string.h> instead of <stdlib.h>.
3403         Do not include <assert.h>; no longer needed.
3404         Include xalloc.h.
3405         (memrchr): Remove decl.
3406         (dir_name_r): Remove.
3407         (dir_len): Renamed from dirlen.  All callers changed.
3408         Rewrite in terms of base_name, for simplicity and consistency.
3409         (dir_name): Never return NULL.  All callers changed.
3410         Do not include <stdlib.h> in test program; no longer needed.
3411         return 0; is fine for test program.
3412
3413         * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
3414         New macros.
3415         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
3416
3417         * path-concat.c (path_concat): Use base_len to compute
3418         base length, not strlen; this means we cannot rely on memcpy
3419         to null-terminate.
3420
3421         * same.c (STREQ): Remove.
3422         (same_name): Handle the case where the basename ends in trailing '/'.
3423
3424         * stripslash.c (strip_trailing_slashes): Return nonzero if
3425         a slash was stripped.  Do not strip the last slash after a
3426         file system prefix.
3427
3428 2001-04-08  Jim Meyering  <meyering@lucent.com>
3429
3430         * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
3431         recomputed; that's necessary when the offset spans a DST transition.
3432         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
3433
3434 2001-04-02  Jim Meyering  <meyering@lucent.com>
3435
3436         * regex.h, regex.c: Update from GNU libc.
3437
3438 2001-03-19  Paul Eggert  <eggert@twinsun.com>
3439
3440         * version-etc.c (version_etc_copyright): Update to 2001.
3441
3442 2001-03-16  Paul Eggert  <eggert@twinsun.com>
3443
3444         * tempname.c (uint64_t): Define to uintmax_t if
3445         not defined, and if UINT64_MAX is not defined.
3446         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
3447         Reported by John David Anglin.
3448
3449 2001-03-10  Bruno Haible  <haible@clisp.cons.org>
3450
3451         * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
3452         alias if codeset is empty.
3453         * config.charset (BeOS): Use wildcard syntax.
3454
3455 2001-03-13  Jim Meyering  <meyering@lucent.com>
3456
3457         * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
3458         Don't insert a backslash when concatenating e.g., `C:' and `foo'.
3459         From Bruno Haible.
3460
3461 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
3462
3463         * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
3464         Don't return NULL.
3465         * unicodeio.c (print_unicode_char): Simplify accordingly.
3466
3467 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
3468
3469         * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
3470         support for DOS/DJGPP.
3471
3472 2001-02-28  Paul Eggert  <eggert@twinsun.com>
3473
3474         * Makefile.am (libfetish_a_SOURCES):
3475         Add dup-safer.c, fopen-safer.c.
3476         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
3477
3478         * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
3479
3480 2001-02-25  Paul Eggert  <eggert@twinsun.com>
3481
3482         The mkstemp replacement is taken from glibc 2.2.2, with some
3483         portability fixes for use outside glibc, as follows:
3484
3485         * tempname.c (struct_stat64): New macro.
3486         (direxists, __gen_tempname): Use it.
3487         This avoids a portability problem with Solaris 8.
3488
3489         * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
3490         (<stddef.h>, <stdint.h>, <string.h>):
3491         Include only if STDC_HEADERS || _LIBC.
3492         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
3493         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
3494         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
3495         (__set_errno): Define this macro if <errno.h> doesn't.
3496         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
3497         Define these macros if <stdio.h> doesn't.
3498         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
3499         Define these macros if <sys/stat.h>
3500         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
3501         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
3502         __xstat64): Define if not _LIBC.
3503         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
3504         (__gen_tempname): Invoke gettimeofday only if
3505         HAVE_GETTIMEOFDAY || _LIBC;
3506         otherwise, fall back on plain "time".
3507         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
3508
3509         * mkstemp.c (__GT_FILE): Define to zero if not defined.
3510
3511         * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
3512
3513 2001-02-17  Jim Meyering  <meyering@lucent.com>
3514
3515         * strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
3516         around included file name.
3517
3518         * strnlen.c (__strnlen): Merge in a change from GNU libc.
3519
3520         * strftime.c: Update from GNU libc (the only changes were to comments).
3521
3522 2001-02-13  Bruno Haible  <haible@clisp.cons.org>
3523
3524         * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
3525
3526 2001-02-17  Paul Eggert  <eggert@twinsun.com>
3527
3528         * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
3529         Remove workaround macros for hosts that have mbrtowc but not
3530         mbstate_t, as we now insist on proper declarations for both
3531         before using mbrtowc.
3532
3533 2001-02-17  Jim Meyering  <meyering@lucent.com>
3534
3535         * regex.c: Update from libc.
3536
3537 2001-02-16  Paul Eggert  <eggert@twinsun.com>
3538
3539         * alloca.c (malloc): Undef before defining, since stdlib.h
3540         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
3541         Reported by Mark Hounschell via Paul Eggert.
3542
3543 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
3544
3545         * config.charset: Update for FreeBSD 4.2.
3546
3547 2001-01-26  Jim Meyering  <meyering@lucent.com>
3548
3549         * quotearg.c: Include stddef.h.
3550         * quote.c: Include stddef.h.
3551         Reported by Axel Kittenberger.
3552
3553         * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
3554         line in double quotes so that it evokes a better diagnostic.
3555         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
3556         Reported by Axel Kittenberger.
3557
3558 2001-01-15  Bruno Haible  <haible@clisp.cons.org>
3559
3560         * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
3561         to avoid a warning.  Add back 'const' to inptr.
3562
3563 2001-01-16  Jim Meyering  <meyering@lucent.com>
3564
3565         * basename.c: Include <stdio.h>, needed by assert on SunOS 4.
3566         From Bruno Haible.
3567
3568 2001-01-14  Jim Meyering  <meyering@lucent.com>
3569
3570         * rename.c: New file.  From Volker Borchert.
3571         Include stdlib.h, string.h or strings.h, and xalloc.h.
3572         Use strip_trailing_slashes rather than open-coding it.
3573
3574 2001-01-03  Paul Eggert  <eggert@twinsun.com>
3575
3576         * strftime.c: Sync with glibc time/strftime.c 1.81.
3577
3578 2001-01-03  Jim Meyering  <meyering@lucent.com>
3579
3580         * unicodeio.c (print_unicode_char): Remove `const' from declaration of
3581         local `inptr' to avoid warning with some system declarations of iconv.
3582
3583 2000-12-29  Paul Eggert  <eggert@twinsun.com>
3584
3585         * modechange.c: Do not assume that mode_t uses the
3586         traditional octal encoding.  E.g. "chmod 1 FOO" should set
3587         the other-execute bit of FOO even if S_IXOTH != 1.
3588
3589         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
3590         WOTH, XOTH, ALLM): New macros.
3591         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
3592          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
3593         Use them.
3594         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
3595         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
3596         (mode_compile):
3597         No need to use uintmax_t; unsigned long is long enough.
3598         Don't bother to get suffix since we don't use it.
3599
3600 2000-12-24  Jim Meyering  <meyering@lucent.com>
3601
3602         * hash.c (is_prime): Return explicit boolean values.
3603         (hash_get_first): Return NULL to appease Irix5.6's 89.
3604         Reported by Nelson Beebe.
3605
3606 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
3607
3608         * localcharset.c (locale_charset): Add support for Win32.
3609
3610 2000-12-18  Paul Eggert  <eggert@twinsun.com>
3611
3612         * physmem.h, physmem.c: New files.
3613
3614         * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
3615         (noinst_HEADERS): Add physmem.h.
3616
3617         * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
3618         't' for compatibility with Solaris 8 sort.
3619
3620 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
3621
3622         * config.charset: Add support for BeOS.
3623
3624 2000-12-16  Jim Meyering  <meyering@lucent.com>
3625
3626         * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
3627         SHELLS_FILE to a file name that's useful on djgpp systems.
3628         Include stdlib.h.
3629         (ADDITIONAL_DEFAULT_SHELLS): Define.
3630         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
3631         Based mostly on a patch from Prashant TR.
3632
3633 2000-12-16  Jim Meyering  <meyering@lucent.com>
3634
3635         This bug had a serious impact on chown: `chown N:M FILE' (for integer
3636         N and M) would have treated it like `chown N:N FILE'.
3637
3638         * userspec.c (parse_user_spec): Fix typo: s/u/g/.
3639
3640 2000-10-31  Bruno Haible  <haible@clisp.cons.org>
3641
3642         * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
3643         CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
3644         to the list of canonical encodings. Rename EUC-CN to GB2312.
3645
3646 2000-12-08  Andreas Schwab  <schwab@suse.de>
3647
3648         * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
3649         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
3650
3651 2000-12-07  Jim Meyering  <meyering@lucent.com>
3652
3653         * stripslash.c (ISSLASH): Define.
3654         (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
3655         From Prashant TR.
3656
3657         * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
3658         (dir_name_r): Declare this function as static.
3659         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
3660         manifest itself on a name containing a mix of slashes and
3661         backslashes.
3662         Make this function work with names starting with a DOS-style
3663         drive letter and colon prefix.
3664         (dir_name): Append `.' if necessary.
3665         Based mostly on patches from Prashant TR and Eli Zaretskii.
3666
3667         * dirname.h (dir_name_r): Remove prototype.
3668
3669 2000-12-05  Jim Meyering  <meyering@lucent.com>
3670
3671         * dirname.c (dir_name_r): Add `const' in a few local declarations.
3672
3673 2000-12-04  Jim Meyering  <meyering@lucent.com>
3674
3675         * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
3676         Also include memory.h, stdlib.h, unistd.h if appropriate.
3677         Reported by Andreas Jaeger (conflicting declaration of malloc).
3678
3679 2000-12-02  Jim Meyering  <meyering@lucent.com>
3680
3681         * closeout.h: Make idempotent, to avoid some obscure warnings.
3682
3683 2000-12-01  Paul Eggert  <eggert@twinsun.com>
3684
3685         * memrchr.c: Include <config.h> before any system include file.
3686
3687 2000-11-29  Paul Eggert  <eggert@twinsun.com>
3688
3689         * dirname.c (dir_name_r): Fix typo: int -> size_t.
3690
3691 2000-11-26  Jim Meyering  <meyering@lucent.com>
3692
3693         * memcoll.c: Include sys/types.h.  From Werner Almesberger.
3694
3695 2000-11-22  Paul Eggert  <eggert@twinsun.com>
3696
3697         * strftime.c (my_strftime): Do not invoke mbrlen with a
3698         size of (size_t) -1; it's not portable.
3699
3700 2000-11-17  Akim Demaille  <akim@epita.fr>
3701
3702         * obstack.h: Formatting changes.
3703         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
3704         prevent type checking.
3705         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
3706         cast the value to (void *): assigning a `foo *' to a `void *'
3707         variable is valid.
3708         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
3709
3710 2000-11-17  Jim Meyering  <meyering@lucent.com>
3711
3712         * strstr.c: Update from GNU libc.
3713
3714 2000-11-16  Jim Meyering  <meyering@lucent.com>
3715
3716         * strverscmp.c: Incorporate weak-alias-related changes from glibc.
3717
3718 2000-11-11  Jim Meyering  <meyering@lucent.com>
3719
3720         * error.c: Add a couple #includes, merging from GNU libc version.
3721
3722 2000-11-10  Jim Meyering  <meyering@lucent.com>
3723
3724         * obstack.h: Update from GNU libc.
3725         * obstack.c: Likewise.
3726
3727 2000-11-06  Paul Eggert  <eggert@twinsun.com>
3728
3729         * getusershell.c (setusershell): Use rewind rather than
3730         fseek/fseeko, to avoid configuration hassles with fseeko.
3731         Don't bother opening SHELLS_FILE if shellstream is NULL;
3732         it's not necessary.
3733
3734 2000-11-05  Jim Meyering  <meyering@lucent.com>
3735
3736         * makepath.h (make_dir): Declare.
3737         * makepath.c (make_dir): Remove `static' attribute.
3738         Tweak a comment.
3739
3740 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
3741
3742         * hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
3743         last one in a bucket, advance to the next bucket.
3744
3745 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
3746
3747         * fnmatch.c: Do not comment out all the code if we are using
3748         the GNU C library, because in some cases we are replacing buggy
3749         code in the GNU C library itself.
3750
3751 2000-10-30  Paul Eggert  <eggert@twinsun.com>
3752
3753         * error.h, getline.h, modechange.h:
3754         Remove "2000" from Copyright line, as the file hasn't been
3755         changed this year other than in the copyright notice.
3756
3757         * xalloc.h: Add "2000" to Copyright line, as this file
3758         was changed this year.
3759
3760 2000-10-30  Paul Eggert  <eggert@twinsun.com>
3761
3762         * fnmatch.c (FOLD): Do not assume that characters are unsigned.
3763         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
3764         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
3765
3766 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
3767
3768         * regex.h (__restrict_arr): Move definition out of #ifndef block.
3769         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
3770         doesn't define __restrict_arr.
3771
3772 2000-10-29  Jim Meyering  <meyering@lucent.com>
3773
3774         * xstat.in: Fix grammar in comment.
3775
3776 2000-10-28  Jim Meyering  <meyering@lucent.com>
3777
3778         * memchr.c: Update from libc.
3779         Adjust for portability:
3780         [HAVE_STDLIB_H]: Include stdlib.h.
3781         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
3782         Undef __memchr, too.
3783         [!weak_alias]: Define __memchr to memchr.
3784
3785         * regex.c: Update from libc.
3786         * regex.h: Likewise.
3787         * getopt1.c: Likewise.
3788         * memcmp.c: Likewise.
3789
3790         * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
3791         Avoid using fseek, when possible -- it's broken by design.
3792         Patch by Ulrich Drepper.
3793
3794 2000-10-26  Jim Meyering  <meyering@lucent.com>
3795
3796         * strftime.c: Update from libc.
3797
3798 2000-10-25  Jim Meyering  <meyering@lucent.com>
3799
3800         * obstack.c: Update from libc.
3801
3802 2000-10-23  Jim Meyering  <meyering@lucent.com>
3803
3804         * hard-locale.c (hard_locale): Revert last change -- it was simply
3805         wrong.  That set_locale call must not have any side effects.
3806         From Paul Eggert.
3807
3808 2000-10-22  Jim Meyering  <meyering@lucent.com>
3809
3810         * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
3811         [CYCLIC]: Remove now-unused definition.
3812
3813         * save-cwd.c (O_DIRECTORY): Define, if needed.
3814         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
3815         Suggestion from Ulrich Drepper.
3816
3817 2000-10-21  Jim Meyering  <meyering@lucent.com>
3818
3819         * dirname.c (dir_name_r): New function, factored out of dir_name.
3820         (dir_name): Use dir_name_r.
3821         * dirname.h (dir_name_r): Declare it.
3822
3823 2000-10-21  Jim Meyering  <meyering@lucent.com>
3824
3825         * dirname.c (memrchr): Declare if necessary.
3826         (dir_name): Remove the restriction that there be no
3827         trailing slashes.  Now, this code skips past them, effectively
3828         ignoring them.
3829         [TEST_DIRNAME] (main): New unit tests.
3830
3831         * memrchr.c: New file from GNU libc.
3832         Undef __memrchr, too.
3833         [!weak_alias]: Define __memrchr to memrchr.
3834         Guard weak_alias use with `#ifdef weak_alias'.
3835
3836 2000-10-17  Jim Meyering  <meyering@lucent.com>
3837
3838         * quote.h (PARAMS): Define and use.
3839         Reported by Akim Demaille.
3840
3841         * getopt.c: Update from libc.
3842
3843 2000-10-16  Jim Meyering  <meyering@lucent.com>
3844
3845         * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
3846         From Jan Fedak.
3847
3848 2000-09-25  Jim Meyering  <meyering@lucent.com>
3849
3850         * md5.h (rol): Define (from GnuPG).
3851
3852         * sha.c: Give credit (GnuPG) where due.
3853         (M): Use rol rather than open-coding it.
3854         Add a FIXME comment.
3855
3856 2000-09-21  Jim Meyering  <meyering@lucent.com>
3857
3858         * userspec.c (parse_user_spec): Remove debugging printf I'd added.
3859         Reported by Michael Stone.
3860
3861 2000-09-20  Jim Meyering  <meyering@lucent.com>
3862
3863         * Makefile.am (libfetish_a_SOURCES): Add sha.c.
3864         (noinst_HEADERS): Add sha.h.
3865         Based on code from Scott G. Miller and from GnuPG.
3866
3867 2000-09-15  Jim Meyering  <meyering@lucent.com>
3868
3869         * regex.c: Update from libc.
3870
3871 2000-09-10  Jim Meyering  <meyering@lucent.com>
3872
3873         * getopt.c (_getopt_internal): Update from glibc.
3874
3875 2000-09-09  Jim Meyering  <meyering@lucent.com>
3876
3877         * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
3878         think it should be used as a general replacement for isascii.
3879         * fnmatch.c: Likewise.
3880         * mbswidth.c: Likewise
3881         * regex.c: Likewise.
3882
3883         Don't use atoi.
3884         * userspec.c: Include sys/param.h and limits.h.
3885         Include xstrtol.h.
3886         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
3887         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
3888         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
3889         UID, GID.  Check range.
3890
3891 2000-09-06  Jim Meyering  <meyering@lucent.com>
3892
3893         * getopt.c (_getopt_internal): Update from glibc.
3894
3895 2000-08-30  Jim Meyering  <meyering@lucent.com>
3896
3897         * strftime.c: Merge in changes from GNU libc.
3898
3899 2000-08-26  Jim Meyering  <meyering@lucent.com>
3900
3901         * closeout.c: Include "__fpending.h".
3902         (close_stdout_status): Return right away if there's nothing to flush.
3903
3904         * Makefile.am (noinst_HEADERS): Add __fpending.h.
3905         * __fpending.c: New file.
3906         * __fpending.h: New file.
3907
3908 2000-08-07  Paul Eggert  <eggert@twinsun.com>
3909
3910         Standardize on "memory exhausted" instead of "Memory exhausted"
3911         or "virtual memory exhausted".
3912         * obstack.c (print_and_abort): Use "memory exhausted", not
3913         "virtual memory exhausted".
3914         * same.c (same_name): Invoke xalloc_die instead of printing
3915         our own message.
3916         * userspec.c (parse_user_spec): Likewise.
3917         * bumpalloc.h: comment fix
3918         * same.c, userspec.c: Include xalloc.h.
3919
3920         * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
3921         not char *const and pointing to a constant array.
3922         * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
3923         (xrealloc): Comment fix.
3924
3925         * userspec.c (parse_user_spec):
3926         Don't translate a message until just before returning,
3927         to avoid unnecessary translation.
3928
3929 2000-08-07  Jim Meyering  <meyering@lucent.com>
3930
3931         * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
3932         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
3933         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
3934         getgroups.c, gethostname.c, getopt.h, group-member.c,
3935         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
3936         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
3937         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
3938         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
3939         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
3940         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
3941         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
3942         yesno.c: Back out Copyright date changes for each file with no change
3943         this year.  This eases coordination with other programs using the same
3944         source code modules.  From Paul Eggert.
3945
3946 2000-08-03  Greg McGary  <greg@mcgary.org>
3947
3948         * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
3949         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
3950         (EXTEND_BUFFER): Use them.
3951
3952 2000-08-01  Jim Meyering  <meyering@lucent.com>
3953
3954         * dirname.c (ISSLASH): Define.
3955         (BACKSLASH_IS_PATH_SEPARATOR): Define.
3956         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
3957         both `\' and `/' may be use as path separators.
3958         Based on a patch from Prashant TR.
3959
3960 2000-07-31  Paul Eggert  <eggert@twinsun.com>
3961
3962         * quotearg.c (quotearg_n_options): Don't make the initial
3963         slot vector a constant, since it might get modified.
3964
3965 2000-07-31  Jim Meyering  <meyering@lucent.com>
3966
3967         * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
3968         * obstack.c (print_and_abort): Likewise.
3969
3970 2000-07-30  Paul Eggert  <eggert@twinsun.com>
3971
3972         * quotearg.c (quotearg_n_options): Preallocate a slot 0
3973         buffer, so that the caller can always quote one small
3974         component of a "memory exhausted" message in slot 0.
3975         From a suggestion by Jim Meyering.
3976
3977 2000-07-30  Jim Meyering  <meyering@lucent.com>
3978
3979         * makepath.c (make_path): Quote the other instance, too.
3980
3981         * quotearg.c (N_STATIC_SLOTVECS): Define.
3982         (STATIC_BUF_SIZE): Define.
3983         (quotearg_n_options): Use only statically allocated storage when
3984         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
3985         than STATIC_BUF_SIZE.
3986
3987 2000-07-29  Jim Meyering  <meyering@lucent.com>
3988
3989         * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
3990         * dirname.c (dir_name): Likewise.
3991
3992         * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
3993
3994         * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
3995         (dir_name): Assert that there are no trailing slashes.
3996
3997 2000-07-18  Bruno Haible  <haible@clisp.cons.org>
3998
3999         * mbswidth.h (mbswidth): Add a flags argument.
4000         (mbswidth): New declaration.
4001         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
4002         * mbswidth.c (mbswidth): Add a flags argument.
4003         (mbsnwidth): New function.
4004
4005 2000-07-24  Jim Meyering  <meyering@lucent.com>
4006
4007         * mbswidth.c: Remove useless #else.  From Bruno Haible.
4008
4009 2000-07-23  Paul Eggert  <eggert@twinsun.com>
4010
4011         * mbswidth.c (_XOPEN_SOURCE):
4012         Don't define; this causes problems on Solaris 7.
4013         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
4014
4015 2000-07-23  Paul Eggert  <eggert@twinsun.com>
4016
4017         * quotearg.c:
4018         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
4019         so that mbstate_t is always defined.
4020
4021         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
4022         be 1 in at least one GCC installation, and this configuration
4023         error is likely to be common.  Ignoring MB_LEN_MAX hurts
4024         performance on hosts that have mbrtowc but have only unibyte
4025         locales, but I assume these hosts are rare.
4026
4027 2000-07-23  Paul Eggert  <eggert@twinsun.com>
4028
4029         * quotearg.c: Streamline by invoking multibyte code only if needed.
4030         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
4031         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
4032         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
4033         invoke multibyte primitives.
4034
4035 2000-07-23  Jim Meyering  <meyering@lucent.com>
4036
4037         * basename.c (base_name): Add an assertion.
4038
4039 2000-07-15  Bruno Haible  <clisp.cons.org>
4040
4041         * quotearg.c: When the system forces us to redefine mbstate_t,
4042         shadow its mbsinit function.
4043
4044 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
4045
4046         * mbswidth.h: New file.
4047         * mbswidth.c: New file.
4048         * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
4049         (noinst_HEADERS): Add mbswidth.h.
4050
4051 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
4052
4053         * config.charset: Add support for FreeBSD. Improve support for HP-UX
4054         and IRIX 6.
4055
4056 2000-07-15  Jim Meyering  <meyering@lucent.com>
4057
4058         * makepath.c: Include quote.h.
4059         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
4060         corresponding argument in a `quote (...)' call.
4061         Give better diagnostics.
4062
4063         * Makefile.am (libfetish_a_SOURCES): Add quote.c.
4064         (noinst_HEADERS): Add quote.h.
4065
4066         * quote.c (quote, quote_n): New file.  Two functions taken verbatim
4067         from tar's src/misc.c.
4068         * quote.h: New file.  Prototypes for same.
4069
4070 2000-07-10  Paul Eggert  <eggert@twinsun.com>
4071
4072         From a suggestion by Bruno Haible.
4073         * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
4074         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
4075         to decide whether to define the BeOS workaround macro;
4076         this adjusts to the change to AC_MBSTATE_T.
4077
4078 2000-07-13  Paul Eggert  <eggert@twinsun.com>
4079
4080         * quotearg.h (enum quoting style): New enum clocale_quoting_style.
4081
4082         * quotearg.c (quoting_style_args, quoting_style_vals,
4083         quotearg_buffer_restyled): Add support for
4084         clocale_quoting_style.  Undo previous change to
4085         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
4086         and "{RIGHT QUOTATION MARK}" msgids.
4087
4088 2000-07-05  Paul Eggert  <eggert@twinsun.com>
4089
4090         The old behavior of quoting `like this' doesn't look good with
4091         newer, ISO-style fonts.  See:
4092         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
4093
4094         Instead, quote "like this" by default.  Let the translator
4095         tailor the locale-specific quoting behavior by providing
4096         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
4097
4098         * quotearg.c (N_): New macro.
4099         (gettext_default): New function.
4100         (quotearg_buffer_restyled): Use
4101         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
4102         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
4103
4104 2000-07-09  Jim Meyering  <meyering@lucent.com>
4105
4106         * Most files: Update copyright dates to include 2000.
4107
4108 2000-07-08  Jim Meyering  <meyering@lucent.com>
4109
4110         * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
4111         if not defined.
4112         (xgethostname): Remove now-unnecessary #ifdef.
4113         Move declaration of `err' into loop where it's used.
4114
4115 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
4116
4117         * xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
4118         by allocating a larger buffer. Test the gethostname return value for
4119         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
4120         returns an error and ENAMETOOLONG isn't defined.
4121
4122 2000-07-05  Paul Eggert  <eggert@twinsun.com>
4123         and Bruno Haible  <haible@clisp.cons.org>
4124
4125         * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
4126
4127 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
4128
4129         * quotearg.c (struct quoting_options): Simplify quote_these_too
4130         dimension.
4131
4132 2000-07-03  Jim Meyering  <meyering@lucent.com>
4133
4134         * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
4135         Reported by Bruno Haible.
4136
4137 2000-07-04  Jim Meyering  <meyering@lucent.com>
4138
4139         * quotearg.c: Make inclusion of <wchar.h> independent of whether
4140         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
4141         lacks mbrtowc.
4142
4143 2000-07-03  Paul Eggert  <eggert@twinsun.com>
4144         and Bruno Haible  <haible@clisp.cons.org>
4145
4146         * quotearg.c (mbrtowc):
4147         Assign to *pwc, and return 1 only if result is nonzero.
4148         (iswprint): Use ISPRINT when substituting our own mbrtowc.
4149
4150 2000-07-03  Jim Meyering  <meyering@lucent.com>
4151
4152         * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
4153         This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
4154         From Bob Proulx.
4155
4156 2000-07-02  Jim Meyering  <meyering@lucent.com>
4157
4158         * quotearg.c (mbstate_t): Don't define here.
4159
4160 2000-07-02  Jim Meyering  <meyering@lucent.com>
4161
4162         * nanosleep.c (SIGCONT): Define if not already defined.
4163
4164 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
4165
4166         * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
4167         per change in ../m4/ls-mntd-fs.m4.
4168         (read_filesystem_list): Ignore symbolic links.
4169
4170 2000-06-29  Jim Meyering  <meyering@lucent.com>
4171
4172         * same.c: Include <string.h> or <strings.h>, as appropriate,
4173         for declaration of strcmp.
4174
4175         * long-options.c: Include <stdlib.h>, for declaration of exit.
4176
4177         * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
4178         Avoid warning by casting result to `char *' to remove `const'.
4179
4180 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
4181
4182         * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
4183
4184 2000-06-26  Paul Eggert  <eggert@twinsun.com>
4185
4186         savedir now sets errno on failure and invokes xmalloc to get memory.
4187         Fix a couple of other minor bugs while we're at it.
4188
4189         * savedir.c (<unistd.h>): Do not include; there's no need.
4190         (NAMLEN): Remove macro.
4191         (malloc, realloc): Remove decls.
4192         (stpcpy): Likewise.
4193         ("xalloc.h"): Include.
4194         (NAME_SIZE_DEFAULT): New macro.
4195         (savedir): Use xmalloc / xrealloc to allocate memory.
4196         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
4197         Skip "" directory entries.
4198         Use strlen to calculate directory entry length, since the old method
4199         is rarely used these days and isn't worth supporting.
4200         Don't use a pointer after freeing it.
4201         Check for integer overflow when calculating allocation size.
4202         Use memcpy to copy entries, instead of stpcpy.
4203         Set errno properly when returning NULL.
4204         Check for readdir error.
4205
4206 2000-06-26  Jim Meyering  <meyering@lucent.com>
4207
4208         * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
4209
4210 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
4211
4212         * getusershell.c (xmalloc, xrealloc): Remove functions.
4213         Include xalloc.h.
4214         Don't include <stdlib.h>.  Don't declare malloc, realloc.
4215
4216 2000-06-23  Bruno Haible  <haible@clisp.cons.org>
4217
4218         * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
4219
4220 2000-06-24  Jim Meyering  <meyering@lucent.com>
4221
4222         * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
4223
4224 2000-06-21  Jim Meyering  <meyering@lucent.com>
4225
4226         * getpass.c: New file, from Bruno Haible.  Required for BeOS.
4227
4228 2000-06-19  Paul Eggert  <eggert@twinsun.com>
4229
4230         * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
4231         (mbrtowc, mbstate_t): Define substitutes if
4232         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
4233         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
4234         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
4235
4236 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
4237
4238         * xgetcwd.c (xgetcwd): If the required pathname length is smaller
4239         than 1024, return a memory chunk of least possible size, instead
4240         of size PATH_MAX + 2. In the loop, increment the size proportionally.
4241         Use free/xmalloc instead of xrealloc to avoid copying for very long
4242         paths.
4243
4244 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
4245
4246         * canon-host.c (canon_host): Use malloc and memcpy to copy an
4247         address, not strdup.  Include <stdlib.h> and don't declare free().
4248
4249 2000-06-17  Bruno Haible  <haible@clisp.cons.org>
4250
4251         * path-concat.c (path_concat): Don't access dir[-1] if dir is
4252         the empty string.
4253
4254 2000-06-21  Jim Meyering  <meyering@lucent.com>
4255
4256         * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
4257         (noinst_HEADERS): Add getstr.h.
4258
4259         * getline.c (getstr): Move into a separate file.
4260         * getstr.c (getstr): New file, extracted from getline.c, with
4261         the following changes: new parameter, delim2; both delim[12]
4262         parameters have type `int', not `char'.  The latter would lose
4263         with 8-bit delimiters.
4264         * getstr.h: New file.
4265
4266 2000-06-19  Jim Meyering  <meyering@lucent.com>
4267
4268         * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
4269
4270 2000-06-18  Jim Meyering  <meyering@lucent.com>
4271
4272         * mkdir.c: Remove file, due mainly to copyright incompatibility.
4273         Besides, these days every porting target provides a mkdir function.
4274
4275         * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
4276         (this snippet comes from src/system.h).
4277
4278 2000-06-15  Paul Eggert  <eggert@twinsun.com>
4279
4280         * human.c (adjust_value): New function.
4281         (human_readable_inexact): Apply rounding style even when
4282         printing approximate values.
4283
4284 2000-06-14  Paul Eggert  <eggert@twinsun.com>
4285
4286         * human.c (human_readable_inexact): Allow an input block
4287         size that is not a multiple of the output block size, and vice versa.
4288         Reported by Piergiorgio Sartor.
4289
4290 2000-06-14  Paul Eggert  <eggert@twinsun.com>
4291
4292         * getdate.y (get_date): Apply relative times after time
4293         zone indicator, not before.  Reported by Todd A. Jacobs.
4294
4295 2000-06-13  Jim Meyering  <meyering@lucent.com>
4296
4297         * Makefile.am (all-local): Depend on lstat.c and stat.c.
4298
4299         * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
4300
4301 2000-06-12  Paul Eggert  <eggert@twinsun.com>
4302
4303         * xstat.in: Include <stdlib.h> in lstat, to declare "free".
4304
4305 2000-06-04  Paul Eggert  <eggert@twinsun.com>
4306
4307         * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
4308
4309 2000-06-04  Jim Meyering  <meyering@lucent.com>
4310
4311         * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
4312         SunOS 4.1.4 for which gid_t is an unsigned type.
4313
4314 2000-06-03  Jim Meyering  <meyering@lucent.com>
4315
4316         * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
4317
4318 2000-05-26  Bruno Haible  <haible@clisp.cons.org>
4319
4320         * Makefile.am (install-exec-local): On systems with glibc-2.1 or
4321         newer, don't install charset.alias.
4322         * config.charset: Change the Linux/glibc rules so they become empty
4323         on glibc-2.1 or newer.
4324
4325 2000-06-02  Jim Meyering  <meyering@lucent.com>
4326
4327         * mountlist.c: Back out last change.  Instead, do this...
4328         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
4329         member using the same `ignore'-testing code.
4330         * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
4331         fs_type strings.
4332         From Mark D. Roth.
4333
4334 2000-05-29  Jim Meyering  <meyering@lucent.com>
4335
4336         * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
4337         with the `ignore' attribute.  Based on a patch from Mark D. Roth.
4338
4339 2000-05-22  Jim Meyering  <meyering@lucent.com>
4340
4341         * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
4342
4343 2000-05-18  Jim Meyering  <meyering@lucent.com>
4344
4345         * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
4346         back, too, since it may have been modified by allocate_entry.
4347         (hash_delete): Rewrite to use neither the assignment operator
4348         nor the comma operator in an if-expression.
4349
4350 2000-05-15  Paul Eggert  <eggert@twinsun.com>
4351
4352         * closeout.c:
4353         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
4354         Remove; no longer needed.
4355         "quotearg.h": Add include.
4356         (file_name): Do not bother to explicitly initialize to NULL; it's less
4357         efficient on some hosts.
4358         (close_stdout_status): Remove test as to whether stdout was already
4359         closed; it breaks for the case "echo x | sort >&-".
4360         Quote file name colons.
4361         Do not assume that _("write error") lacks format strings.
4362
4363 2000-05-15  Jim Meyering  <meyering@lucent.com>
4364
4365         * version-etc.c (version_etc_copyright): Update the copyright string
4366         used in all --version output.
4367
4368 2000-05-14  Jim Meyering  <meyering@lucent.com>
4369
4370         * closeout.c (close_stdout_set_file_name): New function.
4371         (close_stdout_status): Use new file-scoped global.
4372         Return right away if fstat says the stdout file descriptor is invalid.
4373         * closeout.h (close_stdout_set_file_name): Declare.
4374
4375 2000-05-10  Jim Meyering  <meyering@lucent.com>
4376
4377         * closeout.c [default_exit_status]: New file-scoped variable.
4378         (close_stdout_set_status): New function.
4379         * closeout.h (close_stdout_set_status): Declare.
4380
4381 2000-05-08  Jim Meyering  <meyering@lucent.com>
4382
4383         * long-options.c: Don't include closeout.h.
4384         (parse_long_options): Don't call close_stdout for --version.
4385
4386 2000-05-06  Jim Meyering  <meyering@lucent.com>
4387
4388         * strnlen.c: Undefine __strnlen and strnlen.
4389         [!weak_alias]: Define __strnlen to strnlen.
4390
4391         * atexit.c: New file, from libiberty.
4392
4393 2000-05-06  Jim Meyering  <meyering@lucent.com>
4394
4395         * closeout.c (close_stdout_status): Also check for errors on the
4396         stderr stream.
4397
4398 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
4399
4400         * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
4401         instead of xmalloc, xrealloc, path_concat.
4402         (locale_charset): Treat empty environment variables as absent.
4403         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
4404
4405 2000-05-04  Jim Meyering  <meyering@lucent.com>
4406
4407         * getopt.c: Update from glibc.
4408         * obstack.c: Likewise.
4409         * obstack.h: Likewise.
4410         * regex.c: Likewise.  NB: K&R compiler support is dropped for this file
4411
4412         * regex.h: Likewise.
4413         * strndup.c: Likewise.
4414         * strnlen.c: New file, from glibc.
4415
4416 2000-05-01  Jim Meyering  <meyering@lucent.com>
4417
4418         * full-write.c (full_write): Remove `FIXME' part of comment.
4419
4420 2000-04-29  Jim Meyering  <meyering@lucent.com>
4421
4422         * path-concat.c: Declare strdup only if it's not defined.
4423         * canon-host.c: Likewise.
4424
4425 2000-04-28  Jim Meyering  <meyering@lucent.com>
4426
4427         * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
4428         redefinition warning on some systems (HPUX).  Otherwise, regex.h is
4429         included first, then limits.h is included by locale.h by libintl.h.
4430         From John David Anglin.
4431
4432 2000-04-25  Jim Meyering  <meyering@lucent.com>
4433
4434         * makepath.c (S_IRWXUGO): Define.
4435         (make_path): Always perform explicit chmod if MODE specifies any
4436         of the `special' permission bits.  Prompted by a bug report against
4437         install from Mate Wierdl and Joost van Baal.
4438
4439 2000-04-18  Jim Meyering  <meyering@lucent.com>
4440
4441         * README: New file.
4442
4443         * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
4444         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
4445
4446 2000-04-17  Jim Meyering  <meyering@lucent.com>
4447
4448         * strftime.c (my_strftime) [strftime]: Declare strftime here, since
4449         the definition of it to rpl_strftime also defined-away the system's
4450         declaration.
4451
4452 2000-04-15  Jim Meyering  <meyering@lucent.com>
4453
4454         Use `C' to denote so-called `contiguous' files, the same way
4455         that tar does.
4456         * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
4457         (ftypelet): Use S_ISCTG.
4458         From Michael Deutschmann.
4459
4460 2000-04-14  Jim Meyering  <meyering@lucent.com>
4461
4462         * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
4463
4464 2000-04-08  Jim Meyering  <meyering@lucent.com>
4465
4466         * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
4467         names don't conflict.  Reported by Eli Zaretskii.
4468
4469 2000-03-28  Bruno Haible  <haible@clisp.cons.org>
4470
4471         * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
4472         bug.  Deal with the different error behavior of Irix iconv.
4473
4474 2000-04-07  Jim Meyering  <meyering@lucent.com>
4475
4476         * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
4477         to work around system header problems on AIX 3.2.5.  From Bruno Haible.
4478
4479 2000-04-05  Jim Meyering  <meyering@lucent.com>
4480
4481         Portability tweaks required for ultrix4.3.
4482         * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
4483         * readutmp.c: Include sys/types.h before sys/stat.h.
4484         * canon-host.c: Declare strdup.
4485         * path-concat.c: Likewise.
4486         From John David Anglin.
4487
4488 2000-04-04  Jim Meyering  <meyering@lucent.com>
4489
4490         Be more DOS 8.3-friendly.
4491         * ref-add.sin: Renamed from ref-add.sed.in.
4492         * ref-del.sin: Renamed from ref-del.sed.in.
4493         * Makefile.am: Reflect renaming.
4494         Reported by Eli Zaretskii.
4495
4496         Use a temporary file name that won't clash with `charset.alias'
4497         in the DOS 8.3 name space.
4498         * Makefile.am (charset_tmp): Define.
4499         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
4500         (uninstall-local): Likewise.
4501         Reported by Eli Zaretskii.
4502
4503 2000-03-29  Paul Eggert  <eggert@twinsun.com>
4504
4505         * time/strftime.c (my_strftime): Make sure we call the system
4506         strftime, not ourselves, when invoking the underlying strftime.
4507
4508 2000-03-24  Jim Meyering  <meyering@lucent.com>
4509
4510         * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
4511         (charset_alias): Define.
4512         (install-exec-local): Factor out common code.
4513         (uninstall-local): Split lines longer than 80.
4514         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
4515         (SUFFIXES): Define.
4516         (.sed.in.sed): New rule.  Don't redirect directly to $@.
4517         (CLEANFILES): Add ref-add.sed and ref-del.sed.
4518
4519 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
4520
4521         * config.charset: Output a line containing "Packages using this file".
4522         * ref-add.sed.in, ref-del.sed.in: New files.
4523         * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
4524         ref-del.sed): New rules.
4525
4526 2000-03-17  Jim Meyering  <meyering@lucent.com>
4527
4528         * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
4529         Otherwise, include <strings.h>
4530
4531 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
4532
4533         * unicodeio.c (utf8_wctomb): New function.
4534         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
4535         format instead of in UCS-4 with platform dependent endianness.
4536
4537 2000-03-07  Paul Eggert  <eggert@twinsun.com>
4538
4539         * savedir.c (savedir): Work even if directory size is
4540         negative; this can happen with some screwy NFS configurations.
4541
4542 2000-03-06  Jim Meyering  <meyering@lucent.com>
4543
4544         * localcharset.c (get_charset_aliases): Don't try to free file_name
4545         if it's NULL (because we ran out of memory).  From Bruno Haible.
4546
4547 2000-03-05  Jim Meyering  <meyering@lucent.com>
4548
4549         * localcharset.c ("path-concat.h"): Include.
4550         (get_charset_aliases): Use path_concat instead of ANSI string
4551         concatenation.
4552
4553         * unicodeio.h (PARAMS): Define.
4554         Use it to guard prototype.
4555
4556 2000-03-04  Jim Meyering  <meyering@lucent.com>
4557
4558         * Makefile.am (install-exec-local): Create $(libdir) before installing
4559         into it.
4560         (uninstall-local): Uncomment this rule so `make distcheck' works
4561         once again.
4562
4563         * unicodeio.c (<errno.h>): Include it.
4564         (errno): Declare if not defined.
4565
4566         * localcharset.c: Add Bruno's comment justifying use of volatile.
4567
4568         * config.charset: New version, incorporating remarks from a linux
4569         i18n mailing list.  From Bruno Haible.
4570
4571 2000-03-02  Jim Meyering  <meyering@lucent.com>
4572
4573         * Makefile.am (EXTRA_DIST): Add config.charset.
4574
4575 2000-03-01  Jim Meyering  <meyering@lucent.com>
4576
4577         * localcharset.c: Guard some #includes with `#if HAVE_...'.
4578         * unicodeio.c: Likewise.
4579
4580 2000-02-02  Bruno Haible  <haible@clisp.cons.org>
4581
4582         * config.charset: New file.
4583         * localcharset.c: New file.
4584         * unicodeio.h, unicodeio.c: New files.
4585         * Makefile.am (DEFS): Add -DLIBDIR=...
4586         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
4587         (noinst_HEADERS): Add unicodeio.h.
4588         (all-local, install-exec-local, charset.alias): New targets.
4589
4590 2000-02-28  Paul Eggert  <eggert@twinsun.com>
4591
4592         * quotearg.c (ALERT_CHAR): New macro.
4593         (quotearg_buffer_restyled): Use it.
4594
4595 2000-02-27  Jim Meyering  <meyering@lucent.com>
4596
4597         * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
4598         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
4599
4600         * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
4601         not `#if STDC_HEADERS'.
4602         Declare malloc if needed.
4603
4604         * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
4605         now that autoconf always defines the HAVE_DECL_ symbols.
4606         * human.c: Likewise.
4607         * same.c: Likewise.
4608         * strtoumax.c: Likewise.
4609
4610         * backupfile.c: Arrange for cpp to fail if the configure-time
4611         declaration check was not run.
4612         * hash.c: Likewise.
4613         * human.c: Likewise.
4614         * same.c: Likewise.
4615         * strtoumax.c: Likewise.
4616
4617         * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
4618         then first look up the entire `.'-containing string as a login name.
4619
4620 2000-02-18  Paul Eggert  <eggert@twinsun.com>
4621
4622         * getdate.y: Handle two-digit years with leading zeros correctly.
4623         (textint): New typedef.
4624         (parser_control): Member year changed from int to textint.
4625         All uses changed.
4626         (YYSTYPE): Removed; replaced by %union with int and textint members.
4627         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
4628         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
4629         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
4630         (tSNUMBER, tUNUMBER): Now of type <textintval>.
4631         (date, number, to_year): Use width of number in digits, not its value,
4632         to determine whether it's a 2-digit year, or a 2-digit time.
4633         (yylex): Store number of digits of numeric tokens.
4634         Reported by John Kendall.
4635
4636         (parser_control): Changed from struct parser_control to typedef (for
4637         consistency).  All uses changed.
4638
4639         (tID): Removed; not used.
4640         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
4641
4642 2000-02-14  Paul Eggert  <eggert@twinsun.com>
4643
4644         * getpagesize.h (getpagesize): Port to VMS for Alpha;
4645         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
4646
4647 2000-02-12  Jim Meyering  <meyering@lucent.com>
4648
4649         * userspec.c (ISDIGIT): Define it.
4650         (isdigit): Remove definition.
4651         (is_number): Use ISDIGIT, not isdigit.
4652         <libintl.h>: Include.
4653         (_ and N_): Define.
4654         (parse_user_spec): Mark translatable strings.
4655
4656 2000-02-10  Jim Meyering  <meyering@lucent.com>
4657
4658         With these changes, nanosleep.[ch] are finally enough like the other
4659         lib/* replacement files to compile on a few more losing systems.
4660
4661         * nanosleep.h: Don't include config.h.
4662         Remove prototype from declaration of nanosleep.
4663         (PARAMS): Remove now-unneeded definition.
4664         * nanosleep.c: #undef nanosleep.
4665         (rpl_nanosleep): Rename from nanosleep.
4666
4667 2000-02-03  Jim Meyering  <meyering@lucent.com>
4668
4669         * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
4670         rather than with `#if HAVE_UTMPNAME'.
4671
4672 2000-02-01  Jim Meyering  <meyering@lucent.com>
4673
4674         * readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
4675
4676 2000-01-31  Jim Meyering  <meyering@lucent.com>
4677
4678         * nanosleep.h (nanosleep): Guard declaration with
4679         `#if ! HAVE_DECL_NANOSLEEP'.
4680         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
4681         the declaration in that vendor's sys/timers.h.
4682         Reported by Christian Krackowizer.
4683
4684         * quotearg.c (ISASCII): Add #undef and move definition to follow
4685         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
4686         (ISPRINT): Likewise.
4687         Reported by Tom Tromey.
4688
4689 2000-01-30  Jim Meyering  <meyering@lucent.com>
4690
4691         * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
4692         uses of ->ut_name.  The latter doesn't work with new Linux header files
4693         where only utmpx.ut_user is declared.
4694
4695         * readutmp.h (UT_USER): Define.
4696
4697 2000-01-23  Jim Meyering  <meyering@lucent.com>
4698
4699         * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
4700         obstack.c.
4701
4702 2000-01-22  Jim Meyering  <meyering@lucent.com>
4703
4704         * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
4705         [! HAVE_DECL_STRTOULL]: Declare strtoull.
4706         Required for some AIX systems.  Reported by Christian Krackowizer.
4707         [TESTING] (main): New function.
4708
4709         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
4710         * dirname.c (dir_name): Support for DOS-style file names with drive
4711         letters.
4712
4713         * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
4714
4715         * strverscmp.c (ISDIGIT): Define.
4716         (strverscmp): Use ISDIGIT, not isdigit.
4717
4718 2000-01-17  Paul Eggert  <eggert@twinsun.com>
4719
4720         * nanosleep.c (nanosleep):
4721         Don't use SA_INTERRUPT to decide whether to call sigaction, as
4722         POSIX.1 doesn't require SA_INTERRUPT and some systems
4723         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
4724         it's been part of POSIX.1 since day 1 (in 1988).
4725
4726 2000-01-17  Jim Meyering  <meyering@lucent.com>
4727
4728         * interlock: Remove unused file.  Reported by François Pinard.
4729
4730 2000-01-16  Paul Eggert  <eggert@twinsun.com>
4731
4732         * quotearg.c (quotearg_buffer_restyled): Do not quote
4733         alert, backslash, formfeed, and vertical tab unnecessarily in
4734         shell quoting style.
4735
4736 Local Variables:
4737 version-control: never
4738 End: