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