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