1 2001-08-28 Paul Eggert <eggert@twinsun.com>
3 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
5 * strtoimax.c: Renamed from strtoxmax.c, removing the
8 Also, make the following further changes to make this file's
9 configuration more similar to that of strtol.c:
10 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
11 (strtoumax, uintmax_t, strtoull, strtol): Remove.
12 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
13 (strtoimax): Renamed from strtoumax. All uses of unsigned values
14 changed to signed values.
16 And make the following changes as well:
17 Fix copyright notice, as 1999 was missing.
19 (strtoimax): Check sizes at compile-time, not run-time.
20 Prefer strtol to strtoll if both work.
21 (main): Remove; it was not that useful and was a pain to maintain.
23 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
25 2001-08-30 Paul Eggert <eggert@twinsun.com>
27 * savedir.c (savedir): Remove size parameter, as POSIX says that
28 a directory's st_size can have an arbitrary value, so the old
29 usage could waste an arbitrary amount of memory. All uses
31 * savedir.h: Update prototype.
33 2001-08-30 Paul Eggert <eggert@twinsun.com>
35 * xstrtol.c (strtoimax): New decl.
37 2001-08-28 Paul Eggert <eggert@twinsun.com>
39 * xstrtol.h: Add copyright notice.
40 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
41 LONGINT_INVALID_SUFFIX_CHAR.
43 2001-08-30 Paul Eggert <eggert@twinsun.com>
45 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
48 2001-08-30 Paul Eggert <eggert@twinsun.com>
50 * hash.c: Remove '2001' from copyright notice.
52 2001-08-30 Paul Eggert <eggert@twinsun.com>
54 * full-write.h: New file.
55 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
56 * full-write.c: Correct credits, as cccp.c no longer
57 exists and anyway it was so heavily changed from the old cccp
58 code as to be unrecognizable. Include full-write.h.
59 (full_write) Return size_t, with short writes meaning failure.
60 All callers changed. This fixes a bug with large buffers
62 * utime.c: Include full-write.h.
64 2001-08-30 Paul Eggert <eggert@twinsun.com>
66 Merge 'exclude' changes from tar 1.13.22.
67 This fixes one or two unlikely storage allocation overflow bugs,
68 but doesn't change user-visible behavior otherwise.
70 2001-08-30 Paul Eggert <eggert@twinsun.com>
72 * exclude.c (bool): Declare, perhaps by including stdbool.h.
73 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
74 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
77 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
78 (verify): New macro. Use it to verify that EXCLUDE macros do not
79 collide with FNM macros.
80 (struct patopts): New struct.
81 (struct exclude): Use it, as exclude patterns now come with options.
82 (new_exclude): Support above changes.
83 (new_exclude, add_exclude_file):
84 Initial size must now be a power of two to simplify overflow checking.
85 (free_exclude, fnmatch_no_wildcards): New function.
86 (excluded_filename): No longer requires options arg, as the options
87 are determined by add_exclude. Now returns bool, not int.
88 (excluded_filename, add_exclude):
89 Add support for the fancy new exclusion options.
90 (add_exclude, add_exclude_file): Now takes int options arg.
91 Check for arithmetic overflow when computing sizes.
92 (add_exclude_file): xrealloc might modify errno, so don't
93 realloc until after errno might be used.
95 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
97 (free_exclude): New decl.
98 (add_exclude, add_exclude_file): Now takes int options arg.
99 (excluded_filename): No longer requires options arg, as the options
100 are determined by add_exclude. Now returns bool, not int.
102 2001-08-30 Paul Eggert <eggert@twinsun.com>
104 * alloca.c (alloca): Arg is of type size_t, not unsigned.
106 2001-08-27 Jim Meyering <meyering@lucent.com>
108 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
110 * version-etc.c (N_): Remove definition.
111 Revert most of last change.
112 Instead, simply don't mark the `Copyright...' string for translation.
113 Based on advice from Paul Eggert.
115 * strtoxmax.c: Tweak comment.
117 2001-08-26 Jim Meyering <meyering@lucent.com>
119 * version-etc.c (version_etc_copyright_fmt): Replace literal year
120 of copyright with `%s' so translators don't get an untranslated
122 (COPYRIGHT_YEAR): Define.
123 (version_etc): Use fprintf rather than fputs.
124 Suggestion from Ulrich Drepper.
126 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
128 * strtoll.c: New file, from GNU libc.
129 * xstrtoimax.c: New file.
131 * xstrtol.h: Add xstrtoimax.
132 * strtoumax.c: New file. Simply include "strtoumax.c".
133 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
135 * strtoumax.c: Factor to work both for unsigned and signed types, ...
136 * strtoxmax.c: ... then renamed to this.
138 2001-08-13 Paul Eggert <eggert@twinsun.com>
140 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
141 Port to Solaris 8, where 'sed' requires a space after the 'r'
142 command, and where sh dislikes "$/". Clean up the spacing a bit.
143 Redirect output to $tmp just once.
145 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
147 * addext.c (<errno.h>): Include.
148 (errno): Declare if not defined.
149 (addext): Work correctly when pathconf returns -1 and leaves
150 errno alone because there is no limit. Also, work even if
151 pathconf returns a value greater than SIZE_MAX.
153 2001-08-12 Jim Meyering <meyering@lucent.com>
155 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
156 Simply `return getcwd (NULL, 0);'.
157 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
158 Use 1300 as initial value for length, not PATH_MAX.
160 * pathmax.h: Clean up cpp syntax.
162 2001-08-12 Jim Meyering <meyering@lucent.com>
164 * gettimeofday.c: New file.
166 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
168 2001-08-04 Jim Meyering <meyering@lucent.com>
170 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
171 to get in sync with glibc.
173 2001-08-03 Paul Eggert <eggert@twinsun.com>
175 The following changes are from gettext 0.10.39 as maintained by
178 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
179 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
180 with inverted sense. All uses changed.
182 * mbswidth.c: Don't include <limits.h>.
183 Include <stdlib.h> and <string.h> unconditionally.
184 (iswcntrl, mbsinit, ISCNTRL): New macros.
185 (mbsnwidth): Use K&R style function declarations.
186 Don't bother checking for MB_LEN_MAX == 1, since the compiler
187 can optimize it when MB_CUR_MAX == 1.
188 The width of control characters is zero, not 1.
190 2001-07-15 Jim Meyering <meyering@lucent.com>
192 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
193 (BUILT_SOURCES): Add unlocked-io.h.
194 (io_functions): Define.
195 (unlocked-io.h): New rule.
196 (DISTCLEANFILES): Add unlocked-io.h.
197 (all-local): Depend on unlocked-io.h, to ensure it is created.
199 * unlocked-io.hin: New file
201 * regex.c: Update from glibc.
203 2001-07-05 Jim Meyering <meyering@lucent.com>
205 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
207 (libfetish_a_SOURCES): Put all .h files here instead.
208 Remove a thus-exposed (better checks in automake) duplicate and
209 two unnecessary .h files.
211 2001-06-11 Jim Meyering <meyering@lucent.com>
213 * regex.c: Update from GNU libc.
215 2001-05-27 Jim Meyering <meyering@lucent.com>
217 * readutmp.h (UT_TYPE): Define.
219 2001-05-24 Jim Meyering <meyering@lucent.com>
221 * argmatch.c: Include "quote.h".
222 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
223 quote function. Reported by Göran Uddeborg.
225 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
227 * dirname.c (dir_name): Compute append_dot using path, not newpath
228 which is not yet declared.
230 2001-05-11 Paul Eggert <eggert@twinsun.com>
232 * Makefile.am (libfetish_a_SOURCES):
233 Add strftime.c, since we now compile it on all hosts.
235 * strftime.c (my_strftime):
236 Define to nstrftime if emacs, but only if my_strftime is not defined.
237 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
238 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
239 Add one more extra argument: a nanoseconds value.
242 (my_strftime function): Add %N format.
243 (emacs_strftimeu): Renamed from emacs_strftime,
244 with extra ut argument.
246 2001-05-11 Paul Eggert <eggert@twinsun.com>
248 dirname code cleanup. base_name now behaves more compatibly
249 with POSIX basename when given file names that have trailing
250 slashes, and similarly for dir_name. Add new primitives
251 base_len and dir_len. Put the directory-name-related decls
254 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
255 * backupfile.c (base_name): Likewise.
256 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
257 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
258 * makepath.c (strip_trailing_slashes): Likewise.
259 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
261 * rename.c (strip_trailing_slashes): Likewise.
262 * same.c (base_name): Likewise.
263 * stripslash.c (ISSLASH): Likewise.
265 * addext.c: Include <dirname.h> after size_t is defined.
266 * backupfile.c: Likewise.
268 * addext.c (addext): Use base_len to trim redundant
269 trailing slashes instead of doing it ourselves.
270 But do not trim the last slash if it is not redundant.
272 * backupfile.c (find_backup_file_name,
273 max_backup_version): Use base_len instead of rolling it ourselves.
274 Handle the case of "" and (on DOS) "C:" correctly.
276 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
277 Include <string.h>, <dirname.h>.
278 (base_name): Allow file names ending in slashes, other than names
279 that are all slashes. In this case, return the basename followed
280 by the slashes. This is more general, and can be used in places
281 where the original base_name purposely had an assertion failure.
282 (base_len): New function.
284 * dirname.c: Include <string.h> instead of <stdlib.h>.
285 Do not include <assert.h>; no longer needed.
287 (memrchr): Remove decl.
288 (dir_name_r): Remove.
289 (dir_len): Renamed from dirlen. All callers changed.
290 Rewrite in terms of base_name, for simplicity and consistency.
291 (dir_name): Never return NULL. All callers changed.
292 Do not include <stdlib.h> in test program; no longer needed.
293 return 0; is fine for test program.
295 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
297 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
299 * path-concat.c (path_concat): Use base_len to compute
300 base length, not strlen; this means we cannot rely on memcpy
303 * same.c (STREQ): Remove.
304 (same_name): Handle the case where the basename ends in trailing '/'.
306 * stripslash.c (strip_trailing_slashes): Return nonzero if
307 a slash was stripped. Do not strip the last slash after a
310 2001-04-08 Jim Meyering <meyering@lucent.com>
312 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
313 recomputed; that's necessary when the offset spans a DST transition.
314 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
316 2001-04-02 Jim Meyering <meyering@lucent.com>
318 * regex.h, regex.c: Update from GNU libc.
320 2001-03-19 Paul Eggert <eggert@twinsun.com>
322 * version-etc.c (version_etc_copyright): Update to 2001.
324 2001-03-16 Paul Eggert <eggert@twinsun.com>
326 * tempname.c (uint64_t): Define to uintmax_t if
327 not defined, and if UINT64_MAX is not defined.
328 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
329 Reported by John David Anglin.
331 2001-03-10 Bruno Haible <haible@clisp.cons.org>
333 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
334 alias if codeset is empty.
335 * config.charset (BeOS): Use wildcard syntax.
337 2001-03-13 Jim Meyering <meyering@lucent.com>
339 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
340 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
343 2001-03-06 Bruno Haible <haible@clisp.cons.org>
345 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
347 * unicodeio.c (print_unicode_char): Simplify accordingly.
349 2001-03-06 Bruno Haible <haible@clisp.cons.org>
351 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
352 support for DOS/DJGPP.
354 2001-02-28 Paul Eggert <eggert@twinsun.com>
356 * Makefile.am (libfetish_a_SOURCES):
357 Add dup-safer.c, fopen-safer.c.
358 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
360 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
362 2001-02-25 Paul Eggert <eggert@twinsun.com>
364 The mkstemp replacement is taken from glibc 2.2.2, with some
365 portability fixes for use outside glibc, as follows:
367 * tempname.c (struct_stat64): New macro.
368 (direxists, __gen_tempname): Use it.
369 This avoids a portability problem with Solaris 8.
371 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
372 (<stddef.h>, <stdint.h>, <string.h>):
373 Include only if STDC_HEADERS || _LIBC.
374 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
375 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
376 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
377 (__set_errno): Define this macro if <errno.h> doesn't.
378 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
379 Define these macros if <stdio.h> doesn't.
380 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
381 Define these macros if <sys/stat.h>
382 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
383 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
384 __xstat64): Define if not _LIBC.
385 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
386 (__gen_tempname): Invoke gettimeofday only if
387 HAVE_GETTIMEOFDAY || _LIBC;
388 otherwise, fall back on plain "time".
389 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
391 * mkstemp.c (__GT_FILE): Define to zero if not defined.
393 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
395 2001-02-17 Jim Meyering <meyering@lucent.com>
397 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
398 around included file name.
400 * strnlen.c (__strnlen): Merge in a change from GNU libc.
402 * strftime.c: Update from GNU libc (the only changes were to comments).
404 2001-02-13 Bruno Haible <haible@clisp.cons.org>
406 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
408 2001-02-17 Paul Eggert <eggert@twinsun.com>
410 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
411 Remove workaround macros for hosts that have mbrtowc but not
412 mbstate_t, as we now insist on proper declarations for both
413 before using mbrtowc.
415 2001-02-17 Jim Meyering <meyering@lucent.com>
417 * regex.c: Update from libc.
419 2001-02-16 Paul Eggert <eggert@twinsun.com>
421 * alloca.c (malloc): Undef before defining, since stdlib.h
422 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
423 Reported by Mark Hounschell via Paul Eggert.
425 2001-01-30 Bruno Haible <haible@clisp.cons.org>
427 * config.charset: Update for FreeBSD 4.2.
429 2001-01-26 Jim Meyering <meyering@lucent.com>
431 * quotearg.c: Include stddef.h.
432 * quote.c: Include stddef.h.
433 Reported by Axel Kittenberger.
435 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
436 line in double quotes so that it evokes a better diagnostic.
437 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
438 Reported by Axel Kittenberger.
440 2001-01-15 Bruno Haible <haible@clisp.cons.org>
442 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
443 to avoid a warning. Add back 'const' to inptr.
445 2001-01-16 Jim Meyering <meyering@lucent.com>
447 * basename.c: Include <stdio.h>, needed by assert on SunOS4.
450 2001-01-14 Jim Meyering <meyering@lucent.com>
452 * rename.c: New file. From Volker Borchert.
453 Include stdlib.h, string.h or strings.h, and xalloc.h.
454 Use strip_trailing_slashes rather than open-coding it.
456 2001-01-03 Paul Eggert <eggert@twinsun.com>
458 * strftime.c: Sync with glibc time/strftime.c 1.81.
460 2001-01-03 Jim Meyering <meyering@lucent.com>
462 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
463 local `inptr' to avoid warning with some system declarations of iconv.
465 2000-12-29 Paul Eggert <eggert@twinsun.com>
467 * modechange.c: Do not assume that mode_t uses the
468 traditional octal encoding. E.g. "chmod 1 FOO" should set
469 the other-execute bit of FOO even if S_IXOTH != 1.
471 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
472 WOTH, XOTH, ALLM): New macros.
473 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
474 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
476 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
477 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
479 No need to use uintmax_t; unsigned long is long enough.
480 Don't bother to get suffix since we don't use it.
482 2000-12-24 Jim Meyering <meyering@lucent.com>
484 * hash.c (is_prime): Return explicit boolean values.
485 (hash_get_first): Return NULL to appease Irix5.6's 89.
486 Reported by Nelson Beebe.
488 2000-10-31 Bruno Haible <haible@clisp.cons.org>
490 * localcharset.c (locale_charset): Add support for Win32.
492 2000-12-18 Paul Eggert <eggert@twinsun.com>
494 * physmem.h, physmem.c: New files.
496 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
497 (noinst_HEADERS): Add physmem.h.
499 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
500 't' for compatibility with Solaris 8 sort.
502 2000-12-18 Bruno Haible <haible@clisp.cons.org>
504 * config.charset: Add support for BeOS.
506 2000-12-16 Jim Meyering <meyering@lucent.com>
508 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
509 SHELLS_FILE to a file name that's useful on djgpp systems.
511 (ADDITIONAL_DEFAULT_SHELLS): Define.
512 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
513 Based mostly on a patch from Prashant TR.
515 2000-12-16 Jim Meyering <meyering@lucent.com>
517 This bug had a serious impact on chown: `chown N:M FILE' (for integer
518 N and M) would have treated it like `chown N:N FILE'.
520 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
522 2000-10-31 Bruno Haible <haible@clisp.cons.org>
524 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
525 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
526 to the list of canonical encodings. Rename EUC-CN to GB2312.
528 2000-12-08 Andreas Schwab <schwab@suse.de>
530 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
531 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
533 2000-12-07 Jim Meyering <meyering@lucent.com>
535 * stripslash.c (ISSLASH): Define.
536 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
539 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
540 (dir_name_r): Declare this function as static.
541 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
542 manifest itself on a name containing a mix of slashes and
544 Make this function work with names starting with a DOS-style
545 drive letter and colon prefix.
546 (dir_name): Append `.' if necessary.
547 Based mostly on patches from Prashant TR and Eli Zaretskii.
549 * dirname.h (dir_name_r): Remove prototype.
551 2000-12-05 Jim Meyering <meyering@lucent.com>
553 * dirname.c (dir_name_r): Add `const' in a few local declarations.
555 2000-12-04 Jim Meyering <meyering@lucent.com>
557 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
558 Also include memory.h, stdlib.h, unistd.h if appropriate.
559 Reported by Andreas Jaeger (conflicting declaration of malloc).
561 2000-12-02 Jim Meyering <meyering@lucent.com>
563 * closeout.h: Make idempotent, to avoid some obscure warnings.
565 2000-12-01 Paul Eggert <eggert@twinsun.com>
567 * memrchr.c: Include <config.h> before any system include file.
569 2000-11-29 Paul Eggert <eggert@twinsun.com>
571 * dirname.c (dir_name_r): Fix typo: int -> size_t.
573 2000-11-26 Jim Meyering <meyering@lucent.com>
575 * memcoll.c: Include sys/types.h. From Werner Almesberger.
577 2000-11-22 Paul Eggert <eggert@twinsun.com>
579 * strftime.c (my_strftime): Do not invoke mbrlen with a
580 size of (size_t) -1; it's not portable.
582 2000-11-17 Akim Demaille <akim@epita.fr>
584 * obstack.h: Formatting changes.
585 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
586 prevent type checking.
587 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
588 cast the value to (void *): assigning a `foo *' to a `void *'
590 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
592 2000-11-17 Jim Meyering <meyering@lucent.com>
594 * strstr.c: Update from GNU libc.
596 2000-11-16 Jim Meyering <meyering@lucent.com>
598 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
600 2000-11-11 Jim Meyering <meyering@lucent.com>
602 * error.c: Add a couple #includes, merging from GNU libc version.
604 2000-11-10 Jim Meyering <meyering@lucent.com>
606 * obstack.h: Update from GNU libc.
607 * obstack.c: Likewise.
609 2000-11-06 Paul Eggert <eggert@twinsun.com>
611 * getusershell.c (setusershell): Use rewind rather than
612 fseek/fseeko, to avoid configuration hassles with fseeko.
613 Don't bother opening SHELLS_FILE if shellstream is NULL;
616 2000-11-05 Jim Meyering <meyering@lucent.com>
618 * makepath.h (make_dir): Declare.
619 * makepath.c (make_dir): Remove `static' attribute.
622 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
624 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
625 last one in a bucket, advance to the next bucket.
627 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
629 * fnmatch.c: Do not comment out all the code if we are using
630 the GNU C library, because in some cases we are replacing buggy
631 code in the GNU C library itself.
633 2000-10-30 Paul Eggert <eggert@twinsun.com>
635 * error.h, getline.h, modechange.h:
636 Remove "2000" from Copyright line, as the file hasn't been
637 changed this year other than in the copyright notice.
639 * xalloc.h: Add "2000" to Copyright line, as this file
640 was changed this year.
642 2000-10-30 Paul Eggert <eggert@twinsun.com>
644 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
645 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
646 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
648 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
650 * regex.h (__restrict_arr): Move definition out of #ifndef block.
651 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
652 doesn't define __restrict_arr.
654 2000-10-29 Jim Meyering <meyering@lucent.com>
656 * xstat.in: Fix grammar in comment.
658 2000-10-28 Jim Meyering <meyering@lucent.com>
660 * memchr.c: Update from libc.
661 Adjust for portability:
662 [HAVE_STDLIB_H]: Include stdlib.h.
663 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
665 [!weak_alias]: Define __memchr to memchr.
667 * regex.c: Update from libc.
669 * getopt1.c: Likewise.
670 * memcmp.c: Likewise.
672 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
673 Avoid using fseek, when possible -- it's broken by design.
674 Patch by Ulrich Drepper.
676 2000-10-26 Jim Meyering <meyering@lucent.com>
678 * strftime.c: Update from libc.
680 2000-10-25 Jim Meyering <meyering@lucent.com>
682 * obstack.c: Update from libc.
684 2000-10-23 Jim Meyering <meyering@lucent.com>
686 * hard-locale.c (hard_locale): Revert last change -- it was simply
687 wrong. That set_locale call must not have any side effects.
690 2000-10-22 Jim Meyering <meyering@lucent.com>
692 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
693 [CYCLIC]: Remove now-unused definition.
695 * save-cwd.c (O_DIRECTORY): Define, if needed.
696 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
697 Suggestion from Ulrich Drepper.
699 2000-10-21 Jim Meyering <meyering@lucent.com>
701 * dirname.c (dir_name_r): New function, factored out of dir_name.
702 (dir_name): Use dir_name_r.
703 * dirname.h (dir_name_r): Declare it.
705 2000-10-21 Jim Meyering <meyering@lucent.com>
707 * dirname.c (memrchr): Declare if necessary.
708 (dir_name): Remove the restriction that there be no
709 trailing slashes. Now, this code skips past them, effectively
711 [TEST_DIRNAME] (main): New unit tests.
713 * memrchr.c: New file from GNU libc.
714 Undef __memrchr, too.
715 [!weak_alias]: Define __memrchr to memrchr.
716 Guard weak_alias use with `#ifdef weak_alias'.
718 2000-10-17 Jim Meyering <meyering@lucent.com>
720 * quote.h (PARAMS): Define and use.
721 Reported by Akim Demaille.
723 * getopt.c: Update from libc.
725 2000-10-16 Jim Meyering <meyering@lucent.com>
727 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
730 2000-09-25 Jim Meyering <meyering@lucent.com>
732 * md5.h (rol): Define (from GnuPG).
734 * sha.c: Give credit (GnuPG) where due.
735 (M): Use rol rather than open-coding it.
738 2000-09-21 Jim Meyering <meyering@lucent.com>
740 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
741 Reported by Michael Stone.
743 2000-09-20 Jim Meyering <meyering@lucent.com>
745 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
746 (noinst_HEADERS): Add sha.h.
747 Based on code from Scott G. Miller and from GnuPG.
749 2000-09-15 Jim Meyering <meyering@lucent.com>
751 * regex.c: Update from libc.
753 2000-09-10 Jim Meyering <meyering@lucent.com>
755 * getopt.c (_getopt_internal): Update from glibc.
757 2000-09-09 Jim Meyering <meyering@lucent.com>
759 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
760 think it should be used as a general replacement for isascii.
761 * fnmatch.c: Likewise.
762 * mbswidth.c: Likewise
766 * userspec.c: Include sys/param.h and limits.h.
768 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
769 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
770 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
771 UID, GID. Check range.
773 2000-09-06 Jim Meyering <meyering@lucent.com>
775 * getopt.c (_getopt_internal): Update from glibc.
777 2000-08-30 Jim Meyering <meyering@lucent.com>
779 * strftime.c: Merge in changes from GNU libc.
781 2000-08-26 Jim Meyering <meyering@lucent.com>
783 * closeout.c: Include "__fpending.h".
784 (close_stdout_status): Return right away if there's nothing to flush.
786 * Makefile.am (noinst_HEADERS): Add __fpending.h.
787 * __fpending.c: New file.
788 * __fpending.h: New file.
790 2000-08-07 Paul Eggert <eggert@twinsun.com>
792 Standardize on "memory exhausted" instead of "Memory exhausted"
793 or "virtual memory exhausted".
794 * obstack.c (print_and_abort): Use "memory exhausted", not
795 "virtual memory exhausted".
796 * same.c (same_name): Invoke xalloc_die instead of printing
798 * userspec.c (parse_user_spec): Likewise.
799 * bumpalloc.h: comment fix
800 * same.c, userspec.c: Include xalloc.h.
802 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
803 not char *const and pointing to a constant array.
804 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
805 (xrealloc): Comment fix.
807 * userspec.c (parse_user_spec):
808 Don't translate a message until just before returning,
809 to avoid unnecessary translation.
811 2000-08-07 Jim Meyering <meyering@lucent.com>
813 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
814 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
815 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
816 getgroups.c, gethostname.c, getopt.h, group-member.c,
817 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
818 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
819 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
820 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
821 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
822 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
823 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
824 yesno.c: Back out Copyright date changes for each file with no change
825 this year. This eases coordination with other programs using the same
826 source code modules. From Paul Eggert.
828 2000-08-03 Greg McGary <greg@mcgary.org>
830 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
831 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
832 (EXTEND_BUFFER): Use them.
834 2000-08-01 Jim Meyering <meyering@lucent.com>
836 * dirname.c (ISSLASH): Define.
837 (BACKSLASH_IS_PATH_SEPARATOR): Define.
838 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
839 both `\' and `/' may be use as path separators.
840 Based on a patch from Prashant TR.
842 2000-07-31 Paul Eggert <eggert@twinsun.com>
844 * quotearg.c (quotearg_n_options): Don't make the initial
845 slot vector a constant, since it might get modified.
847 2000-07-31 Jim Meyering <meyering@lucent.com>
849 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
850 * obstack.c (print_and_abort): Likewise.
852 2000-07-30 Paul Eggert <eggert@twinsun.com>
854 * quotearg.c (quotearg_n_options): Preallocate a slot 0
855 buffer, so that the caller can always quote one small
856 component of a "memory exhausted" message in slot 0.
857 From a suggestion by Jim Meyering.
859 2000-07-30 Jim Meyering <meyering@lucent.com>
861 * makepath.c (make_path): Quote the other instance, too.
863 * quotearg.c (N_STATIC_SLOTVECS): Define.
864 (STATIC_BUF_SIZE): Define.
865 (quotearg_n_options): Use only statically allocated storage when
866 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
867 than STATIC_BUF_SIZE.
869 2000-07-29 Jim Meyering <meyering@lucent.com>
871 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
872 * dirname.c (dir_name): Likewise.
874 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
876 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
877 (dir_name): Assert that there are no trailing slashes.
879 2000-07-18 Bruno Haible <haible@clisp.cons.org>
881 * mbswidth.h (mbswidth): Add a flags argument.
882 (mbswidth): New declaration.
883 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
884 * mbswidth.c (mbswidth): Add a flags argument.
885 (mbsnwidth): New function.
887 2000-07-24 Jim Meyering <meyering@lucent.com>
889 * mbswidth.c: Remove useless #else. From Bruno Haible.
891 2000-07-23 Paul Eggert <eggert@twinsun.com>
893 * mbswidth.c (_XOPEN_SOURCE):
894 Don't define; this causes problems on Solaris 7.
895 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
897 2000-07-23 Paul Eggert <eggert@twinsun.com>
900 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
901 so that mbstate_t is always defined.
903 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
904 be 1 in at least one GCC installation, and this configuration
905 error is likely to be common. Ignoring MB_LEN_MAX hurts
906 performance on hosts that have mbrtowc but have only unibyte
907 locales, but I assume these hosts are rare.
909 2000-07-23 Paul Eggert <eggert@twinsun.com>
911 * quotearg.c: Streamline by invoking multibyte code only if needed.
912 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
913 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
914 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
915 invoke multibyte primitives.
917 2000-07-23 Jim Meyering <meyering@lucent.com>
919 * basename.c (base_name): Add an assertion.
921 2000-07-15 Bruno Haible <clisp.cons.org>
923 * quotearg.c: When the system forces us to redefine mbstate_t,
924 shadow its mbsinit function.
926 2000-07-16 Bruno Haible <haible@clisp.cons.org>
928 * mbswidth.h: New file.
929 * mbswidth.c: New file.
930 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
931 (noinst_HEADERS): Add mbswidth.h.
933 2000-07-17 Bruno Haible <haible@clisp.cons.org>
935 * config.charset: Add support for FreeBSD. Improve support for HP-UX
938 2000-07-15 Jim Meyering <meyering@lucent.com>
940 * makepath.c: Include quote.h.
941 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
942 corresponding argument in a `quote (...)' call.
943 Give better diagnostics.
945 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
946 (noinst_HEADERS): Add quote.h.
948 * quote.c (quote, quote_n): New file. Two functions taken verbatim
949 from tar's src/misc.c.
950 * quote.h: New file. Prototypes for same.
952 2000-07-10 Paul Eggert <eggert@twinsun.com>
954 From a suggestion by Bruno Haible.
955 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
956 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
957 to decide whether to define the BeOS workaround macro;
958 this adjusts to the change to AC_MBSTATE_T.
960 2000-07-13 Paul Eggert <eggert@twinsun.com>
962 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
964 * quotearg.c (quoting_style_args, quoting_style_vals,
965 quotearg_buffer_restyled): Add support for
966 clocale_quoting_style. Undo previous change to
967 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
968 and "{RIGHT QUOTATION MARK}" msgids.
970 2000-07-05 Paul Eggert <eggert@twinsun.com>
972 The old behavior of quoting `like this' doesn't look good with
973 newer, ISO-style fonts. See:
974 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
976 Instead, quote "like this" by default. Let the translator
977 tailor the locale-specific quoting behavior by providing
978 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
980 * quotearg.c (N_): New macro.
981 (gettext_default): New function.
982 (quotearg_buffer_restyled): Use
983 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
984 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
986 2000-07-09 Jim Meyering <meyering@lucent.com>
988 * Most files: Update copyright dates to include 2000.
990 2000-07-08 Jim Meyering <meyering@lucent.com>
992 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
994 (xgethostname): Remove now-unnecessary #ifdef.
995 Move declaration of `err' into loop where it's used.
997 2000-07-05 Bruno Haible <haible@clisp.cons.org>
999 * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
1000 by allocating a larger buffer. Test the gethostname return value for
1001 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
1002 returns an error and ENAMETOOLONG isn't defined.
1004 2000-07-05 Paul Eggert <eggert@twinsun.com>
1005 and Bruno Haible <haible@clisp.cons.org>
1007 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
1009 2000-07-05 Bruno Haible <haible@clisp.cons.org>
1011 * quotearg.c (struct quoting_options): Simplify quote_these_too
1014 2000-07-03 Jim Meyering <meyering@lucent.com>
1016 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
1017 Reported by Bruno Haible.
1019 2000-07-04 Jim Meyering <meyering@lucent.com>
1021 * quotearg.c: Make inclusion of <wchar.h> independent of whether
1022 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
1025 2000-07-03 Paul Eggert <eggert@twinsun.com>
1026 and Bruno Haible <haible@clisp.cons.org>
1028 * quotearg.c (mbrtowc):
1029 Assign to *pwc, and return 1 only if result is nonzero.
1030 (iswprint): Use ISPRINT when substituting our own mbrtowc.
1032 2000-07-03 Jim Meyering <meyering@lucent.com>
1034 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
1035 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
1038 2000-07-02 Jim Meyering <meyering@lucent.com>
1040 * quotearg.c (mbstate_t): Don't define here.
1042 2000-07-02 Jim Meyering <meyering@lucent.com>
1044 * nanosleep.c (SIGCONT): Define if not already defined.
1046 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1048 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
1049 per change in ../m4/ls-mntd-fs.m4.
1050 (read_filesystem_list): Ignore symbolic links.
1052 2000-06-29 Jim Meyering <meyering@lucent.com>
1054 * same.c: Include <string.h> or <strings.h>, as appropriate,
1055 for declaration of strcmp.
1057 * long-options.c: Include <stdlib.h>, for declaration of exit.
1059 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
1060 Avoid warning by casting result to `char *' to remove `const'.
1062 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1064 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
1066 2000-06-26 Paul Eggert <eggert@twinsun.com>
1068 savedir now sets errno on failure and invokes xmalloc to get memory.
1069 Fix a couple of other minor bugs while we're at it.
1071 * savedir.c (<unistd.h>): Do not include; there's no need.
1072 (NAMLEN): Remove macro.
1073 (malloc, realloc): Remove decls.
1075 ("xalloc.h"): Include.
1076 (NAME_SIZE_DEFAULT): New macro.
1077 (savedir): Use xmalloc / xrealloc to allocate memory.
1078 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
1079 Skip "" directory entries.
1080 Use strlen to calculate directory entry length, since the old method
1081 is rarely used these days and isn't worth supporting.
1082 Don't use a pointer after freeing it.
1083 Check for integer overflow when calculating allocation size.
1084 Use memcpy to copy entries, instead of stpcpy.
1085 Set errno properly when returning NULL.
1086 Check for readdir error.
1088 2000-06-26 Jim Meyering <meyering@lucent.com>
1090 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
1092 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1094 * getusershell.c (xmalloc, xrealloc): Remove functions.
1096 Don't include <stdlib.h>. Don't declare malloc, realloc.
1098 2000-06-23 Bruno Haible <haible@clisp.cons.org>
1100 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
1102 2000-06-24 Jim Meyering <meyering@lucent.com>
1104 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
1106 2000-06-21 Jim Meyering <meyering@lucent.com>
1108 * getpass.c: New file, from Bruno Haible. Required for BeOS.
1110 2000-06-19 Paul Eggert <eggert@twinsun.com>
1112 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
1113 (mbrtowc, mbstate_t): Define substitutes if
1114 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
1115 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
1116 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
1118 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1120 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
1121 than 1024, return a memory chunk of least possible size, instead
1122 of size PATH_MAX + 2. In the loop, increment the size proportionally.
1123 Use free/xmalloc instead of xrealloc to avoid copying for very long
1126 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1128 * canon-host.c (canon_host): Use malloc and memcpy to copy an
1129 address, not strdup. Include <stdlib.h> and don't declare free().
1131 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1133 * path-concat.c (path_concat): Don't access dir[-1] if dir is
1136 2000-06-21 Jim Meyering <meyering@lucent.com>
1138 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
1139 (noinst_HEADERS): Add getstr.h.
1141 * getline.c (getstr): Move into a separate file.
1142 * getstr.c (getstr): New file, extracted from getline.c, with
1143 the following changes: new parameter, delim2; both delim[12]
1144 parameters have type `int', not `char'. The latter would lose
1145 with 8-bit delimiters.
1146 * getstr.h: New file.
1148 2000-06-19 Jim Meyering <meyering@lucent.com>
1150 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
1152 2000-06-18 Jim Meyering <meyering@lucent.com>
1154 * mkdir.c: Remove file, due mainly to copyright incompatibility.
1155 Besides, these days every porting target provides a mkdir function.
1157 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
1158 (this snippet comes from src/system.h).
1160 2000-06-15 Paul Eggert <eggert@twinsun.com>
1162 * human.c (adjust_value): New function.
1163 (human_readable_inexact): Apply rounding style even when
1164 printing approximate values.
1166 2000-06-14 Paul Eggert <eggert@twinsun.com>
1168 * human.c (human_readable_inexact): Allow an input block
1169 size that is not a multiple of the output block size, and vice versa.
1170 Reported by Piergiorgio Sartor.
1172 2000-06-14 Paul Eggert <eggert@twinsun.com>
1174 * getdate.y (get_date): Apply relative times after time
1175 zone indicator, not before. Reported by Todd A. Jacobs.
1177 2000-06-13 Jim Meyering <meyering@lucent.com>
1179 * Makefile.am (all-local): Depend on lstat.c and stat.c.
1181 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
1183 2000-06-12 Paul Eggert <eggert@twinsun.com>
1185 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
1187 2000-06-04 Paul Eggert <eggert@twinsun.com>
1189 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
1191 2000-06-04 Jim Meyering <meyering@lucent.com>
1193 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
1194 SunOS4.1.4 for which gid_t is an unsigned type.
1196 2000-06-03 Jim Meyering <meyering@lucent.com>
1198 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
1200 2000-05-26 Bruno Haible <haible@clisp.cons.org>
1202 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
1203 newer, don't install charset.alias.
1204 * config.charset: Change the Linux/glibc rules so they become empty
1205 on glibc-2.1 or newer.
1207 2000-06-02 Jim Meyering <meyering@lucent.com>
1209 * mountlist.c: Back out last change. Instead, do this...
1210 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
1211 member using the same `ignore'-testing code.
1212 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
1216 2000-05-29 Jim Meyering <meyering@lucent.com>
1218 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
1219 with the `ignore' attribute. Based on a patch from Mark D. Roth.
1221 2000-05-22 Jim Meyering <meyering@lucent.com>
1223 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
1225 2000-05-18 Jim Meyering <meyering@lucent.com>
1227 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
1228 back, too, since it may have been modified by allocate_entry.
1229 (hash_delete): Rewrite to use neither the assignment operator
1230 nor the comma operator in an if-expression.
1232 2000-05-15 Paul Eggert <eggert@twinsun.com>
1235 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
1236 Remove; no longer needed.
1237 "quotearg.h": Add include.
1238 (file_name): Do not bother to explicitly initialize to NULL; it's less
1239 efficient on some hosts.
1240 (close_stdout_status): Remove test as to whether stdout was already
1241 closed; it breaks for the case "echo x | sort >&-".
1242 Quote file name colons.
1243 Do not assume that _("write error") lacks format strings.
1245 2000-05-15 Jim Meyering <meyering@lucent.com>
1247 * version-etc.c (version_etc_copyright): Update the copyright string
1248 used in all --version output.
1250 2000-05-14 Jim Meyering <meyering@lucent.com>
1252 * closeout.c (close_stdout_set_file_name): New function.
1253 (close_stdout_status): Use new file-scoped global.
1254 Return right away if fstat says the stdout file descriptor is invalid.
1255 * closeout.h (close_stdout_set_file_name): Declare.
1257 2000-05-10 Jim Meyering <meyering@lucent.com>
1259 * closeout.c [default_exit_status]: New file-scoped variable.
1260 (close_stdout_set_status): New function.
1261 * closeout.h (close_stdout_set_status): Declare.
1263 2000-05-08 Jim Meyering <meyering@lucent.com>
1265 * long-options.c: Don't include closeout.h.
1266 (parse_long_options): Don't call close_stdout for --version.
1268 2000-05-06 Jim Meyering <meyering@lucent.com>
1270 * strnlen.c: Undefine __strnlen and strnlen.
1271 [!weak_alias]: Define __strnlen to strnlen.
1273 * atexit.c: New file, from libiberty.
1275 2000-05-06 Jim Meyering <meyering@lucent.com>
1277 * closeout.c (close_stdout_status): Also check for errors on the
1280 2000-05-05 Bruno Haible <haible@clisp.cons.org>
1282 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
1283 instead of xmalloc, xrealloc, path_concat.
1284 (locale_charset): Treat empty environment variables as absent.
1285 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
1287 2000-05-04 Jim Meyering <meyering@lucent.com>
1289 * getopt.c: Update from glibc.
1290 * obstack.c: Likewise.
1291 * obstack.h: Likewise.
1292 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
1294 * regex.h: Likewise.
1295 * strndup.c: Likewise.
1296 * strnlen.c: New file, from glibc.
1298 2000-05-01 Jim Meyering <meyering@lucent.com>
1300 * full-write.c (full_write): Remove `FIXME' part of comment.
1302 2000-04-29 Jim Meyering <meyering@lucent.com>
1304 * path-concat.c: Declare strdup only if it's not defined.
1305 * canon-host.c: Likewise.
1307 2000-04-28 Jim Meyering <meyering@lucent.com>
1309 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
1310 redefinition warning on some systems (HPUX). Otherwise, regex.h is
1311 included first, then limits.h is included by locale.h by libintl.h.
1312 From John David Anglin.
1314 2000-04-25 Jim Meyering <meyering@lucent.com>
1316 * makepath.c (S_IRWXUGO): Define.
1317 (make_path): Always perform explicit chmod if MODE specifies any
1318 of the `special' permission bits. Prompted by a bug report against
1319 install from Mate Wierdl and Joost van Baal.
1321 2000-04-18 Jim Meyering <meyering@lucent.com>
1325 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
1326 getpagesize. For BeOS. Based on a patch from Bruno Haible.
1328 2000-04-17 Jim Meyering <meyering@lucent.com>
1330 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
1331 the definition of it to rpl_strftime also defined-away the system's
1334 2000-04-15 Jim Meyering <meyering@lucent.com>
1336 Use `C' to denote so-called `contiguous' files, the same way
1338 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
1339 (ftypelet): Use S_ISCTG.
1340 From Michael Deutschmann.
1342 2000-04-14 Jim Meyering <meyering@lucent.com>
1344 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
1346 2000-04-08 Jim Meyering <meyering@lucent.com>
1348 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
1349 names don't conflict. Reported by Eli Zaretskii.
1351 2000-03-28 Bruno Haible <haible@clisp.cons.org>
1353 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
1354 bug. Deal with the different error behavior of Irix iconv.
1356 2000-04-07 Jim Meyering <meyering@lucent.com>
1358 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
1359 to work around system header problems on AIX 3.2.5. From Bruno Haible.
1361 2000-04-05 Jim Meyering <meyering@lucent.com>
1363 Portability tweaks required for ultrix4.3.
1364 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
1365 * readutmp.c: Include sys/types.h before sys/stat.h.
1366 * canon-host.c: Declare strdup.
1367 * path-concat.c: Likewise.
1368 From John David Anglin.
1370 2000-04-04 Jim Meyering <meyering@lucent.com>
1372 Be more DOS 8.3-friendly.
1373 * ref-add.sin: Renamed from ref-add.sed.in.
1374 * ref-del.sin: Renamed from ref-del.sed.in.
1375 * Makefile.am: Reflect renaming.
1376 Reported by Eli Zaretskii.
1378 Use a temporary file name that won't clash with `charset.alias'
1379 in the DOS 8.3 name space.
1380 * Makefile.am (charset_tmp): Define.
1381 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
1382 (uninstall-local): Likewise.
1383 Reported by Eli Zaretskii.
1385 2000-03-29 Paul Eggert <eggert@twinsun.com>
1387 * time/strftime.c (my_strftime): Make sure we call the system
1388 strftime, not ourselves, when invoking the underlying strftime.
1390 2000-03-24 Jim Meyering <meyering@lucent.com>
1392 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
1393 (charset_alias): Define.
1394 (install-exec-local): Factor out common code.
1395 (uninstall-local): Split lines longer than 80.
1396 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
1398 (.sed.in.sed): New rule. Don't redirect directly to $@.
1399 (CLEANFILES): Add ref-add.sed and ref-del.sed.
1401 2000-03-19 Bruno Haible <haible@clisp.cons.org>
1403 * config.charset: Output a line containing "Packages using this file".
1404 * ref-add.sed.in, ref-del.sed.in: New files.
1405 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
1406 ref-del.sed): New rules.
1408 2000-03-17 Jim Meyering <meyering@lucent.com>
1410 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
1411 Otherwise, include <strings.h>
1413 2000-03-17 Bruno Haible <haible@clisp.cons.org>
1415 * unicodeio.c (utf8_wctomb): New function.
1416 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
1417 format instead of in UCS-4 with platform dependent endianness.
1419 2000-03-07 Paul Eggert <eggert@twinsun.com>
1421 * savedir.c (savedir): Work even if directory size is
1422 negative; this can happen with some screwy NFS configurations.
1424 2000-03-06 Jim Meyering <meyering@lucent.com>
1426 * localcharset.c (get_charset_aliases): Don't try to free file_name
1427 if it's NULL (because we ran out of memory). From Bruno Haible.
1429 2000-03-05 Jim Meyering <meyering@lucent.com>
1431 * localcharset.c ("path-concat.h"): Include.
1432 (get_charset_aliases): Use path_concat instead of ANSI string
1435 * unicodeio.h (PARAMS): Define.
1436 Use it to guard prototype.
1438 2000-03-04 Jim Meyering <meyering@lucent.com>
1440 * Makefile.am (install-exec-local): Create $(libdir) before installing
1442 (uninstall-local): Uncomment this rule so `make distcheck' works
1445 * unicodeio.c (<errno.h>): Include it.
1446 (errno): Declare if not defined.
1448 * localcharset.c: Add Bruno's comment justifying use of volatile.
1450 * config.charset: New version, incorporating remarks from a linux
1451 i18n mailing list. From Bruno Haible.
1453 2000-03-02 Jim Meyering <meyering@lucent.com>
1455 * Makefile.am (EXTRA_DIST): Add config.charset.
1457 2000-03-01 Jim Meyering <meyering@lucent.com>
1459 * localcharset.c: Guard some #includes with `#if HAVE_...'.
1460 * unicodeio.c: Likewise.
1462 2000-02-02 Bruno Haible <haible@clisp.cons.org>
1464 * config.charset: New file.
1465 * localcharset.c: New file.
1466 * unicodeio.h, unicodeio.c: New files.
1467 * Makefile.am (DEFS): Add -DLIBDIR=...
1468 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
1469 (noinst_HEADERS): Add unicodeio.h.
1470 (all-local, install-exec-local, charset.alias): New targets.
1472 2000-02-28 Paul Eggert <eggert@twinsun.com>
1474 * quotearg.c (ALERT_CHAR): New macro.
1475 (quotearg_buffer_restyled): Use it.
1477 2000-02-27 Jim Meyering <meyering@lucent.com>
1479 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
1480 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
1482 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
1483 not `#if STDC_HEADERS'.
1484 Declare malloc if needed.
1486 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
1487 now that autoconf always defines the HAVE_DECL_ symbols.
1488 * human.c: Likewise.
1490 * strtoumax.c: Likewise.
1492 * backupfile.c: Arrange for cpp to fail if the configure-time
1493 declaration check was not run.
1495 * human.c: Likewise.
1497 * strtoumax.c: Likewise.
1499 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
1500 then first look up the entire `.'-containing string as a login name.
1502 2000-02-18 Paul Eggert <eggert@twinsun.com>
1504 * getdate.y: Handle two-digit years with leading zeros correctly.
1505 (textint): New typedef.
1506 (parser_control): Member year changed from int to textint.
1508 (YYSTYPE): Removed; replaced by %union with int and textint members.
1509 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
1510 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
1511 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
1512 (tSNUMBER, tUNUMBER): Now of type <textintval>.
1513 (date, number, to_year): Use width of number in digits, not its value,
1514 to determine whether it's a 2-digit year, or a 2-digit time.
1515 (yylex): Store number of digits of numeric tokens.
1516 Reported by John Kendall.
1518 (parser_control): Changed from struct parser_control to typedef (for
1519 consistency). All uses changed.
1521 (tID): Removed; not used.
1522 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
1524 2000-02-14 Paul Eggert <eggert@twinsun.com>
1526 * getpagesize.h (getpagesize): Port to VMS for Alpha;
1527 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
1529 2000-02-12 Jim Meyering <meyering@lucent.com>
1531 * userspec.c (ISDIGIT): Define it.
1532 (isdigit): Remove definition.
1533 (is_number): Use ISDIGIT, not isdigit.
1534 <libintl.h>: Include.
1536 (parse_user_spec): Mark translatable strings.
1538 2000-02-10 Jim Meyering <meyering@lucent.com>
1540 With these changes, nanosleep.[ch] are finally enough like the other
1541 lib/* replacement files to compile on a few more losing systems.
1543 * nanosleep.h: Don't include config.h.
1544 Remove prototype from declaration of nanosleep.
1545 (PARAMS): Remove now-unneeded definition.
1546 * nanosleep.c: #undef nanosleep.
1547 (rpl_nanosleep): Rename from nanosleep.
1549 2000-02-03 Jim Meyering <meyering@lucent.com>
1551 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
1552 rather than with `#if HAVE_UTMPNAME'.
1554 2000-02-01 Jim Meyering <meyering@lucent.com>
1556 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
1558 2000-01-31 Jim Meyering <meyering@lucent.com>
1560 * nanosleep.h (nanosleep): Guard declaration with
1561 `#if ! HAVE_DECL_NANOSLEEP'.
1562 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
1563 the declaration in that vendor's sys/timers.h.
1564 Reported by Christian Krackowizer.
1566 * quotearg.c (ISASCII): Add #undef and move definition to follow
1567 inclusion of wctype.h to work around solaris2.6 namespace pollution.
1568 (ISPRINT): Likewise.
1569 Reported by Tom Tromey.
1571 2000-01-30 Jim Meyering <meyering@lucent.com>
1573 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
1574 uses of ->ut_name. The latter doesn't work with new Linux header files
1575 where only utmpx.ut_user is declared.
1577 * readutmp.h (UT_USER): Define.
1579 2000-01-23 Jim Meyering <meyering@lucent.com>
1581 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
1584 2000-01-22 Jim Meyering <meyering@lucent.com>
1586 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
1587 [! HAVE_DECL_STRTOULL]: Declare strtoull.
1588 Required for some AIX systems. Reported by Christian Krackowizer.
1589 [TESTING] (main): New function.
1591 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
1592 * dirname.c (dir_name): Support for DOS-style file names with drive
1595 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
1597 * strverscmp.c (ISDIGIT): Define.
1598 (strverscmp): Use ISDIGIT, not isdigit.
1600 2000-01-17 Paul Eggert <eggert@twinsun.com>
1602 * nanosleep.c (nanosleep):
1603 Don't use SA_INTERRUPT to decide whether to call sigaction, as
1604 POSIX.1 doesn't require SA_INTERRUPT and some systems
1605 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
1606 it's been part of POSIX.1 since day 1 (in 1988).
1608 2000-01-17 Jim Meyering <meyering@lucent.com>
1610 * interlock: Remove unused file. Reported by François Pinard.
1612 2000-01-16 Paul Eggert <eggert@twinsun.com>
1614 * quotearg.c (quotearg_buffer_restyled): Do not quote
1615 alert, backslash, formfeed, and vertical tab unnecessarily in
1616 shell quoting style.
1619 version-control: never