1 2003-05-30 <karl@gnu.org>
3 * mktime.c: update from libc.
5 2003-05-30 Bruno Haible <bruno@clisp.org>
7 * config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
8 * localcharset.h: Likewise.
9 * localcharset.c: Likewise.
11 2003-05-28 Paul Eggert <eggert@twinsun.com>
13 Assume the headers required for C89 freestanding compilers.
14 * addext.c, backupfile.c, fsusage.c, human.c, pathmax.h,
15 rpmatch.c, userspec.c, xreadlink.c, xstrtol.c: Include <limits.h>
16 without checking for HAVE_LIMITS_H.
17 * backupfile.c, fsusage.c, hash.c, human.c, safe-read.c, userspec.c,
18 xstrtol.c (CHAR_BIT) : Don't define, since <limits.h> is guaranteed
20 * fatal.c: Include <stdarg.h> without checking for __STDC__.
21 * exclude.c: Include <stdbool.h> unconditionally.
22 * tempname.c: Include <stddef.h> unconditionally.
23 * hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
24 * modechange.c, rpmatch.c (NULL): Don't define, since
26 * quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
27 * safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
28 * safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer needed.
29 * xstrtol.c: Likewise.
30 * safe-read.c: Remove TYPE_SIGNED; no longer needed.
31 * savedir.c: Include <stddef.h> instead of defining NULL.
33 * addext.c (addext): Use assignment rather than cast, to avoid
34 warnings on some platforms.
36 * mktime.c (__mktime_internal): Do not reject negative timestamps
39 2003-05-10 Bruno Haible <bruno@clisp.org>
41 * linebreak.c (iconv_string_length): Don't return -1 just because the
42 string is longer than 4 KB.
44 2003-05-12 Jim Meyering <jim@meyering.net>
46 * strftime.c (my_strftime): Let the `-' (no-pad) flag affect
47 the space-padded-by-default conversion specifiers, %e, %k, %l.
49 2003-05-03 Bruno Haible <bruno@clisp.org>
51 Upgrade to Unicode-4.0.
52 * linebreak.c (nonspacing_table_data): Change width of U+00AD,
53 U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
54 U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
55 U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
56 from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
57 (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
58 of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
59 Change width of U+E0100..U+E01EF from 1 to 0.
61 2003-04-25 Bruno Haible <bruno@clisp.org>
63 * copy-file.c: Include <stddef.h>, for size_t.
65 2003-04-25 Jim Meyering <jim@meyering.net>
67 * copy-file.c (copy_file_preserving): Declare buf_size to be
68 of type size_t, not int.
70 2003-04-11 Jim Meyering <jim@meyering.net>
72 Merge changes from Coreutils.
74 2003-03-22 Jim Meyering <jim@meyering.net>
76 * strftime.c (widen): Cast alloca return value to proper type.
78 2003-01-19 Ulrich Drepper <drepper@redhat.com>
81 * strftime.c (my_strftime): Handle very large width
82 specifications for numeric values correctly. Improve checks for
85 2003-01-19 Jim Meyering <jim@meyering.net>
87 * strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical definitions.
88 (nl_get_alt_digit) [! defined my_strftime]: Define.
89 (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
90 _nl_get_alt_digit and _nl_get_walt_digit.
92 * strftime.c (my_strftime): Merge in locale-related changes from libc.
93 These changes have no effect outside of _LIBC.
95 2003-04-10 Bruno Haible <bruno@clisp.org>
97 * findprog.h: New file, from GNU gettext.
98 * findprog.c: New file, from GNU gettext.
100 2003-04-05 Jim Meyering <jim@meyering.net>
102 Merge changes from Coreutils.
104 * exclude.h (PARAMS): Remove definition and uses.
105 * exclude.c: Remove uses of `PARAMS'.
107 * dirname.c [TEST_DIRNAME]: Update build instructions for test.
108 Add test-cases for DOS filenames. Declare program_name.
109 (main): Set up program_name. Patch by Rich Dawe.
111 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
113 Use mntctl's return value to drive the entry-processing loop, since
114 we can't rely on the value of the vmt_length member in the last
115 entry. On some systems doing so could result in exhausting
116 virtual memory. Based in part on a patch from Mike Jetzer.
118 2003-04-04 Bruno Haible <bruno@clisp.org>
120 * linebreak.h: New file, from GNU gettext.
121 * linebreak.c: New file, from GNU gettext with slight modifications.
122 * lbrkprop.h: New file, from GNU gettext.
124 2003-04-03 Bruno Haible <bruno@clisp.org>
126 * utf8-ucs4.h: New file, from GNU gettext.
127 * utf16-ucs4.h: New file, from GNU gettext.
128 * ucs4-utf8.h: New file, from GNU gettext.
129 * ucs4-utf16.h: New file, from GNU gettext.
131 2003-04-02 Bruno Haible <bruno@clisp.org>
133 * binary-io.h: New file, from GNU gettext.
135 2003-04-01 Bruno Haible <bruno@clisp.org>
137 * pathname.h: New file, from GNU gettext.
138 * concatpath.c: New file, from GNU gettext.
140 2003-03-30 Bruno Haible <bruno@clisp.org>
142 * copy-file.c (copy_file_preserving): Don't set owner if the function
143 chown() doesn't exist.
145 2003-03-28 Bruno Haible <bruno@clisp.org>
147 * copy-file.h: New file, from GNU gettext.
148 * copy-file.c: New file, from GNU gettext.
150 2003-03-18 Jim Meyering <jim@meyering.net>
152 * quote.c (quote_n): Fix typo in comment.
154 2003-03-14 Jim Meyering <jim@meyering.net>
156 Merge changes from Coreutils.
157 * obstack.h (obstack_object_size): Declare temporary, __o,
158 to be const, in order to avoid warnings.
159 (obstack_room): Likewise.
160 (obstack_empty_p): Likewise.
162 2003-03-13 Paul Eggert <eggert@twinsun.com>
164 Merge changes from Bison.
165 * obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
166 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
167 when compiling Bison 1.875's `bitset bset = obstack_alloc
168 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
169 * hash.c: Include <stdbool.h> unconditionally.
171 2003-03-09 Paul Eggert <eggert@twinsun.com>
173 * argmatch.c (EXIT_FAILURE): Define if the system doesn't.
174 Reported by Bruce Becker; see:
175 http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
177 2003-03-03 Paul Eggert <eggert@twinsun.com>
178 Bruno Haible <bruno@clisp.org>
180 * mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
181 Reported by John Hughes, see
182 http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
184 2003-02-19 Paolo Bonzino <bonzini@gnu.org>
189 2003-02-18 Paolo Bonzino <bonzini@gnu.org>
198 * floorl.c: New file.
199 * frexpl.c: New file.
200 * ldexpl.c: New file.
202 * sincosl.c: New file.
209 2003-02-17 Bruno Haible <bruno@clisp.org>
211 * mkdtemp.h: New file, from GNU gettext.
212 * mkdtemp.c: New file, from GNU gettext.
214 2003-01-31 Bruno Haible <bruno@clisp.org>
216 * rename.c: #undef rename before defining rpl_rename.
217 * strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
219 2003-01-30 Bruno Haible <bruno@clisp.org>
221 * printf-args.h: New file, from GNU gettext.
222 * printf-args.c: New file, from GNU gettext.
223 * printf-parse.h: New file, from GNU gettext.
224 * printf-parse.c: New file, from GNU gettext.
225 * vasnprintf.h: New file, from GNU gettext.
226 * vasnprintf.c: New file, from GNU gettext.
227 * asnprintf.c: New file, from GNU gettext.
228 * vasprintf.h: New file, from GNU gettext with modifications.
229 * vasprintf.c: New file, from GNU gettext.
230 * asprintf.c: New file, from GNU gettext.
232 2003-01-29 Bruno Haible <bruno@clisp.org>
234 * stpncpy.h: New file, from GNU gettext with modifications.
235 * stpncpy.c: New file, from GNU gettext with modifications.
237 2003-01-28 Bruno Haible <bruno@clisp.org>
239 * c-ctype.h: New file, from GNU gettext, with changes suggested by
241 * c-ctype.c: New file, from GNU gettext, with changes suggested by
244 2003-01-27 Bruno Haible <bruno@clisp.org>
246 * xsetenv.h: New file, from GNU gettext.
247 * xsetenv.c: New file, from GNU gettext.
249 2003-01-23 Bruno Haible <bruno@clisp.org>
251 * minmax.h: New file, from GNU gettext, with comments from Paul Eggert.
253 2003-01-22 Bruno Haible <bruno@clisp.org>
255 * exit.h: New file, from GNU gettext.
257 2003-01-11 Bruno Haible <bruno@clisp.org>
259 * stpcpy.h (stpcpy): Use ANSI C function declarations.
260 * strcase.h (strcasecmp, strncasecmp): Likewise.
262 2003-01-14 Jim Meyering <jim@meyering.net>
264 * same.c (same_name): Tweak a comment.
266 2003-01-11 Bruno Haible <bruno@clisp.org>
268 * same.c (same_name): Reorder tests so as to avoid calling stat()
269 when a string comparison is sufficient.
271 2003-01-11 Bruno Haible <bruno@clisp.org>
273 * readtokens.c (readtoken): Cast character to 'unsigned char', not
276 2003-01-11 Bruno Haible <bruno@clisp.org>
278 * hash-pjw.c: Add comment about low quality of this function.
280 2003-01-12 Paul Eggert <eggert@twinsun.com>
282 Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
283 to avoid collisions with libcurses and libreadline.
285 * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
286 * getstr.h, getstr.c: Remove.
287 * getline.c: Include "getline.h", to check interface.
288 Move body of old getstr.c here: this defines MIN_CHUNK and
289 declares getdelim2, which is renamed from getstr.
290 (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
292 * linebuffer.c (readlinebuffer): Renamed from readline.
294 * linebuffer.h: Likewise.
295 (readline): Remove backward-compatibility macro.
297 2003-01-12 Jim Meyering <jim@meyering.net>
299 * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary.
301 2003-01-10 Bruno Haible <bruno@clisp.org>
303 * alloca_.h: New file.
304 * getdate.y: Unconditionally include alloca.h.
305 * makepath.c: Likewise.
306 * setenv.c: Likewise.
307 * userspec.c: Likewise.
309 2003-01-09 Bruno Haible <bruno@clisp.org>
311 * stdbool.h.in: New file.
313 2003-01-08 Bruno Haible <bruno@clisp.org>
315 * safe-read.c: Include specification header first, to ensure its
317 * full-write.c: Likewise.
319 2003-01-08 Jim Meyering <jim@meyering.net>
321 * full-write.c: Undefine and define-away `const' after inclusion
322 of errno.h, not before. Suggestion from Bruno Haible.
324 2003-01-07 Jim Meyering <jim@meyering.net>
326 * full-write.c: Rework so that it may serve to define full_read, too.
327 * full-read.c: Simply #define FULL_READ and include full-write.c.
329 2003-01-06 Jim Meyering <jim@meyering.net>
331 * version-etc.c: Update year in translatable copyright string.
333 2002-12-25 Bruno Haible <bruno@clisp.org>
335 * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
336 * xstrtol.h: Likewise.
337 * xstrtoimax.c: Likewise.
338 * xstrtoumax.c: Likewise.
341 * tempname.c: Include <inttypes.h> too. Avoids a compilation error
342 on systems that have <inttypes.h> but not <stdint.h>.
344 2002-12-31 Paul Eggert <eggert@twinsun.com>
346 * memcoll.c (memcoll): Fall back on a simple algorithm using
347 memcmp if strcoll doesn't work.
349 2002-12-23 Bruno Haible <bruno@clisp.org>
351 * localcharset.h: New file.
352 * localcharset.c: Include it.
353 * unicodeio.c: Likewise.
355 2002-12-22 Bruno Haible <bruno@clisp.org>
357 * utime.c (utime_null): No need to call ftruncate if the file was
360 2002-12-23 Bruno Haible <bruno@clisp.org>
362 * memcoll.c (STRCOLL): New macro.
365 2002-12-22 Bruno Haible <bruno@clisp.org>
367 * getstr.h (getstr): Define, to avoid clash with libcurses.
368 * linebuffer.h (readline): Define, to avoid clash with libreadline.
370 2002-12-22 Bruno Haible <bruno@clisp.org>
372 * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
374 2002-12-23 Bruno Haible <bruno@clisp.org>
376 * getline.h: Include <stddef.h>, for size_t.
378 * unicodeio.h: Include <stddef.h>, for size_t.
379 * unicodeio.c: Don't include <stddef.h>.
381 2002-12-17 Bruno Haible <bruno@clisp.org>
383 * canon-host.c (strdup): Remove unused declaration.
385 * fsusage.c: Include full_read.h.
386 (get_fs_usage): Use full_read instead of safe_read.
388 * utime.c (utime_null): Use SAFE_READ_ERROR.
390 2002-12-11 Bruno Haible <bruno@clisp.org>
392 * setenv.h: Rewritten to cope with systems that have setenv() but not
394 * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
397 2002-12-11 Bruno Haible <bruno@clisp.org>
399 * setenv.c (alloca): Fall back to malloc.
401 (setenv): Use freea() to free memory allocated with alloca().
403 2002-11-13 Bruno Haible <bruno@clisp.org>
405 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
406 function declarations.
407 * unsetenv.c (unsetenv): Likewise.
409 2002-03-04 Bruno Haible <bruno@clisp.org>
411 Portability to AIX 4.3.3.
412 * unsetenv.c: New file, extracted from setenv.c.
413 * setenv.c: Move the unsetenv() function to unsetenv.c.
415 2001-12-20 Bruno Haible <bruno@clisp.org>
417 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
418 use malloc instead. For SunOS4.
420 2001-12-11 Bruno Haible <bruno@clisp.org>
422 * setenv.c: Declare alloca.
423 (compar_fn_t): New typedef.
424 (KNOWN_VALUE, STORE_VALUE): Use it.
426 * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
429 2002-12-10 Paul Eggert <eggert@twinsun.com>
431 Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
432 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
433 Choose values that are less likely to collide with system fnmatch
435 * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
436 defined (e.g., a pure POSIX system).
437 (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
438 instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
440 2002-12-06 Jim Meyering <jim@meyering.net>
442 * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
444 Merge in changes from libc's misc/error.c, in preparation
445 for the merge of gnulib's changes back into libc.
447 * error.c (_): Define only if not already defined.
448 Move definition to follow all #include directives.
449 Include unlocked-io.h only if !_LIBC.
450 [_LIBC]: Include <libio/libioP.h>.
451 [USE_IN_LIBIO]: Include <libio/iolibio.h>
452 (fflush): Tweak definition to use INTUSE.
455 2002-12-05 Paul Eggert <eggert@twinsun.com>
457 * alloca.c [defined emacs]: Include "lisp.h".
458 (xalloc_die) [defined emacs]: New macro.
459 (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
460 [! defined emacs]: Include <xalloc.h>.
461 (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
462 (pointer): Typedef to POINTER_TYPE *.
463 (malloc): Remove decl; we now always use xmalloc.
464 (alloca): Use old-style definition, since Emacs needs this.
465 Check for arithmetic overflow when computing combined size.
467 2002-12-04 Paul Eggert <eggert@twinsun.com>
469 Do not generate unlocked-io.h automatically, since it's easier to
472 * unlocked-io.h: New file, from GNU diffutils,
473 but with proper copyright notice and attribution.
475 * Makefile.am: Add copyright notice.
476 (libfetish_a_SOURCES): Add unlocked-io.h.
477 (BUILT_SOURCES, all-local): Remove unlocked-io.h.
478 (DISTCLEANFILES, io_functions): Remove macros.
479 (EXTRA_DIST): Remove gen_uio.
480 (unlocked-io.h): Remove rule.
482 2002-12-04 Jim Meyering <jim@meyering.net>
484 Reflect the fact that stat.c and lstat.c are no longer generated.
485 * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
486 (DISTCLEANFILES): Likewise.
487 (EXTRA_DIST): Likewise.
488 (all_local): Don't depend on stat.c or lstat.c.
489 (stat.c, lstat.c): Remove rules.
490 (EXTRA_DIST): Remove xstat.in.
492 * xstat.in: Remove file. Contents moved into stat.c.
493 * stat.c: New file. Contents mostly from xstat.in.
494 * stat.c: Rework so that it may serve to define rpl_lstat, too.
495 * lstat.c: New file. Simply #define LSTAT and include stat.c.
497 * safe-read.c: Rework so that it may serve to define safe_write, too.
498 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
500 2002-12-03 Jim Meyering <jim@meyering.net>
502 * safe-read.c, safe-write.c: Change variable names and comments, but
503 not semantics, to minimize the differences between these two files.
504 (safe_read): Change comment to mention SAFE_READ_ERROR.
506 * safe-read.c (IS_EINTR): Define.
507 (safe_read): Use IS_EINTR in place of in-function cpp directives.
509 2002-12-02 Bruno Haible <bruno@clisp.org>
511 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
512 Define, taken from safe-read.c.
513 (INT_MAX): Provide fallback.
514 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
515 * safe-write.h (SAFE_WRITE_ERROR): Define.
517 * safe-read.c (EINTR): Remove definition.
518 (safe_read): Don't use EINTR if it is absent.
520 2002-12-02 Jim Meyering <jim@meyering.net>
522 * safe-read.c (EINTR): Define.
523 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
524 (INT_MAX): Provide fallback.
525 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
527 * safe-read.h (SAFE_READ_ERROR): Define.
529 2002-12-01 Jim Meyering <jim@meyering.net>
531 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
532 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
534 2002-11-27 Paul Eggert <eggert@twinsun.com>
536 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
537 hash_rehash): Replace `if (limit <= value) abort ();' with
538 `if (! (value < limit)) abort ();', for readability.
540 2002-11-26 <karl@gnu.org>
542 * strdup.c: copy from libc again, with jim's ok.
543 * .cppi-disable: re-add strdup.c
545 2002-11-25 <karl@gnu.org>
547 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
548 instead of "strtol.c".
550 2002-11-25 Jim Meyering <jim@meyering.net>
552 * mktime.c: Sync from libc, now that it has the latest fix.
554 2002-11-24 <karl@gnu.org>
556 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
557 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
559 2002-11-24 Jim Meyering <jim@meyering.net>
561 Update from coreutils:
563 * mktime.c: Merge in changes from libc.
565 Avoid a link-time failure on some Linux systems.
566 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
567 (__mon_yday): Declare with the STATIC attribute.
568 (__mktime_internal): Likewise.
569 Based on a report from Greg Schafer.
571 2002-11-23 Jim Meyering <jim@meyering.net>
573 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
574 Use `unsigned', not `int', as type of index.
576 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
578 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
580 2002-11-22 Paul Eggert <eggert@twinsun.com>
582 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
583 hint that one should use `if (! x) abort ();' rather than `assert
584 (x);', and anyway it's one less thing to worry about configuring.
585 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
586 hash_rehash, hash_insert): Use abort rather than assert.
588 2002-11-22 Paul Eggert <eggert@twinsun.com>
590 * quotearg.h: Allow multiple inclusion by surrounding with
591 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
592 so that we can be included first.
593 (PARAMS): Remove; we now assume C89 or later. All uses removed.
594 * quotearg.c: Include quotearg.h immediately after config.h.
595 No need to include stddef.h or sys/types.h any more.
596 Surround local include files with "", not "<>".
597 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
598 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
599 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
600 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
601 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
602 (ISPRINT): Remove; no longer needed now that we assume C89.
604 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
607 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
608 quotearg_char): Use SIZE_MAX rather than
609 (size_t) -1 when we are talking about "infinity".
611 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
613 2002-11-22 Bruno Haible <bruno@clisp.org>
615 * safe-read.h: Assume C89. Add comments.
616 (safe_read): Change return type to size_t.
617 * safe-read.c (safe_read): Change return type to size_t. Handle byte
618 counts > SSIZE_MAX correctly.
619 * safe-write.h: New file.
620 * safe-write.c: New file.
621 * full-read.h: New file.
622 * full-read.c: New file.
623 * full-write.h: Assume C89. Add comments.
624 * full-write.c: Include safe-write.h.
625 (full_write): Rewritten to use safe_write.
626 Suggested by Jim Meyering and Paul Eggert.
628 2002-11-21 Bruno Haible <bruno@clisp.org>
630 Remove case insensitive option matching.
631 * argmatch.h (argcasematch): Remove declaration.
632 (ARGCASEMATCH): Remove macro.
633 (__xargmatch_internal): Remove case_sensitive argument.
635 (XARGCASEMATCH): Remove macro.
636 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
637 case_sensitive argument.
638 (argcasematch): Remove function.
639 (__xargmatch_internal): Remove case_sensitive argument.
640 (main): Use XARGMATCH instead of XARGCASEMATCH.
642 * xmalloc.c: Change compile-time error message. Add comment about
643 required autoconf version.
645 2002-11-21 Jim Meyering <jim@meyering.net>
647 * strdup.c (strdup): Tweak comment and initial #if/#include.
649 Merge in changes from the coreutils.
651 2002-09-25 Paul Eggert <eggert@twinsun.com>
652 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
653 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
654 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
655 int. Work more efficiently if X is the same width as uintmax_t.
656 Do not compare X to -1, to avoid bogus compiler warning.
657 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
658 Don't assume that f_frsize and f_bsize are the same type.
660 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
663 * makepath.c (make_path): Restore umask *before* creating the final
665 (make_path): Minor reformatting.
667 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
668 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
670 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
671 ones. At least on GNU/Linux systems, `auto' means something else.
674 2002-11-20 Paul Eggert <eggert@twinsun.com>
676 Merge argmatch cleanups from Bison. Assume C89.
678 * argmatch.c: Include config.h here, not in argmatch.h.
679 Include stdlib.h, for EXIT_FAILURE.
680 Always include <string.h>, since we assume C89.
681 (EXIT_FAILURE): Remove pre-C89 bug workaround.
682 * argmatch.h: Do not include <config.h> or <sys/types.h>.
683 Include <stddef.h> instead, since it's all we need for size_t.
684 (PARAMS): Remove. All uses removed.
685 (ARRAY_CARDINALITY): Do not bother to #undef.
686 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
687 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
688 Remove unnecessary parentheses.
689 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
690 Insert necessary parentheses.
691 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
692 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
694 2002-11-19 Bruno Haible <bruno@clisp.org>
696 * mbswidth.c: Include mbswidth.h right at the beginning.
697 * mbswidth.h: Include <stddef.h>, for size_t.
699 * mbswidth.h (PARAMS): Remove macro.
700 (mbswidth, mbsnwidth): Use ANSI C function declarations.
701 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
703 * gcd.h (PARAMS): Remove macro.
704 (gcd): Use ANSI C function declarations.
705 * gcd.c (gcd): Likewise.
707 2002-11-15 Bruno Haible <bruno@clisp.org>
709 * strcspn.c: Include <stddef.h>.
710 (strcspn): Use ANSI C function declaration. Change return type to
712 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
714 * strpbrk.h (PARAMS): Remove macro.
715 (strpbrk): Use ANSI C function declaration.
716 * strstr.c: Don't include <sys/types.h>.
717 * strstr.h (PARAMS): Remove macro.
718 (strstr): Use ANSI C function declarations.
720 2002-11-06 Bruno Haible <bruno@clisp.org>
722 * gcd.h (gcd): Change argument type to 'unsigned long'.
723 * gcd.c (gcd): Likewise.
725 2002-11-05 Bruno Haible <bruno@clisp.org>
727 * gcd.h: New file, from gettext-0.11.5.
728 * gcd.c: New file, from gettext-0.11.5.
730 2002-11-05 Bruno Haible <bruno@clisp.org>
732 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
733 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
734 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
735 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
737 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
738 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
740 * closeout.c: Include gettext.h instead of <libintl.h>.
741 * human.c: Include gettext.h instead of <libintl.h>.
742 * quotearg.c: Include gettext.h instead of <libintl.h>.
743 * rpmatch.c: Include gettext.h instead of <libintl.h>.
744 * unicodeio.c: Include gettext.h instead of <libintl.h>.
745 * userspec.c: Include gettext.h instead of <libintl.h>.
746 * version-etc.c: Include gettext.h instead of <libintl.h>.
747 * xmalloc.c: Include gettext.h instead of <libintl.h>.
748 (textdomain): Remove definition.
749 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
751 * long-options.c: Remove include of <libintl.h> and definition of _.
752 * same.c: Remove include of <libintl.h> and definition of _.
754 2002-11-04 Bruno Haible <bruno@clisp.org>
756 * stpcpy.h: New file, from GNU gettext-0.11.5.
757 * strcase.h: New file, from GNU gettext-0.11.5.
758 * strpbrk.h: New file, from GNU gettext-0.11.5.
759 * strstr.h: New file, from GNU gettext-0.11.5.
760 * xgetcwd.h: New file, from GNU gettext-0.11.5.
762 2002-05-09 Bruno Haible <bruno@clisp.org>
764 * config.charset: Update for newest glibc. Add canonical names
765 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
767 2002-05-09 Bruno Haible <bruno@clisp.org>
769 * localcharset.c (get_charset_aliases): Add more Windows specific
772 2002-05-08 Owen Taylor <otaylor@redhat.com>
774 * config.charset: A few additions for Solaris.
776 2001-12-05 Bruno Haible <bruno@clisp.org>
778 * localcharset.c (locale_charset): Don't return an empty string.
780 2001-10-23 Bruno Haible <haible@clisp.cons.org>
782 * config.charset: msdos in uk_UA uses CP1125.
784 2001-08-05 Bruno Haible <haible@clisp.cons.org>
786 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
787 * localcharset.c (locale_charset): Declare as extern "C".
789 2002-02-15 Bruno Haible <bruno@clisp.org>
791 * config.charset [msdosdjgpp]: For Russian, use CP866.
793 2002-02-11 Bruno Haible <bruno@clisp.org>
795 * config.charset: Add support for NetBSD.
797 2002-09-25 <karl@gnu.org>
799 * strdup.c: copy from libc/string (via ../config/srclist*).
800 * getopt*: copy from libc/posix.
801 * gettext.h: copy from gettext.
802 * .cppi-disable: add strdup.c, gettext.h.
804 2002-07-01 Jim Meyering <meyering@lucent.com>
806 * c-stack.c: Include sys/time.h.
807 From Volker Borchert.
809 2002-06-11 Paul Eggert <eggert@twinsun.com>
811 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
812 New macro. Use it uniformly instead of
813 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
814 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
815 reported by Vin Shelton.
817 2002-06-22 Jim Meyering <meyering@lucent.com>
819 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
820 redefinition due to Solaris5.6's definition in /usr/include/sys/euc.h.
822 2002-06-22 Paul Eggert <eggert@twinsun.com>
824 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
825 Do not assume SA_SIGINFO behavior.
826 Bug reported by Jim Meyering on NetBSD 1.5.2.
828 2002-06-22 Jim Meyering <meyering@lucent.com>
830 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
832 * exitfail.c, exitfail.h: Likewise.
833 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
835 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
837 (EXTRA_DIST): Add fnmatch_loop.c.
838 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
840 * fnmatch_loop.c: New file, from diffutils-2.8.2.
841 * fnmatch.c: Update from diffutils-2.8.2.
842 * fnmatch_.h: New file. From diffutils-2.8.2.
843 * fnmatch.h: Remove file.
845 2002-06-18 Paul Eggert <eggert@twinsun.com>
847 * file-type.h: Report an error if neither S_ISREG nor
848 S_IFREG is defined, instead of using a test specific to glibc
849 2.2. This should be safe, since POSIX requires S_ISREG and
850 Unix Version 7 had S_IFREG. We don't need to check for
851 <sys/types.h> since we don't use any symbols that it defines.
853 2002-06-15 Jim Meyering <meyering@lucent.com>
855 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
856 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
857 have been included before this file.
859 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
861 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
862 so that each temporary file name is unique and valid in the first
863 8 characters, for operation under DOS.
865 2002-06-15 Jim Meyering <meyering@lucent.com>
867 Work even with DJGPP 2.03, which lacks support for symlinks.
869 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
871 * lchown.c (S_ISLNK): Likewise.
873 2002-06-14 Jim Meyering <meyering@lucent.com>
875 * file-type.h: Use the version from diffutils-2.8.2.
876 * file-type.c: Likewise.
878 2002-05-27 Jim Meyering <meyering@lucent.com>
880 Fix a problem seen only on nonconforming systems whereby ls.c's
881 use of localtime, and then of gettimeofday would cause trouble:
882 the localtime call used to initialize rpl_gettimeofday's save
883 mechanism would clobber ls's current local time information so
884 that in any long listing the first file would always be listed
885 with date 1970-01-01. Analysis by Volker Borchert.
887 * gettimeofday.c (localtime): Undefine.
888 (rpl_localtime): New function.
890 2002-05-22 Jim Meyering <meyering@lucent.com>
892 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
893 * file-type.h: New file.
894 * file-type.c (file_type): New file/function. Extracted from diffutils.
896 2002-04-29 Paul Eggert <eggert@twinsun.com>
898 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
900 2002-04-28 Paul Eggert <eggert@twinsun.com>
902 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
903 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
904 of 127, since 64 is the largest conceivable number for ancient
906 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
908 2002-04-28 Jim Meyering <meyering@lucent.com>
910 * sig2str.c (WTERMSIG): Remove definition (unused).
912 2002-04-28 Paul Eggert <eggert@twinsun.com>
914 * sig2str.h, sig2str.c: New files.
915 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
917 2002-04-24 Jim Meyering <meyering@lucent.com>
919 * gettext.h: New file, from Gettext.
920 * Makefile.am (INCLUDES): Remove -I../intl.
921 (libfetish_a_SOURCES): Add gettext.h.
923 2002-04-16 Jim Meyering <meyering@lucent.com>
925 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
926 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
927 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
929 2002-04-12 Jim Meyering <meyering@lucent.com>
931 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
933 2002-03-10 Jim Meyering <meyering@lucent.com>
935 * makepath.c (make_path): Remove a comma from a diagnostic.
936 Suggestion from Santiago Vila.
938 2002-03-08 Jim Meyering <meyering@lucent.com>
940 * rename.c: Mention that this wrapper is needed also on
941 mips-dec-ultrix4.4 systems.
943 2002-03-02 Jim Meyering <meyering@lucent.com>
945 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
946 not HAVE_CLOCK_SETTIME.
948 2002-02-27 Paul Eggert <eggert@twinsun.com>
950 * nanosleep.h: Rename to....
951 * timespec.h: New name for nanosleep.h. All uses changed.
953 * gettime.c: New file.
954 * settime.c: New file.
957 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
958 timespec.h. Remove nanosleep.h.
960 2002-02-25 Paul Eggert <eggert@twinsun.com>
962 * acl.c, acl.h: New files.
963 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
965 2002-02-24 Jim Meyering <meyering@lucent.com>
967 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
968 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
969 cause trouble. Reported by Nelson Beebe.
971 2002-02-23 Paul Eggert <eggert@twinsun.com>
973 * path-concat.c (xpath_concat): Reorder code to pacify
974 compilers that don't know that xalloc_die never returns.
976 2002-02-20 Jim Meyering <meyering@lucent.com>
978 * getdate.c: Regenerate using bison-1.33.
980 2002-02-15 Paul Eggert <eggert@twinsun.com>
982 * posixver.c, posixver.h: New files.
983 * Makefile.am (libfetish_a_SOURCES): Add them.
985 2002-02-02 Paul Eggert <eggert@twinsun.com>
986 Bruno Haible <bruno@clisp.org>
988 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
989 (fwrite_success_callback): New declaration.
990 * unicodeio.c (unicode_to_mb): New function, extracted from
991 print_unicode_char. Call failure callback instead of error.
992 (fwrite_success_callback): New function.
993 (exit_failure_callback): New function.
994 (fallback_failure_callback): New function.
995 (print_unicode_char): Call unicode_to_mb.
997 2002-01-26 Jim Meyering <meyering@lucent.com>
999 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
1001 2002-01-22 Jim Meyering <meyering@lucent.com>
1003 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
1004 Otherwise, some versions of automake would omit the rule that makes
1005 Makefile from Makefile.in.
1007 2001-01-21 Paul Eggert <eggert@twinsun.com>
1009 * xmemcoll.h, xmemcoll.c: New files.
1010 * Makefile.am (libfetish_a_SOURCES): Add them.
1011 * memcoll.c: Include errno.h, and declare errno if not defined.
1012 (memcoll): Set errno to zero if there is no error.
1014 * quotearg.c (quotearg_buffer_restyled):
1015 Fix bug with quoting buffers containing NUL when backslashing escapes.
1016 This bug was exposed by the other changes in this patch.
1017 (quotearg_n_options): New arg ARGSIZE.
1018 All callers changed.
1019 (quoting_options_from_style): New function.
1020 (quotearg_n_style): Use it.
1021 (quotearg_n_style_mem): New function.
1023 * quotearg.h (quotearg_n_style_mem): New function.
1025 2002-01-16 Jim Meyering <meyering@lucent.com>
1027 * getdate.y: Add three semicolons, each just before a closing brace.
1028 Bison (as of version 1.31) no longer papers over that mistake.
1030 2002-02-14 Paul Eggert <eggert@twinsun.com>
1032 * backupfile.c (ISDIGIT): Comment fix.
1033 * getdate.y (ISDIGIT): Likewise.
1034 * posixtm.c (ISDIGIT, year): Likewise.
1035 * strverscmp.c (ISDIGIT): Likewise.
1036 * userspec.c (ISDIGIT): Likewise.
1038 2002-01-05 Jim Meyering <meyering@lucent.com>
1040 * version-etc.c (version_etc_copyright): Update copyright year.
1042 2001-01-19 Paul Eggert <eggert@twinsun.com>
1044 * closeout.c (close_stdout_status): If ferror (stdout), do
1045 not silently exit merely because the output buffer happens to
1046 have nothing pending.
1048 2001-12-18 Paul Eggert <eggert@twinsun.com>
1050 See the big note in ../ChangeLog.
1051 * human.c (suffixes): Prefer K to k for 1024.
1052 (generate_suffix_backwards): New function.
1053 (human_readable_inexact): Use it.
1054 * xstrtol.c (__xstrtol): If there is no number but there
1055 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
1056 Accept 'K' as well as 'k'.
1058 2001-12-15 Jim Meyering <meyering@lucent.com>
1060 * regex.h (__restrict_arr): Update from libc.
1062 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
1063 as `remote' if the name starts with `//'. Suggested by Michael Stone.
1066 2001-12-10 Jim Meyering <meyering@lucent.com>
1068 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
1069 Instead, include "xalloc.h".
1070 (initbuffer): Don't cast xmalloc return value to char*.
1071 (readline): Reword comment.
1072 Don't cast xrealloc return value to char*
1075 2001-12-09 Jim Meyering <meyering@lucent.com>
1077 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
1078 `signed and unsigned type in conditional expression'.
1079 * posixtm.c (posix_time_parse): Likewise.
1081 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
1083 * readtokens.c (readtoken): Declare an index to be of type unsigned
1084 to avoid a pedantic warning.
1086 * getstr.c: Don't include assert.h.
1087 (getstr): Remove warning-evoking assertions.
1088 Return -1 if offset parameter is out of bounds.
1089 Change the type of a local from int to size_t.
1091 * strftime.c (my_strftime_localtime_r): Include this function
1092 definition in the `#if ! HAVE_TM_GMTOFF' block.
1094 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
1095 Include xalloc.h instead.
1097 2001-12-02 Jim Meyering <meyering@lucent.com>
1099 * tempname.c: Don't declare getenv, thus reverting the change of
1100 2001-11-18. It's no longer necessary, now that stdlib.h is always
1103 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
1104 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
1106 2001-11-30 Akim Demaille <akim@epita.fr>
1108 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
1109 before being defined.
1111 2001-11-27 Paul Eggert <eggert@twinsun.com>
1113 * quotearg.h (quotearg_n, quotearg_n_style):
1114 First arg is int, not unsigned.
1115 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
1116 (SIZE_MAX, UINT_MAX): New macros.
1117 (quotearg_n_options): Abort if N is negative.
1118 Avoid overflow check on hosts where size_t is 64 bits and int
1119 is 32 bits, as overflow is impossible there.
1120 Fix off-by-one typo that caused unnecessary reallocation.
1122 2001-11-27 Jim Meyering <meyering@lucent.com>
1124 * tempname.c: Merge with version from libc.
1125 * regex.c: Likewise.
1127 * tempname.c: Include stdlib.h unconditionally. On some old systems
1128 for which STDC_HEADERS is 0, it was not included, resulting in a
1129 warning about an integer-to-pointer conversion problem with getenv.
1130 Reported by Volker Borchert.
1132 2001-11-26 Jim Meyering <meyering@lucent.com>
1134 * gtod.h: Remove file.
1135 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
1136 * gettimeofday.c: Don't include gtod.h.
1137 (GTOD_init): Remove function.
1138 (rpl_gettimeofday): Do its job here instead, rather than aborting.
1139 Suggestion from Volker Borchert.
1141 2001-11-23 Jim Meyering <meyering@lucent.com>
1143 * hash.h (struct hash_table): Don't define here. Merely declare it.
1144 * hash.c (struct hash_table): Define it here instead.
1146 2001-11-22 Jim Meyering <meyering@lucent.com>
1148 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
1150 2001-11-18 Paul Eggert <eggert@twinsun.com>
1152 * tempname.c (TMP_MAX): Remove; no longer needed.
1153 (TEMPORARIES): New macro.
1154 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
1155 removes an artificial limitation (e.g. HP-UX 10.20, where
1158 2001-11-18 Jim Meyering <meyering@lucent.com>
1160 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
1163 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
1164 files will be created before anything else.
1166 2001-11-17 Jim Meyering <meyering@lucent.com>
1168 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
1169 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
1170 rather than group writable. Patch by Juan F. Codagnone.
1172 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
1173 Instead, include "xalloc.h".
1175 * mountlist.c: Include unlocked-io.h after all system headers.
1176 Remove explicit declarations of xmalloc, xrealloc,
1177 and xstrdup. Instead, include "xalloc.h".
1179 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
1180 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
1181 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
1183 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
1184 Reported by Padraig Brady.
1186 * mkstemp.c: #undef mkstemp.
1188 (rpl_mkstemp): Rename from mkstemp.
1191 2001-11-16 Jim Meyering <meyering@lucent.com>
1193 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
1194 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
1195 determine the amount of total physical memory, use pstat_getstatic.
1196 HPUX-11 doesn't define _SC_PHYS_PAGES.
1197 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
1198 If sysconf couldn't be used to determine the amount of available
1199 physical memory, use both pstat_getstatic and pstat_getdynamic.
1200 Based on a patch from Bob Proulx.
1202 2001-11-05 Jim Meyering <meyering@lucent.com>
1204 * xstat.in (slash_aware_lstat): Correct a misleading comment.
1206 2001-11-03 Jim Meyering <meyering@lucent.com>
1208 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
1209 in argmatch_to_argument call.
1211 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
1214 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
1215 e.g., a fault due to an attempt to free a NULL pointer.
1217 2001-11-01 Jim Meyering <meyering@lucent.com>
1219 * dirfd.c, dirfd.h: New files.
1220 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
1222 * hash.c (hash_print) [TESTING]: Clean up.
1224 2001-10-22 Paul Eggert <eggert@twinsun.com>
1226 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
1227 to avoid a warning if -Wall.
1229 2001-10-21 Paul Eggert <eggert@twinsun.com>
1231 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
1233 2001-10-21 Jim Meyering <meyering@lucent.com>
1235 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
1236 this code would end up calling gettext even in packages built
1238 * getopt.c (_): Likewise.
1239 * regex.c (_): Likewise.
1241 2001-10-20 Paul Eggert <eggert@twinsun.com>
1243 * error.c (strerror_r): Do not declare unless !_LIBC.
1244 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
1245 Use strerror_r that is only a macro, even if it is not a function.
1246 (strerror): Check for HAVE_DECL_STRERROR before declaring.
1247 (private_strerror): Use prototypes, not old-style function definition.
1248 (print_errno_message): New function.
1249 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
1251 (error_tail, error, error_at_line): Use it.
1253 2001-10-11 Jim Meyering <meyering@lucent.com>
1255 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
1256 and quote_n (1, ... to avoid clobbering a buffer.
1258 2001-10-05 Jim Meyering <meyering@lucent.com>
1260 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
1261 * hash-pjw.c: New file (factored out of fileutils' remove.c).
1262 * hash-pjw.h: New file.
1264 2001-09-30 Jim Meyering <meyering@lucent.com>
1266 * mountlist.c [MOUNTED_GETFSSTAT]:
1267 Include <sys/ucred.h>, for Apple Darwin.
1268 Include sys/mount.h and sys/fs_types.h only if available.
1270 (read_filesystem_list): Use FS_TYPE.
1272 2001-09-29 Paul Eggert <eggert@twinsun.com>
1274 * exclude.c (excluded_filename): 0 -> false, since it's
1277 2001-09-28 Paul Eggert <eggert@twinsun.com>
1279 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
1280 #defines strtoimax. Also treat the other strto* functions
1283 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
1284 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
1285 (strtoimax, strtoumax): Do not declare if already defined as a macro.
1287 2001-09-26 Jim Meyering <meyering@lucent.com>
1289 Most macros in unlocked-io.h had the wrong number of arguments.
1290 * gen-uio: New script.
1291 (USE_UNLOCKED_IO): Define to 1 if not already defined.
1292 * unlocked-io.hin: Remove file.
1293 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
1294 rather than trying to embed it here.
1295 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
1296 Reported by Padraig Brady.
1298 2001-09-25 Volker Borchert <bt@teknon.de>
1300 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
1302 2001-09-23 Jim Meyering <meyering@lucent.com>
1304 * mountlist.c: Remove useless parentheses in #if directives.
1305 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
1306 the deprecated MOUNTED symbol is no longer defined in mntent.h.
1308 2001-09-22 Jim Meyering <meyering@lucent.com>
1310 * localcharset.c: Update from latest gettext.
1311 * config.charset: Likewise.
1313 2001-09-20 Jim Meyering <meyering@lucent.com>
1315 * xstrtol.c (strtoimax): Guard declaration with
1316 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
1317 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
1318 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
1319 (strtoumax): Likewise, for completeness (it wasn't necessary).
1321 2001-09-06 Paul Eggert <eggert@twinsun.com>
1323 * strtoimax.c (HAVE_LONG_LONG):
1324 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
1325 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
1326 to work around bug in IBM C compiler.
1328 2001-09-16 Jim Meyering <meyering@lucent.com>
1330 * mkdir.c: New file.
1332 2001-09-04 Paul Eggert <eggert@twinsun.com>
1334 * xgetcwd.c: Revert some of the previous change; intead,
1335 fix the HAVE_GETCWD_NULL code to behave more like the
1336 !HAVE_GETCWD_NULL code used to.
1339 (xgetcwd): Do not return NULL when memory is exhausted; instead,
1342 2001-09-04 Paul Eggert <eggert@twinsun.com>
1344 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
1345 Use ssize_t, not int, to store result of readlink.
1346 Check for ssize_t overflow as well as size_t overflow,
1347 as POSIX says the result of readlink is implementation-defined
1348 when ssize_t overflows.
1349 Remove unnecessary cast to char*.
1350 Use free+malloc instead of realloc, as the storage doesn't need
1351 to be preserved and it's clearer and can be more efficient that way.
1352 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
1353 * xreadlink.h (xreadlink): Update prototype.
1355 2001-09-03 Paul Eggert <eggert@twinsun.com>
1357 * exclude.c (fnmatch_no_wildcards): Fix confusion between
1358 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
1359 spotted by Jim Meyering.
1361 2001-09-03 Jim Meyering <meyering@lucent.com>
1363 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
1365 2001-09-03 Paul Eggert <eggert@twinsun.com>
1367 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
1368 like the HAVE_GETCWD_NULL code.
1369 Include pathmax.h if not HAVE_GETCWD.
1370 Do not include xalloc.h.
1371 (INITIAL_BUFFER_SIZE): New symbol.
1372 Do not use xmalloc / xrealloc, since the caller is responsible for
1373 handling errors. Preserve errno around `free' during failure.
1374 Do not overrun buffer when using getwd.
1376 2001-09-03 Paul Eggert <eggert@twinsun.com>
1378 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
1379 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
1381 2001-09-02 Jim Meyering <meyering@lucent.com>
1383 * error.c: Update from GNU libc.
1385 2001-09-01 Jim Meyering <meyering@lucent.com>
1387 * xreadlink.c: New file.
1388 * xreadlink.h: New file.
1389 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
1391 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
1392 doesn't conflict with sparc-sun-solaris2.7's definition in
1393 /usr/include/sys/int_types.h.
1395 * exclude.c: Use `""', not `<>' to #include non-system header files.
1396 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
1397 and strncasecmp as r-values. Unixware didn't have declarations.
1399 2001-08-31 Jim Meyering <meyering@lucent.com>
1401 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
1402 Use an initial, malloc'd, buffer of length 128 rather than
1403 a statically allocated one of length 1024.
1405 2001-08-30 Paul Eggert <eggert@twinsun.com>
1407 * xgetcwd.c: Don't include pathmax.h.
1408 Include stdlib.h and unistd.h if available.
1410 (xmalloc, xstrdup, free): Remove decls.
1411 (xgetcwd): Don't assume sizes fit in unsigned.
1412 Check for overflow when computing sizes.
1413 Simplify reallocation code.
1415 2001-08-28 Paul Eggert <eggert@twinsun.com>
1417 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
1419 * strtoimax.c: Renamed from strtoxmax.c, removing the
1422 Also, make the following further changes to make this file's
1423 configuration more similar to that of strtol.c:
1424 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
1425 (strtoumax, uintmax_t, strtoull, strtol): Remove.
1426 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
1427 (strtoimax): Renamed from strtoumax. All uses of unsigned values
1428 changed to signed values.
1430 And make the following changes as well:
1431 Fix copyright notice, as 1999 was missing.
1432 (verify): New macro.
1433 (strtoimax): Check sizes at compile-time, not run-time.
1434 Prefer strtol to strtoll if both work.
1435 (main): Remove; it was not that useful and was a pain to maintain.
1437 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
1439 2001-08-30 Paul Eggert <eggert@twinsun.com>
1441 * savedir.c (savedir): Remove size parameter, as POSIX says that
1442 a directory's st_size can have an arbitrary value, so the old
1443 usage could waste an arbitrary amount of memory. All uses
1445 * savedir.h: Update prototype.
1447 2001-08-30 Paul Eggert <eggert@twinsun.com>
1449 * xstrtol.c (strtoimax): New decl.
1451 2001-08-28 Paul Eggert <eggert@twinsun.com>
1453 * xstrtol.h: Add copyright notice.
1454 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
1455 LONGINT_INVALID_SUFFIX_CHAR.
1457 2001-08-30 Paul Eggert <eggert@twinsun.com>
1459 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
1462 2001-08-30 Paul Eggert <eggert@twinsun.com>
1464 * hash.c: Remove '2001' from copyright notice.
1466 2001-08-30 Paul Eggert <eggert@twinsun.com>
1468 * full-write.h: New file.
1469 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
1470 * full-write.c: Correct credits, as cccp.c no longer
1471 exists and anyway it was so heavily changed from the old cccp
1472 code as to be unrecognizable. Include full-write.h.
1473 (full_write) Return size_t, with short writes meaning failure.
1474 All callers changed. This fixes a bug with large buffers
1476 * utime.c: Include full-write.h.
1478 2001-08-30 Paul Eggert <eggert@twinsun.com>
1480 Merge 'exclude' changes from tar 1.13.22.
1481 This fixes one or two unlikely storage allocation overflow bugs,
1482 but doesn't change user-visible behavior otherwise.
1484 2001-08-30 Paul Eggert <eggert@twinsun.com>
1486 * exclude.c (bool): Declare, perhaps by including stdbool.h.
1487 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
1488 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
1489 Include if available.
1490 (<xalloc.h>): Include
1491 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
1492 (verify): New macro. Use it to verify that EXCLUDE macros do not
1493 collide with FNM macros.
1494 (struct patopts): New struct.
1495 (struct exclude): Use it, as exclude patterns now come with options.
1496 (new_exclude): Support above changes.
1497 (new_exclude, add_exclude_file):
1498 Initial size must now be a power of two to simplify overflow checking.
1499 (free_exclude, fnmatch_no_wildcards): New function.
1500 (excluded_filename): No longer requires options arg, as the options
1501 are determined by add_exclude. Now returns bool, not int.
1502 (excluded_filename, add_exclude):
1503 Add support for the fancy new exclusion options.
1504 (add_exclude, add_exclude_file): Now takes int options arg.
1505 Check for arithmetic overflow when computing sizes.
1506 (add_exclude_file): xrealloc might modify errno, so don't
1507 realloc until after errno might be used.
1509 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
1511 (free_exclude): New decl.
1512 (add_exclude, add_exclude_file): Now takes int options arg.
1513 (excluded_filename): No longer requires options arg, as the options
1514 are determined by add_exclude. Now returns bool, not int.
1516 2001-08-30 Paul Eggert <eggert@twinsun.com>
1518 * alloca.c (alloca): Arg is of type size_t, not unsigned.
1520 2001-08-27 Jim Meyering <meyering@lucent.com>
1522 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
1524 * version-etc.c (N_): Remove definition.
1525 Revert most of last change.
1526 Instead, simply don't mark the `Copyright...' string for translation.
1527 Based on advice from Paul Eggert.
1529 * strtoxmax.c: Tweak comment.
1531 2001-08-26 Jim Meyering <meyering@lucent.com>
1533 * version-etc.c (version_etc_copyright_fmt): Replace literal year
1534 of copyright with `%s' so translators don't get an untranslated
1536 (COPYRIGHT_YEAR): Define.
1537 (version_etc): Use fprintf rather than fputs.
1538 Suggestion from Ulrich Drepper.
1540 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
1542 * strtoll.c: New file, from GNU libc.
1543 * xstrtoimax.c: New file.
1545 * xstrtol.h: Add xstrtoimax.
1546 * strtoumax.c: New file. Simply include "strtoumax.c".
1547 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
1549 * strtoumax.c: Factor to work both for unsigned and signed types, ...
1550 * strtoxmax.c: ... then renamed to this.
1552 2001-08-13 Paul Eggert <eggert@twinsun.com>
1554 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
1555 Port to Solaris 8, where 'sed' requires a space after the 'r'
1556 command, and where sh dislikes "$/". Clean up the spacing a bit.
1557 Redirect output to $tmp just once.
1559 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
1561 * addext.c (<errno.h>): Include.
1562 (errno): Declare if not defined.
1563 (addext): Work correctly when pathconf returns -1 and leaves
1564 errno alone because there is no limit. Also, work even if
1565 pathconf returns a value greater than SIZE_MAX.
1567 2001-08-12 Jim Meyering <meyering@lucent.com>
1569 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
1570 Simply `return getcwd (NULL, 0);'.
1571 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
1572 Use 1300 as initial value for length, not PATH_MAX.
1574 * pathmax.h: Clean up cpp syntax.
1576 2001-08-12 Jim Meyering <meyering@lucent.com>
1578 * gettimeofday.c: New file.
1580 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
1582 2001-08-04 Jim Meyering <meyering@lucent.com>
1584 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
1585 to get in sync with glibc.
1587 2001-08-03 Paul Eggert <eggert@twinsun.com>
1589 The following changes are from gettext 0.10.39 as maintained by
1592 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
1593 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
1594 with inverted sense. All uses changed.
1596 * mbswidth.c: Don't include <limits.h>.
1597 Include <stdlib.h> and <string.h> unconditionally.
1598 (iswcntrl, mbsinit, ISCNTRL): New macros.
1599 (mbsnwidth): Use K&R style function declarations.
1600 Don't bother checking for MB_LEN_MAX == 1, since the compiler
1601 can optimize it when MB_CUR_MAX == 1.
1602 The width of control characters is zero, not 1.
1604 2001-07-15 Jim Meyering <meyering@lucent.com>
1606 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
1607 (BUILT_SOURCES): Add unlocked-io.h.
1608 (io_functions): Define.
1609 (unlocked-io.h): New rule.
1610 (DISTCLEANFILES): Add unlocked-io.h.
1611 (all-local): Depend on unlocked-io.h, to ensure it is created.
1613 * unlocked-io.hin: New file
1615 * regex.c: Update from glibc.
1617 2001-07-05 Jim Meyering <meyering@lucent.com>
1619 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
1621 (libfetish_a_SOURCES): Put all .h files here instead.
1622 Remove a thus-exposed (better checks in automake) duplicate and
1623 two unnecessary .h files.
1625 2001-06-11 Jim Meyering <meyering@lucent.com>
1627 * regex.c: Update from GNU libc.
1629 2001-05-27 Jim Meyering <meyering@lucent.com>
1631 * readutmp.h (UT_TYPE): Define.
1633 2001-05-24 Jim Meyering <meyering@lucent.com>
1635 * argmatch.c: Include "quote.h".
1636 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
1637 quote function. Reported by Göran Uddeborg.
1639 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
1641 * dirname.c (dir_name): Compute append_dot using path, not newpath
1642 which is not yet declared.
1644 2001-05-11 Paul Eggert <eggert@twinsun.com>
1646 * Makefile.am (libfetish_a_SOURCES):
1647 Add strftime.c, since we now compile it on all hosts.
1649 * strftime.c (my_strftime):
1650 Define to nstrftime if emacs, but only if my_strftime is not defined.
1651 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
1652 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
1653 Add one more extra argument: a nanoseconds value.
1656 (my_strftime function): Add %N format.
1657 (emacs_strftimeu): Renamed from emacs_strftime,
1658 with extra ut argument.
1660 2001-05-11 Paul Eggert <eggert@twinsun.com>
1662 dirname code cleanup. base_name now behaves more compatibly
1663 with POSIX basename when given file names that have trailing
1664 slashes, and similarly for dir_name. Add new primitives
1665 base_len and dir_len. Put the directory-name-related decls
1668 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
1669 * backupfile.c (base_name): Likewise.
1670 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
1671 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
1672 * makepath.c (strip_trailing_slashes): Likewise.
1673 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
1675 * rename.c (strip_trailing_slashes): Likewise.
1676 * same.c (base_name): Likewise.
1677 * stripslash.c (ISSLASH): Likewise.
1679 * addext.c: Include <dirname.h> after size_t is defined.
1680 * backupfile.c: Likewise.
1682 * addext.c (addext): Use base_len to trim redundant
1683 trailing slashes instead of doing it ourselves.
1684 But do not trim the last slash if it is not redundant.
1686 * backupfile.c (find_backup_file_name,
1687 max_backup_version): Use base_len instead of rolling it ourselves.
1688 Handle the case of "" and (on DOS) "C:" correctly.
1690 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
1691 Include <string.h>, <dirname.h>.
1692 (base_name): Allow file names ending in slashes, other than names
1693 that are all slashes. In this case, return the basename followed
1694 by the slashes. This is more general, and can be used in places
1695 where the original base_name purposely had an assertion failure.
1696 (base_len): New function.
1698 * dirname.c: Include <string.h> instead of <stdlib.h>.
1699 Do not include <assert.h>; no longer needed.
1701 (memrchr): Remove decl.
1702 (dir_name_r): Remove.
1703 (dir_len): Renamed from dirlen. All callers changed.
1704 Rewrite in terms of base_name, for simplicity and consistency.
1705 (dir_name): Never return NULL. All callers changed.
1706 Do not include <stdlib.h> in test program; no longer needed.
1707 return 0; is fine for test program.
1709 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
1711 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
1713 * path-concat.c (path_concat): Use base_len to compute
1714 base length, not strlen; this means we cannot rely on memcpy
1717 * same.c (STREQ): Remove.
1718 (same_name): Handle the case where the basename ends in trailing '/'.
1720 * stripslash.c (strip_trailing_slashes): Return nonzero if
1721 a slash was stripped. Do not strip the last slash after a
1724 2001-04-08 Jim Meyering <meyering@lucent.com>
1726 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
1727 recomputed; that's necessary when the offset spans a DST transition.
1728 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
1730 2001-04-02 Jim Meyering <meyering@lucent.com>
1732 * regex.h, regex.c: Update from GNU libc.
1734 2001-03-19 Paul Eggert <eggert@twinsun.com>
1736 * version-etc.c (version_etc_copyright): Update to 2001.
1738 2001-03-16 Paul Eggert <eggert@twinsun.com>
1740 * tempname.c (uint64_t): Define to uintmax_t if
1741 not defined, and if UINT64_MAX is not defined.
1742 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
1743 Reported by John David Anglin.
1745 2001-03-10 Bruno Haible <haible@clisp.cons.org>
1747 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
1748 alias if codeset is empty.
1749 * config.charset (BeOS): Use wildcard syntax.
1751 2001-03-13 Jim Meyering <meyering@lucent.com>
1753 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
1754 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
1757 2001-03-06 Bruno Haible <haible@clisp.cons.org>
1759 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
1761 * unicodeio.c (print_unicode_char): Simplify accordingly.
1763 2001-03-06 Bruno Haible <haible@clisp.cons.org>
1765 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
1766 support for DOS/DJGPP.
1768 2001-02-28 Paul Eggert <eggert@twinsun.com>
1770 * Makefile.am (libfetish_a_SOURCES):
1771 Add dup-safer.c, fopen-safer.c.
1772 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
1774 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
1776 2001-02-25 Paul Eggert <eggert@twinsun.com>
1778 The mkstemp replacement is taken from glibc 2.2.2, with some
1779 portability fixes for use outside glibc, as follows:
1781 * tempname.c (struct_stat64): New macro.
1782 (direxists, __gen_tempname): Use it.
1783 This avoids a portability problem with Solaris 8.
1785 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
1786 (<stddef.h>, <stdint.h>, <string.h>):
1787 Include only if STDC_HEADERS || _LIBC.
1788 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
1789 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
1790 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
1791 (__set_errno): Define this macro if <errno.h> doesn't.
1792 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
1793 Define these macros if <stdio.h> doesn't.
1794 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
1795 Define these macros if <sys/stat.h>
1796 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
1797 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
1798 __xstat64): Define if not _LIBC.
1799 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
1800 (__gen_tempname): Invoke gettimeofday only if
1801 HAVE_GETTIMEOFDAY || _LIBC;
1802 otherwise, fall back on plain "time".
1803 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
1805 * mkstemp.c (__GT_FILE): Define to zero if not defined.
1807 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
1809 2001-02-17 Jim Meyering <meyering@lucent.com>
1811 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
1812 around included file name.
1814 * strnlen.c (__strnlen): Merge in a change from GNU libc.
1816 * strftime.c: Update from GNU libc (the only changes were to comments).
1818 2001-02-13 Bruno Haible <haible@clisp.cons.org>
1820 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
1822 2001-02-17 Paul Eggert <eggert@twinsun.com>
1824 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
1825 Remove workaround macros for hosts that have mbrtowc but not
1826 mbstate_t, as we now insist on proper declarations for both
1827 before using mbrtowc.
1829 2001-02-17 Jim Meyering <meyering@lucent.com>
1831 * regex.c: Update from libc.
1833 2001-02-16 Paul Eggert <eggert@twinsun.com>
1835 * alloca.c (malloc): Undef before defining, since stdlib.h
1836 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
1837 Reported by Mark Hounschell via Paul Eggert.
1839 2001-01-30 Bruno Haible <haible@clisp.cons.org>
1841 * config.charset: Update for FreeBSD 4.2.
1843 2001-01-26 Jim Meyering <meyering@lucent.com>
1845 * quotearg.c: Include stddef.h.
1846 * quote.c: Include stddef.h.
1847 Reported by Axel Kittenberger.
1849 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
1850 line in double quotes so that it evokes a better diagnostic.
1851 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
1852 Reported by Axel Kittenberger.
1854 2001-01-15 Bruno Haible <haible@clisp.cons.org>
1856 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
1857 to avoid a warning. Add back 'const' to inptr.
1859 2001-01-16 Jim Meyering <meyering@lucent.com>
1861 * basename.c: Include <stdio.h>, needed by assert on SunOS4.
1864 2001-01-14 Jim Meyering <meyering@lucent.com>
1866 * rename.c: New file. From Volker Borchert.
1867 Include stdlib.h, string.h or strings.h, and xalloc.h.
1868 Use strip_trailing_slashes rather than open-coding it.
1870 2001-01-03 Paul Eggert <eggert@twinsun.com>
1872 * strftime.c: Sync with glibc time/strftime.c 1.81.
1874 2001-01-03 Jim Meyering <meyering@lucent.com>
1876 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
1877 local `inptr' to avoid warning with some system declarations of iconv.
1879 2000-12-29 Paul Eggert <eggert@twinsun.com>
1881 * modechange.c: Do not assume that mode_t uses the
1882 traditional octal encoding. E.g. "chmod 1 FOO" should set
1883 the other-execute bit of FOO even if S_IXOTH != 1.
1885 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
1886 WOTH, XOTH, ALLM): New macros.
1887 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
1888 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
1890 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
1891 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
1893 No need to use uintmax_t; unsigned long is long enough.
1894 Don't bother to get suffix since we don't use it.
1896 2000-12-24 Jim Meyering <meyering@lucent.com>
1898 * hash.c (is_prime): Return explicit boolean values.
1899 (hash_get_first): Return NULL to appease Irix5.6's 89.
1900 Reported by Nelson Beebe.
1902 2000-10-31 Bruno Haible <haible@clisp.cons.org>
1904 * localcharset.c (locale_charset): Add support for Win32.
1906 2000-12-18 Paul Eggert <eggert@twinsun.com>
1908 * physmem.h, physmem.c: New files.
1910 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
1911 (noinst_HEADERS): Add physmem.h.
1913 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
1914 't' for compatibility with Solaris 8 sort.
1916 2000-12-18 Bruno Haible <haible@clisp.cons.org>
1918 * config.charset: Add support for BeOS.
1920 2000-12-16 Jim Meyering <meyering@lucent.com>
1922 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
1923 SHELLS_FILE to a file name that's useful on djgpp systems.
1925 (ADDITIONAL_DEFAULT_SHELLS): Define.
1926 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
1927 Based mostly on a patch from Prashant TR.
1929 2000-12-16 Jim Meyering <meyering@lucent.com>
1931 This bug had a serious impact on chown: `chown N:M FILE' (for integer
1932 N and M) would have treated it like `chown N:N FILE'.
1934 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
1936 2000-10-31 Bruno Haible <haible@clisp.cons.org>
1938 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
1939 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
1940 to the list of canonical encodings. Rename EUC-CN to GB2312.
1942 2000-12-08 Andreas Schwab <schwab@suse.de>
1944 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
1945 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
1947 2000-12-07 Jim Meyering <meyering@lucent.com>
1949 * stripslash.c (ISSLASH): Define.
1950 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
1953 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
1954 (dir_name_r): Declare this function as static.
1955 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
1956 manifest itself on a name containing a mix of slashes and
1958 Make this function work with names starting with a DOS-style
1959 drive letter and colon prefix.
1960 (dir_name): Append `.' if necessary.
1961 Based mostly on patches from Prashant TR and Eli Zaretskii.
1963 * dirname.h (dir_name_r): Remove prototype.
1965 2000-12-05 Jim Meyering <meyering@lucent.com>
1967 * dirname.c (dir_name_r): Add `const' in a few local declarations.
1969 2000-12-04 Jim Meyering <meyering@lucent.com>
1971 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
1972 Also include memory.h, stdlib.h, unistd.h if appropriate.
1973 Reported by Andreas Jaeger (conflicting declaration of malloc).
1975 2000-12-02 Jim Meyering <meyering@lucent.com>
1977 * closeout.h: Make idempotent, to avoid some obscure warnings.
1979 2000-12-01 Paul Eggert <eggert@twinsun.com>
1981 * memrchr.c: Include <config.h> before any system include file.
1983 2000-11-29 Paul Eggert <eggert@twinsun.com>
1985 * dirname.c (dir_name_r): Fix typo: int -> size_t.
1987 2000-11-26 Jim Meyering <meyering@lucent.com>
1989 * memcoll.c: Include sys/types.h. From Werner Almesberger.
1991 2000-11-22 Paul Eggert <eggert@twinsun.com>
1993 * strftime.c (my_strftime): Do not invoke mbrlen with a
1994 size of (size_t) -1; it's not portable.
1996 2000-11-17 Akim Demaille <akim@epita.fr>
1998 * obstack.h: Formatting changes.
1999 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
2000 prevent type checking.
2001 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
2002 cast the value to (void *): assigning a `foo *' to a `void *'
2004 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
2006 2000-11-17 Jim Meyering <meyering@lucent.com>
2008 * strstr.c: Update from GNU libc.
2010 2000-11-16 Jim Meyering <meyering@lucent.com>
2012 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
2014 2000-11-11 Jim Meyering <meyering@lucent.com>
2016 * error.c: Add a couple #includes, merging from GNU libc version.
2018 2000-11-10 Jim Meyering <meyering@lucent.com>
2020 * obstack.h: Update from GNU libc.
2021 * obstack.c: Likewise.
2023 2000-11-06 Paul Eggert <eggert@twinsun.com>
2025 * getusershell.c (setusershell): Use rewind rather than
2026 fseek/fseeko, to avoid configuration hassles with fseeko.
2027 Don't bother opening SHELLS_FILE if shellstream is NULL;
2030 2000-11-05 Jim Meyering <meyering@lucent.com>
2032 * makepath.h (make_dir): Declare.
2033 * makepath.c (make_dir): Remove `static' attribute.
2036 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
2038 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
2039 last one in a bucket, advance to the next bucket.
2041 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
2043 * fnmatch.c: Do not comment out all the code if we are using
2044 the GNU C library, because in some cases we are replacing buggy
2045 code in the GNU C library itself.
2047 2000-10-30 Paul Eggert <eggert@twinsun.com>
2049 * error.h, getline.h, modechange.h:
2050 Remove "2000" from Copyright line, as the file hasn't been
2051 changed this year other than in the copyright notice.
2053 * xalloc.h: Add "2000" to Copyright line, as this file
2054 was changed this year.
2056 2000-10-30 Paul Eggert <eggert@twinsun.com>
2058 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
2059 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
2060 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
2062 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
2064 * regex.h (__restrict_arr): Move definition out of #ifndef block.
2065 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
2066 doesn't define __restrict_arr.
2068 2000-10-29 Jim Meyering <meyering@lucent.com>
2070 * xstat.in: Fix grammar in comment.
2072 2000-10-28 Jim Meyering <meyering@lucent.com>
2074 * memchr.c: Update from libc.
2075 Adjust for portability:
2076 [HAVE_STDLIB_H]: Include stdlib.h.
2077 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
2078 Undef __memchr, too.
2079 [!weak_alias]: Define __memchr to memchr.
2081 * regex.c: Update from libc.
2082 * regex.h: Likewise.
2083 * getopt1.c: Likewise.
2084 * memcmp.c: Likewise.
2086 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
2087 Avoid using fseek, when possible -- it's broken by design.
2088 Patch by Ulrich Drepper.
2090 2000-10-26 Jim Meyering <meyering@lucent.com>
2092 * strftime.c: Update from libc.
2094 2000-10-25 Jim Meyering <meyering@lucent.com>
2096 * obstack.c: Update from libc.
2098 2000-10-23 Jim Meyering <meyering@lucent.com>
2100 * hard-locale.c (hard_locale): Revert last change -- it was simply
2101 wrong. That set_locale call must not have any side effects.
2104 2000-10-22 Jim Meyering <meyering@lucent.com>
2106 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
2107 [CYCLIC]: Remove now-unused definition.
2109 * save-cwd.c (O_DIRECTORY): Define, if needed.
2110 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
2111 Suggestion from Ulrich Drepper.
2113 2000-10-21 Jim Meyering <meyering@lucent.com>
2115 * dirname.c (dir_name_r): New function, factored out of dir_name.
2116 (dir_name): Use dir_name_r.
2117 * dirname.h (dir_name_r): Declare it.
2119 2000-10-21 Jim Meyering <meyering@lucent.com>
2121 * dirname.c (memrchr): Declare if necessary.
2122 (dir_name): Remove the restriction that there be no
2123 trailing slashes. Now, this code skips past them, effectively
2125 [TEST_DIRNAME] (main): New unit tests.
2127 * memrchr.c: New file from GNU libc.
2128 Undef __memrchr, too.
2129 [!weak_alias]: Define __memrchr to memrchr.
2130 Guard weak_alias use with `#ifdef weak_alias'.
2132 2000-10-17 Jim Meyering <meyering@lucent.com>
2134 * quote.h (PARAMS): Define and use.
2135 Reported by Akim Demaille.
2137 * getopt.c: Update from libc.
2139 2000-10-16 Jim Meyering <meyering@lucent.com>
2141 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
2144 2000-09-25 Jim Meyering <meyering@lucent.com>
2146 * md5.h (rol): Define (from GnuPG).
2148 * sha.c: Give credit (GnuPG) where due.
2149 (M): Use rol rather than open-coding it.
2150 Add a FIXME comment.
2152 2000-09-21 Jim Meyering <meyering@lucent.com>
2154 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
2155 Reported by Michael Stone.
2157 2000-09-20 Jim Meyering <meyering@lucent.com>
2159 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
2160 (noinst_HEADERS): Add sha.h.
2161 Based on code from Scott G. Miller and from GnuPG.
2163 2000-09-15 Jim Meyering <meyering@lucent.com>
2165 * regex.c: Update from libc.
2167 2000-09-10 Jim Meyering <meyering@lucent.com>
2169 * getopt.c (_getopt_internal): Update from glibc.
2171 2000-09-09 Jim Meyering <meyering@lucent.com>
2173 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
2174 think it should be used as a general replacement for isascii.
2175 * fnmatch.c: Likewise.
2176 * mbswidth.c: Likewise
2177 * regex.c: Likewise.
2180 * userspec.c: Include sys/param.h and limits.h.
2182 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
2183 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
2184 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
2185 UID, GID. Check range.
2187 2000-09-06 Jim Meyering <meyering@lucent.com>
2189 * getopt.c (_getopt_internal): Update from glibc.
2191 2000-08-30 Jim Meyering <meyering@lucent.com>
2193 * strftime.c: Merge in changes from GNU libc.
2195 2000-08-26 Jim Meyering <meyering@lucent.com>
2197 * closeout.c: Include "__fpending.h".
2198 (close_stdout_status): Return right away if there's nothing to flush.
2200 * Makefile.am (noinst_HEADERS): Add __fpending.h.
2201 * __fpending.c: New file.
2202 * __fpending.h: New file.
2204 2000-08-07 Paul Eggert <eggert@twinsun.com>
2206 Standardize on "memory exhausted" instead of "Memory exhausted"
2207 or "virtual memory exhausted".
2208 * obstack.c (print_and_abort): Use "memory exhausted", not
2209 "virtual memory exhausted".
2210 * same.c (same_name): Invoke xalloc_die instead of printing
2212 * userspec.c (parse_user_spec): Likewise.
2213 * bumpalloc.h: comment fix
2214 * same.c, userspec.c: Include xalloc.h.
2216 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
2217 not char *const and pointing to a constant array.
2218 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
2219 (xrealloc): Comment fix.
2221 * userspec.c (parse_user_spec):
2222 Don't translate a message until just before returning,
2223 to avoid unnecessary translation.
2225 2000-08-07 Jim Meyering <meyering@lucent.com>
2227 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
2228 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
2229 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
2230 getgroups.c, gethostname.c, getopt.h, group-member.c,
2231 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
2232 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
2233 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
2234 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
2235 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
2236 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
2237 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
2238 yesno.c: Back out Copyright date changes for each file with no change
2239 this year. This eases coordination with other programs using the same
2240 source code modules. From Paul Eggert.
2242 2000-08-03 Greg McGary <greg@mcgary.org>
2244 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
2245 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
2246 (EXTEND_BUFFER): Use them.
2248 2000-08-01 Jim Meyering <meyering@lucent.com>
2250 * dirname.c (ISSLASH): Define.
2251 (BACKSLASH_IS_PATH_SEPARATOR): Define.
2252 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
2253 both `\' and `/' may be use as path separators.
2254 Based on a patch from Prashant TR.
2256 2000-07-31 Paul Eggert <eggert@twinsun.com>
2258 * quotearg.c (quotearg_n_options): Don't make the initial
2259 slot vector a constant, since it might get modified.
2261 2000-07-31 Jim Meyering <meyering@lucent.com>
2263 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
2264 * obstack.c (print_and_abort): Likewise.
2266 2000-07-30 Paul Eggert <eggert@twinsun.com>
2268 * quotearg.c (quotearg_n_options): Preallocate a slot 0
2269 buffer, so that the caller can always quote one small
2270 component of a "memory exhausted" message in slot 0.
2271 From a suggestion by Jim Meyering.
2273 2000-07-30 Jim Meyering <meyering@lucent.com>
2275 * makepath.c (make_path): Quote the other instance, too.
2277 * quotearg.c (N_STATIC_SLOTVECS): Define.
2278 (STATIC_BUF_SIZE): Define.
2279 (quotearg_n_options): Use only statically allocated storage when
2280 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
2281 than STATIC_BUF_SIZE.
2283 2000-07-29 Jim Meyering <meyering@lucent.com>
2285 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
2286 * dirname.c (dir_name): Likewise.
2288 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
2290 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
2291 (dir_name): Assert that there are no trailing slashes.
2293 2000-07-18 Bruno Haible <haible@clisp.cons.org>
2295 * mbswidth.h (mbswidth): Add a flags argument.
2296 (mbswidth): New declaration.
2297 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
2298 * mbswidth.c (mbswidth): Add a flags argument.
2299 (mbsnwidth): New function.
2301 2000-07-24 Jim Meyering <meyering@lucent.com>
2303 * mbswidth.c: Remove useless #else. From Bruno Haible.
2305 2000-07-23 Paul Eggert <eggert@twinsun.com>
2307 * mbswidth.c (_XOPEN_SOURCE):
2308 Don't define; this causes problems on Solaris 7.
2309 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
2311 2000-07-23 Paul Eggert <eggert@twinsun.com>
2314 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
2315 so that mbstate_t is always defined.
2317 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
2318 be 1 in at least one GCC installation, and this configuration
2319 error is likely to be common. Ignoring MB_LEN_MAX hurts
2320 performance on hosts that have mbrtowc but have only unibyte
2321 locales, but I assume these hosts are rare.
2323 2000-07-23 Paul Eggert <eggert@twinsun.com>
2325 * quotearg.c: Streamline by invoking multibyte code only if needed.
2326 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
2327 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
2328 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
2329 invoke multibyte primitives.
2331 2000-07-23 Jim Meyering <meyering@lucent.com>
2333 * basename.c (base_name): Add an assertion.
2335 2000-07-15 Bruno Haible <clisp.cons.org>
2337 * quotearg.c: When the system forces us to redefine mbstate_t,
2338 shadow its mbsinit function.
2340 2000-07-16 Bruno Haible <haible@clisp.cons.org>
2342 * mbswidth.h: New file.
2343 * mbswidth.c: New file.
2344 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
2345 (noinst_HEADERS): Add mbswidth.h.
2347 2000-07-17 Bruno Haible <haible@clisp.cons.org>
2349 * config.charset: Add support for FreeBSD. Improve support for HP-UX
2352 2000-07-15 Jim Meyering <meyering@lucent.com>
2354 * makepath.c: Include quote.h.
2355 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
2356 corresponding argument in a `quote (...)' call.
2357 Give better diagnostics.
2359 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
2360 (noinst_HEADERS): Add quote.h.
2362 * quote.c (quote, quote_n): New file. Two functions taken verbatim
2363 from tar's src/misc.c.
2364 * quote.h: New file. Prototypes for same.
2366 2000-07-10 Paul Eggert <eggert@twinsun.com>
2368 From a suggestion by Bruno Haible.
2369 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
2370 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
2371 to decide whether to define the BeOS workaround macro;
2372 this adjusts to the change to AC_MBSTATE_T.
2374 2000-07-13 Paul Eggert <eggert@twinsun.com>
2376 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
2378 * quotearg.c (quoting_style_args, quoting_style_vals,
2379 quotearg_buffer_restyled): Add support for
2380 clocale_quoting_style. Undo previous change to
2381 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
2382 and "{RIGHT QUOTATION MARK}" msgids.
2384 2000-07-05 Paul Eggert <eggert@twinsun.com>
2386 The old behavior of quoting `like this' doesn't look good with
2387 newer, ISO-style fonts. See:
2388 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2390 Instead, quote "like this" by default. Let the translator
2391 tailor the locale-specific quoting behavior by providing
2392 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
2394 * quotearg.c (N_): New macro.
2395 (gettext_default): New function.
2396 (quotearg_buffer_restyled): Use
2397 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
2398 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
2400 2000-07-09 Jim Meyering <meyering@lucent.com>
2402 * Most files: Update copyright dates to include 2000.
2404 2000-07-08 Jim Meyering <meyering@lucent.com>
2406 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
2408 (xgethostname): Remove now-unnecessary #ifdef.
2409 Move declaration of `err' into loop where it's used.
2411 2000-07-05 Bruno Haible <haible@clisp.cons.org>
2413 * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
2414 by allocating a larger buffer. Test the gethostname return value for
2415 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
2416 returns an error and ENAMETOOLONG isn't defined.
2418 2000-07-05 Paul Eggert <eggert@twinsun.com>
2419 and Bruno Haible <haible@clisp.cons.org>
2421 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
2423 2000-07-05 Bruno Haible <haible@clisp.cons.org>
2425 * quotearg.c (struct quoting_options): Simplify quote_these_too
2428 2000-07-03 Jim Meyering <meyering@lucent.com>
2430 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
2431 Reported by Bruno Haible.
2433 2000-07-04 Jim Meyering <meyering@lucent.com>
2435 * quotearg.c: Make inclusion of <wchar.h> independent of whether
2436 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
2439 2000-07-03 Paul Eggert <eggert@twinsun.com>
2440 and Bruno Haible <haible@clisp.cons.org>
2442 * quotearg.c (mbrtowc):
2443 Assign to *pwc, and return 1 only if result is nonzero.
2444 (iswprint): Use ISPRINT when substituting our own mbrtowc.
2446 2000-07-03 Jim Meyering <meyering@lucent.com>
2448 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
2449 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
2452 2000-07-02 Jim Meyering <meyering@lucent.com>
2454 * quotearg.c (mbstate_t): Don't define here.
2456 2000-07-02 Jim Meyering <meyering@lucent.com>
2458 * nanosleep.c (SIGCONT): Define if not already defined.
2460 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2462 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
2463 per change in ../m4/ls-mntd-fs.m4.
2464 (read_filesystem_list): Ignore symbolic links.
2466 2000-06-29 Jim Meyering <meyering@lucent.com>
2468 * same.c: Include <string.h> or <strings.h>, as appropriate,
2469 for declaration of strcmp.
2471 * long-options.c: Include <stdlib.h>, for declaration of exit.
2473 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
2474 Avoid warning by casting result to `char *' to remove `const'.
2476 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2478 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
2480 2000-06-26 Paul Eggert <eggert@twinsun.com>
2482 savedir now sets errno on failure and invokes xmalloc to get memory.
2483 Fix a couple of other minor bugs while we're at it.
2485 * savedir.c (<unistd.h>): Do not include; there's no need.
2486 (NAMLEN): Remove macro.
2487 (malloc, realloc): Remove decls.
2489 ("xalloc.h"): Include.
2490 (NAME_SIZE_DEFAULT): New macro.
2491 (savedir): Use xmalloc / xrealloc to allocate memory.
2492 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
2493 Skip "" directory entries.
2494 Use strlen to calculate directory entry length, since the old method
2495 is rarely used these days and isn't worth supporting.
2496 Don't use a pointer after freeing it.
2497 Check for integer overflow when calculating allocation size.
2498 Use memcpy to copy entries, instead of stpcpy.
2499 Set errno properly when returning NULL.
2500 Check for readdir error.
2502 2000-06-26 Jim Meyering <meyering@lucent.com>
2504 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
2506 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2508 * getusershell.c (xmalloc, xrealloc): Remove functions.
2510 Don't include <stdlib.h>. Don't declare malloc, realloc.
2512 2000-06-23 Bruno Haible <haible@clisp.cons.org>
2514 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
2516 2000-06-24 Jim Meyering <meyering@lucent.com>
2518 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
2520 2000-06-21 Jim Meyering <meyering@lucent.com>
2522 * getpass.c: New file, from Bruno Haible. Required for BeOS.
2524 2000-06-19 Paul Eggert <eggert@twinsun.com>
2526 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
2527 (mbrtowc, mbstate_t): Define substitutes if
2528 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
2529 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
2530 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
2532 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2534 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
2535 than 1024, return a memory chunk of least possible size, instead
2536 of size PATH_MAX + 2. In the loop, increment the size proportionally.
2537 Use free/xmalloc instead of xrealloc to avoid copying for very long
2540 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2542 * canon-host.c (canon_host): Use malloc and memcpy to copy an
2543 address, not strdup. Include <stdlib.h> and don't declare free().
2545 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2547 * path-concat.c (path_concat): Don't access dir[-1] if dir is
2550 2000-06-21 Jim Meyering <meyering@lucent.com>
2552 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
2553 (noinst_HEADERS): Add getstr.h.
2555 * getline.c (getstr): Move into a separate file.
2556 * getstr.c (getstr): New file, extracted from getline.c, with
2557 the following changes: new parameter, delim2; both delim[12]
2558 parameters have type `int', not `char'. The latter would lose
2559 with 8-bit delimiters.
2560 * getstr.h: New file.
2562 2000-06-19 Jim Meyering <meyering@lucent.com>
2564 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
2566 2000-06-18 Jim Meyering <meyering@lucent.com>
2568 * mkdir.c: Remove file, due mainly to copyright incompatibility.
2569 Besides, these days every porting target provides a mkdir function.
2571 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
2572 (this snippet comes from src/system.h).
2574 2000-06-15 Paul Eggert <eggert@twinsun.com>
2576 * human.c (adjust_value): New function.
2577 (human_readable_inexact): Apply rounding style even when
2578 printing approximate values.
2580 2000-06-14 Paul Eggert <eggert@twinsun.com>
2582 * human.c (human_readable_inexact): Allow an input block
2583 size that is not a multiple of the output block size, and vice versa.
2584 Reported by Piergiorgio Sartor.
2586 2000-06-14 Paul Eggert <eggert@twinsun.com>
2588 * getdate.y (get_date): Apply relative times after time
2589 zone indicator, not before. Reported by Todd A. Jacobs.
2591 2000-06-13 Jim Meyering <meyering@lucent.com>
2593 * Makefile.am (all-local): Depend on lstat.c and stat.c.
2595 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
2597 2000-06-12 Paul Eggert <eggert@twinsun.com>
2599 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
2601 2000-06-04 Paul Eggert <eggert@twinsun.com>
2603 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
2605 2000-06-04 Jim Meyering <meyering@lucent.com>
2607 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
2608 SunOS4.1.4 for which gid_t is an unsigned type.
2610 2000-06-03 Jim Meyering <meyering@lucent.com>
2612 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
2614 2000-05-26 Bruno Haible <haible@clisp.cons.org>
2616 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
2617 newer, don't install charset.alias.
2618 * config.charset: Change the Linux/glibc rules so they become empty
2619 on glibc-2.1 or newer.
2621 2000-06-02 Jim Meyering <meyering@lucent.com>
2623 * mountlist.c: Back out last change. Instead, do this...
2624 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
2625 member using the same `ignore'-testing code.
2626 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
2630 2000-05-29 Jim Meyering <meyering@lucent.com>
2632 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
2633 with the `ignore' attribute. Based on a patch from Mark D. Roth.
2635 2000-05-22 Jim Meyering <meyering@lucent.com>
2637 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
2639 2000-05-18 Jim Meyering <meyering@lucent.com>
2641 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
2642 back, too, since it may have been modified by allocate_entry.
2643 (hash_delete): Rewrite to use neither the assignment operator
2644 nor the comma operator in an if-expression.
2646 2000-05-15 Paul Eggert <eggert@twinsun.com>
2649 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
2650 Remove; no longer needed.
2651 "quotearg.h": Add include.
2652 (file_name): Do not bother to explicitly initialize to NULL; it's less
2653 efficient on some hosts.
2654 (close_stdout_status): Remove test as to whether stdout was already
2655 closed; it breaks for the case "echo x | sort >&-".
2656 Quote file name colons.
2657 Do not assume that _("write error") lacks format strings.
2659 2000-05-15 Jim Meyering <meyering@lucent.com>
2661 * version-etc.c (version_etc_copyright): Update the copyright string
2662 used in all --version output.
2664 2000-05-14 Jim Meyering <meyering@lucent.com>
2666 * closeout.c (close_stdout_set_file_name): New function.
2667 (close_stdout_status): Use new file-scoped global.
2668 Return right away if fstat says the stdout file descriptor is invalid.
2669 * closeout.h (close_stdout_set_file_name): Declare.
2671 2000-05-10 Jim Meyering <meyering@lucent.com>
2673 * closeout.c [default_exit_status]: New file-scoped variable.
2674 (close_stdout_set_status): New function.
2675 * closeout.h (close_stdout_set_status): Declare.
2677 2000-05-08 Jim Meyering <meyering@lucent.com>
2679 * long-options.c: Don't include closeout.h.
2680 (parse_long_options): Don't call close_stdout for --version.
2682 2000-05-06 Jim Meyering <meyering@lucent.com>
2684 * strnlen.c: Undefine __strnlen and strnlen.
2685 [!weak_alias]: Define __strnlen to strnlen.
2687 * atexit.c: New file, from libiberty.
2689 2000-05-06 Jim Meyering <meyering@lucent.com>
2691 * closeout.c (close_stdout_status): Also check for errors on the
2694 2000-05-05 Bruno Haible <haible@clisp.cons.org>
2696 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
2697 instead of xmalloc, xrealloc, path_concat.
2698 (locale_charset): Treat empty environment variables as absent.
2699 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
2701 2000-05-04 Jim Meyering <meyering@lucent.com>
2703 * getopt.c: Update from glibc.
2704 * obstack.c: Likewise.
2705 * obstack.h: Likewise.
2706 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
2708 * regex.h: Likewise.
2709 * strndup.c: Likewise.
2710 * strnlen.c: New file, from glibc.
2712 2000-05-01 Jim Meyering <meyering@lucent.com>
2714 * full-write.c (full_write): Remove `FIXME' part of comment.
2716 2000-04-29 Jim Meyering <meyering@lucent.com>
2718 * path-concat.c: Declare strdup only if it's not defined.
2719 * canon-host.c: Likewise.
2721 2000-04-28 Jim Meyering <meyering@lucent.com>
2723 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
2724 redefinition warning on some systems (HPUX). Otherwise, regex.h is
2725 included first, then limits.h is included by locale.h by libintl.h.
2726 From John David Anglin.
2728 2000-04-25 Jim Meyering <meyering@lucent.com>
2730 * makepath.c (S_IRWXUGO): Define.
2731 (make_path): Always perform explicit chmod if MODE specifies any
2732 of the `special' permission bits. Prompted by a bug report against
2733 install from Mate Wierdl and Joost van Baal.
2735 2000-04-18 Jim Meyering <meyering@lucent.com>
2739 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
2740 getpagesize. For BeOS. Based on a patch from Bruno Haible.
2742 2000-04-17 Jim Meyering <meyering@lucent.com>
2744 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
2745 the definition of it to rpl_strftime also defined-away the system's
2748 2000-04-15 Jim Meyering <meyering@lucent.com>
2750 Use `C' to denote so-called `contiguous' files, the same way
2752 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
2753 (ftypelet): Use S_ISCTG.
2754 From Michael Deutschmann.
2756 2000-04-14 Jim Meyering <meyering@lucent.com>
2758 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
2760 2000-04-08 Jim Meyering <meyering@lucent.com>
2762 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
2763 names don't conflict. Reported by Eli Zaretskii.
2765 2000-03-28 Bruno Haible <haible@clisp.cons.org>
2767 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
2768 bug. Deal with the different error behavior of Irix iconv.
2770 2000-04-07 Jim Meyering <meyering@lucent.com>
2772 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
2773 to work around system header problems on AIX 3.2.5. From Bruno Haible.
2775 2000-04-05 Jim Meyering <meyering@lucent.com>
2777 Portability tweaks required for ultrix4.3.
2778 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
2779 * readutmp.c: Include sys/types.h before sys/stat.h.
2780 * canon-host.c: Declare strdup.
2781 * path-concat.c: Likewise.
2782 From John David Anglin.
2784 2000-04-04 Jim Meyering <meyering@lucent.com>
2786 Be more DOS 8.3-friendly.
2787 * ref-add.sin: Renamed from ref-add.sed.in.
2788 * ref-del.sin: Renamed from ref-del.sed.in.
2789 * Makefile.am: Reflect renaming.
2790 Reported by Eli Zaretskii.
2792 Use a temporary file name that won't clash with `charset.alias'
2793 in the DOS 8.3 name space.
2794 * Makefile.am (charset_tmp): Define.
2795 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
2796 (uninstall-local): Likewise.
2797 Reported by Eli Zaretskii.
2799 2000-03-29 Paul Eggert <eggert@twinsun.com>
2801 * time/strftime.c (my_strftime): Make sure we call the system
2802 strftime, not ourselves, when invoking the underlying strftime.
2804 2000-03-24 Jim Meyering <meyering@lucent.com>
2806 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
2807 (charset_alias): Define.
2808 (install-exec-local): Factor out common code.
2809 (uninstall-local): Split lines longer than 80.
2810 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
2812 (.sed.in.sed): New rule. Don't redirect directly to $@.
2813 (CLEANFILES): Add ref-add.sed and ref-del.sed.
2815 2000-03-19 Bruno Haible <haible@clisp.cons.org>
2817 * config.charset: Output a line containing "Packages using this file".
2818 * ref-add.sed.in, ref-del.sed.in: New files.
2819 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
2820 ref-del.sed): New rules.
2822 2000-03-17 Jim Meyering <meyering@lucent.com>
2824 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
2825 Otherwise, include <strings.h>
2827 2000-03-17 Bruno Haible <haible@clisp.cons.org>
2829 * unicodeio.c (utf8_wctomb): New function.
2830 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
2831 format instead of in UCS-4 with platform dependent endianness.
2833 2000-03-07 Paul Eggert <eggert@twinsun.com>
2835 * savedir.c (savedir): Work even if directory size is
2836 negative; this can happen with some screwy NFS configurations.
2838 2000-03-06 Jim Meyering <meyering@lucent.com>
2840 * localcharset.c (get_charset_aliases): Don't try to free file_name
2841 if it's NULL (because we ran out of memory). From Bruno Haible.
2843 2000-03-05 Jim Meyering <meyering@lucent.com>
2845 * localcharset.c ("path-concat.h"): Include.
2846 (get_charset_aliases): Use path_concat instead of ANSI string
2849 * unicodeio.h (PARAMS): Define.
2850 Use it to guard prototype.
2852 2000-03-04 Jim Meyering <meyering@lucent.com>
2854 * Makefile.am (install-exec-local): Create $(libdir) before installing
2856 (uninstall-local): Uncomment this rule so `make distcheck' works
2859 * unicodeio.c (<errno.h>): Include it.
2860 (errno): Declare if not defined.
2862 * localcharset.c: Add Bruno's comment justifying use of volatile.
2864 * config.charset: New version, incorporating remarks from a linux
2865 i18n mailing list. From Bruno Haible.
2867 2000-03-02 Jim Meyering <meyering@lucent.com>
2869 * Makefile.am (EXTRA_DIST): Add config.charset.
2871 2000-03-01 Jim Meyering <meyering@lucent.com>
2873 * localcharset.c: Guard some #includes with `#if HAVE_...'.
2874 * unicodeio.c: Likewise.
2876 2000-02-02 Bruno Haible <haible@clisp.cons.org>
2878 * config.charset: New file.
2879 * localcharset.c: New file.
2880 * unicodeio.h, unicodeio.c: New files.
2881 * Makefile.am (DEFS): Add -DLIBDIR=...
2882 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
2883 (noinst_HEADERS): Add unicodeio.h.
2884 (all-local, install-exec-local, charset.alias): New targets.
2886 2000-02-28 Paul Eggert <eggert@twinsun.com>
2888 * quotearg.c (ALERT_CHAR): New macro.
2889 (quotearg_buffer_restyled): Use it.
2891 2000-02-27 Jim Meyering <meyering@lucent.com>
2893 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
2894 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
2896 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
2897 not `#if STDC_HEADERS'.
2898 Declare malloc if needed.
2900 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
2901 now that autoconf always defines the HAVE_DECL_ symbols.
2902 * human.c: Likewise.
2904 * strtoumax.c: Likewise.
2906 * backupfile.c: Arrange for cpp to fail if the configure-time
2907 declaration check was not run.
2909 * human.c: Likewise.
2911 * strtoumax.c: Likewise.
2913 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
2914 then first look up the entire `.'-containing string as a login name.
2916 2000-02-18 Paul Eggert <eggert@twinsun.com>
2918 * getdate.y: Handle two-digit years with leading zeros correctly.
2919 (textint): New typedef.
2920 (parser_control): Member year changed from int to textint.
2922 (YYSTYPE): Removed; replaced by %union with int and textint members.
2923 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
2924 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
2925 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
2926 (tSNUMBER, tUNUMBER): Now of type <textintval>.
2927 (date, number, to_year): Use width of number in digits, not its value,
2928 to determine whether it's a 2-digit year, or a 2-digit time.
2929 (yylex): Store number of digits of numeric tokens.
2930 Reported by John Kendall.
2932 (parser_control): Changed from struct parser_control to typedef (for
2933 consistency). All uses changed.
2935 (tID): Removed; not used.
2936 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
2938 2000-02-14 Paul Eggert <eggert@twinsun.com>
2940 * getpagesize.h (getpagesize): Port to VMS for Alpha;
2941 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
2943 2000-02-12 Jim Meyering <meyering@lucent.com>
2945 * userspec.c (ISDIGIT): Define it.
2946 (isdigit): Remove definition.
2947 (is_number): Use ISDIGIT, not isdigit.
2948 <libintl.h>: Include.
2950 (parse_user_spec): Mark translatable strings.
2952 2000-02-10 Jim Meyering <meyering@lucent.com>
2954 With these changes, nanosleep.[ch] are finally enough like the other
2955 lib/* replacement files to compile on a few more losing systems.
2957 * nanosleep.h: Don't include config.h.
2958 Remove prototype from declaration of nanosleep.
2959 (PARAMS): Remove now-unneeded definition.
2960 * nanosleep.c: #undef nanosleep.
2961 (rpl_nanosleep): Rename from nanosleep.
2963 2000-02-03 Jim Meyering <meyering@lucent.com>
2965 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
2966 rather than with `#if HAVE_UTMPNAME'.
2968 2000-02-01 Jim Meyering <meyering@lucent.com>
2970 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
2972 2000-01-31 Jim Meyering <meyering@lucent.com>
2974 * nanosleep.h (nanosleep): Guard declaration with
2975 `#if ! HAVE_DECL_NANOSLEEP'.
2976 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
2977 the declaration in that vendor's sys/timers.h.
2978 Reported by Christian Krackowizer.
2980 * quotearg.c (ISASCII): Add #undef and move definition to follow
2981 inclusion of wctype.h to work around solaris2.6 namespace pollution.
2982 (ISPRINT): Likewise.
2983 Reported by Tom Tromey.
2985 2000-01-30 Jim Meyering <meyering@lucent.com>
2987 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
2988 uses of ->ut_name. The latter doesn't work with new Linux header files
2989 where only utmpx.ut_user is declared.
2991 * readutmp.h (UT_USER): Define.
2993 2000-01-23 Jim Meyering <meyering@lucent.com>
2995 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
2998 2000-01-22 Jim Meyering <meyering@lucent.com>
3000 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
3001 [! HAVE_DECL_STRTOULL]: Declare strtoull.
3002 Required for some AIX systems. Reported by Christian Krackowizer.
3003 [TESTING] (main): New function.
3005 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
3006 * dirname.c (dir_name): Support for DOS-style file names with drive
3009 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
3011 * strverscmp.c (ISDIGIT): Define.
3012 (strverscmp): Use ISDIGIT, not isdigit.
3014 2000-01-17 Paul Eggert <eggert@twinsun.com>
3016 * nanosleep.c (nanosleep):
3017 Don't use SA_INTERRUPT to decide whether to call sigaction, as
3018 POSIX.1 doesn't require SA_INTERRUPT and some systems
3019 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
3020 it's been part of POSIX.1 since day 1 (in 1988).
3022 2000-01-17 Jim Meyering <meyering@lucent.com>
3024 * interlock: Remove unused file. Reported by François Pinard.
3026 2000-01-16 Paul Eggert <eggert@twinsun.com>
3028 * quotearg.c (quotearg_buffer_restyled): Do not quote
3029 alert, backslash, formfeed, and vertical tab unnecessarily in
3030 shell quoting style.
3033 version-control: never