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