1 2003-01-11 Bruno Haible <bruno@clisp.org>
3 * readtokens.c (readtoken): Cast character to 'unsigned char', not
6 2003-01-11 Bruno Haible <bruno@clisp.org>
8 * hash-pjw.c: Add comment about low quality of this function.
10 2003-01-12 Paul Eggert <eggert@twinsun.com>
12 Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
13 to avoid collisions with libcurses and libreadline.
15 * Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
16 * getstr.h, getstr.c: Remove.
17 * getline.c: Include "getline.h", to check interface.
18 Move body of old getstr.c here: this defines MIN_CHUNK and
19 declares getdelim2, which is renamed from getstr.
20 (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
22 * linebuffer.c (readlinebuffer): Renamed from readline.
24 * linebuffer.h: Likewise.
25 (readline): Remove backward-compatibility macro.
27 2003-01-12 Jim Meyering <jim@meyering.net>
29 * makepath.c: Don't test HAVE_ERRNO_H. It's not necessary.
31 2003-01-10 Bruno Haible <bruno@clisp.org>
33 * alloca_.h: New file.
34 * getdate.y: Unconditionally include alloca.h.
35 * makepath.c: Likewise.
37 * userspec.c: Likewise.
39 2003-01-09 Bruno Haible <bruno@clisp.org>
41 * stdbool.h.in: New file.
43 2003-01-08 Bruno Haible <bruno@clisp.org>
45 * safe-read.c: Include specification header first, to ensure its
47 * full-write.c: Likewise.
49 2003-01-08 Jim Meyering <jim@meyering.net>
51 * full-write.c: Undefine and define-away `const' after inclusion
52 of errno.h, not before. Suggestion from Bruno Haible.
54 2003-01-07 Jim Meyering <jim@meyering.net>
56 * full-write.c: Rework so that it may serve to define full_read, too.
57 * full-read.c: Simply #define FULL_READ and include full-write.c.
59 2003-01-06 Jim Meyering <jim@meyering.net>
61 * version-etc.c: Update year in translatable copyright string.
63 2002-12-25 Bruno Haible <bruno@clisp.org>
65 * strtoimax.c: Include <stdint.h> as an alternative to <inttypes.h>.
66 * xstrtol.h: Likewise.
67 * xstrtoimax.c: Likewise.
68 * xstrtoumax.c: Likewise.
71 * tempname.c: Include <inttypes.h> too. Avoids a compilation error
72 on systems that have <inttypes.h> but not <stdint.h>.
74 2002-12-31 Paul Eggert <eggert@twinsun.com>
76 * memcoll.c (memcoll): Fall back on a simple algorithm using
77 memcmp if strcoll doesn't work.
79 2002-12-23 Bruno Haible <bruno@clisp.org>
81 * localcharset.h: New file.
82 * localcharset.c: Include it.
83 * unicodeio.c: Likewise.
85 2002-12-22 Bruno Haible <bruno@clisp.org>
87 * utime.c (utime_null): No need to call ftruncate if the file was
90 2002-12-23 Bruno Haible <bruno@clisp.org>
92 * memcoll.c (STRCOLL): New macro.
95 2002-12-22 Bruno Haible <bruno@clisp.org>
97 * getstr.h (getstr): Define, to avoid clash with libcurses.
98 * linebuffer.h (readline): Define, to avoid clash with libreadline.
100 2002-12-22 Bruno Haible <bruno@clisp.org>
102 * getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not HAVE_TM_ZONE.
104 2002-12-23 Bruno Haible <bruno@clisp.org>
106 * getline.h: Include <stddef.h>, for size_t.
108 * unicodeio.h: Include <stddef.h>, for size_t.
109 * unicodeio.c: Don't include <stddef.h>.
111 2002-12-17 Bruno Haible <bruno@clisp.org>
113 * canon-host.c (strdup): Remove unused declaration.
115 * fsusage.c: Include full_read.h.
116 (get_fs_usage): Use full_read instead of safe_read.
118 * utime.c (utime_null): Use SAFE_READ_ERROR.
120 2002-12-11 Bruno Haible <bruno@clisp.org>
122 * setenv.h: Rewritten to cope with systems that have setenv() but not
124 * setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
127 2002-12-11 Bruno Haible <bruno@clisp.org>
129 * setenv.c (alloca): Fall back to malloc.
131 (setenv): Use freea() to free memory allocated with alloca().
133 2002-11-13 Bruno Haible <bruno@clisp.org>
135 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
136 function declarations.
137 * unsetenv.c (unsetenv): Likewise.
139 2002-03-04 Bruno Haible <bruno@clisp.org>
141 Portability to AIX 4.3.3.
142 * unsetenv.c: New file, extracted from setenv.c.
143 * setenv.c: Move the unsetenv() function to unsetenv.c.
145 2001-12-20 Bruno Haible <bruno@clisp.org>
147 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
148 use malloc instead. For SunOS4.
150 2001-12-11 Bruno Haible <bruno@clisp.org>
152 * setenv.c: Declare alloca.
153 (compar_fn_t): New typedef.
154 (KNOWN_VALUE, STORE_VALUE): Use it.
156 * Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
159 2002-12-10 Paul Eggert <eggert@twinsun.com>
161 Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
162 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
163 Choose values that are less likely to collide with system fnmatch
165 * exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
166 defined (e.g., a pure POSIX system).
167 (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
168 instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
170 2002-12-06 Jim Meyering <jim@meyering.net>
172 * error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
174 Merge in changes from libc's misc/error.c, in preparation
175 for the merge of gnulib's changes back into libc.
177 * error.c (_): Define only if not already defined.
178 Move definition to follow all #include directives.
179 Include unlocked-io.h only if !_LIBC.
180 [_LIBC]: Include <libio/libioP.h>.
181 [USE_IN_LIBIO]: Include <libio/iolibio.h>
182 (fflush): Tweak definition to use INTUSE.
185 2002-12-05 Paul Eggert <eggert@twinsun.com>
187 * alloca.c [defined emacs]: Include "lisp.h".
188 (xalloc_die) [defined emacs]: New macro.
189 (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
190 [! defined emacs]: Include <xalloc.h>.
191 (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
192 (pointer): Typedef to POINTER_TYPE *.
193 (malloc): Remove decl; we now always use xmalloc.
194 (alloca): Use old-style definition, since Emacs needs this.
195 Check for arithmetic overflow when computing combined size.
197 2002-12-04 Paul Eggert <eggert@twinsun.com>
199 Do not generate unlocked-io.h automatically, since it's easier to
202 * unlocked-io.h: New file, from GNU diffutils,
203 but with proper copyright notice and attribution.
205 * Makefile.am: Add copyright notice.
206 (libfetish_a_SOURCES): Add unlocked-io.h.
207 (BUILT_SOURCES, all-local): Remove unlocked-io.h.
208 (DISTCLEANFILES, io_functions): Remove macros.
209 (EXTRA_DIST): Remove gen_uio.
210 (unlocked-io.h): Remove rule.
212 2002-12-04 Jim Meyering <jim@meyering.net>
214 Reflect the fact that stat.c and lstat.c are no longer generated.
215 * Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
216 (DISTCLEANFILES): Likewise.
217 (EXTRA_DIST): Likewise.
218 (all_local): Don't depend on stat.c or lstat.c.
219 (stat.c, lstat.c): Remove rules.
220 (EXTRA_DIST): Remove xstat.in.
222 * xstat.in: Remove file. Contents moved into stat.c.
223 * stat.c: New file. Contents mostly from xstat.in.
224 * stat.c: Rework so that it may serve to define rpl_lstat, too.
225 * lstat.c: New file. Simply #define LSTAT and include stat.c.
227 * safe-read.c: Rework so that it may serve to define safe_write, too.
228 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
230 2002-12-03 Jim Meyering <jim@meyering.net>
232 * safe-read.c, safe-write.c: Change variable names and comments, but
233 not semantics, to minimize the differences between these two files.
234 (safe_read): Change comment to mention SAFE_READ_ERROR.
236 * safe-read.c (IS_EINTR): Define.
237 (safe_read): Use IS_EINTR in place of in-function cpp directives.
239 2002-12-02 Bruno Haible <bruno@clisp.org>
241 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
242 Define, taken from safe-read.c.
243 (INT_MAX): Provide fallback.
244 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
245 * safe-write.h (SAFE_WRITE_ERROR): Define.
247 * safe-read.c (EINTR): Remove definition.
248 (safe_read): Don't use EINTR if it is absent.
250 2002-12-02 Jim Meyering <jim@meyering.net>
252 * safe-read.c (EINTR): Define.
253 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
254 (INT_MAX): Provide fallback.
255 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
257 * safe-read.h (SAFE_READ_ERROR): Define.
259 2002-12-01 Jim Meyering <jim@meyering.net>
261 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
262 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
264 2002-11-27 Paul Eggert <eggert@twinsun.com>
266 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
267 hash_rehash): Replace `if (limit <= value) abort ();' with
268 `if (! (value < limit)) abort ();', for readability.
270 2002-11-26 <karl@gnu.org>
272 * strdup.c: copy from libc again, with jim's ok.
273 * .cppi-disable: re-add strdup.c
275 2002-11-25 <karl@gnu.org>
277 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
278 instead of "strtol.c".
280 2002-11-25 Jim Meyering <jim@meyering.net>
282 * mktime.c: Sync from libc, now that it has the latest fix.
284 2002-11-24 <karl@gnu.org>
286 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
287 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
289 2002-11-24 Jim Meyering <jim@meyering.net>
291 Update from coreutils:
293 * mktime.c: Merge in changes from libc.
295 Avoid a link-time failure on some Linux systems.
296 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
297 (__mon_yday): Declare with the STATIC attribute.
298 (__mktime_internal): Likewise.
299 Based on a report from Greg Schafer.
301 2002-11-23 Jim Meyering <jim@meyering.net>
303 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
304 Use `unsigned', not `int', as type of index.
306 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
308 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
310 2002-11-22 Paul Eggert <eggert@twinsun.com>
312 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
313 hint that one should use `if (! x) abort ();' rather than `assert
314 (x);', and anyway it's one less thing to worry about configuring.
315 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
316 hash_rehash, hash_insert): Use abort rather than assert.
318 2002-11-22 Paul Eggert <eggert@twinsun.com>
320 * quotearg.h: Allow multiple inclusion by surrounding with
321 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
322 so that we can be included first.
323 (PARAMS): Remove; we now assume C89 or later. All uses removed.
324 * quotearg.c: Include quotearg.h immediately after config.h.
325 No need to include stddef.h or sys/types.h any more.
326 Surround local include files with "", not "<>".
327 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
328 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
329 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
330 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
331 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
332 (ISPRINT): Remove; no longer needed now that we assume C89.
334 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
337 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
338 quotearg_char): Use SIZE_MAX rather than
339 (size_t) -1 when we are talking about "infinity".
341 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
343 2002-11-22 Bruno Haible <bruno@clisp.org>
345 * safe-read.h: Assume C89. Add comments.
346 (safe_read): Change return type to size_t.
347 * safe-read.c (safe_read): Change return type to size_t. Handle byte
348 counts > SSIZE_MAX correctly.
349 * safe-write.h: New file.
350 * safe-write.c: New file.
351 * full-read.h: New file.
352 * full-read.c: New file.
353 * full-write.h: Assume C89. Add comments.
354 * full-write.c: Include safe-write.h.
355 (full_write): Rewritten to use safe_write.
356 Suggested by Jim Meyering and Paul Eggert.
358 2002-11-21 Bruno Haible <bruno@clisp.org>
360 Remove case insensitive option matching.
361 * argmatch.h (argcasematch): Remove declaration.
362 (ARGCASEMATCH): Remove macro.
363 (__xargmatch_internal): Remove case_sensitive argument.
365 (XARGCASEMATCH): Remove macro.
366 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
367 case_sensitive argument.
368 (argcasematch): Remove function.
369 (__xargmatch_internal): Remove case_sensitive argument.
370 (main): Use XARGMATCH instead of XARGCASEMATCH.
372 * xmalloc.c: Change compile-time error message. Add comment about
373 required autoconf version.
375 2002-11-21 Jim Meyering <jim@meyering.net>
377 * strdup.c (strdup): Tweak comment and initial #if/#include.
379 Merge in changes from the coreutils.
381 2002-09-25 Paul Eggert <eggert@twinsun.com>
382 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
383 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
384 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
385 int. Work more efficiently if X is the same width as uintmax_t.
386 Do not compare X to -1, to avoid bogus compiler warning.
387 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
388 Don't assume that f_frsize and f_bsize are the same type.
390 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
393 * makepath.c (make_path): Restore umask *before* creating the final
395 (make_path): Minor reformatting.
397 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
398 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
400 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
401 ones. At least on GNU/Linux systems, `auto' means something else.
404 2002-11-20 Paul Eggert <eggert@twinsun.com>
406 Merge argmatch cleanups from Bison. Assume C89.
408 * argmatch.c: Include config.h here, not in argmatch.h.
409 Include stdlib.h, for EXIT_FAILURE.
410 Always include <string.h>, since we assume C89.
411 (EXIT_FAILURE): Remove pre-C89 bug workaround.
412 * argmatch.h: Do not include <config.h> or <sys/types.h>.
413 Include <stddef.h> instead, since it's all we need for size_t.
414 (PARAMS): Remove. All uses removed.
415 (ARRAY_CARDINALITY): Do not bother to #undef.
416 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
417 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
418 Remove unnecessary parentheses.
419 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
420 Insert necessary parentheses.
421 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
422 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
424 2002-11-19 Bruno Haible <bruno@clisp.org>
426 * mbswidth.c: Include mbswidth.h right at the beginning.
427 * mbswidth.h: Include <stddef.h>, for size_t.
429 * mbswidth.h (PARAMS): Remove macro.
430 (mbswidth, mbsnwidth): Use ANSI C function declarations.
431 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
433 * gcd.h (PARAMS): Remove macro.
434 (gcd): Use ANSI C function declarations.
435 * gcd.c (gcd): Likewise.
437 2002-11-15 Bruno Haible <bruno@clisp.org>
439 * strcspn.c: Include <stddef.h>.
440 (strcspn): Use ANSI C function declaration. Change return type to
442 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
444 * strpbrk.h (PARAMS): Remove macro.
445 (strpbrk): Use ANSI C function declaration.
446 * strstr.c: Don't include <sys/types.h>.
447 * strstr.h (PARAMS): Remove macro.
448 (strstr): Use ANSI C function declarations.
450 2002-11-06 Bruno Haible <bruno@clisp.org>
452 * gcd.h (gcd): Change argument type to 'unsigned long'.
453 * gcd.c (gcd): Likewise.
455 2002-11-05 Bruno Haible <bruno@clisp.org>
457 * gcd.h: New file, from gettext-0.11.5.
458 * gcd.c: New file, from gettext-0.11.5.
460 2002-11-05 Bruno Haible <bruno@clisp.org>
462 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
463 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
464 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
465 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
467 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
468 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
470 * closeout.c: Include gettext.h instead of <libintl.h>.
471 * human.c: Include gettext.h instead of <libintl.h>.
472 * quotearg.c: Include gettext.h instead of <libintl.h>.
473 * rpmatch.c: Include gettext.h instead of <libintl.h>.
474 * unicodeio.c: Include gettext.h instead of <libintl.h>.
475 * userspec.c: Include gettext.h instead of <libintl.h>.
476 * version-etc.c: Include gettext.h instead of <libintl.h>.
477 * xmalloc.c: Include gettext.h instead of <libintl.h>.
478 (textdomain): Remove definition.
479 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
481 * long-options.c: Remove include of <libintl.h> and definition of _.
482 * same.c: Remove include of <libintl.h> and definition of _.
484 2002-11-04 Bruno Haible <bruno@clisp.org>
486 * stpcpy.h: New file, from GNU gettext-0.11.5.
487 * strcase.h: New file, from GNU gettext-0.11.5.
488 * strpbrk.h: New file, from GNU gettext-0.11.5.
489 * strstr.h: New file, from GNU gettext-0.11.5.
490 * xgetcwd.h: New file, from GNU gettext-0.11.5.
492 2002-05-09 Bruno Haible <bruno@clisp.org>
494 * config.charset: Update for newest glibc. Add canonical names
495 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
497 2002-05-09 Bruno Haible <bruno@clisp.org>
499 * localcharset.c (get_charset_aliases): Add more Windows specific
502 2002-05-08 Owen Taylor <otaylor@redhat.com>
504 * config.charset: A few additions for Solaris.
506 2001-12-05 Bruno Haible <bruno@clisp.org>
508 * localcharset.c (locale_charset): Don't return an empty string.
510 2001-10-23 Bruno Haible <haible@clisp.cons.org>
512 * config.charset: msdos in uk_UA uses CP1125.
514 2001-08-05 Bruno Haible <haible@clisp.cons.org>
516 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
517 * localcharset.c (locale_charset): Declare as extern "C".
519 2002-02-15 Bruno Haible <bruno@clisp.org>
521 * config.charset [msdosdjgpp]: For Russian, use CP866.
523 2002-02-11 Bruno Haible <bruno@clisp.org>
525 * config.charset: Add support for NetBSD.
527 2002-09-25 <karl@gnu.org>
529 * strdup.c: copy from libc/string (via ../config/srclist*).
530 * getopt*: copy from libc/posix.
531 * gettext.h: copy from gettext.
532 * .cppi-disable: add strdup.c, gettext.h.
534 2002-07-01 Jim Meyering <meyering@lucent.com>
536 * c-stack.c: Include sys/time.h.
537 From Volker Borchert.
539 2002-06-11 Paul Eggert <eggert@twinsun.com>
541 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
542 New macro. Use it uniformly instead of
543 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
544 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
545 reported by Vin Shelton.
547 2002-06-22 Jim Meyering <meyering@lucent.com>
549 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
550 redefinition due to Solaris5.6's definition in /usr/include/sys/euc.h.
552 2002-06-22 Paul Eggert <eggert@twinsun.com>
554 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
555 Do not assume SA_SIGINFO behavior.
556 Bug reported by Jim Meyering on NetBSD 1.5.2.
558 2002-06-22 Jim Meyering <meyering@lucent.com>
560 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
562 * exitfail.c, exitfail.h: Likewise.
563 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
565 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
567 (EXTRA_DIST): Add fnmatch_loop.c.
568 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
570 * fnmatch_loop.c: New file, from diffutils-2.8.2.
571 * fnmatch.c: Update from diffutils-2.8.2.
572 * fnmatch_.h: New file. From diffutils-2.8.2.
573 * fnmatch.h: Remove file.
575 2002-06-18 Paul Eggert <eggert@twinsun.com>
577 * file-type.h: Report an error if neither S_ISREG nor
578 S_IFREG is defined, instead of using a test specific to glibc
579 2.2. This should be safe, since POSIX requires S_ISREG and
580 Unix Version 7 had S_IFREG. We don't need to check for
581 <sys/types.h> since we don't use any symbols that it defines.
583 2002-06-15 Jim Meyering <meyering@lucent.com>
585 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
586 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
587 have been included before this file.
589 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
591 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
592 so that each temporary file name is unique and valid in the first
593 8 characters, for operation under DOS.
595 2002-06-15 Jim Meyering <meyering@lucent.com>
597 Work even with DJGPP 2.03, which lacks support for symlinks.
599 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
601 * lchown.c (S_ISLNK): Likewise.
603 2002-06-14 Jim Meyering <meyering@lucent.com>
605 * file-type.h: Use the version from diffutils-2.8.2.
606 * file-type.c: Likewise.
608 2002-05-27 Jim Meyering <meyering@lucent.com>
610 Fix a problem seen only on nonconforming systems whereby ls.c's
611 use of localtime, and then of gettimeofday would cause trouble:
612 the localtime call used to initialize rpl_gettimeofday's save
613 mechanism would clobber ls's current local time information so
614 that in any long listing the first file would always be listed
615 with date 1970-01-01. Analysis by Volker Borchert.
617 * gettimeofday.c (localtime): Undefine.
618 (rpl_localtime): New function.
620 2002-05-22 Jim Meyering <meyering@lucent.com>
622 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
623 * file-type.h: New file.
624 * file-type.c (file_type): New file/function. Extracted from diffutils.
626 2002-04-29 Paul Eggert <eggert@twinsun.com>
628 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
630 2002-04-28 Paul Eggert <eggert@twinsun.com>
632 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
633 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
634 of 127, since 64 is the largest conceivable number for ancient
636 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
638 2002-04-28 Jim Meyering <meyering@lucent.com>
640 * sig2str.c (WTERMSIG): Remove definition (unused).
642 2002-04-28 Paul Eggert <eggert@twinsun.com>
644 * sig2str.h, sig2str.c: New files.
645 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
647 2002-04-24 Jim Meyering <meyering@lucent.com>
649 * gettext.h: New file, from Gettext.
650 * Makefile.am (INCLUDES): Remove -I../intl.
651 (libfetish_a_SOURCES): Add gettext.h.
653 2002-04-16 Jim Meyering <meyering@lucent.com>
655 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
656 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
657 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
659 2002-04-12 Jim Meyering <meyering@lucent.com>
661 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
663 2002-03-10 Jim Meyering <meyering@lucent.com>
665 * makepath.c (make_path): Remove a comma from a diagnostic.
666 Suggestion from Santiago Vila.
668 2002-03-08 Jim Meyering <meyering@lucent.com>
670 * rename.c: Mention that this wrapper is needed also on
671 mips-dec-ultrix4.4 systems.
673 2002-03-02 Jim Meyering <meyering@lucent.com>
675 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
676 not HAVE_CLOCK_SETTIME.
678 2002-02-27 Paul Eggert <eggert@twinsun.com>
680 * nanosleep.h: Rename to....
681 * timespec.h: New name for nanosleep.h. All uses changed.
683 * gettime.c: New file.
684 * settime.c: New file.
687 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
688 timespec.h. Remove nanosleep.h.
690 2002-02-25 Paul Eggert <eggert@twinsun.com>
692 * acl.c, acl.h: New files.
693 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
695 2002-02-24 Jim Meyering <meyering@lucent.com>
697 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
698 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
699 cause trouble. Reported by Nelson Beebe.
701 2002-02-23 Paul Eggert <eggert@twinsun.com>
703 * path-concat.c (xpath_concat): Reorder code to pacify
704 compilers that don't know that xalloc_die never returns.
706 2002-02-20 Jim Meyering <meyering@lucent.com>
708 * getdate.c: Regenerate using bison-1.33.
710 2002-02-15 Paul Eggert <eggert@twinsun.com>
712 * posixver.c, posixver.h: New files.
713 * Makefile.am (libfetish_a_SOURCES): Add them.
715 2002-02-02 Paul Eggert <eggert@twinsun.com>
716 Bruno Haible <bruno@clisp.org>
718 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
719 (fwrite_success_callback): New declaration.
720 * unicodeio.c (unicode_to_mb): New function, extracted from
721 print_unicode_char. Call failure callback instead of error.
722 (fwrite_success_callback): New function.
723 (exit_failure_callback): New function.
724 (fallback_failure_callback): New function.
725 (print_unicode_char): Call unicode_to_mb.
727 2002-01-26 Jim Meyering <meyering@lucent.com>
729 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
731 2002-01-22 Jim Meyering <meyering@lucent.com>
733 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
734 Otherwise, some versions of automake would omit the rule that makes
735 Makefile from Makefile.in.
737 2001-01-21 Paul Eggert <eggert@twinsun.com>
739 * xmemcoll.h, xmemcoll.c: New files.
740 * Makefile.am (libfetish_a_SOURCES): Add them.
741 * memcoll.c: Include errno.h, and declare errno if not defined.
742 (memcoll): Set errno to zero if there is no error.
744 * quotearg.c (quotearg_buffer_restyled):
745 Fix bug with quoting buffers containing NUL when backslashing escapes.
746 This bug was exposed by the other changes in this patch.
747 (quotearg_n_options): New arg ARGSIZE.
749 (quoting_options_from_style): New function.
750 (quotearg_n_style): Use it.
751 (quotearg_n_style_mem): New function.
753 * quotearg.h (quotearg_n_style_mem): New function.
755 2002-01-16 Jim Meyering <meyering@lucent.com>
757 * getdate.y: Add three semicolons, each just before a closing brace.
758 Bison (as of version 1.31) no longer papers over that mistake.
760 2002-02-14 Paul Eggert <eggert@twinsun.com>
762 * backupfile.c (ISDIGIT): Comment fix.
763 * getdate.y (ISDIGIT): Likewise.
764 * posixtm.c (ISDIGIT, year): Likewise.
765 * strverscmp.c (ISDIGIT): Likewise.
766 * userspec.c (ISDIGIT): Likewise.
768 2002-01-05 Jim Meyering <meyering@lucent.com>
770 * version-etc.c (version_etc_copyright): Update copyright year.
772 2001-01-19 Paul Eggert <eggert@twinsun.com>
774 * closeout.c (close_stdout_status): If ferror (stdout), do
775 not silently exit merely because the output buffer happens to
776 have nothing pending.
778 2001-12-18 Paul Eggert <eggert@twinsun.com>
780 See the big note in ../ChangeLog.
781 * human.c (suffixes): Prefer K to k for 1024.
782 (generate_suffix_backwards): New function.
783 (human_readable_inexact): Use it.
784 * xstrtol.c (__xstrtol): If there is no number but there
785 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
786 Accept 'K' as well as 'k'.
788 2001-12-15 Jim Meyering <meyering@lucent.com>
790 * regex.h (__restrict_arr): Update from libc.
792 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
793 as `remote' if the name starts with `//'. Suggested by Michael Stone.
796 2001-12-10 Jim Meyering <meyering@lucent.com>
798 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
799 Instead, include "xalloc.h".
800 (initbuffer): Don't cast xmalloc return value to char*.
801 (readline): Reword comment.
802 Don't cast xrealloc return value to char*
805 2001-12-09 Jim Meyering <meyering@lucent.com>
807 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
808 `signed and unsigned type in conditional expression'.
809 * posixtm.c (posix_time_parse): Likewise.
811 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
813 * readtokens.c (readtoken): Declare an index to be of type unsigned
814 to avoid a pedantic warning.
816 * getstr.c: Don't include assert.h.
817 (getstr): Remove warning-evoking assertions.
818 Return -1 if offset parameter is out of bounds.
819 Change the type of a local from int to size_t.
821 * strftime.c (my_strftime_localtime_r): Include this function
822 definition in the `#if ! HAVE_TM_GMTOFF' block.
824 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
825 Include xalloc.h instead.
827 2001-12-02 Jim Meyering <meyering@lucent.com>
829 * tempname.c: Don't declare getenv, thus reverting the change of
830 2001-11-18. It's no longer necessary, now that stdlib.h is always
833 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
834 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
836 2001-11-30 Akim Demaille <akim@epita.fr>
838 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
839 before being defined.
841 2001-11-27 Paul Eggert <eggert@twinsun.com>
843 * quotearg.h (quotearg_n, quotearg_n_style):
844 First arg is int, not unsigned.
845 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
846 (SIZE_MAX, UINT_MAX): New macros.
847 (quotearg_n_options): Abort if N is negative.
848 Avoid overflow check on hosts where size_t is 64 bits and int
849 is 32 bits, as overflow is impossible there.
850 Fix off-by-one typo that caused unnecessary reallocation.
852 2001-11-27 Jim Meyering <meyering@lucent.com>
854 * tempname.c: Merge with version from libc.
857 * tempname.c: Include stdlib.h unconditionally. On some old systems
858 for which STDC_HEADERS is 0, it was not included, resulting in a
859 warning about an integer-to-pointer conversion problem with getenv.
860 Reported by Volker Borchert.
862 2001-11-26 Jim Meyering <meyering@lucent.com>
864 * gtod.h: Remove file.
865 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
866 * gettimeofday.c: Don't include gtod.h.
867 (GTOD_init): Remove function.
868 (rpl_gettimeofday): Do its job here instead, rather than aborting.
869 Suggestion from Volker Borchert.
871 2001-11-23 Jim Meyering <meyering@lucent.com>
873 * hash.h (struct hash_table): Don't define here. Merely declare it.
874 * hash.c (struct hash_table): Define it here instead.
876 2001-11-22 Jim Meyering <meyering@lucent.com>
878 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
880 2001-11-18 Paul Eggert <eggert@twinsun.com>
882 * tempname.c (TMP_MAX): Remove; no longer needed.
883 (TEMPORARIES): New macro.
884 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
885 removes an artificial limitation (e.g. HP-UX 10.20, where
888 2001-11-18 Jim Meyering <meyering@lucent.com>
890 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
893 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
894 files will be created before anything else.
896 2001-11-17 Jim Meyering <meyering@lucent.com>
898 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
899 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
900 rather than group writable. Patch by Juan F. Codagnone.
902 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
903 Instead, include "xalloc.h".
905 * mountlist.c: Include unlocked-io.h after all system headers.
906 Remove explicit declarations of xmalloc, xrealloc,
907 and xstrdup. Instead, include "xalloc.h".
909 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
910 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
911 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
913 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
914 Reported by Padraig Brady.
916 * mkstemp.c: #undef mkstemp.
918 (rpl_mkstemp): Rename from mkstemp.
921 2001-11-16 Jim Meyering <meyering@lucent.com>
923 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
924 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
925 determine the amount of total physical memory, use pstat_getstatic.
926 HPUX-11 doesn't define _SC_PHYS_PAGES.
927 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
928 If sysconf couldn't be used to determine the amount of available
929 physical memory, use both pstat_getstatic and pstat_getdynamic.
930 Based on a patch from Bob Proulx.
932 2001-11-05 Jim Meyering <meyering@lucent.com>
934 * xstat.in (slash_aware_lstat): Correct a misleading comment.
936 2001-11-03 Jim Meyering <meyering@lucent.com>
938 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
939 in argmatch_to_argument call.
941 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
944 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
945 e.g., a fault due to an attempt to free a NULL pointer.
947 2001-11-01 Jim Meyering <meyering@lucent.com>
949 * dirfd.c, dirfd.h: New files.
950 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
952 * hash.c (hash_print) [TESTING]: Clean up.
954 2001-10-22 Paul Eggert <eggert@twinsun.com>
956 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
957 to avoid a warning if -Wall.
959 2001-10-21 Paul Eggert <eggert@twinsun.com>
961 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
963 2001-10-21 Jim Meyering <meyering@lucent.com>
965 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
966 this code would end up calling gettext even in packages built
968 * getopt.c (_): Likewise.
969 * regex.c (_): Likewise.
971 2001-10-20 Paul Eggert <eggert@twinsun.com>
973 * error.c (strerror_r): Do not declare unless !_LIBC.
974 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
975 Use strerror_r that is only a macro, even if it is not a function.
976 (strerror): Check for HAVE_DECL_STRERROR before declaring.
977 (private_strerror): Use prototypes, not old-style function definition.
978 (print_errno_message): New function.
979 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
981 (error_tail, error, error_at_line): Use it.
983 2001-10-11 Jim Meyering <meyering@lucent.com>
985 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
986 and quote_n (1, ... to avoid clobbering a buffer.
988 2001-10-05 Jim Meyering <meyering@lucent.com>
990 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
991 * hash-pjw.c: New file (factored out of fileutils' remove.c).
992 * hash-pjw.h: New file.
994 2001-09-30 Jim Meyering <meyering@lucent.com>
996 * mountlist.c [MOUNTED_GETFSSTAT]:
997 Include <sys/ucred.h>, for Apple Darwin.
998 Include sys/mount.h and sys/fs_types.h only if available.
1000 (read_filesystem_list): Use FS_TYPE.
1002 2001-09-29 Paul Eggert <eggert@twinsun.com>
1004 * exclude.c (excluded_filename): 0 -> false, since it's
1007 2001-09-28 Paul Eggert <eggert@twinsun.com>
1009 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
1010 #defines strtoimax. Also treat the other strto* functions
1013 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
1014 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
1015 (strtoimax, strtoumax): Do not declare if already defined as a macro.
1017 2001-09-26 Jim Meyering <meyering@lucent.com>
1019 Most macros in unlocked-io.h had the wrong number of arguments.
1020 * gen-uio: New script.
1021 (USE_UNLOCKED_IO): Define to 1 if not already defined.
1022 * unlocked-io.hin: Remove file.
1023 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
1024 rather than trying to embed it here.
1025 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
1026 Reported by Padraig Brady.
1028 2001-09-25 Volker Borchert <bt@teknon.de>
1030 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
1032 2001-09-23 Jim Meyering <meyering@lucent.com>
1034 * mountlist.c: Remove useless parentheses in #if directives.
1035 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
1036 the deprecated MOUNTED symbol is no longer defined in mntent.h.
1038 2001-09-22 Jim Meyering <meyering@lucent.com>
1040 * localcharset.c: Update from latest gettext.
1041 * config.charset: Likewise.
1043 2001-09-20 Jim Meyering <meyering@lucent.com>
1045 * xstrtol.c (strtoimax): Guard declaration with
1046 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
1047 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
1048 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
1049 (strtoumax): Likewise, for completeness (it wasn't necessary).
1051 2001-09-06 Paul Eggert <eggert@twinsun.com>
1053 * strtoimax.c (HAVE_LONG_LONG):
1054 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
1055 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
1056 to work around bug in IBM C compiler.
1058 2001-09-16 Jim Meyering <meyering@lucent.com>
1060 * mkdir.c: New file.
1062 2001-09-04 Paul Eggert <eggert@twinsun.com>
1064 * xgetcwd.c: Revert some of the previous change; intead,
1065 fix the HAVE_GETCWD_NULL code to behave more like the
1066 !HAVE_GETCWD_NULL code used to.
1069 (xgetcwd): Do not return NULL when memory is exhausted; instead,
1072 2001-09-04 Paul Eggert <eggert@twinsun.com>
1074 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
1075 Use ssize_t, not int, to store result of readlink.
1076 Check for ssize_t overflow as well as size_t overflow,
1077 as POSIX says the result of readlink is implementation-defined
1078 when ssize_t overflows.
1079 Remove unnecessary cast to char*.
1080 Use free+malloc instead of realloc, as the storage doesn't need
1081 to be preserved and it's clearer and can be more efficient that way.
1082 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
1083 * xreadlink.h (xreadlink): Update prototype.
1085 2001-09-03 Paul Eggert <eggert@twinsun.com>
1087 * exclude.c (fnmatch_no_wildcards): Fix confusion between
1088 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
1089 spotted by Jim Meyering.
1091 2001-09-03 Jim Meyering <meyering@lucent.com>
1093 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
1095 2001-09-03 Paul Eggert <eggert@twinsun.com>
1097 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
1098 like the HAVE_GETCWD_NULL code.
1099 Include pathmax.h if not HAVE_GETCWD.
1100 Do not include xalloc.h.
1101 (INITIAL_BUFFER_SIZE): New symbol.
1102 Do not use xmalloc / xrealloc, since the caller is responsible for
1103 handling errors. Preserve errno around `free' during failure.
1104 Do not overrun buffer when using getwd.
1106 2001-09-03 Paul Eggert <eggert@twinsun.com>
1108 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
1109 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
1111 2001-09-02 Jim Meyering <meyering@lucent.com>
1113 * error.c: Update from GNU libc.
1115 2001-09-01 Jim Meyering <meyering@lucent.com>
1117 * xreadlink.c: New file.
1118 * xreadlink.h: New file.
1119 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
1121 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
1122 doesn't conflict with sparc-sun-solaris2.7's definition in
1123 /usr/include/sys/int_types.h.
1125 * exclude.c: Use `""', not `<>' to #include non-system header files.
1126 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
1127 and strncasecmp as r-values. Unixware didn't have declarations.
1129 2001-08-31 Jim Meyering <meyering@lucent.com>
1131 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
1132 Use an initial, malloc'd, buffer of length 128 rather than
1133 a statically allocated one of length 1024.
1135 2001-08-30 Paul Eggert <eggert@twinsun.com>
1137 * xgetcwd.c: Don't include pathmax.h.
1138 Include stdlib.h and unistd.h if available.
1140 (xmalloc, xstrdup, free): Remove decls.
1141 (xgetcwd): Don't assume sizes fit in unsigned.
1142 Check for overflow when computing sizes.
1143 Simplify reallocation code.
1145 2001-08-28 Paul Eggert <eggert@twinsun.com>
1147 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
1149 * strtoimax.c: Renamed from strtoxmax.c, removing the
1152 Also, make the following further changes to make this file's
1153 configuration more similar to that of strtol.c:
1154 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
1155 (strtoumax, uintmax_t, strtoull, strtol): Remove.
1156 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
1157 (strtoimax): Renamed from strtoumax. All uses of unsigned values
1158 changed to signed values.
1160 And make the following changes as well:
1161 Fix copyright notice, as 1999 was missing.
1162 (verify): New macro.
1163 (strtoimax): Check sizes at compile-time, not run-time.
1164 Prefer strtol to strtoll if both work.
1165 (main): Remove; it was not that useful and was a pain to maintain.
1167 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
1169 2001-08-30 Paul Eggert <eggert@twinsun.com>
1171 * savedir.c (savedir): Remove size parameter, as POSIX says that
1172 a directory's st_size can have an arbitrary value, so the old
1173 usage could waste an arbitrary amount of memory. All uses
1175 * savedir.h: Update prototype.
1177 2001-08-30 Paul Eggert <eggert@twinsun.com>
1179 * xstrtol.c (strtoimax): New decl.
1181 2001-08-28 Paul Eggert <eggert@twinsun.com>
1183 * xstrtol.h: Add copyright notice.
1184 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
1185 LONGINT_INVALID_SUFFIX_CHAR.
1187 2001-08-30 Paul Eggert <eggert@twinsun.com>
1189 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
1192 2001-08-30 Paul Eggert <eggert@twinsun.com>
1194 * hash.c: Remove '2001' from copyright notice.
1196 2001-08-30 Paul Eggert <eggert@twinsun.com>
1198 * full-write.h: New file.
1199 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
1200 * full-write.c: Correct credits, as cccp.c no longer
1201 exists and anyway it was so heavily changed from the old cccp
1202 code as to be unrecognizable. Include full-write.h.
1203 (full_write) Return size_t, with short writes meaning failure.
1204 All callers changed. This fixes a bug with large buffers
1206 * utime.c: Include full-write.h.
1208 2001-08-30 Paul Eggert <eggert@twinsun.com>
1210 Merge 'exclude' changes from tar 1.13.22.
1211 This fixes one or two unlikely storage allocation overflow bugs,
1212 but doesn't change user-visible behavior otherwise.
1214 2001-08-30 Paul Eggert <eggert@twinsun.com>
1216 * exclude.c (bool): Declare, perhaps by including stdbool.h.
1217 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
1218 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
1219 Include if available.
1220 (<xalloc.h>): Include
1221 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
1222 (verify): New macro. Use it to verify that EXCLUDE macros do not
1223 collide with FNM macros.
1224 (struct patopts): New struct.
1225 (struct exclude): Use it, as exclude patterns now come with options.
1226 (new_exclude): Support above changes.
1227 (new_exclude, add_exclude_file):
1228 Initial size must now be a power of two to simplify overflow checking.
1229 (free_exclude, fnmatch_no_wildcards): New function.
1230 (excluded_filename): No longer requires options arg, as the options
1231 are determined by add_exclude. Now returns bool, not int.
1232 (excluded_filename, add_exclude):
1233 Add support for the fancy new exclusion options.
1234 (add_exclude, add_exclude_file): Now takes int options arg.
1235 Check for arithmetic overflow when computing sizes.
1236 (add_exclude_file): xrealloc might modify errno, so don't
1237 realloc until after errno might be used.
1239 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
1241 (free_exclude): New decl.
1242 (add_exclude, add_exclude_file): Now takes int options arg.
1243 (excluded_filename): No longer requires options arg, as the options
1244 are determined by add_exclude. Now returns bool, not int.
1246 2001-08-30 Paul Eggert <eggert@twinsun.com>
1248 * alloca.c (alloca): Arg is of type size_t, not unsigned.
1250 2001-08-27 Jim Meyering <meyering@lucent.com>
1252 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
1254 * version-etc.c (N_): Remove definition.
1255 Revert most of last change.
1256 Instead, simply don't mark the `Copyright...' string for translation.
1257 Based on advice from Paul Eggert.
1259 * strtoxmax.c: Tweak comment.
1261 2001-08-26 Jim Meyering <meyering@lucent.com>
1263 * version-etc.c (version_etc_copyright_fmt): Replace literal year
1264 of copyright with `%s' so translators don't get an untranslated
1266 (COPYRIGHT_YEAR): Define.
1267 (version_etc): Use fprintf rather than fputs.
1268 Suggestion from Ulrich Drepper.
1270 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
1272 * strtoll.c: New file, from GNU libc.
1273 * xstrtoimax.c: New file.
1275 * xstrtol.h: Add xstrtoimax.
1276 * strtoumax.c: New file. Simply include "strtoumax.c".
1277 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
1279 * strtoumax.c: Factor to work both for unsigned and signed types, ...
1280 * strtoxmax.c: ... then renamed to this.
1282 2001-08-13 Paul Eggert <eggert@twinsun.com>
1284 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
1285 Port to Solaris 8, where 'sed' requires a space after the 'r'
1286 command, and where sh dislikes "$/". Clean up the spacing a bit.
1287 Redirect output to $tmp just once.
1289 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
1291 * addext.c (<errno.h>): Include.
1292 (errno): Declare if not defined.
1293 (addext): Work correctly when pathconf returns -1 and leaves
1294 errno alone because there is no limit. Also, work even if
1295 pathconf returns a value greater than SIZE_MAX.
1297 2001-08-12 Jim Meyering <meyering@lucent.com>
1299 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
1300 Simply `return getcwd (NULL, 0);'.
1301 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
1302 Use 1300 as initial value for length, not PATH_MAX.
1304 * pathmax.h: Clean up cpp syntax.
1306 2001-08-12 Jim Meyering <meyering@lucent.com>
1308 * gettimeofday.c: New file.
1310 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
1312 2001-08-04 Jim Meyering <meyering@lucent.com>
1314 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
1315 to get in sync with glibc.
1317 2001-08-03 Paul Eggert <eggert@twinsun.com>
1319 The following changes are from gettext 0.10.39 as maintained by
1322 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
1323 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
1324 with inverted sense. All uses changed.
1326 * mbswidth.c: Don't include <limits.h>.
1327 Include <stdlib.h> and <string.h> unconditionally.
1328 (iswcntrl, mbsinit, ISCNTRL): New macros.
1329 (mbsnwidth): Use K&R style function declarations.
1330 Don't bother checking for MB_LEN_MAX == 1, since the compiler
1331 can optimize it when MB_CUR_MAX == 1.
1332 The width of control characters is zero, not 1.
1334 2001-07-15 Jim Meyering <meyering@lucent.com>
1336 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
1337 (BUILT_SOURCES): Add unlocked-io.h.
1338 (io_functions): Define.
1339 (unlocked-io.h): New rule.
1340 (DISTCLEANFILES): Add unlocked-io.h.
1341 (all-local): Depend on unlocked-io.h, to ensure it is created.
1343 * unlocked-io.hin: New file
1345 * regex.c: Update from glibc.
1347 2001-07-05 Jim Meyering <meyering@lucent.com>
1349 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
1351 (libfetish_a_SOURCES): Put all .h files here instead.
1352 Remove a thus-exposed (better checks in automake) duplicate and
1353 two unnecessary .h files.
1355 2001-06-11 Jim Meyering <meyering@lucent.com>
1357 * regex.c: Update from GNU libc.
1359 2001-05-27 Jim Meyering <meyering@lucent.com>
1361 * readutmp.h (UT_TYPE): Define.
1363 2001-05-24 Jim Meyering <meyering@lucent.com>
1365 * argmatch.c: Include "quote.h".
1366 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
1367 quote function. Reported by Göran Uddeborg.
1369 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
1371 * dirname.c (dir_name): Compute append_dot using path, not newpath
1372 which is not yet declared.
1374 2001-05-11 Paul Eggert <eggert@twinsun.com>
1376 * Makefile.am (libfetish_a_SOURCES):
1377 Add strftime.c, since we now compile it on all hosts.
1379 * strftime.c (my_strftime):
1380 Define to nstrftime if emacs, but only if my_strftime is not defined.
1381 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
1382 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
1383 Add one more extra argument: a nanoseconds value.
1386 (my_strftime function): Add %N format.
1387 (emacs_strftimeu): Renamed from emacs_strftime,
1388 with extra ut argument.
1390 2001-05-11 Paul Eggert <eggert@twinsun.com>
1392 dirname code cleanup. base_name now behaves more compatibly
1393 with POSIX basename when given file names that have trailing
1394 slashes, and similarly for dir_name. Add new primitives
1395 base_len and dir_len. Put the directory-name-related decls
1398 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
1399 * backupfile.c (base_name): Likewise.
1400 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
1401 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
1402 * makepath.c (strip_trailing_slashes): Likewise.
1403 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
1405 * rename.c (strip_trailing_slashes): Likewise.
1406 * same.c (base_name): Likewise.
1407 * stripslash.c (ISSLASH): Likewise.
1409 * addext.c: Include <dirname.h> after size_t is defined.
1410 * backupfile.c: Likewise.
1412 * addext.c (addext): Use base_len to trim redundant
1413 trailing slashes instead of doing it ourselves.
1414 But do not trim the last slash if it is not redundant.
1416 * backupfile.c (find_backup_file_name,
1417 max_backup_version): Use base_len instead of rolling it ourselves.
1418 Handle the case of "" and (on DOS) "C:" correctly.
1420 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
1421 Include <string.h>, <dirname.h>.
1422 (base_name): Allow file names ending in slashes, other than names
1423 that are all slashes. In this case, return the basename followed
1424 by the slashes. This is more general, and can be used in places
1425 where the original base_name purposely had an assertion failure.
1426 (base_len): New function.
1428 * dirname.c: Include <string.h> instead of <stdlib.h>.
1429 Do not include <assert.h>; no longer needed.
1431 (memrchr): Remove decl.
1432 (dir_name_r): Remove.
1433 (dir_len): Renamed from dirlen. All callers changed.
1434 Rewrite in terms of base_name, for simplicity and consistency.
1435 (dir_name): Never return NULL. All callers changed.
1436 Do not include <stdlib.h> in test program; no longer needed.
1437 return 0; is fine for test program.
1439 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
1441 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
1443 * path-concat.c (path_concat): Use base_len to compute
1444 base length, not strlen; this means we cannot rely on memcpy
1447 * same.c (STREQ): Remove.
1448 (same_name): Handle the case where the basename ends in trailing '/'.
1450 * stripslash.c (strip_trailing_slashes): Return nonzero if
1451 a slash was stripped. Do not strip the last slash after a
1454 2001-04-08 Jim Meyering <meyering@lucent.com>
1456 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
1457 recomputed; that's necessary when the offset spans a DST transition.
1458 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
1460 2001-04-02 Jim Meyering <meyering@lucent.com>
1462 * regex.h, regex.c: Update from GNU libc.
1464 2001-03-19 Paul Eggert <eggert@twinsun.com>
1466 * version-etc.c (version_etc_copyright): Update to 2001.
1468 2001-03-16 Paul Eggert <eggert@twinsun.com>
1470 * tempname.c (uint64_t): Define to uintmax_t if
1471 not defined, and if UINT64_MAX is not defined.
1472 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
1473 Reported by John David Anglin.
1475 2001-03-10 Bruno Haible <haible@clisp.cons.org>
1477 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
1478 alias if codeset is empty.
1479 * config.charset (BeOS): Use wildcard syntax.
1481 2001-03-13 Jim Meyering <meyering@lucent.com>
1483 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
1484 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
1487 2001-03-06 Bruno Haible <haible@clisp.cons.org>
1489 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
1491 * unicodeio.c (print_unicode_char): Simplify accordingly.
1493 2001-03-06 Bruno Haible <haible@clisp.cons.org>
1495 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
1496 support for DOS/DJGPP.
1498 2001-02-28 Paul Eggert <eggert@twinsun.com>
1500 * Makefile.am (libfetish_a_SOURCES):
1501 Add dup-safer.c, fopen-safer.c.
1502 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
1504 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
1506 2001-02-25 Paul Eggert <eggert@twinsun.com>
1508 The mkstemp replacement is taken from glibc 2.2.2, with some
1509 portability fixes for use outside glibc, as follows:
1511 * tempname.c (struct_stat64): New macro.
1512 (direxists, __gen_tempname): Use it.
1513 This avoids a portability problem with Solaris 8.
1515 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
1516 (<stddef.h>, <stdint.h>, <string.h>):
1517 Include only if STDC_HEADERS || _LIBC.
1518 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
1519 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
1520 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
1521 (__set_errno): Define this macro if <errno.h> doesn't.
1522 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
1523 Define these macros if <stdio.h> doesn't.
1524 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
1525 Define these macros if <sys/stat.h>
1526 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
1527 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
1528 __xstat64): Define if not _LIBC.
1529 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
1530 (__gen_tempname): Invoke gettimeofday only if
1531 HAVE_GETTIMEOFDAY || _LIBC;
1532 otherwise, fall back on plain "time".
1533 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
1535 * mkstemp.c (__GT_FILE): Define to zero if not defined.
1537 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
1539 2001-02-17 Jim Meyering <meyering@lucent.com>
1541 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
1542 around included file name.
1544 * strnlen.c (__strnlen): Merge in a change from GNU libc.
1546 * strftime.c: Update from GNU libc (the only changes were to comments).
1548 2001-02-13 Bruno Haible <haible@clisp.cons.org>
1550 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
1552 2001-02-17 Paul Eggert <eggert@twinsun.com>
1554 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
1555 Remove workaround macros for hosts that have mbrtowc but not
1556 mbstate_t, as we now insist on proper declarations for both
1557 before using mbrtowc.
1559 2001-02-17 Jim Meyering <meyering@lucent.com>
1561 * regex.c: Update from libc.
1563 2001-02-16 Paul Eggert <eggert@twinsun.com>
1565 * alloca.c (malloc): Undef before defining, since stdlib.h
1566 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
1567 Reported by Mark Hounschell via Paul Eggert.
1569 2001-01-30 Bruno Haible <haible@clisp.cons.org>
1571 * config.charset: Update for FreeBSD 4.2.
1573 2001-01-26 Jim Meyering <meyering@lucent.com>
1575 * quotearg.c: Include stddef.h.
1576 * quote.c: Include stddef.h.
1577 Reported by Axel Kittenberger.
1579 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
1580 line in double quotes so that it evokes a better diagnostic.
1581 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
1582 Reported by Axel Kittenberger.
1584 2001-01-15 Bruno Haible <haible@clisp.cons.org>
1586 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
1587 to avoid a warning. Add back 'const' to inptr.
1589 2001-01-16 Jim Meyering <meyering@lucent.com>
1591 * basename.c: Include <stdio.h>, needed by assert on SunOS4.
1594 2001-01-14 Jim Meyering <meyering@lucent.com>
1596 * rename.c: New file. From Volker Borchert.
1597 Include stdlib.h, string.h or strings.h, and xalloc.h.
1598 Use strip_trailing_slashes rather than open-coding it.
1600 2001-01-03 Paul Eggert <eggert@twinsun.com>
1602 * strftime.c: Sync with glibc time/strftime.c 1.81.
1604 2001-01-03 Jim Meyering <meyering@lucent.com>
1606 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
1607 local `inptr' to avoid warning with some system declarations of iconv.
1609 2000-12-29 Paul Eggert <eggert@twinsun.com>
1611 * modechange.c: Do not assume that mode_t uses the
1612 traditional octal encoding. E.g. "chmod 1 FOO" should set
1613 the other-execute bit of FOO even if S_IXOTH != 1.
1615 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
1616 WOTH, XOTH, ALLM): New macros.
1617 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
1618 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
1620 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
1621 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
1623 No need to use uintmax_t; unsigned long is long enough.
1624 Don't bother to get suffix since we don't use it.
1626 2000-12-24 Jim Meyering <meyering@lucent.com>
1628 * hash.c (is_prime): Return explicit boolean values.
1629 (hash_get_first): Return NULL to appease Irix5.6's 89.
1630 Reported by Nelson Beebe.
1632 2000-10-31 Bruno Haible <haible@clisp.cons.org>
1634 * localcharset.c (locale_charset): Add support for Win32.
1636 2000-12-18 Paul Eggert <eggert@twinsun.com>
1638 * physmem.h, physmem.c: New files.
1640 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
1641 (noinst_HEADERS): Add physmem.h.
1643 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
1644 't' for compatibility with Solaris 8 sort.
1646 2000-12-18 Bruno Haible <haible@clisp.cons.org>
1648 * config.charset: Add support for BeOS.
1650 2000-12-16 Jim Meyering <meyering@lucent.com>
1652 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
1653 SHELLS_FILE to a file name that's useful on djgpp systems.
1655 (ADDITIONAL_DEFAULT_SHELLS): Define.
1656 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
1657 Based mostly on a patch from Prashant TR.
1659 2000-12-16 Jim Meyering <meyering@lucent.com>
1661 This bug had a serious impact on chown: `chown N:M FILE' (for integer
1662 N and M) would have treated it like `chown N:N FILE'.
1664 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
1666 2000-10-31 Bruno Haible <haible@clisp.cons.org>
1668 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
1669 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
1670 to the list of canonical encodings. Rename EUC-CN to GB2312.
1672 2000-12-08 Andreas Schwab <schwab@suse.de>
1674 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
1675 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
1677 2000-12-07 Jim Meyering <meyering@lucent.com>
1679 * stripslash.c (ISSLASH): Define.
1680 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
1683 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
1684 (dir_name_r): Declare this function as static.
1685 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
1686 manifest itself on a name containing a mix of slashes and
1688 Make this function work with names starting with a DOS-style
1689 drive letter and colon prefix.
1690 (dir_name): Append `.' if necessary.
1691 Based mostly on patches from Prashant TR and Eli Zaretskii.
1693 * dirname.h (dir_name_r): Remove prototype.
1695 2000-12-05 Jim Meyering <meyering@lucent.com>
1697 * dirname.c (dir_name_r): Add `const' in a few local declarations.
1699 2000-12-04 Jim Meyering <meyering@lucent.com>
1701 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
1702 Also include memory.h, stdlib.h, unistd.h if appropriate.
1703 Reported by Andreas Jaeger (conflicting declaration of malloc).
1705 2000-12-02 Jim Meyering <meyering@lucent.com>
1707 * closeout.h: Make idempotent, to avoid some obscure warnings.
1709 2000-12-01 Paul Eggert <eggert@twinsun.com>
1711 * memrchr.c: Include <config.h> before any system include file.
1713 2000-11-29 Paul Eggert <eggert@twinsun.com>
1715 * dirname.c (dir_name_r): Fix typo: int -> size_t.
1717 2000-11-26 Jim Meyering <meyering@lucent.com>
1719 * memcoll.c: Include sys/types.h. From Werner Almesberger.
1721 2000-11-22 Paul Eggert <eggert@twinsun.com>
1723 * strftime.c (my_strftime): Do not invoke mbrlen with a
1724 size of (size_t) -1; it's not portable.
1726 2000-11-17 Akim Demaille <akim@epita.fr>
1728 * obstack.h: Formatting changes.
1729 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
1730 prevent type checking.
1731 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
1732 cast the value to (void *): assigning a `foo *' to a `void *'
1734 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
1736 2000-11-17 Jim Meyering <meyering@lucent.com>
1738 * strstr.c: Update from GNU libc.
1740 2000-11-16 Jim Meyering <meyering@lucent.com>
1742 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
1744 2000-11-11 Jim Meyering <meyering@lucent.com>
1746 * error.c: Add a couple #includes, merging from GNU libc version.
1748 2000-11-10 Jim Meyering <meyering@lucent.com>
1750 * obstack.h: Update from GNU libc.
1751 * obstack.c: Likewise.
1753 2000-11-06 Paul Eggert <eggert@twinsun.com>
1755 * getusershell.c (setusershell): Use rewind rather than
1756 fseek/fseeko, to avoid configuration hassles with fseeko.
1757 Don't bother opening SHELLS_FILE if shellstream is NULL;
1760 2000-11-05 Jim Meyering <meyering@lucent.com>
1762 * makepath.h (make_dir): Declare.
1763 * makepath.c (make_dir): Remove `static' attribute.
1766 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
1768 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
1769 last one in a bucket, advance to the next bucket.
1771 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
1773 * fnmatch.c: Do not comment out all the code if we are using
1774 the GNU C library, because in some cases we are replacing buggy
1775 code in the GNU C library itself.
1777 2000-10-30 Paul Eggert <eggert@twinsun.com>
1779 * error.h, getline.h, modechange.h:
1780 Remove "2000" from Copyright line, as the file hasn't been
1781 changed this year other than in the copyright notice.
1783 * xalloc.h: Add "2000" to Copyright line, as this file
1784 was changed this year.
1786 2000-10-30 Paul Eggert <eggert@twinsun.com>
1788 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
1789 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
1790 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
1792 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
1794 * regex.h (__restrict_arr): Move definition out of #ifndef block.
1795 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
1796 doesn't define __restrict_arr.
1798 2000-10-29 Jim Meyering <meyering@lucent.com>
1800 * xstat.in: Fix grammar in comment.
1802 2000-10-28 Jim Meyering <meyering@lucent.com>
1804 * memchr.c: Update from libc.
1805 Adjust for portability:
1806 [HAVE_STDLIB_H]: Include stdlib.h.
1807 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
1808 Undef __memchr, too.
1809 [!weak_alias]: Define __memchr to memchr.
1811 * regex.c: Update from libc.
1812 * regex.h: Likewise.
1813 * getopt1.c: Likewise.
1814 * memcmp.c: Likewise.
1816 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
1817 Avoid using fseek, when possible -- it's broken by design.
1818 Patch by Ulrich Drepper.
1820 2000-10-26 Jim Meyering <meyering@lucent.com>
1822 * strftime.c: Update from libc.
1824 2000-10-25 Jim Meyering <meyering@lucent.com>
1826 * obstack.c: Update from libc.
1828 2000-10-23 Jim Meyering <meyering@lucent.com>
1830 * hard-locale.c (hard_locale): Revert last change -- it was simply
1831 wrong. That set_locale call must not have any side effects.
1834 2000-10-22 Jim Meyering <meyering@lucent.com>
1836 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
1837 [CYCLIC]: Remove now-unused definition.
1839 * save-cwd.c (O_DIRECTORY): Define, if needed.
1840 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
1841 Suggestion from Ulrich Drepper.
1843 2000-10-21 Jim Meyering <meyering@lucent.com>
1845 * dirname.c (dir_name_r): New function, factored out of dir_name.
1846 (dir_name): Use dir_name_r.
1847 * dirname.h (dir_name_r): Declare it.
1849 2000-10-21 Jim Meyering <meyering@lucent.com>
1851 * dirname.c (memrchr): Declare if necessary.
1852 (dir_name): Remove the restriction that there be no
1853 trailing slashes. Now, this code skips past them, effectively
1855 [TEST_DIRNAME] (main): New unit tests.
1857 * memrchr.c: New file from GNU libc.
1858 Undef __memrchr, too.
1859 [!weak_alias]: Define __memrchr to memrchr.
1860 Guard weak_alias use with `#ifdef weak_alias'.
1862 2000-10-17 Jim Meyering <meyering@lucent.com>
1864 * quote.h (PARAMS): Define and use.
1865 Reported by Akim Demaille.
1867 * getopt.c: Update from libc.
1869 2000-10-16 Jim Meyering <meyering@lucent.com>
1871 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
1874 2000-09-25 Jim Meyering <meyering@lucent.com>
1876 * md5.h (rol): Define (from GnuPG).
1878 * sha.c: Give credit (GnuPG) where due.
1879 (M): Use rol rather than open-coding it.
1880 Add a FIXME comment.
1882 2000-09-21 Jim Meyering <meyering@lucent.com>
1884 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
1885 Reported by Michael Stone.
1887 2000-09-20 Jim Meyering <meyering@lucent.com>
1889 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
1890 (noinst_HEADERS): Add sha.h.
1891 Based on code from Scott G. Miller and from GnuPG.
1893 2000-09-15 Jim Meyering <meyering@lucent.com>
1895 * regex.c: Update from libc.
1897 2000-09-10 Jim Meyering <meyering@lucent.com>
1899 * getopt.c (_getopt_internal): Update from glibc.
1901 2000-09-09 Jim Meyering <meyering@lucent.com>
1903 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
1904 think it should be used as a general replacement for isascii.
1905 * fnmatch.c: Likewise.
1906 * mbswidth.c: Likewise
1907 * regex.c: Likewise.
1910 * userspec.c: Include sys/param.h and limits.h.
1912 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
1913 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
1914 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
1915 UID, GID. Check range.
1917 2000-09-06 Jim Meyering <meyering@lucent.com>
1919 * getopt.c (_getopt_internal): Update from glibc.
1921 2000-08-30 Jim Meyering <meyering@lucent.com>
1923 * strftime.c: Merge in changes from GNU libc.
1925 2000-08-26 Jim Meyering <meyering@lucent.com>
1927 * closeout.c: Include "__fpending.h".
1928 (close_stdout_status): Return right away if there's nothing to flush.
1930 * Makefile.am (noinst_HEADERS): Add __fpending.h.
1931 * __fpending.c: New file.
1932 * __fpending.h: New file.
1934 2000-08-07 Paul Eggert <eggert@twinsun.com>
1936 Standardize on "memory exhausted" instead of "Memory exhausted"
1937 or "virtual memory exhausted".
1938 * obstack.c (print_and_abort): Use "memory exhausted", not
1939 "virtual memory exhausted".
1940 * same.c (same_name): Invoke xalloc_die instead of printing
1942 * userspec.c (parse_user_spec): Likewise.
1943 * bumpalloc.h: comment fix
1944 * same.c, userspec.c: Include xalloc.h.
1946 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
1947 not char *const and pointing to a constant array.
1948 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
1949 (xrealloc): Comment fix.
1951 * userspec.c (parse_user_spec):
1952 Don't translate a message until just before returning,
1953 to avoid unnecessary translation.
1955 2000-08-07 Jim Meyering <meyering@lucent.com>
1957 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
1958 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
1959 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
1960 getgroups.c, gethostname.c, getopt.h, group-member.c,
1961 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
1962 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
1963 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
1964 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
1965 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
1966 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
1967 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
1968 yesno.c: Back out Copyright date changes for each file with no change
1969 this year. This eases coordination with other programs using the same
1970 source code modules. From Paul Eggert.
1972 2000-08-03 Greg McGary <greg@mcgary.org>
1974 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
1975 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
1976 (EXTEND_BUFFER): Use them.
1978 2000-08-01 Jim Meyering <meyering@lucent.com>
1980 * dirname.c (ISSLASH): Define.
1981 (BACKSLASH_IS_PATH_SEPARATOR): Define.
1982 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
1983 both `\' and `/' may be use as path separators.
1984 Based on a patch from Prashant TR.
1986 2000-07-31 Paul Eggert <eggert@twinsun.com>
1988 * quotearg.c (quotearg_n_options): Don't make the initial
1989 slot vector a constant, since it might get modified.
1991 2000-07-31 Jim Meyering <meyering@lucent.com>
1993 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
1994 * obstack.c (print_and_abort): Likewise.
1996 2000-07-30 Paul Eggert <eggert@twinsun.com>
1998 * quotearg.c (quotearg_n_options): Preallocate a slot 0
1999 buffer, so that the caller can always quote one small
2000 component of a "memory exhausted" message in slot 0.
2001 From a suggestion by Jim Meyering.
2003 2000-07-30 Jim Meyering <meyering@lucent.com>
2005 * makepath.c (make_path): Quote the other instance, too.
2007 * quotearg.c (N_STATIC_SLOTVECS): Define.
2008 (STATIC_BUF_SIZE): Define.
2009 (quotearg_n_options): Use only statically allocated storage when
2010 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
2011 than STATIC_BUF_SIZE.
2013 2000-07-29 Jim Meyering <meyering@lucent.com>
2015 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
2016 * dirname.c (dir_name): Likewise.
2018 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
2020 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
2021 (dir_name): Assert that there are no trailing slashes.
2023 2000-07-18 Bruno Haible <haible@clisp.cons.org>
2025 * mbswidth.h (mbswidth): Add a flags argument.
2026 (mbswidth): New declaration.
2027 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
2028 * mbswidth.c (mbswidth): Add a flags argument.
2029 (mbsnwidth): New function.
2031 2000-07-24 Jim Meyering <meyering@lucent.com>
2033 * mbswidth.c: Remove useless #else. From Bruno Haible.
2035 2000-07-23 Paul Eggert <eggert@twinsun.com>
2037 * mbswidth.c (_XOPEN_SOURCE):
2038 Don't define; this causes problems on Solaris 7.
2039 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
2041 2000-07-23 Paul Eggert <eggert@twinsun.com>
2044 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
2045 so that mbstate_t is always defined.
2047 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
2048 be 1 in at least one GCC installation, and this configuration
2049 error is likely to be common. Ignoring MB_LEN_MAX hurts
2050 performance on hosts that have mbrtowc but have only unibyte
2051 locales, but I assume these hosts are rare.
2053 2000-07-23 Paul Eggert <eggert@twinsun.com>
2055 * quotearg.c: Streamline by invoking multibyte code only if needed.
2056 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
2057 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
2058 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
2059 invoke multibyte primitives.
2061 2000-07-23 Jim Meyering <meyering@lucent.com>
2063 * basename.c (base_name): Add an assertion.
2065 2000-07-15 Bruno Haible <clisp.cons.org>
2067 * quotearg.c: When the system forces us to redefine mbstate_t,
2068 shadow its mbsinit function.
2070 2000-07-16 Bruno Haible <haible@clisp.cons.org>
2072 * mbswidth.h: New file.
2073 * mbswidth.c: New file.
2074 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
2075 (noinst_HEADERS): Add mbswidth.h.
2077 2000-07-17 Bruno Haible <haible@clisp.cons.org>
2079 * config.charset: Add support for FreeBSD. Improve support for HP-UX
2082 2000-07-15 Jim Meyering <meyering@lucent.com>
2084 * makepath.c: Include quote.h.
2085 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
2086 corresponding argument in a `quote (...)' call.
2087 Give better diagnostics.
2089 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
2090 (noinst_HEADERS): Add quote.h.
2092 * quote.c (quote, quote_n): New file. Two functions taken verbatim
2093 from tar's src/misc.c.
2094 * quote.h: New file. Prototypes for same.
2096 2000-07-10 Paul Eggert <eggert@twinsun.com>
2098 From a suggestion by Bruno Haible.
2099 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
2100 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
2101 to decide whether to define the BeOS workaround macro;
2102 this adjusts to the change to AC_MBSTATE_T.
2104 2000-07-13 Paul Eggert <eggert@twinsun.com>
2106 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
2108 * quotearg.c (quoting_style_args, quoting_style_vals,
2109 quotearg_buffer_restyled): Add support for
2110 clocale_quoting_style. Undo previous change to
2111 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
2112 and "{RIGHT QUOTATION MARK}" msgids.
2114 2000-07-05 Paul Eggert <eggert@twinsun.com>
2116 The old behavior of quoting `like this' doesn't look good with
2117 newer, ISO-style fonts. See:
2118 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2120 Instead, quote "like this" by default. Let the translator
2121 tailor the locale-specific quoting behavior by providing
2122 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
2124 * quotearg.c (N_): New macro.
2125 (gettext_default): New function.
2126 (quotearg_buffer_restyled): Use
2127 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
2128 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
2130 2000-07-09 Jim Meyering <meyering@lucent.com>
2132 * Most files: Update copyright dates to include 2000.
2134 2000-07-08 Jim Meyering <meyering@lucent.com>
2136 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
2138 (xgethostname): Remove now-unnecessary #ifdef.
2139 Move declaration of `err' into loop where it's used.
2141 2000-07-05 Bruno Haible <haible@clisp.cons.org>
2143 * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
2144 by allocating a larger buffer. Test the gethostname return value for
2145 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
2146 returns an error and ENAMETOOLONG isn't defined.
2148 2000-07-05 Paul Eggert <eggert@twinsun.com>
2149 and Bruno Haible <haible@clisp.cons.org>
2151 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
2153 2000-07-05 Bruno Haible <haible@clisp.cons.org>
2155 * quotearg.c (struct quoting_options): Simplify quote_these_too
2158 2000-07-03 Jim Meyering <meyering@lucent.com>
2160 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
2161 Reported by Bruno Haible.
2163 2000-07-04 Jim Meyering <meyering@lucent.com>
2165 * quotearg.c: Make inclusion of <wchar.h> independent of whether
2166 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
2169 2000-07-03 Paul Eggert <eggert@twinsun.com>
2170 and Bruno Haible <haible@clisp.cons.org>
2172 * quotearg.c (mbrtowc):
2173 Assign to *pwc, and return 1 only if result is nonzero.
2174 (iswprint): Use ISPRINT when substituting our own mbrtowc.
2176 2000-07-03 Jim Meyering <meyering@lucent.com>
2178 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
2179 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
2182 2000-07-02 Jim Meyering <meyering@lucent.com>
2184 * quotearg.c (mbstate_t): Don't define here.
2186 2000-07-02 Jim Meyering <meyering@lucent.com>
2188 * nanosleep.c (SIGCONT): Define if not already defined.
2190 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2192 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
2193 per change in ../m4/ls-mntd-fs.m4.
2194 (read_filesystem_list): Ignore symbolic links.
2196 2000-06-29 Jim Meyering <meyering@lucent.com>
2198 * same.c: Include <string.h> or <strings.h>, as appropriate,
2199 for declaration of strcmp.
2201 * long-options.c: Include <stdlib.h>, for declaration of exit.
2203 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
2204 Avoid warning by casting result to `char *' to remove `const'.
2206 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2208 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
2210 2000-06-26 Paul Eggert <eggert@twinsun.com>
2212 savedir now sets errno on failure and invokes xmalloc to get memory.
2213 Fix a couple of other minor bugs while we're at it.
2215 * savedir.c (<unistd.h>): Do not include; there's no need.
2216 (NAMLEN): Remove macro.
2217 (malloc, realloc): Remove decls.
2219 ("xalloc.h"): Include.
2220 (NAME_SIZE_DEFAULT): New macro.
2221 (savedir): Use xmalloc / xrealloc to allocate memory.
2222 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
2223 Skip "" directory entries.
2224 Use strlen to calculate directory entry length, since the old method
2225 is rarely used these days and isn't worth supporting.
2226 Don't use a pointer after freeing it.
2227 Check for integer overflow when calculating allocation size.
2228 Use memcpy to copy entries, instead of stpcpy.
2229 Set errno properly when returning NULL.
2230 Check for readdir error.
2232 2000-06-26 Jim Meyering <meyering@lucent.com>
2234 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
2236 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2238 * getusershell.c (xmalloc, xrealloc): Remove functions.
2240 Don't include <stdlib.h>. Don't declare malloc, realloc.
2242 2000-06-23 Bruno Haible <haible@clisp.cons.org>
2244 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
2246 2000-06-24 Jim Meyering <meyering@lucent.com>
2248 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
2250 2000-06-21 Jim Meyering <meyering@lucent.com>
2252 * getpass.c: New file, from Bruno Haible. Required for BeOS.
2254 2000-06-19 Paul Eggert <eggert@twinsun.com>
2256 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
2257 (mbrtowc, mbstate_t): Define substitutes if
2258 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
2259 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
2260 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
2262 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2264 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
2265 than 1024, return a memory chunk of least possible size, instead
2266 of size PATH_MAX + 2. In the loop, increment the size proportionally.
2267 Use free/xmalloc instead of xrealloc to avoid copying for very long
2270 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2272 * canon-host.c (canon_host): Use malloc and memcpy to copy an
2273 address, not strdup. Include <stdlib.h> and don't declare free().
2275 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2277 * path-concat.c (path_concat): Don't access dir[-1] if dir is
2280 2000-06-21 Jim Meyering <meyering@lucent.com>
2282 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
2283 (noinst_HEADERS): Add getstr.h.
2285 * getline.c (getstr): Move into a separate file.
2286 * getstr.c (getstr): New file, extracted from getline.c, with
2287 the following changes: new parameter, delim2; both delim[12]
2288 parameters have type `int', not `char'. The latter would lose
2289 with 8-bit delimiters.
2290 * getstr.h: New file.
2292 2000-06-19 Jim Meyering <meyering@lucent.com>
2294 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
2296 2000-06-18 Jim Meyering <meyering@lucent.com>
2298 * mkdir.c: Remove file, due mainly to copyright incompatibility.
2299 Besides, these days every porting target provides a mkdir function.
2301 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
2302 (this snippet comes from src/system.h).
2304 2000-06-15 Paul Eggert <eggert@twinsun.com>
2306 * human.c (adjust_value): New function.
2307 (human_readable_inexact): Apply rounding style even when
2308 printing approximate values.
2310 2000-06-14 Paul Eggert <eggert@twinsun.com>
2312 * human.c (human_readable_inexact): Allow an input block
2313 size that is not a multiple of the output block size, and vice versa.
2314 Reported by Piergiorgio Sartor.
2316 2000-06-14 Paul Eggert <eggert@twinsun.com>
2318 * getdate.y (get_date): Apply relative times after time
2319 zone indicator, not before. Reported by Todd A. Jacobs.
2321 2000-06-13 Jim Meyering <meyering@lucent.com>
2323 * Makefile.am (all-local): Depend on lstat.c and stat.c.
2325 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
2327 2000-06-12 Paul Eggert <eggert@twinsun.com>
2329 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
2331 2000-06-04 Paul Eggert <eggert@twinsun.com>
2333 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
2335 2000-06-04 Jim Meyering <meyering@lucent.com>
2337 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
2338 SunOS4.1.4 for which gid_t is an unsigned type.
2340 2000-06-03 Jim Meyering <meyering@lucent.com>
2342 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
2344 2000-05-26 Bruno Haible <haible@clisp.cons.org>
2346 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
2347 newer, don't install charset.alias.
2348 * config.charset: Change the Linux/glibc rules so they become empty
2349 on glibc-2.1 or newer.
2351 2000-06-02 Jim Meyering <meyering@lucent.com>
2353 * mountlist.c: Back out last change. Instead, do this...
2354 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
2355 member using the same `ignore'-testing code.
2356 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
2360 2000-05-29 Jim Meyering <meyering@lucent.com>
2362 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
2363 with the `ignore' attribute. Based on a patch from Mark D. Roth.
2365 2000-05-22 Jim Meyering <meyering@lucent.com>
2367 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
2369 2000-05-18 Jim Meyering <meyering@lucent.com>
2371 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
2372 back, too, since it may have been modified by allocate_entry.
2373 (hash_delete): Rewrite to use neither the assignment operator
2374 nor the comma operator in an if-expression.
2376 2000-05-15 Paul Eggert <eggert@twinsun.com>
2379 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
2380 Remove; no longer needed.
2381 "quotearg.h": Add include.
2382 (file_name): Do not bother to explicitly initialize to NULL; it's less
2383 efficient on some hosts.
2384 (close_stdout_status): Remove test as to whether stdout was already
2385 closed; it breaks for the case "echo x | sort >&-".
2386 Quote file name colons.
2387 Do not assume that _("write error") lacks format strings.
2389 2000-05-15 Jim Meyering <meyering@lucent.com>
2391 * version-etc.c (version_etc_copyright): Update the copyright string
2392 used in all --version output.
2394 2000-05-14 Jim Meyering <meyering@lucent.com>
2396 * closeout.c (close_stdout_set_file_name): New function.
2397 (close_stdout_status): Use new file-scoped global.
2398 Return right away if fstat says the stdout file descriptor is invalid.
2399 * closeout.h (close_stdout_set_file_name): Declare.
2401 2000-05-10 Jim Meyering <meyering@lucent.com>
2403 * closeout.c [default_exit_status]: New file-scoped variable.
2404 (close_stdout_set_status): New function.
2405 * closeout.h (close_stdout_set_status): Declare.
2407 2000-05-08 Jim Meyering <meyering@lucent.com>
2409 * long-options.c: Don't include closeout.h.
2410 (parse_long_options): Don't call close_stdout for --version.
2412 2000-05-06 Jim Meyering <meyering@lucent.com>
2414 * strnlen.c: Undefine __strnlen and strnlen.
2415 [!weak_alias]: Define __strnlen to strnlen.
2417 * atexit.c: New file, from libiberty.
2419 2000-05-06 Jim Meyering <meyering@lucent.com>
2421 * closeout.c (close_stdout_status): Also check for errors on the
2424 2000-05-05 Bruno Haible <haible@clisp.cons.org>
2426 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
2427 instead of xmalloc, xrealloc, path_concat.
2428 (locale_charset): Treat empty environment variables as absent.
2429 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
2431 2000-05-04 Jim Meyering <meyering@lucent.com>
2433 * getopt.c: Update from glibc.
2434 * obstack.c: Likewise.
2435 * obstack.h: Likewise.
2436 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
2438 * regex.h: Likewise.
2439 * strndup.c: Likewise.
2440 * strnlen.c: New file, from glibc.
2442 2000-05-01 Jim Meyering <meyering@lucent.com>
2444 * full-write.c (full_write): Remove `FIXME' part of comment.
2446 2000-04-29 Jim Meyering <meyering@lucent.com>
2448 * path-concat.c: Declare strdup only if it's not defined.
2449 * canon-host.c: Likewise.
2451 2000-04-28 Jim Meyering <meyering@lucent.com>
2453 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
2454 redefinition warning on some systems (HPUX). Otherwise, regex.h is
2455 included first, then limits.h is included by locale.h by libintl.h.
2456 From John David Anglin.
2458 2000-04-25 Jim Meyering <meyering@lucent.com>
2460 * makepath.c (S_IRWXUGO): Define.
2461 (make_path): Always perform explicit chmod if MODE specifies any
2462 of the `special' permission bits. Prompted by a bug report against
2463 install from Mate Wierdl and Joost van Baal.
2465 2000-04-18 Jim Meyering <meyering@lucent.com>
2469 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
2470 getpagesize. For BeOS. Based on a patch from Bruno Haible.
2472 2000-04-17 Jim Meyering <meyering@lucent.com>
2474 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
2475 the definition of it to rpl_strftime also defined-away the system's
2478 2000-04-15 Jim Meyering <meyering@lucent.com>
2480 Use `C' to denote so-called `contiguous' files, the same way
2482 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
2483 (ftypelet): Use S_ISCTG.
2484 From Michael Deutschmann.
2486 2000-04-14 Jim Meyering <meyering@lucent.com>
2488 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
2490 2000-04-08 Jim Meyering <meyering@lucent.com>
2492 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
2493 names don't conflict. Reported by Eli Zaretskii.
2495 2000-03-28 Bruno Haible <haible@clisp.cons.org>
2497 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
2498 bug. Deal with the different error behavior of Irix iconv.
2500 2000-04-07 Jim Meyering <meyering@lucent.com>
2502 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
2503 to work around system header problems on AIX 3.2.5. From Bruno Haible.
2505 2000-04-05 Jim Meyering <meyering@lucent.com>
2507 Portability tweaks required for ultrix4.3.
2508 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
2509 * readutmp.c: Include sys/types.h before sys/stat.h.
2510 * canon-host.c: Declare strdup.
2511 * path-concat.c: Likewise.
2512 From John David Anglin.
2514 2000-04-04 Jim Meyering <meyering@lucent.com>
2516 Be more DOS 8.3-friendly.
2517 * ref-add.sin: Renamed from ref-add.sed.in.
2518 * ref-del.sin: Renamed from ref-del.sed.in.
2519 * Makefile.am: Reflect renaming.
2520 Reported by Eli Zaretskii.
2522 Use a temporary file name that won't clash with `charset.alias'
2523 in the DOS 8.3 name space.
2524 * Makefile.am (charset_tmp): Define.
2525 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
2526 (uninstall-local): Likewise.
2527 Reported by Eli Zaretskii.
2529 2000-03-29 Paul Eggert <eggert@twinsun.com>
2531 * time/strftime.c (my_strftime): Make sure we call the system
2532 strftime, not ourselves, when invoking the underlying strftime.
2534 2000-03-24 Jim Meyering <meyering@lucent.com>
2536 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
2537 (charset_alias): Define.
2538 (install-exec-local): Factor out common code.
2539 (uninstall-local): Split lines longer than 80.
2540 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
2542 (.sed.in.sed): New rule. Don't redirect directly to $@.
2543 (CLEANFILES): Add ref-add.sed and ref-del.sed.
2545 2000-03-19 Bruno Haible <haible@clisp.cons.org>
2547 * config.charset: Output a line containing "Packages using this file".
2548 * ref-add.sed.in, ref-del.sed.in: New files.
2549 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
2550 ref-del.sed): New rules.
2552 2000-03-17 Jim Meyering <meyering@lucent.com>
2554 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
2555 Otherwise, include <strings.h>
2557 2000-03-17 Bruno Haible <haible@clisp.cons.org>
2559 * unicodeio.c (utf8_wctomb): New function.
2560 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
2561 format instead of in UCS-4 with platform dependent endianness.
2563 2000-03-07 Paul Eggert <eggert@twinsun.com>
2565 * savedir.c (savedir): Work even if directory size is
2566 negative; this can happen with some screwy NFS configurations.
2568 2000-03-06 Jim Meyering <meyering@lucent.com>
2570 * localcharset.c (get_charset_aliases): Don't try to free file_name
2571 if it's NULL (because we ran out of memory). From Bruno Haible.
2573 2000-03-05 Jim Meyering <meyering@lucent.com>
2575 * localcharset.c ("path-concat.h"): Include.
2576 (get_charset_aliases): Use path_concat instead of ANSI string
2579 * unicodeio.h (PARAMS): Define.
2580 Use it to guard prototype.
2582 2000-03-04 Jim Meyering <meyering@lucent.com>
2584 * Makefile.am (install-exec-local): Create $(libdir) before installing
2586 (uninstall-local): Uncomment this rule so `make distcheck' works
2589 * unicodeio.c (<errno.h>): Include it.
2590 (errno): Declare if not defined.
2592 * localcharset.c: Add Bruno's comment justifying use of volatile.
2594 * config.charset: New version, incorporating remarks from a linux
2595 i18n mailing list. From Bruno Haible.
2597 2000-03-02 Jim Meyering <meyering@lucent.com>
2599 * Makefile.am (EXTRA_DIST): Add config.charset.
2601 2000-03-01 Jim Meyering <meyering@lucent.com>
2603 * localcharset.c: Guard some #includes with `#if HAVE_...'.
2604 * unicodeio.c: Likewise.
2606 2000-02-02 Bruno Haible <haible@clisp.cons.org>
2608 * config.charset: New file.
2609 * localcharset.c: New file.
2610 * unicodeio.h, unicodeio.c: New files.
2611 * Makefile.am (DEFS): Add -DLIBDIR=...
2612 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
2613 (noinst_HEADERS): Add unicodeio.h.
2614 (all-local, install-exec-local, charset.alias): New targets.
2616 2000-02-28 Paul Eggert <eggert@twinsun.com>
2618 * quotearg.c (ALERT_CHAR): New macro.
2619 (quotearg_buffer_restyled): Use it.
2621 2000-02-27 Jim Meyering <meyering@lucent.com>
2623 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
2624 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
2626 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
2627 not `#if STDC_HEADERS'.
2628 Declare malloc if needed.
2630 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
2631 now that autoconf always defines the HAVE_DECL_ symbols.
2632 * human.c: Likewise.
2634 * strtoumax.c: Likewise.
2636 * backupfile.c: Arrange for cpp to fail if the configure-time
2637 declaration check was not run.
2639 * human.c: Likewise.
2641 * strtoumax.c: Likewise.
2643 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
2644 then first look up the entire `.'-containing string as a login name.
2646 2000-02-18 Paul Eggert <eggert@twinsun.com>
2648 * getdate.y: Handle two-digit years with leading zeros correctly.
2649 (textint): New typedef.
2650 (parser_control): Member year changed from int to textint.
2652 (YYSTYPE): Removed; replaced by %union with int and textint members.
2653 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
2654 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
2655 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
2656 (tSNUMBER, tUNUMBER): Now of type <textintval>.
2657 (date, number, to_year): Use width of number in digits, not its value,
2658 to determine whether it's a 2-digit year, or a 2-digit time.
2659 (yylex): Store number of digits of numeric tokens.
2660 Reported by John Kendall.
2662 (parser_control): Changed from struct parser_control to typedef (for
2663 consistency). All uses changed.
2665 (tID): Removed; not used.
2666 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
2668 2000-02-14 Paul Eggert <eggert@twinsun.com>
2670 * getpagesize.h (getpagesize): Port to VMS for Alpha;
2671 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
2673 2000-02-12 Jim Meyering <meyering@lucent.com>
2675 * userspec.c (ISDIGIT): Define it.
2676 (isdigit): Remove definition.
2677 (is_number): Use ISDIGIT, not isdigit.
2678 <libintl.h>: Include.
2680 (parse_user_spec): Mark translatable strings.
2682 2000-02-10 Jim Meyering <meyering@lucent.com>
2684 With these changes, nanosleep.[ch] are finally enough like the other
2685 lib/* replacement files to compile on a few more losing systems.
2687 * nanosleep.h: Don't include config.h.
2688 Remove prototype from declaration of nanosleep.
2689 (PARAMS): Remove now-unneeded definition.
2690 * nanosleep.c: #undef nanosleep.
2691 (rpl_nanosleep): Rename from nanosleep.
2693 2000-02-03 Jim Meyering <meyering@lucent.com>
2695 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
2696 rather than with `#if HAVE_UTMPNAME'.
2698 2000-02-01 Jim Meyering <meyering@lucent.com>
2700 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
2702 2000-01-31 Jim Meyering <meyering@lucent.com>
2704 * nanosleep.h (nanosleep): Guard declaration with
2705 `#if ! HAVE_DECL_NANOSLEEP'.
2706 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
2707 the declaration in that vendor's sys/timers.h.
2708 Reported by Christian Krackowizer.
2710 * quotearg.c (ISASCII): Add #undef and move definition to follow
2711 inclusion of wctype.h to work around solaris2.6 namespace pollution.
2712 (ISPRINT): Likewise.
2713 Reported by Tom Tromey.
2715 2000-01-30 Jim Meyering <meyering@lucent.com>
2717 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
2718 uses of ->ut_name. The latter doesn't work with new Linux header files
2719 where only utmpx.ut_user is declared.
2721 * readutmp.h (UT_USER): Define.
2723 2000-01-23 Jim Meyering <meyering@lucent.com>
2725 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
2728 2000-01-22 Jim Meyering <meyering@lucent.com>
2730 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
2731 [! HAVE_DECL_STRTOULL]: Declare strtoull.
2732 Required for some AIX systems. Reported by Christian Krackowizer.
2733 [TESTING] (main): New function.
2735 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
2736 * dirname.c (dir_name): Support for DOS-style file names with drive
2739 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
2741 * strverscmp.c (ISDIGIT): Define.
2742 (strverscmp): Use ISDIGIT, not isdigit.
2744 2000-01-17 Paul Eggert <eggert@twinsun.com>
2746 * nanosleep.c (nanosleep):
2747 Don't use SA_INTERRUPT to decide whether to call sigaction, as
2748 POSIX.1 doesn't require SA_INTERRUPT and some systems
2749 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
2750 it's been part of POSIX.1 since day 1 (in 1988).
2752 2000-01-17 Jim Meyering <meyering@lucent.com>
2754 * interlock: Remove unused file. Reported by François Pinard.
2756 2000-01-16 Paul Eggert <eggert@twinsun.com>
2758 * quotearg.c (quotearg_buffer_restyled): Do not quote
2759 alert, backslash, formfeed, and vertical tab unnecessarily in
2760 shell quoting style.
2763 version-control: never