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