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