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