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