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