1 2002-12-04 Jim Meyering <jim@meyering.net>
3 * safe-read.c: Rework so that it may serve to define safe_write, too.
4 * safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
6 2002-12-03 Jim Meyering <jim@meyering.net>
8 * safe-read.c, safe-write.c: Change variable names and comments, but
9 not semantics, to minimize the differences between these two files.
10 (safe_read): Change comment to mention SAFE_READ_ERROR.
12 * safe-read.c (IS_EINTR): Define.
13 (safe_read): Use IS_EINTR in place of in-function cpp directives.
15 2002-12-02 Bruno Haible <bruno@clisp.org>
17 * safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
18 Define, taken from safe-read.c.
19 (INT_MAX): Provide fallback.
20 (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21 * safe-write.h (SAFE_WRITE_ERROR): Define.
23 * safe-read.c (EINTR): Remove definition.
24 (safe_read): Don't use EINTR if it is absent.
26 2002-12-02 Jim Meyering <jim@meyering.net>
28 * safe-read.c (EINTR): Define.
29 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
30 (INT_MAX): Provide fallback.
31 (safe_read): Rewrite to iterate IFF the read fails with EINTR.
33 * safe-read.h (SAFE_READ_ERROR): Define.
35 2002-12-01 Jim Meyering <jim@meyering.net>
37 * safe-read.c: (safe_read): Also exit the loop when read returns zero.
38 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
40 2002-11-27 Paul Eggert <eggert@twinsun.com>
42 * hash.c (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
43 hash_rehash): Replace `if (limit <= value) abort ();' with
44 `if (! (value < limit)) abort ();', for readability.
46 2002-11-26 <karl@gnu.org>
48 * strdup.c: copy from libc again, with jim's ok.
49 * .cppi-disable: re-add strdup.c
51 2002-11-25 <karl@gnu.org>
53 * strtoll.c: copy from libc, meaning we now #include <strtol.c>
54 instead of "strtol.c".
56 2002-11-25 Jim Meyering <jim@meyering.net>
58 * mktime.c: Sync from libc, now that it has the latest fix.
60 2002-11-24 <karl@gnu.org>
62 * error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
63 regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
65 2002-11-24 Jim Meyering <jim@meyering.net>
67 Update from coreutils:
69 * mktime.c: Merge in changes from libc.
71 Avoid a link-time failure on some Linux systems.
72 * mktime.c (STATIC): Define to be empty (_LIBC) or `static' (otherwise).
73 (__mon_yday): Declare with the STATIC attribute.
74 (__mktime_internal): Likewise.
75 Based on a report from Greg Schafer.
77 2002-11-23 Jim Meyering <jim@meyering.net>
79 * sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
80 Use `unsigned', not `int', as type of index.
82 * xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
84 * fsusage.c: Remove unneeded parentheses around operands of `defined'.
86 2002-11-22 Paul Eggert <eggert@twinsun.com>
88 * hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
89 hint that one should use `if (! x) abort ();' rather than `assert
90 (x);', and anyway it's one less thing to worry about configuring.
91 (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
92 hash_rehash, hash_insert): Use abort rather than assert.
94 2002-11-22 Paul Eggert <eggert@twinsun.com>
96 * quotearg.h: Allow multiple inclusion by surrounding with
97 "#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
98 so that we can be included first.
99 (PARAMS): Remove; we now assume C89 or later. All uses removed.
100 * quotearg.c: Include quotearg.h immediately after config.h.
101 No need to include stddef.h or sys/types.h any more.
102 Surround local include files with "", not "<>".
103 Assume HAVE_LIMITS_H unconditionally, as we assume C89.
104 Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
105 HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
106 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
107 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
108 (ISPRINT): Remove; no longer needed now that we assume C89.
110 (clone_quoting_options, quotearg_buffer, quotearg_n_options):
113 (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
114 quotearg_char): Use SIZE_MAX rather than
115 (size_t) -1 when we are talking about "infinity".
117 (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
119 2002-11-22 Bruno Haible <bruno@clisp.org>
121 * safe-read.h: Assume C89. Add comments.
122 (safe_read): Change return type to size_t.
123 * safe-read.c (safe_read): Change return type to size_t. Handle byte
124 counts > SSIZE_MAX correctly.
125 * safe-write.h: New file.
126 * safe-write.c: New file.
127 * full-read.h: New file.
128 * full-read.c: New file.
129 * full-write.h: Assume C89. Add comments.
130 * full-write.c: Include safe-write.h.
131 (full_write): Rewritten to use safe_write.
132 Suggested by Jim Meyering and Paul Eggert.
134 2002-11-21 Bruno Haible <bruno@clisp.org>
136 Remove case insensitive option matching.
137 * argmatch.h (argcasematch): Remove declaration.
138 (ARGCASEMATCH): Remove macro.
139 (__xargmatch_internal): Remove case_sensitive argument.
141 (XARGCASEMATCH): Remove macro.
142 * argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
143 case_sensitive argument.
144 (argcasematch): Remove function.
145 (__xargmatch_internal): Remove case_sensitive argument.
146 (main): Use XARGMATCH instead of XARGCASEMATCH.
148 * xmalloc.c: Change compile-time error message. Add comment about
149 required autoconf version.
151 2002-11-21 Jim Meyering <jim@meyering.net>
153 * strdup.c (strdup): Tweak comment and initial #if/#include.
155 Merge in changes from the coreutils.
157 2002-09-25 Paul Eggert <eggert@twinsun.com>
158 * fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
159 (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
160 (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
161 int. Work more efficiently if X is the same width as uintmax_t.
162 Do not compare X to -1, to avoid bogus compiler warning.
163 (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
164 Don't assume that f_frsize and f_bsize are the same type.
166 * mountlist.c: #undef MNT_IGNORE before defining it, to avoid warning
169 * makepath.c (make_path): Restore umask *before* creating the final
171 (make_path): Minor reformatting.
173 * xmalloc.c: Adjust to work with new autoconf macros, AC_FUNC_MALLOC
174 and AC_FUNC_REALLOC: test #ifndef HAVE_MALLOC/HAVE_REALLOC.
176 * mountlist.h (ME_DUMMY): Don't count entries of type `auto' as dummy
177 ones. At least on GNU/Linux systems, `auto' means something else.
180 2002-11-20 Paul Eggert <eggert@twinsun.com>
182 Merge argmatch cleanups from Bison. Assume C89.
184 * argmatch.c: Include config.h here, not in argmatch.h.
185 Include stdlib.h, for EXIT_FAILURE.
186 Always include <string.h>, since we assume C89.
187 (EXIT_FAILURE): Remove pre-C89 bug workaround.
188 * argmatch.h: Do not include <config.h> or <sys/types.h>.
189 Include <stddef.h> instead, since it's all we need for size_t.
190 (PARAMS): Remove. All uses removed.
191 (ARRAY_CARDINALITY): Do not bother to #undef.
192 (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
193 ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
194 Remove unnecessary parentheses.
195 (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
196 Insert necessary parentheses.
197 (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
198 (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
200 2002-11-19 Bruno Haible <bruno@clisp.org>
202 * mbswidth.c: Include mbswidth.h right at the beginning.
203 * mbswidth.h: Include <stddef.h>, for size_t.
205 * mbswidth.h (PARAMS): Remove macro.
206 (mbswidth, mbsnwidth): Use ANSI C function declarations.
207 * mbswidth.c (mbswidth, mbsnwidth): Likewise.
209 * gcd.h (PARAMS): Remove macro.
210 (gcd): Use ANSI C function declarations.
211 * gcd.c (gcd): Likewise.
213 2002-11-15 Bruno Haible <bruno@clisp.org>
215 * strcspn.c: Include <stddef.h>.
216 (strcspn): Use ANSI C function declaration. Change return type to
218 * strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
220 * strpbrk.h (PARAMS): Remove macro.
221 (strpbrk): Use ANSI C function declaration.
222 * strstr.c: Don't include <sys/types.h>.
223 * strstr.h (PARAMS): Remove macro.
224 (strstr): Use ANSI C function declarations.
226 2002-11-06 Bruno Haible <bruno@clisp.org>
228 * gcd.h (gcd): Change argument type to 'unsigned long'.
229 * gcd.c (gcd): Likewise.
231 2002-11-05 Bruno Haible <bruno@clisp.org>
233 * gcd.h: New file, from gettext-0.11.5.
234 * gcd.c: New file, from gettext-0.11.5.
236 2002-11-05 Bruno Haible <bruno@clisp.org>
238 * error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
239 * getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
240 * obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
241 * regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
243 * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
244 * makepath.c: Include gettext.h instead of <locale.h> and <libintl.h>.
246 * closeout.c: Include gettext.h instead of <libintl.h>.
247 * human.c: Include gettext.h instead of <libintl.h>.
248 * quotearg.c: Include gettext.h instead of <libintl.h>.
249 * rpmatch.c: Include gettext.h instead of <libintl.h>.
250 * unicodeio.c: Include gettext.h instead of <libintl.h>.
251 * userspec.c: Include gettext.h instead of <libintl.h>.
252 * version-etc.c: Include gettext.h instead of <libintl.h>.
253 * xmalloc.c: Include gettext.h instead of <libintl.h>.
254 (textdomain): Remove definition.
255 * xmemcoll.c: Include gettext.h instead of <libintl.h>.
257 * long-options.c: Remove include of <libintl.h> and definition of _.
258 * same.c: Remove include of <libintl.h> and definition of _.
260 2002-11-04 Bruno Haible <bruno@clisp.org>
262 * stpcpy.h: New file, from GNU gettext-0.11.5.
263 * strcase.h: New file, from GNU gettext-0.11.5.
264 * strpbrk.h: New file, from GNU gettext-0.11.5.
265 * strstr.h: New file, from GNU gettext-0.11.5.
266 * xgetcwd.h: New file, from GNU gettext-0.11.5.
268 2002-05-09 Bruno Haible <bruno@clisp.org>
270 * config.charset: Update for newest glibc. Add canonical names
271 ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
273 2002-05-09 Bruno Haible <bruno@clisp.org>
275 * localcharset.c (get_charset_aliases): Add more Windows specific
278 2002-05-08 Owen Taylor <otaylor@redhat.com>
280 * config.charset: A few additions for Solaris.
282 2001-12-05 Bruno Haible <bruno@clisp.org>
284 * localcharset.c (locale_charset): Don't return an empty string.
286 2001-10-23 Bruno Haible <haible@clisp.cons.org>
288 * config.charset: msdos in uk_UA uses CP1125.
290 2001-08-05 Bruno Haible <haible@clisp.cons.org>
292 Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
293 * localcharset.c (locale_charset): Declare as extern "C".
295 2002-02-15 Bruno Haible <bruno@clisp.org>
297 * config.charset [msdosdjgpp]: For Russian, use CP866.
299 2002-02-11 Bruno Haible <bruno@clisp.org>
301 * config.charset: Add support for NetBSD.
303 2002-09-25 <karl@gnu.org>
305 * strdup.c: copy from libc/string (via ../config/srclist*).
306 * getopt*: copy from libc/posix.
307 * gettext.h: copy from gettext.
308 * .cppi-disable: add strdup.c, gettext.h.
310 2002-07-01 Jim Meyering <meyering@lucent.com>
312 * c-stack.c: Include sys/time.h.
313 From Volker Borchert.
315 2002-06-11 Paul Eggert <eggert@twinsun.com>
317 * fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
318 New macro. Use it uniformly instead of
319 (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
320 It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
321 reported by Vin Shelton.
323 2002-06-22 Jim Meyering <meyering@lucent.com>
325 * fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
326 redefinition due to Solaris5.6's definition in /usr/include/sys/euc.h.
328 2002-06-22 Paul Eggert <eggert@twinsun.com>
330 * c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
331 Do not assume SA_SIGINFO behavior.
332 Bug reported by Jim Meyering on NetBSD 1.5.2.
334 2002-06-22 Jim Meyering <meyering@lucent.com>
336 * c-stack.c, c-stack.h: New files, from diffutils-2.8.2.
338 * exitfail.c, exitfail.h: Likewise.
339 * Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
341 * Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
343 (EXTRA_DIST): Add fnmatch_loop.c.
344 (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
346 * fnmatch_loop.c: New file, from diffutils-2.8.2.
347 * fnmatch.c: Update from diffutils-2.8.2.
348 * fnmatch_.h: New file. From diffutils-2.8.2.
349 * fnmatch.h: Remove file.
351 2002-06-18 Paul Eggert <eggert@twinsun.com>
353 * file-type.h: Report an error if neither S_ISREG nor
354 S_IFREG is defined, instead of using a test specific to glibc
355 2.2. This should be safe, since POSIX requires S_ISREG and
356 Unix Version 7 had S_IFREG. We don't need to check for
357 <sys/types.h> since we don't use any symbols that it defines.
359 2002-06-15 Jim Meyering <meyering@lucent.com>
361 * file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
362 For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
363 have been included before this file.
365 2002-06-13 Richard Dawe <richdawe@bigfoot.com>
367 * Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than $@-t,
368 so that each temporary file name is unique and valid in the first
369 8 characters, for operation under DOS.
371 2002-06-15 Jim Meyering <meyering@lucent.com>
373 Work even with DJGPP 2.03, which lacks support for symlinks.
375 * xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
377 * lchown.c (S_ISLNK): Likewise.
379 2002-06-14 Jim Meyering <meyering@lucent.com>
381 * file-type.h: Use the version from diffutils-2.8.2.
382 * file-type.c: Likewise.
384 2002-05-27 Jim Meyering <meyering@lucent.com>
386 Fix a problem seen only on nonconforming systems whereby ls.c's
387 use of localtime, and then of gettimeofday would cause trouble:
388 the localtime call used to initialize rpl_gettimeofday's save
389 mechanism would clobber ls's current local time information so
390 that in any long listing the first file would always be listed
391 with date 1970-01-01. Analysis by Volker Borchert.
393 * gettimeofday.c (localtime): Undefine.
394 (rpl_localtime): New function.
396 2002-05-22 Jim Meyering <meyering@lucent.com>
398 * Makefile.am (libfetish_a_SOURCES): Add file-type.c and file-type.h.
399 * file-type.h: New file.
400 * file-type.c (file_type): New file/function. Extracted from diffutils.
402 2002-04-29 Paul Eggert <eggert@twinsun.com>
404 * hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
406 2002-04-28 Paul Eggert <eggert@twinsun.com>
408 * sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
409 depending on <sys/wait.h> and WTERMSIG. Default to 64 instead
410 of 127, since 64 is the largest conceivable number for ancient
412 * sig2str.c: Do not include <sys/wait.h>; no longer needed.
414 2002-04-28 Jim Meyering <meyering@lucent.com>
416 * sig2str.c (WTERMSIG): Remove definition (unused).
418 2002-04-28 Paul Eggert <eggert@twinsun.com>
420 * sig2str.h, sig2str.c: New files.
421 * Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
423 2002-04-24 Jim Meyering <meyering@lucent.com>
425 * gettext.h: New file, from Gettext.
426 * Makefile.am (INCLUDES): Remove -I../intl.
427 (libfetish_a_SOURCES): Add gettext.h.
429 2002-04-16 Jim Meyering <meyering@lucent.com>
431 * readutmp.h (UT_TYPE): Remove definition (now in who.c).
432 (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
433 (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
435 2002-04-12 Jim Meyering <meyering@lucent.com>
437 * dirfd.h (dirfd): Elide prototype if dirfd is a macro.
439 2002-03-10 Jim Meyering <meyering@lucent.com>
441 * makepath.c (make_path): Remove a comma from a diagnostic.
442 Suggestion from Santiago Vila.
444 2002-03-08 Jim Meyering <meyering@lucent.com>
446 * rename.c: Mention that this wrapper is needed also on
447 mips-dec-ultrix4.4 systems.
449 2002-03-02 Jim Meyering <meyering@lucent.com>
451 * gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
452 not HAVE_CLOCK_SETTIME.
454 2002-02-27 Paul Eggert <eggert@twinsun.com>
456 * nanosleep.h: Rename to....
457 * timespec.h: New name for nanosleep.h. All uses changed.
459 * gettime.c: New file.
460 * settime.c: New file.
463 * Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
464 timespec.h. Remove nanosleep.h.
466 2002-02-25 Paul Eggert <eggert@twinsun.com>
468 * acl.c, acl.h: New files.
469 * Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
471 2002-02-24 Jim Meyering <meyering@lucent.com>
473 * strnlen.c (strnlen): Define-away/undef so that an inconsistent
474 prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
475 cause trouble. Reported by Nelson Beebe.
477 2002-02-23 Paul Eggert <eggert@twinsun.com>
479 * path-concat.c (xpath_concat): Reorder code to pacify
480 compilers that don't know that xalloc_die never returns.
482 2002-02-20 Jim Meyering <meyering@lucent.com>
484 * getdate.c: Regenerate using bison-1.33.
486 2002-02-15 Paul Eggert <eggert@twinsun.com>
488 * posixver.c, posixver.h: New files.
489 * Makefile.am (libfetish_a_SOURCES): Add them.
491 2002-02-02 Paul Eggert <eggert@twinsun.com>
492 Bruno Haible <bruno@clisp.org>
494 * unicodeio.h (print_unicode_char): Add exit_on_error argument.
495 (fwrite_success_callback): New declaration.
496 * unicodeio.c (unicode_to_mb): New function, extracted from
497 print_unicode_char. Call failure callback instead of error.
498 (fwrite_success_callback): New function.
499 (exit_failure_callback): New function.
500 (fallback_failure_callback): New function.
501 (print_unicode_char): Call unicode_to_mb.
503 2002-01-26 Jim Meyering <meyering@lucent.com>
505 * Makefile.am (getdate$U.o): Depend on unlocked-io.h.
507 2002-01-22 Jim Meyering <meyering@lucent.com>
509 * Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
510 Otherwise, some versions of automake would omit the rule that makes
511 Makefile from Makefile.in.
513 2001-01-21 Paul Eggert <eggert@twinsun.com>
515 * xmemcoll.h, xmemcoll.c: New files.
516 * Makefile.am (libfetish_a_SOURCES): Add them.
517 * memcoll.c: Include errno.h, and declare errno if not defined.
518 (memcoll): Set errno to zero if there is no error.
520 * quotearg.c (quotearg_buffer_restyled):
521 Fix bug with quoting buffers containing NUL when backslashing escapes.
522 This bug was exposed by the other changes in this patch.
523 (quotearg_n_options): New arg ARGSIZE.
525 (quoting_options_from_style): New function.
526 (quotearg_n_style): Use it.
527 (quotearg_n_style_mem): New function.
529 * quotearg.h (quotearg_n_style_mem): New function.
531 2002-01-16 Jim Meyering <meyering@lucent.com>
533 * getdate.y: Add three semicolons, each just before a closing brace.
534 Bison (as of version 1.31) no longer papers over that mistake.
536 2002-02-14 Paul Eggert <eggert@twinsun.com>
538 * backupfile.c (ISDIGIT): Comment fix.
539 * getdate.y (ISDIGIT): Likewise.
540 * posixtm.c (ISDIGIT, year): Likewise.
541 * strverscmp.c (ISDIGIT): Likewise.
542 * userspec.c (ISDIGIT): Likewise.
544 2002-01-05 Jim Meyering <meyering@lucent.com>
546 * version-etc.c (version_etc_copyright): Update copyright year.
548 2001-01-19 Paul Eggert <eggert@twinsun.com>
550 * closeout.c (close_stdout_status): If ferror (stdout), do
551 not silently exit merely because the output buffer happens to
552 have nothing pending.
554 2001-12-18 Paul Eggert <eggert@twinsun.com>
556 See the big note in ../ChangeLog.
557 * human.c (suffixes): Prefer K to k for 1024.
558 (generate_suffix_backwards): New function.
559 (human_readable_inexact): Use it.
560 * xstrtol.c (__xstrtol): If there is no number but there
561 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
562 Accept 'K' as well as 'k'.
564 2001-12-15 Jim Meyering <meyering@lucent.com>
566 * regex.h (__restrict_arr): Update from libc.
568 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
569 as `remote' if the name starts with `//'. Suggested by Michael Stone.
572 2001-12-10 Jim Meyering <meyering@lucent.com>
574 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
575 Instead, include "xalloc.h".
576 (initbuffer): Don't cast xmalloc return value to char*.
577 (readline): Reword comment.
578 Don't cast xrealloc return value to char*
581 2001-12-09 Jim Meyering <meyering@lucent.com>
583 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
584 `signed and unsigned type in conditional expression'.
585 * posixtm.c (posix_time_parse): Likewise.
587 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
589 * readtokens.c (readtoken): Declare an index to be of type unsigned
590 to avoid a pedantic warning.
592 * getstr.c: Don't include assert.h.
593 (getstr): Remove warning-evoking assertions.
594 Return -1 if offset parameter is out of bounds.
595 Change the type of a local from int to size_t.
597 * strftime.c (my_strftime_localtime_r): Include this function
598 definition in the `#if ! HAVE_TM_GMTOFF' block.
600 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
601 Include xalloc.h instead.
603 2001-12-02 Jim Meyering <meyering@lucent.com>
605 * tempname.c: Don't declare getenv, thus reverting the change of
606 2001-11-18. It's no longer necessary, now that stdlib.h is always
609 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
610 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
612 2001-11-30 Akim Demaille <akim@epita.fr>
614 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
615 before being defined.
617 2001-11-27 Paul Eggert <eggert@twinsun.com>
619 * quotearg.h (quotearg_n, quotearg_n_style):
620 First arg is int, not unsigned.
621 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
622 (SIZE_MAX, UINT_MAX): New macros.
623 (quotearg_n_options): Abort if N is negative.
624 Avoid overflow check on hosts where size_t is 64 bits and int
625 is 32 bits, as overflow is impossible there.
626 Fix off-by-one typo that caused unnecessary reallocation.
628 2001-11-27 Jim Meyering <meyering@lucent.com>
630 * tempname.c: Merge with version from libc.
633 * tempname.c: Include stdlib.h unconditionally. On some old systems
634 for which STDC_HEADERS is 0, it was not included, resulting in a
635 warning about an integer-to-pointer conversion problem with getenv.
636 Reported by Volker Borchert.
638 2001-11-26 Jim Meyering <meyering@lucent.com>
640 * gtod.h: Remove file.
641 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
642 * gettimeofday.c: Don't include gtod.h.
643 (GTOD_init): Remove function.
644 (rpl_gettimeofday): Do its job here instead, rather than aborting.
645 Suggestion from Volker Borchert.
647 2001-11-23 Jim Meyering <meyering@lucent.com>
649 * hash.h (struct hash_table): Don't define here. Merely declare it.
650 * hash.c (struct hash_table): Define it here instead.
652 2001-11-22 Jim Meyering <meyering@lucent.com>
654 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
656 2001-11-18 Paul Eggert <eggert@twinsun.com>
658 * tempname.c (TMP_MAX): Remove; no longer needed.
659 (TEMPORARIES): New macro.
660 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
661 removes an artificial limitation (e.g. HP-UX 10.20, where
664 2001-11-18 Jim Meyering <meyering@lucent.com>
666 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
669 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
670 files will be created before anything else.
672 2001-11-17 Jim Meyering <meyering@lucent.com>
674 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
675 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
676 rather than group writable. Patch by Juan F. Codagnone.
678 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
679 Instead, include "xalloc.h".
681 * mountlist.c: Include unlocked-io.h after all system headers.
682 Remove explicit declarations of xmalloc, xrealloc,
683 and xstrdup. Instead, include "xalloc.h".
685 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
686 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
687 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
689 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
690 Reported by Padraig Brady.
692 * mkstemp.c: #undef mkstemp.
694 (rpl_mkstemp): Rename from mkstemp.
697 2001-11-16 Jim Meyering <meyering@lucent.com>
699 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
700 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
701 determine the amount of total physical memory, use pstat_getstatic.
702 HPUX-11 doesn't define _SC_PHYS_PAGES.
703 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
704 If sysconf couldn't be used to determine the amount of available
705 physical memory, use both pstat_getstatic and pstat_getdynamic.
706 Based on a patch from Bob Proulx.
708 2001-11-05 Jim Meyering <meyering@lucent.com>
710 * xstat.in (slash_aware_lstat): Correct a misleading comment.
712 2001-11-03 Jim Meyering <meyering@lucent.com>
714 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
715 in argmatch_to_argument call.
717 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
720 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
721 e.g., a fault due to an attempt to free a NULL pointer.
723 2001-11-01 Jim Meyering <meyering@lucent.com>
725 * dirfd.c, dirfd.h: New files.
726 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
728 * hash.c (hash_print) [TESTING]: Clean up.
730 2001-10-22 Paul Eggert <eggert@twinsun.com>
732 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
733 to avoid a warning if -Wall.
735 2001-10-21 Paul Eggert <eggert@twinsun.com>
737 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
739 2001-10-21 Jim Meyering <meyering@lucent.com>
741 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
742 this code would end up calling gettext even in packages built
744 * getopt.c (_): Likewise.
745 * regex.c (_): Likewise.
747 2001-10-20 Paul Eggert <eggert@twinsun.com>
749 * error.c (strerror_r): Do not declare unless !_LIBC.
750 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
751 Use strerror_r that is only a macro, even if it is not a function.
752 (strerror): Check for HAVE_DECL_STRERROR before declaring.
753 (private_strerror): Use prototypes, not old-style function definition.
754 (print_errno_message): New function.
755 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
757 (error_tail, error, error_at_line): Use it.
759 2001-10-11 Jim Meyering <meyering@lucent.com>
761 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
762 and quote_n (1, ... to avoid clobbering a buffer.
764 2001-10-05 Jim Meyering <meyering@lucent.com>
766 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
767 * hash-pjw.c: New file (factored out of fileutils' remove.c).
768 * hash-pjw.h: New file.
770 2001-09-30 Jim Meyering <meyering@lucent.com>
772 * mountlist.c [MOUNTED_GETFSSTAT]:
773 Include <sys/ucred.h>, for Apple Darwin.
774 Include sys/mount.h and sys/fs_types.h only if available.
776 (read_filesystem_list): Use FS_TYPE.
778 2001-09-29 Paul Eggert <eggert@twinsun.com>
780 * exclude.c (excluded_filename): 0 -> false, since it's
783 2001-09-28 Paul Eggert <eggert@twinsun.com>
785 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
786 #defines strtoimax. Also treat the other strto* functions
789 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
790 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
791 (strtoimax, strtoumax): Do not declare if already defined as a macro.
793 2001-09-26 Jim Meyering <meyering@lucent.com>
795 Most macros in unlocked-io.h had the wrong number of arguments.
796 * gen-uio: New script.
797 (USE_UNLOCKED_IO): Define to 1 if not already defined.
798 * unlocked-io.hin: Remove file.
799 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
800 rather than trying to embed it here.
801 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
802 Reported by Padraig Brady.
804 2001-09-25 Volker Borchert <bt@teknon.de>
806 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
808 2001-09-23 Jim Meyering <meyering@lucent.com>
810 * mountlist.c: Remove useless parentheses in #if directives.
811 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
812 the deprecated MOUNTED symbol is no longer defined in mntent.h.
814 2001-09-22 Jim Meyering <meyering@lucent.com>
816 * localcharset.c: Update from latest gettext.
817 * config.charset: Likewise.
819 2001-09-20 Jim Meyering <meyering@lucent.com>
821 * xstrtol.c (strtoimax): Guard declaration with
822 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
823 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
824 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
825 (strtoumax): Likewise, for completeness (it wasn't necessary).
827 2001-09-06 Paul Eggert <eggert@twinsun.com>
829 * strtoimax.c (HAVE_LONG_LONG):
830 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
831 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
832 to work around bug in IBM C compiler.
834 2001-09-16 Jim Meyering <meyering@lucent.com>
838 2001-09-04 Paul Eggert <eggert@twinsun.com>
840 * xgetcwd.c: Revert some of the previous change; intead,
841 fix the HAVE_GETCWD_NULL code to behave more like the
842 !HAVE_GETCWD_NULL code used to.
845 (xgetcwd): Do not return NULL when memory is exhausted; instead,
848 2001-09-04 Paul Eggert <eggert@twinsun.com>
850 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
851 Use ssize_t, not int, to store result of readlink.
852 Check for ssize_t overflow as well as size_t overflow,
853 as POSIX says the result of readlink is implementation-defined
854 when ssize_t overflows.
855 Remove unnecessary cast to char*.
856 Use free+malloc instead of realloc, as the storage doesn't need
857 to be preserved and it's clearer and can be more efficient that way.
858 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
859 * xreadlink.h (xreadlink): Update prototype.
861 2001-09-03 Paul Eggert <eggert@twinsun.com>
863 * exclude.c (fnmatch_no_wildcards): Fix confusion between
864 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
865 spotted by Jim Meyering.
867 2001-09-03 Jim Meyering <meyering@lucent.com>
869 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
871 2001-09-03 Paul Eggert <eggert@twinsun.com>
873 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
874 like the HAVE_GETCWD_NULL code.
875 Include pathmax.h if not HAVE_GETCWD.
876 Do not include xalloc.h.
877 (INITIAL_BUFFER_SIZE): New symbol.
878 Do not use xmalloc / xrealloc, since the caller is responsible for
879 handling errors. Preserve errno around `free' during failure.
880 Do not overrun buffer when using getwd.
882 2001-09-03 Paul Eggert <eggert@twinsun.com>
884 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
885 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
887 2001-09-02 Jim Meyering <meyering@lucent.com>
889 * error.c: Update from GNU libc.
891 2001-09-01 Jim Meyering <meyering@lucent.com>
893 * xreadlink.c: New file.
894 * xreadlink.h: New file.
895 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
897 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
898 doesn't conflict with sparc-sun-solaris2.7's definition in
899 /usr/include/sys/int_types.h.
901 * exclude.c: Use `""', not `<>' to #include non-system header files.
902 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
903 and strncasecmp as r-values. Unixware didn't have declarations.
905 2001-08-31 Jim Meyering <meyering@lucent.com>
907 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
908 Use an initial, malloc'd, buffer of length 128 rather than
909 a statically allocated one of length 1024.
911 2001-08-30 Paul Eggert <eggert@twinsun.com>
913 * xgetcwd.c: Don't include pathmax.h.
914 Include stdlib.h and unistd.h if available.
916 (xmalloc, xstrdup, free): Remove decls.
917 (xgetcwd): Don't assume sizes fit in unsigned.
918 Check for overflow when computing sizes.
919 Simplify reallocation code.
921 2001-08-28 Paul Eggert <eggert@twinsun.com>
923 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
925 * strtoimax.c: Renamed from strtoxmax.c, removing the
928 Also, make the following further changes to make this file's
929 configuration more similar to that of strtol.c:
930 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
931 (strtoumax, uintmax_t, strtoull, strtol): Remove.
932 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
933 (strtoimax): Renamed from strtoumax. All uses of unsigned values
934 changed to signed values.
936 And make the following changes as well:
937 Fix copyright notice, as 1999 was missing.
939 (strtoimax): Check sizes at compile-time, not run-time.
940 Prefer strtol to strtoll if both work.
941 (main): Remove; it was not that useful and was a pain to maintain.
943 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
945 2001-08-30 Paul Eggert <eggert@twinsun.com>
947 * savedir.c (savedir): Remove size parameter, as POSIX says that
948 a directory's st_size can have an arbitrary value, so the old
949 usage could waste an arbitrary amount of memory. All uses
951 * savedir.h: Update prototype.
953 2001-08-30 Paul Eggert <eggert@twinsun.com>
955 * xstrtol.c (strtoimax): New decl.
957 2001-08-28 Paul Eggert <eggert@twinsun.com>
959 * xstrtol.h: Add copyright notice.
960 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
961 LONGINT_INVALID_SUFFIX_CHAR.
963 2001-08-30 Paul Eggert <eggert@twinsun.com>
965 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
968 2001-08-30 Paul Eggert <eggert@twinsun.com>
970 * hash.c: Remove '2001' from copyright notice.
972 2001-08-30 Paul Eggert <eggert@twinsun.com>
974 * full-write.h: New file.
975 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
976 * full-write.c: Correct credits, as cccp.c no longer
977 exists and anyway it was so heavily changed from the old cccp
978 code as to be unrecognizable. Include full-write.h.
979 (full_write) Return size_t, with short writes meaning failure.
980 All callers changed. This fixes a bug with large buffers
982 * utime.c: Include full-write.h.
984 2001-08-30 Paul Eggert <eggert@twinsun.com>
986 Merge 'exclude' changes from tar 1.13.22.
987 This fixes one or two unlikely storage allocation overflow bugs,
988 but doesn't change user-visible behavior otherwise.
990 2001-08-30 Paul Eggert <eggert@twinsun.com>
992 * exclude.c (bool): Declare, perhaps by including stdbool.h.
993 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
994 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
995 Include if available.
996 (<xalloc.h>): Include
997 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
998 (verify): New macro. Use it to verify that EXCLUDE macros do not
999 collide with FNM macros.
1000 (struct patopts): New struct.
1001 (struct exclude): Use it, as exclude patterns now come with options.
1002 (new_exclude): Support above changes.
1003 (new_exclude, add_exclude_file):
1004 Initial size must now be a power of two to simplify overflow checking.
1005 (free_exclude, fnmatch_no_wildcards): New function.
1006 (excluded_filename): No longer requires options arg, as the options
1007 are determined by add_exclude. Now returns bool, not int.
1008 (excluded_filename, add_exclude):
1009 Add support for the fancy new exclusion options.
1010 (add_exclude, add_exclude_file): Now takes int options arg.
1011 Check for arithmetic overflow when computing sizes.
1012 (add_exclude_file): xrealloc might modify errno, so don't
1013 realloc until after errno might be used.
1015 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
1017 (free_exclude): New decl.
1018 (add_exclude, add_exclude_file): Now takes int options arg.
1019 (excluded_filename): No longer requires options arg, as the options
1020 are determined by add_exclude. Now returns bool, not int.
1022 2001-08-30 Paul Eggert <eggert@twinsun.com>
1024 * alloca.c (alloca): Arg is of type size_t, not unsigned.
1026 2001-08-27 Jim Meyering <meyering@lucent.com>
1028 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
1030 * version-etc.c (N_): Remove definition.
1031 Revert most of last change.
1032 Instead, simply don't mark the `Copyright...' string for translation.
1033 Based on advice from Paul Eggert.
1035 * strtoxmax.c: Tweak comment.
1037 2001-08-26 Jim Meyering <meyering@lucent.com>
1039 * version-etc.c (version_etc_copyright_fmt): Replace literal year
1040 of copyright with `%s' so translators don't get an untranslated
1042 (COPYRIGHT_YEAR): Define.
1043 (version_etc): Use fprintf rather than fputs.
1044 Suggestion from Ulrich Drepper.
1046 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
1048 * strtoll.c: New file, from GNU libc.
1049 * xstrtoimax.c: New file.
1051 * xstrtol.h: Add xstrtoimax.
1052 * strtoumax.c: New file. Simply include "strtoumax.c".
1053 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
1055 * strtoumax.c: Factor to work both for unsigned and signed types, ...
1056 * strtoxmax.c: ... then renamed to this.
1058 2001-08-13 Paul Eggert <eggert@twinsun.com>
1060 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
1061 Port to Solaris 8, where 'sed' requires a space after the 'r'
1062 command, and where sh dislikes "$/". Clean up the spacing a bit.
1063 Redirect output to $tmp just once.
1065 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
1067 * addext.c (<errno.h>): Include.
1068 (errno): Declare if not defined.
1069 (addext): Work correctly when pathconf returns -1 and leaves
1070 errno alone because there is no limit. Also, work even if
1071 pathconf returns a value greater than SIZE_MAX.
1073 2001-08-12 Jim Meyering <meyering@lucent.com>
1075 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
1076 Simply `return getcwd (NULL, 0);'.
1077 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
1078 Use 1300 as initial value for length, not PATH_MAX.
1080 * pathmax.h: Clean up cpp syntax.
1082 2001-08-12 Jim Meyering <meyering@lucent.com>
1084 * gettimeofday.c: New file.
1086 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
1088 2001-08-04 Jim Meyering <meyering@lucent.com>
1090 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
1091 to get in sync with glibc.
1093 2001-08-03 Paul Eggert <eggert@twinsun.com>
1095 The following changes are from gettext 0.10.39 as maintained by
1098 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
1099 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
1100 with inverted sense. All uses changed.
1102 * mbswidth.c: Don't include <limits.h>.
1103 Include <stdlib.h> and <string.h> unconditionally.
1104 (iswcntrl, mbsinit, ISCNTRL): New macros.
1105 (mbsnwidth): Use K&R style function declarations.
1106 Don't bother checking for MB_LEN_MAX == 1, since the compiler
1107 can optimize it when MB_CUR_MAX == 1.
1108 The width of control characters is zero, not 1.
1110 2001-07-15 Jim Meyering <meyering@lucent.com>
1112 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
1113 (BUILT_SOURCES): Add unlocked-io.h.
1114 (io_functions): Define.
1115 (unlocked-io.h): New rule.
1116 (DISTCLEANFILES): Add unlocked-io.h.
1117 (all-local): Depend on unlocked-io.h, to ensure it is created.
1119 * unlocked-io.hin: New file
1121 * regex.c: Update from glibc.
1123 2001-07-05 Jim Meyering <meyering@lucent.com>
1125 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
1127 (libfetish_a_SOURCES): Put all .h files here instead.
1128 Remove a thus-exposed (better checks in automake) duplicate and
1129 two unnecessary .h files.
1131 2001-06-11 Jim Meyering <meyering@lucent.com>
1133 * regex.c: Update from GNU libc.
1135 2001-05-27 Jim Meyering <meyering@lucent.com>
1137 * readutmp.h (UT_TYPE): Define.
1139 2001-05-24 Jim Meyering <meyering@lucent.com>
1141 * argmatch.c: Include "quote.h".
1142 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
1143 quote function. Reported by Göran Uddeborg.
1145 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
1147 * dirname.c (dir_name): Compute append_dot using path, not newpath
1148 which is not yet declared.
1150 2001-05-11 Paul Eggert <eggert@twinsun.com>
1152 * Makefile.am (libfetish_a_SOURCES):
1153 Add strftime.c, since we now compile it on all hosts.
1155 * strftime.c (my_strftime):
1156 Define to nstrftime if emacs, but only if my_strftime is not defined.
1157 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
1158 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
1159 Add one more extra argument: a nanoseconds value.
1162 (my_strftime function): Add %N format.
1163 (emacs_strftimeu): Renamed from emacs_strftime,
1164 with extra ut argument.
1166 2001-05-11 Paul Eggert <eggert@twinsun.com>
1168 dirname code cleanup. base_name now behaves more compatibly
1169 with POSIX basename when given file names that have trailing
1170 slashes, and similarly for dir_name. Add new primitives
1171 base_len and dir_len. Put the directory-name-related decls
1174 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
1175 * backupfile.c (base_name): Likewise.
1176 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
1177 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
1178 * makepath.c (strip_trailing_slashes): Likewise.
1179 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
1181 * rename.c (strip_trailing_slashes): Likewise.
1182 * same.c (base_name): Likewise.
1183 * stripslash.c (ISSLASH): Likewise.
1185 * addext.c: Include <dirname.h> after size_t is defined.
1186 * backupfile.c: Likewise.
1188 * addext.c (addext): Use base_len to trim redundant
1189 trailing slashes instead of doing it ourselves.
1190 But do not trim the last slash if it is not redundant.
1192 * backupfile.c (find_backup_file_name,
1193 max_backup_version): Use base_len instead of rolling it ourselves.
1194 Handle the case of "" and (on DOS) "C:" correctly.
1196 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
1197 Include <string.h>, <dirname.h>.
1198 (base_name): Allow file names ending in slashes, other than names
1199 that are all slashes. In this case, return the basename followed
1200 by the slashes. This is more general, and can be used in places
1201 where the original base_name purposely had an assertion failure.
1202 (base_len): New function.
1204 * dirname.c: Include <string.h> instead of <stdlib.h>.
1205 Do not include <assert.h>; no longer needed.
1207 (memrchr): Remove decl.
1208 (dir_name_r): Remove.
1209 (dir_len): Renamed from dirlen. All callers changed.
1210 Rewrite in terms of base_name, for simplicity and consistency.
1211 (dir_name): Never return NULL. All callers changed.
1212 Do not include <stdlib.h> in test program; no longer needed.
1213 return 0; is fine for test program.
1215 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
1217 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
1219 * path-concat.c (path_concat): Use base_len to compute
1220 base length, not strlen; this means we cannot rely on memcpy
1223 * same.c (STREQ): Remove.
1224 (same_name): Handle the case where the basename ends in trailing '/'.
1226 * stripslash.c (strip_trailing_slashes): Return nonzero if
1227 a slash was stripped. Do not strip the last slash after a
1230 2001-04-08 Jim Meyering <meyering@lucent.com>
1232 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
1233 recomputed; that's necessary when the offset spans a DST transition.
1234 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
1236 2001-04-02 Jim Meyering <meyering@lucent.com>
1238 * regex.h, regex.c: Update from GNU libc.
1240 2001-03-19 Paul Eggert <eggert@twinsun.com>
1242 * version-etc.c (version_etc_copyright): Update to 2001.
1244 2001-03-16 Paul Eggert <eggert@twinsun.com>
1246 * tempname.c (uint64_t): Define to uintmax_t if
1247 not defined, and if UINT64_MAX is not defined.
1248 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
1249 Reported by John David Anglin.
1251 2001-03-10 Bruno Haible <haible@clisp.cons.org>
1253 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
1254 alias if codeset is empty.
1255 * config.charset (BeOS): Use wildcard syntax.
1257 2001-03-13 Jim Meyering <meyering@lucent.com>
1259 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
1260 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
1263 2001-03-06 Bruno Haible <haible@clisp.cons.org>
1265 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
1267 * unicodeio.c (print_unicode_char): Simplify accordingly.
1269 2001-03-06 Bruno Haible <haible@clisp.cons.org>
1271 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
1272 support for DOS/DJGPP.
1274 2001-02-28 Paul Eggert <eggert@twinsun.com>
1276 * Makefile.am (libfetish_a_SOURCES):
1277 Add dup-safer.c, fopen-safer.c.
1278 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
1280 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
1282 2001-02-25 Paul Eggert <eggert@twinsun.com>
1284 The mkstemp replacement is taken from glibc 2.2.2, with some
1285 portability fixes for use outside glibc, as follows:
1287 * tempname.c (struct_stat64): New macro.
1288 (direxists, __gen_tempname): Use it.
1289 This avoids a portability problem with Solaris 8.
1291 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
1292 (<stddef.h>, <stdint.h>, <string.h>):
1293 Include only if STDC_HEADERS || _LIBC.
1294 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
1295 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
1296 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
1297 (__set_errno): Define this macro if <errno.h> doesn't.
1298 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
1299 Define these macros if <stdio.h> doesn't.
1300 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
1301 Define these macros if <sys/stat.h>
1302 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
1303 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
1304 __xstat64): Define if not _LIBC.
1305 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
1306 (__gen_tempname): Invoke gettimeofday only if
1307 HAVE_GETTIMEOFDAY || _LIBC;
1308 otherwise, fall back on plain "time".
1309 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
1311 * mkstemp.c (__GT_FILE): Define to zero if not defined.
1313 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
1315 2001-02-17 Jim Meyering <meyering@lucent.com>
1317 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
1318 around included file name.
1320 * strnlen.c (__strnlen): Merge in a change from GNU libc.
1322 * strftime.c: Update from GNU libc (the only changes were to comments).
1324 2001-02-13 Bruno Haible <haible@clisp.cons.org>
1326 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
1328 2001-02-17 Paul Eggert <eggert@twinsun.com>
1330 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
1331 Remove workaround macros for hosts that have mbrtowc but not
1332 mbstate_t, as we now insist on proper declarations for both
1333 before using mbrtowc.
1335 2001-02-17 Jim Meyering <meyering@lucent.com>
1337 * regex.c: Update from libc.
1339 2001-02-16 Paul Eggert <eggert@twinsun.com>
1341 * alloca.c (malloc): Undef before defining, since stdlib.h
1342 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
1343 Reported by Mark Hounschell via Paul Eggert.
1345 2001-01-30 Bruno Haible <haible@clisp.cons.org>
1347 * config.charset: Update for FreeBSD 4.2.
1349 2001-01-26 Jim Meyering <meyering@lucent.com>
1351 * quotearg.c: Include stddef.h.
1352 * quote.c: Include stddef.h.
1353 Reported by Axel Kittenberger.
1355 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
1356 line in double quotes so that it evokes a better diagnostic.
1357 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
1358 Reported by Axel Kittenberger.
1360 2001-01-15 Bruno Haible <haible@clisp.cons.org>
1362 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
1363 to avoid a warning. Add back 'const' to inptr.
1365 2001-01-16 Jim Meyering <meyering@lucent.com>
1367 * basename.c: Include <stdio.h>, needed by assert on SunOS4.
1370 2001-01-14 Jim Meyering <meyering@lucent.com>
1372 * rename.c: New file. From Volker Borchert.
1373 Include stdlib.h, string.h or strings.h, and xalloc.h.
1374 Use strip_trailing_slashes rather than open-coding it.
1376 2001-01-03 Paul Eggert <eggert@twinsun.com>
1378 * strftime.c: Sync with glibc time/strftime.c 1.81.
1380 2001-01-03 Jim Meyering <meyering@lucent.com>
1382 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
1383 local `inptr' to avoid warning with some system declarations of iconv.
1385 2000-12-29 Paul Eggert <eggert@twinsun.com>
1387 * modechange.c: Do not assume that mode_t uses the
1388 traditional octal encoding. E.g. "chmod 1 FOO" should set
1389 the other-execute bit of FOO even if S_IXOTH != 1.
1391 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
1392 WOTH, XOTH, ALLM): New macros.
1393 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
1394 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
1396 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
1397 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
1399 No need to use uintmax_t; unsigned long is long enough.
1400 Don't bother to get suffix since we don't use it.
1402 2000-12-24 Jim Meyering <meyering@lucent.com>
1404 * hash.c (is_prime): Return explicit boolean values.
1405 (hash_get_first): Return NULL to appease Irix5.6's 89.
1406 Reported by Nelson Beebe.
1408 2000-10-31 Bruno Haible <haible@clisp.cons.org>
1410 * localcharset.c (locale_charset): Add support for Win32.
1412 2000-12-18 Paul Eggert <eggert@twinsun.com>
1414 * physmem.h, physmem.c: New files.
1416 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
1417 (noinst_HEADERS): Add physmem.h.
1419 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
1420 't' for compatibility with Solaris 8 sort.
1422 2000-12-18 Bruno Haible <haible@clisp.cons.org>
1424 * config.charset: Add support for BeOS.
1426 2000-12-16 Jim Meyering <meyering@lucent.com>
1428 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
1429 SHELLS_FILE to a file name that's useful on djgpp systems.
1431 (ADDITIONAL_DEFAULT_SHELLS): Define.
1432 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
1433 Based mostly on a patch from Prashant TR.
1435 2000-12-16 Jim Meyering <meyering@lucent.com>
1437 This bug had a serious impact on chown: `chown N:M FILE' (for integer
1438 N and M) would have treated it like `chown N:N FILE'.
1440 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
1442 2000-10-31 Bruno Haible <haible@clisp.cons.org>
1444 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
1445 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
1446 to the list of canonical encodings. Rename EUC-CN to GB2312.
1448 2000-12-08 Andreas Schwab <schwab@suse.de>
1450 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
1451 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
1453 2000-12-07 Jim Meyering <meyering@lucent.com>
1455 * stripslash.c (ISSLASH): Define.
1456 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
1459 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
1460 (dir_name_r): Declare this function as static.
1461 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
1462 manifest itself on a name containing a mix of slashes and
1464 Make this function work with names starting with a DOS-style
1465 drive letter and colon prefix.
1466 (dir_name): Append `.' if necessary.
1467 Based mostly on patches from Prashant TR and Eli Zaretskii.
1469 * dirname.h (dir_name_r): Remove prototype.
1471 2000-12-05 Jim Meyering <meyering@lucent.com>
1473 * dirname.c (dir_name_r): Add `const' in a few local declarations.
1475 2000-12-04 Jim Meyering <meyering@lucent.com>
1477 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
1478 Also include memory.h, stdlib.h, unistd.h if appropriate.
1479 Reported by Andreas Jaeger (conflicting declaration of malloc).
1481 2000-12-02 Jim Meyering <meyering@lucent.com>
1483 * closeout.h: Make idempotent, to avoid some obscure warnings.
1485 2000-12-01 Paul Eggert <eggert@twinsun.com>
1487 * memrchr.c: Include <config.h> before any system include file.
1489 2000-11-29 Paul Eggert <eggert@twinsun.com>
1491 * dirname.c (dir_name_r): Fix typo: int -> size_t.
1493 2000-11-26 Jim Meyering <meyering@lucent.com>
1495 * memcoll.c: Include sys/types.h. From Werner Almesberger.
1497 2000-11-22 Paul Eggert <eggert@twinsun.com>
1499 * strftime.c (my_strftime): Do not invoke mbrlen with a
1500 size of (size_t) -1; it's not portable.
1502 2000-11-17 Akim Demaille <akim@epita.fr>
1504 * obstack.h: Formatting changes.
1505 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
1506 prevent type checking.
1507 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
1508 cast the value to (void *): assigning a `foo *' to a `void *'
1510 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
1512 2000-11-17 Jim Meyering <meyering@lucent.com>
1514 * strstr.c: Update from GNU libc.
1516 2000-11-16 Jim Meyering <meyering@lucent.com>
1518 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
1520 2000-11-11 Jim Meyering <meyering@lucent.com>
1522 * error.c: Add a couple #includes, merging from GNU libc version.
1524 2000-11-10 Jim Meyering <meyering@lucent.com>
1526 * obstack.h: Update from GNU libc.
1527 * obstack.c: Likewise.
1529 2000-11-06 Paul Eggert <eggert@twinsun.com>
1531 * getusershell.c (setusershell): Use rewind rather than
1532 fseek/fseeko, to avoid configuration hassles with fseeko.
1533 Don't bother opening SHELLS_FILE if shellstream is NULL;
1536 2000-11-05 Jim Meyering <meyering@lucent.com>
1538 * makepath.h (make_dir): Declare.
1539 * makepath.c (make_dir): Remove `static' attribute.
1542 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
1544 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
1545 last one in a bucket, advance to the next bucket.
1547 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
1549 * fnmatch.c: Do not comment out all the code if we are using
1550 the GNU C library, because in some cases we are replacing buggy
1551 code in the GNU C library itself.
1553 2000-10-30 Paul Eggert <eggert@twinsun.com>
1555 * error.h, getline.h, modechange.h:
1556 Remove "2000" from Copyright line, as the file hasn't been
1557 changed this year other than in the copyright notice.
1559 * xalloc.h: Add "2000" to Copyright line, as this file
1560 was changed this year.
1562 2000-10-30 Paul Eggert <eggert@twinsun.com>
1564 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
1565 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
1566 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
1568 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
1570 * regex.h (__restrict_arr): Move definition out of #ifndef block.
1571 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
1572 doesn't define __restrict_arr.
1574 2000-10-29 Jim Meyering <meyering@lucent.com>
1576 * xstat.in: Fix grammar in comment.
1578 2000-10-28 Jim Meyering <meyering@lucent.com>
1580 * memchr.c: Update from libc.
1581 Adjust for portability:
1582 [HAVE_STDLIB_H]: Include stdlib.h.
1583 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
1584 Undef __memchr, too.
1585 [!weak_alias]: Define __memchr to memchr.
1587 * regex.c: Update from libc.
1588 * regex.h: Likewise.
1589 * getopt1.c: Likewise.
1590 * memcmp.c: Likewise.
1592 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
1593 Avoid using fseek, when possible -- it's broken by design.
1594 Patch by Ulrich Drepper.
1596 2000-10-26 Jim Meyering <meyering@lucent.com>
1598 * strftime.c: Update from libc.
1600 2000-10-25 Jim Meyering <meyering@lucent.com>
1602 * obstack.c: Update from libc.
1604 2000-10-23 Jim Meyering <meyering@lucent.com>
1606 * hard-locale.c (hard_locale): Revert last change -- it was simply
1607 wrong. That set_locale call must not have any side effects.
1610 2000-10-22 Jim Meyering <meyering@lucent.com>
1612 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
1613 [CYCLIC]: Remove now-unused definition.
1615 * save-cwd.c (O_DIRECTORY): Define, if needed.
1616 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
1617 Suggestion from Ulrich Drepper.
1619 2000-10-21 Jim Meyering <meyering@lucent.com>
1621 * dirname.c (dir_name_r): New function, factored out of dir_name.
1622 (dir_name): Use dir_name_r.
1623 * dirname.h (dir_name_r): Declare it.
1625 2000-10-21 Jim Meyering <meyering@lucent.com>
1627 * dirname.c (memrchr): Declare if necessary.
1628 (dir_name): Remove the restriction that there be no
1629 trailing slashes. Now, this code skips past them, effectively
1631 [TEST_DIRNAME] (main): New unit tests.
1633 * memrchr.c: New file from GNU libc.
1634 Undef __memrchr, too.
1635 [!weak_alias]: Define __memrchr to memrchr.
1636 Guard weak_alias use with `#ifdef weak_alias'.
1638 2000-10-17 Jim Meyering <meyering@lucent.com>
1640 * quote.h (PARAMS): Define and use.
1641 Reported by Akim Demaille.
1643 * getopt.c: Update from libc.
1645 2000-10-16 Jim Meyering <meyering@lucent.com>
1647 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
1650 2000-09-25 Jim Meyering <meyering@lucent.com>
1652 * md5.h (rol): Define (from GnuPG).
1654 * sha.c: Give credit (GnuPG) where due.
1655 (M): Use rol rather than open-coding it.
1656 Add a FIXME comment.
1658 2000-09-21 Jim Meyering <meyering@lucent.com>
1660 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
1661 Reported by Michael Stone.
1663 2000-09-20 Jim Meyering <meyering@lucent.com>
1665 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
1666 (noinst_HEADERS): Add sha.h.
1667 Based on code from Scott G. Miller and from GnuPG.
1669 2000-09-15 Jim Meyering <meyering@lucent.com>
1671 * regex.c: Update from libc.
1673 2000-09-10 Jim Meyering <meyering@lucent.com>
1675 * getopt.c (_getopt_internal): Update from glibc.
1677 2000-09-09 Jim Meyering <meyering@lucent.com>
1679 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
1680 think it should be used as a general replacement for isascii.
1681 * fnmatch.c: Likewise.
1682 * mbswidth.c: Likewise
1683 * regex.c: Likewise.
1686 * userspec.c: Include sys/param.h and limits.h.
1688 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
1689 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
1690 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
1691 UID, GID. Check range.
1693 2000-09-06 Jim Meyering <meyering@lucent.com>
1695 * getopt.c (_getopt_internal): Update from glibc.
1697 2000-08-30 Jim Meyering <meyering@lucent.com>
1699 * strftime.c: Merge in changes from GNU libc.
1701 2000-08-26 Jim Meyering <meyering@lucent.com>
1703 * closeout.c: Include "__fpending.h".
1704 (close_stdout_status): Return right away if there's nothing to flush.
1706 * Makefile.am (noinst_HEADERS): Add __fpending.h.
1707 * __fpending.c: New file.
1708 * __fpending.h: New file.
1710 2000-08-07 Paul Eggert <eggert@twinsun.com>
1712 Standardize on "memory exhausted" instead of "Memory exhausted"
1713 or "virtual memory exhausted".
1714 * obstack.c (print_and_abort): Use "memory exhausted", not
1715 "virtual memory exhausted".
1716 * same.c (same_name): Invoke xalloc_die instead of printing
1718 * userspec.c (parse_user_spec): Likewise.
1719 * bumpalloc.h: comment fix
1720 * same.c, userspec.c: Include xalloc.h.
1722 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
1723 not char *const and pointing to a constant array.
1724 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
1725 (xrealloc): Comment fix.
1727 * userspec.c (parse_user_spec):
1728 Don't translate a message until just before returning,
1729 to avoid unnecessary translation.
1731 2000-08-07 Jim Meyering <meyering@lucent.com>
1733 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
1734 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
1735 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
1736 getgroups.c, gethostname.c, getopt.h, group-member.c,
1737 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
1738 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
1739 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
1740 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
1741 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
1742 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
1743 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
1744 yesno.c: Back out Copyright date changes for each file with no change
1745 this year. This eases coordination with other programs using the same
1746 source code modules. From Paul Eggert.
1748 2000-08-03 Greg McGary <greg@mcgary.org>
1750 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
1751 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
1752 (EXTEND_BUFFER): Use them.
1754 2000-08-01 Jim Meyering <meyering@lucent.com>
1756 * dirname.c (ISSLASH): Define.
1757 (BACKSLASH_IS_PATH_SEPARATOR): Define.
1758 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
1759 both `\' and `/' may be use as path separators.
1760 Based on a patch from Prashant TR.
1762 2000-07-31 Paul Eggert <eggert@twinsun.com>
1764 * quotearg.c (quotearg_n_options): Don't make the initial
1765 slot vector a constant, since it might get modified.
1767 2000-07-31 Jim Meyering <meyering@lucent.com>
1769 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
1770 * obstack.c (print_and_abort): Likewise.
1772 2000-07-30 Paul Eggert <eggert@twinsun.com>
1774 * quotearg.c (quotearg_n_options): Preallocate a slot 0
1775 buffer, so that the caller can always quote one small
1776 component of a "memory exhausted" message in slot 0.
1777 From a suggestion by Jim Meyering.
1779 2000-07-30 Jim Meyering <meyering@lucent.com>
1781 * makepath.c (make_path): Quote the other instance, too.
1783 * quotearg.c (N_STATIC_SLOTVECS): Define.
1784 (STATIC_BUF_SIZE): Define.
1785 (quotearg_n_options): Use only statically allocated storage when
1786 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
1787 than STATIC_BUF_SIZE.
1789 2000-07-29 Jim Meyering <meyering@lucent.com>
1791 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
1792 * dirname.c (dir_name): Likewise.
1794 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
1796 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
1797 (dir_name): Assert that there are no trailing slashes.
1799 2000-07-18 Bruno Haible <haible@clisp.cons.org>
1801 * mbswidth.h (mbswidth): Add a flags argument.
1802 (mbswidth): New declaration.
1803 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
1804 * mbswidth.c (mbswidth): Add a flags argument.
1805 (mbsnwidth): New function.
1807 2000-07-24 Jim Meyering <meyering@lucent.com>
1809 * mbswidth.c: Remove useless #else. From Bruno Haible.
1811 2000-07-23 Paul Eggert <eggert@twinsun.com>
1813 * mbswidth.c (_XOPEN_SOURCE):
1814 Don't define; this causes problems on Solaris 7.
1815 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
1817 2000-07-23 Paul Eggert <eggert@twinsun.com>
1820 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
1821 so that mbstate_t is always defined.
1823 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
1824 be 1 in at least one GCC installation, and this configuration
1825 error is likely to be common. Ignoring MB_LEN_MAX hurts
1826 performance on hosts that have mbrtowc but have only unibyte
1827 locales, but I assume these hosts are rare.
1829 2000-07-23 Paul Eggert <eggert@twinsun.com>
1831 * quotearg.c: Streamline by invoking multibyte code only if needed.
1832 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
1833 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
1834 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
1835 invoke multibyte primitives.
1837 2000-07-23 Jim Meyering <meyering@lucent.com>
1839 * basename.c (base_name): Add an assertion.
1841 2000-07-15 Bruno Haible <clisp.cons.org>
1843 * quotearg.c: When the system forces us to redefine mbstate_t,
1844 shadow its mbsinit function.
1846 2000-07-16 Bruno Haible <haible@clisp.cons.org>
1848 * mbswidth.h: New file.
1849 * mbswidth.c: New file.
1850 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
1851 (noinst_HEADERS): Add mbswidth.h.
1853 2000-07-17 Bruno Haible <haible@clisp.cons.org>
1855 * config.charset: Add support for FreeBSD. Improve support for HP-UX
1858 2000-07-15 Jim Meyering <meyering@lucent.com>
1860 * makepath.c: Include quote.h.
1861 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
1862 corresponding argument in a `quote (...)' call.
1863 Give better diagnostics.
1865 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
1866 (noinst_HEADERS): Add quote.h.
1868 * quote.c (quote, quote_n): New file. Two functions taken verbatim
1869 from tar's src/misc.c.
1870 * quote.h: New file. Prototypes for same.
1872 2000-07-10 Paul Eggert <eggert@twinsun.com>
1874 From a suggestion by Bruno Haible.
1875 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
1876 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
1877 to decide whether to define the BeOS workaround macro;
1878 this adjusts to the change to AC_MBSTATE_T.
1880 2000-07-13 Paul Eggert <eggert@twinsun.com>
1882 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
1884 * quotearg.c (quoting_style_args, quoting_style_vals,
1885 quotearg_buffer_restyled): Add support for
1886 clocale_quoting_style. Undo previous change to
1887 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
1888 and "{RIGHT QUOTATION MARK}" msgids.
1890 2000-07-05 Paul Eggert <eggert@twinsun.com>
1892 The old behavior of quoting `like this' doesn't look good with
1893 newer, ISO-style fonts. See:
1894 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
1896 Instead, quote "like this" by default. Let the translator
1897 tailor the locale-specific quoting behavior by providing
1898 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
1900 * quotearg.c (N_): New macro.
1901 (gettext_default): New function.
1902 (quotearg_buffer_restyled): Use
1903 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
1904 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
1906 2000-07-09 Jim Meyering <meyering@lucent.com>
1908 * Most files: Update copyright dates to include 2000.
1910 2000-07-08 Jim Meyering <meyering@lucent.com>
1912 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
1914 (xgethostname): Remove now-unnecessary #ifdef.
1915 Move declaration of `err' into loop where it's used.
1917 2000-07-05 Bruno Haible <haible@clisp.cons.org>
1919 * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
1920 by allocating a larger buffer. Test the gethostname return value for
1921 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
1922 returns an error and ENAMETOOLONG isn't defined.
1924 2000-07-05 Paul Eggert <eggert@twinsun.com>
1925 and Bruno Haible <haible@clisp.cons.org>
1927 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
1929 2000-07-05 Bruno Haible <haible@clisp.cons.org>
1931 * quotearg.c (struct quoting_options): Simplify quote_these_too
1934 2000-07-03 Jim Meyering <meyering@lucent.com>
1936 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
1937 Reported by Bruno Haible.
1939 2000-07-04 Jim Meyering <meyering@lucent.com>
1941 * quotearg.c: Make inclusion of <wchar.h> independent of whether
1942 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
1945 2000-07-03 Paul Eggert <eggert@twinsun.com>
1946 and Bruno Haible <haible@clisp.cons.org>
1948 * quotearg.c (mbrtowc):
1949 Assign to *pwc, and return 1 only if result is nonzero.
1950 (iswprint): Use ISPRINT when substituting our own mbrtowc.
1952 2000-07-03 Jim Meyering <meyering@lucent.com>
1954 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
1955 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
1958 2000-07-02 Jim Meyering <meyering@lucent.com>
1960 * quotearg.c (mbstate_t): Don't define here.
1962 2000-07-02 Jim Meyering <meyering@lucent.com>
1964 * nanosleep.c (SIGCONT): Define if not already defined.
1966 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1968 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
1969 per change in ../m4/ls-mntd-fs.m4.
1970 (read_filesystem_list): Ignore symbolic links.
1972 2000-06-29 Jim Meyering <meyering@lucent.com>
1974 * same.c: Include <string.h> or <strings.h>, as appropriate,
1975 for declaration of strcmp.
1977 * long-options.c: Include <stdlib.h>, for declaration of exit.
1979 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
1980 Avoid warning by casting result to `char *' to remove `const'.
1982 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1984 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
1986 2000-06-26 Paul Eggert <eggert@twinsun.com>
1988 savedir now sets errno on failure and invokes xmalloc to get memory.
1989 Fix a couple of other minor bugs while we're at it.
1991 * savedir.c (<unistd.h>): Do not include; there's no need.
1992 (NAMLEN): Remove macro.
1993 (malloc, realloc): Remove decls.
1995 ("xalloc.h"): Include.
1996 (NAME_SIZE_DEFAULT): New macro.
1997 (savedir): Use xmalloc / xrealloc to allocate memory.
1998 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
1999 Skip "" directory entries.
2000 Use strlen to calculate directory entry length, since the old method
2001 is rarely used these days and isn't worth supporting.
2002 Don't use a pointer after freeing it.
2003 Check for integer overflow when calculating allocation size.
2004 Use memcpy to copy entries, instead of stpcpy.
2005 Set errno properly when returning NULL.
2006 Check for readdir error.
2008 2000-06-26 Jim Meyering <meyering@lucent.com>
2010 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
2012 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2014 * getusershell.c (xmalloc, xrealloc): Remove functions.
2016 Don't include <stdlib.h>. Don't declare malloc, realloc.
2018 2000-06-23 Bruno Haible <haible@clisp.cons.org>
2020 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
2022 2000-06-24 Jim Meyering <meyering@lucent.com>
2024 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
2026 2000-06-21 Jim Meyering <meyering@lucent.com>
2028 * getpass.c: New file, from Bruno Haible. Required for BeOS.
2030 2000-06-19 Paul Eggert <eggert@twinsun.com>
2032 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
2033 (mbrtowc, mbstate_t): Define substitutes if
2034 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
2035 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
2036 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
2038 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2040 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
2041 than 1024, return a memory chunk of least possible size, instead
2042 of size PATH_MAX + 2. In the loop, increment the size proportionally.
2043 Use free/xmalloc instead of xrealloc to avoid copying for very long
2046 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2048 * canon-host.c (canon_host): Use malloc and memcpy to copy an
2049 address, not strdup. Include <stdlib.h> and don't declare free().
2051 2000-06-17 Bruno Haible <haible@clisp.cons.org>
2053 * path-concat.c (path_concat): Don't access dir[-1] if dir is
2056 2000-06-21 Jim Meyering <meyering@lucent.com>
2058 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
2059 (noinst_HEADERS): Add getstr.h.
2061 * getline.c (getstr): Move into a separate file.
2062 * getstr.c (getstr): New file, extracted from getline.c, with
2063 the following changes: new parameter, delim2; both delim[12]
2064 parameters have type `int', not `char'. The latter would lose
2065 with 8-bit delimiters.
2066 * getstr.h: New file.
2068 2000-06-19 Jim Meyering <meyering@lucent.com>
2070 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
2072 2000-06-18 Jim Meyering <meyering@lucent.com>
2074 * mkdir.c: Remove file, due mainly to copyright incompatibility.
2075 Besides, these days every porting target provides a mkdir function.
2077 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
2078 (this snippet comes from src/system.h).
2080 2000-06-15 Paul Eggert <eggert@twinsun.com>
2082 * human.c (adjust_value): New function.
2083 (human_readable_inexact): Apply rounding style even when
2084 printing approximate values.
2086 2000-06-14 Paul Eggert <eggert@twinsun.com>
2088 * human.c (human_readable_inexact): Allow an input block
2089 size that is not a multiple of the output block size, and vice versa.
2090 Reported by Piergiorgio Sartor.
2092 2000-06-14 Paul Eggert <eggert@twinsun.com>
2094 * getdate.y (get_date): Apply relative times after time
2095 zone indicator, not before. Reported by Todd A. Jacobs.
2097 2000-06-13 Jim Meyering <meyering@lucent.com>
2099 * Makefile.am (all-local): Depend on lstat.c and stat.c.
2101 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
2103 2000-06-12 Paul Eggert <eggert@twinsun.com>
2105 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
2107 2000-06-04 Paul Eggert <eggert@twinsun.com>
2109 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
2111 2000-06-04 Jim Meyering <meyering@lucent.com>
2113 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
2114 SunOS4.1.4 for which gid_t is an unsigned type.
2116 2000-06-03 Jim Meyering <meyering@lucent.com>
2118 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
2120 2000-05-26 Bruno Haible <haible@clisp.cons.org>
2122 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
2123 newer, don't install charset.alias.
2124 * config.charset: Change the Linux/glibc rules so they become empty
2125 on glibc-2.1 or newer.
2127 2000-06-02 Jim Meyering <meyering@lucent.com>
2129 * mountlist.c: Back out last change. Instead, do this...
2130 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
2131 member using the same `ignore'-testing code.
2132 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
2136 2000-05-29 Jim Meyering <meyering@lucent.com>
2138 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
2139 with the `ignore' attribute. Based on a patch from Mark D. Roth.
2141 2000-05-22 Jim Meyering <meyering@lucent.com>
2143 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
2145 2000-05-18 Jim Meyering <meyering@lucent.com>
2147 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
2148 back, too, since it may have been modified by allocate_entry.
2149 (hash_delete): Rewrite to use neither the assignment operator
2150 nor the comma operator in an if-expression.
2152 2000-05-15 Paul Eggert <eggert@twinsun.com>
2155 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
2156 Remove; no longer needed.
2157 "quotearg.h": Add include.
2158 (file_name): Do not bother to explicitly initialize to NULL; it's less
2159 efficient on some hosts.
2160 (close_stdout_status): Remove test as to whether stdout was already
2161 closed; it breaks for the case "echo x | sort >&-".
2162 Quote file name colons.
2163 Do not assume that _("write error") lacks format strings.
2165 2000-05-15 Jim Meyering <meyering@lucent.com>
2167 * version-etc.c (version_etc_copyright): Update the copyright string
2168 used in all --version output.
2170 2000-05-14 Jim Meyering <meyering@lucent.com>
2172 * closeout.c (close_stdout_set_file_name): New function.
2173 (close_stdout_status): Use new file-scoped global.
2174 Return right away if fstat says the stdout file descriptor is invalid.
2175 * closeout.h (close_stdout_set_file_name): Declare.
2177 2000-05-10 Jim Meyering <meyering@lucent.com>
2179 * closeout.c [default_exit_status]: New file-scoped variable.
2180 (close_stdout_set_status): New function.
2181 * closeout.h (close_stdout_set_status): Declare.
2183 2000-05-08 Jim Meyering <meyering@lucent.com>
2185 * long-options.c: Don't include closeout.h.
2186 (parse_long_options): Don't call close_stdout for --version.
2188 2000-05-06 Jim Meyering <meyering@lucent.com>
2190 * strnlen.c: Undefine __strnlen and strnlen.
2191 [!weak_alias]: Define __strnlen to strnlen.
2193 * atexit.c: New file, from libiberty.
2195 2000-05-06 Jim Meyering <meyering@lucent.com>
2197 * closeout.c (close_stdout_status): Also check for errors on the
2200 2000-05-05 Bruno Haible <haible@clisp.cons.org>
2202 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
2203 instead of xmalloc, xrealloc, path_concat.
2204 (locale_charset): Treat empty environment variables as absent.
2205 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
2207 2000-05-04 Jim Meyering <meyering@lucent.com>
2209 * getopt.c: Update from glibc.
2210 * obstack.c: Likewise.
2211 * obstack.h: Likewise.
2212 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
2214 * regex.h: Likewise.
2215 * strndup.c: Likewise.
2216 * strnlen.c: New file, from glibc.
2218 2000-05-01 Jim Meyering <meyering@lucent.com>
2220 * full-write.c (full_write): Remove `FIXME' part of comment.
2222 2000-04-29 Jim Meyering <meyering@lucent.com>
2224 * path-concat.c: Declare strdup only if it's not defined.
2225 * canon-host.c: Likewise.
2227 2000-04-28 Jim Meyering <meyering@lucent.com>
2229 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
2230 redefinition warning on some systems (HPUX). Otherwise, regex.h is
2231 included first, then limits.h is included by locale.h by libintl.h.
2232 From John David Anglin.
2234 2000-04-25 Jim Meyering <meyering@lucent.com>
2236 * makepath.c (S_IRWXUGO): Define.
2237 (make_path): Always perform explicit chmod if MODE specifies any
2238 of the `special' permission bits. Prompted by a bug report against
2239 install from Mate Wierdl and Joost van Baal.
2241 2000-04-18 Jim Meyering <meyering@lucent.com>
2245 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
2246 getpagesize. For BeOS. Based on a patch from Bruno Haible.
2248 2000-04-17 Jim Meyering <meyering@lucent.com>
2250 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
2251 the definition of it to rpl_strftime also defined-away the system's
2254 2000-04-15 Jim Meyering <meyering@lucent.com>
2256 Use `C' to denote so-called `contiguous' files, the same way
2258 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
2259 (ftypelet): Use S_ISCTG.
2260 From Michael Deutschmann.
2262 2000-04-14 Jim Meyering <meyering@lucent.com>
2264 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
2266 2000-04-08 Jim Meyering <meyering@lucent.com>
2268 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
2269 names don't conflict. Reported by Eli Zaretskii.
2271 2000-03-28 Bruno Haible <haible@clisp.cons.org>
2273 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
2274 bug. Deal with the different error behavior of Irix iconv.
2276 2000-04-07 Jim Meyering <meyering@lucent.com>
2278 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
2279 to work around system header problems on AIX 3.2.5. From Bruno Haible.
2281 2000-04-05 Jim Meyering <meyering@lucent.com>
2283 Portability tweaks required for ultrix4.3.
2284 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
2285 * readutmp.c: Include sys/types.h before sys/stat.h.
2286 * canon-host.c: Declare strdup.
2287 * path-concat.c: Likewise.
2288 From John David Anglin.
2290 2000-04-04 Jim Meyering <meyering@lucent.com>
2292 Be more DOS 8.3-friendly.
2293 * ref-add.sin: Renamed from ref-add.sed.in.
2294 * ref-del.sin: Renamed from ref-del.sed.in.
2295 * Makefile.am: Reflect renaming.
2296 Reported by Eli Zaretskii.
2298 Use a temporary file name that won't clash with `charset.alias'
2299 in the DOS 8.3 name space.
2300 * Makefile.am (charset_tmp): Define.
2301 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
2302 (uninstall-local): Likewise.
2303 Reported by Eli Zaretskii.
2305 2000-03-29 Paul Eggert <eggert@twinsun.com>
2307 * time/strftime.c (my_strftime): Make sure we call the system
2308 strftime, not ourselves, when invoking the underlying strftime.
2310 2000-03-24 Jim Meyering <meyering@lucent.com>
2312 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
2313 (charset_alias): Define.
2314 (install-exec-local): Factor out common code.
2315 (uninstall-local): Split lines longer than 80.
2316 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
2318 (.sed.in.sed): New rule. Don't redirect directly to $@.
2319 (CLEANFILES): Add ref-add.sed and ref-del.sed.
2321 2000-03-19 Bruno Haible <haible@clisp.cons.org>
2323 * config.charset: Output a line containing "Packages using this file".
2324 * ref-add.sed.in, ref-del.sed.in: New files.
2325 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
2326 ref-del.sed): New rules.
2328 2000-03-17 Jim Meyering <meyering@lucent.com>
2330 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
2331 Otherwise, include <strings.h>
2333 2000-03-17 Bruno Haible <haible@clisp.cons.org>
2335 * unicodeio.c (utf8_wctomb): New function.
2336 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
2337 format instead of in UCS-4 with platform dependent endianness.
2339 2000-03-07 Paul Eggert <eggert@twinsun.com>
2341 * savedir.c (savedir): Work even if directory size is
2342 negative; this can happen with some screwy NFS configurations.
2344 2000-03-06 Jim Meyering <meyering@lucent.com>
2346 * localcharset.c (get_charset_aliases): Don't try to free file_name
2347 if it's NULL (because we ran out of memory). From Bruno Haible.
2349 2000-03-05 Jim Meyering <meyering@lucent.com>
2351 * localcharset.c ("path-concat.h"): Include.
2352 (get_charset_aliases): Use path_concat instead of ANSI string
2355 * unicodeio.h (PARAMS): Define.
2356 Use it to guard prototype.
2358 2000-03-04 Jim Meyering <meyering@lucent.com>
2360 * Makefile.am (install-exec-local): Create $(libdir) before installing
2362 (uninstall-local): Uncomment this rule so `make distcheck' works
2365 * unicodeio.c (<errno.h>): Include it.
2366 (errno): Declare if not defined.
2368 * localcharset.c: Add Bruno's comment justifying use of volatile.
2370 * config.charset: New version, incorporating remarks from a linux
2371 i18n mailing list. From Bruno Haible.
2373 2000-03-02 Jim Meyering <meyering@lucent.com>
2375 * Makefile.am (EXTRA_DIST): Add config.charset.
2377 2000-03-01 Jim Meyering <meyering@lucent.com>
2379 * localcharset.c: Guard some #includes with `#if HAVE_...'.
2380 * unicodeio.c: Likewise.
2382 2000-02-02 Bruno Haible <haible@clisp.cons.org>
2384 * config.charset: New file.
2385 * localcharset.c: New file.
2386 * unicodeio.h, unicodeio.c: New files.
2387 * Makefile.am (DEFS): Add -DLIBDIR=...
2388 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
2389 (noinst_HEADERS): Add unicodeio.h.
2390 (all-local, install-exec-local, charset.alias): New targets.
2392 2000-02-28 Paul Eggert <eggert@twinsun.com>
2394 * quotearg.c (ALERT_CHAR): New macro.
2395 (quotearg_buffer_restyled): Use it.
2397 2000-02-27 Jim Meyering <meyering@lucent.com>
2399 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
2400 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
2402 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
2403 not `#if STDC_HEADERS'.
2404 Declare malloc if needed.
2406 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
2407 now that autoconf always defines the HAVE_DECL_ symbols.
2408 * human.c: Likewise.
2410 * strtoumax.c: Likewise.
2412 * backupfile.c: Arrange for cpp to fail if the configure-time
2413 declaration check was not run.
2415 * human.c: Likewise.
2417 * strtoumax.c: Likewise.
2419 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
2420 then first look up the entire `.'-containing string as a login name.
2422 2000-02-18 Paul Eggert <eggert@twinsun.com>
2424 * getdate.y: Handle two-digit years with leading zeros correctly.
2425 (textint): New typedef.
2426 (parser_control): Member year changed from int to textint.
2428 (YYSTYPE): Removed; replaced by %union with int and textint members.
2429 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
2430 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
2431 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
2432 (tSNUMBER, tUNUMBER): Now of type <textintval>.
2433 (date, number, to_year): Use width of number in digits, not its value,
2434 to determine whether it's a 2-digit year, or a 2-digit time.
2435 (yylex): Store number of digits of numeric tokens.
2436 Reported by John Kendall.
2438 (parser_control): Changed from struct parser_control to typedef (for
2439 consistency). All uses changed.
2441 (tID): Removed; not used.
2442 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
2444 2000-02-14 Paul Eggert <eggert@twinsun.com>
2446 * getpagesize.h (getpagesize): Port to VMS for Alpha;
2447 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
2449 2000-02-12 Jim Meyering <meyering@lucent.com>
2451 * userspec.c (ISDIGIT): Define it.
2452 (isdigit): Remove definition.
2453 (is_number): Use ISDIGIT, not isdigit.
2454 <libintl.h>: Include.
2456 (parse_user_spec): Mark translatable strings.
2458 2000-02-10 Jim Meyering <meyering@lucent.com>
2460 With these changes, nanosleep.[ch] are finally enough like the other
2461 lib/* replacement files to compile on a few more losing systems.
2463 * nanosleep.h: Don't include config.h.
2464 Remove prototype from declaration of nanosleep.
2465 (PARAMS): Remove now-unneeded definition.
2466 * nanosleep.c: #undef nanosleep.
2467 (rpl_nanosleep): Rename from nanosleep.
2469 2000-02-03 Jim Meyering <meyering@lucent.com>
2471 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
2472 rather than with `#if HAVE_UTMPNAME'.
2474 2000-02-01 Jim Meyering <meyering@lucent.com>
2476 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
2478 2000-01-31 Jim Meyering <meyering@lucent.com>
2480 * nanosleep.h (nanosleep): Guard declaration with
2481 `#if ! HAVE_DECL_NANOSLEEP'.
2482 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
2483 the declaration in that vendor's sys/timers.h.
2484 Reported by Christian Krackowizer.
2486 * quotearg.c (ISASCII): Add #undef and move definition to follow
2487 inclusion of wctype.h to work around solaris2.6 namespace pollution.
2488 (ISPRINT): Likewise.
2489 Reported by Tom Tromey.
2491 2000-01-30 Jim Meyering <meyering@lucent.com>
2493 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
2494 uses of ->ut_name. The latter doesn't work with new Linux header files
2495 where only utmpx.ut_user is declared.
2497 * readutmp.h (UT_USER): Define.
2499 2000-01-23 Jim Meyering <meyering@lucent.com>
2501 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
2504 2000-01-22 Jim Meyering <meyering@lucent.com>
2506 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
2507 [! HAVE_DECL_STRTOULL]: Declare strtoull.
2508 Required for some AIX systems. Reported by Christian Krackowizer.
2509 [TESTING] (main): New function.
2511 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
2512 * dirname.c (dir_name): Support for DOS-style file names with drive
2515 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
2517 * strverscmp.c (ISDIGIT): Define.
2518 (strverscmp): Use ISDIGIT, not isdigit.
2520 2000-01-17 Paul Eggert <eggert@twinsun.com>
2522 * nanosleep.c (nanosleep):
2523 Don't use SA_INTERRUPT to decide whether to call sigaction, as
2524 POSIX.1 doesn't require SA_INTERRUPT and some systems
2525 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
2526 it's been part of POSIX.1 since day 1 (in 1988).
2528 2000-01-17 Jim Meyering <meyering@lucent.com>
2530 * interlock: Remove unused file. Reported by François Pinard.
2532 2000-01-16 Paul Eggert <eggert@twinsun.com>
2534 * quotearg.c (quotearg_buffer_restyled): Do not quote
2535 alert, backslash, formfeed, and vertical tab unnecessarily in
2536 shell quoting style.
2539 version-control: never