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