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