1 2001-01-14 Jim Meyering <meyering@lucent.com>
3 * rename.c: New file. From Volker Borchert.
4 Include stdlib.h, string.h or strings.h, and xalloc.h.
5 Use strip_trailing_slashes rather than open-coding it.
7 2001-01-03 Paul Eggert <eggert@twinsun.com>
9 * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
11 2001-01-03 Jim Meyering <meyering@lucent.com>
13 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
14 local `inptr' to avoid warning with some system declarations of iconv.
16 2000-12-29 Paul Eggert <eggert@twinsun.com>
18 * lib/modechange.c: Do not assume that mode_t uses the
19 traditional octal encoding. E.g. "chmod 1 FOO" should set
20 the other-execute bit of FOO even if S_IXOTH != 1.
22 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23 WOTH, XOTH, ALLM): New macros.
24 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
25 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
27 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
28 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30 No need to use uintmax_t; unsigned long is long enough.
31 Don't bother to get suffix since we don't use it.
33 2000-12-24 Jim Meyering <meyering@lucent.com>
35 * hash.c (is_prime): Return explicit boolean values.
36 (hash_get_first): Return NULL to appease Irix5.6's 89.
37 Reported by Nelson Beebe.
39 2000-10-31 Bruno Haible <haible@clisp.cons.org>
41 * localcharset.c (locale_charset): Add support for Win32.
43 2000-12-18 Paul Eggert <eggert@twinsun.com>
45 * physmem.h, physmem.c: New files.
47 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
48 (noinst_HEADERS): Add physmem.h.
50 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
51 't' for compatibility with Solaris 8 sort.
53 2000-12-18 Bruno Haible <haible@clisp.cons.org>
55 * config.charset: Add support for BeOS.
57 2000-12-16 Jim Meyering <meyering@lucent.com>
59 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
60 SHELLS_FILE to a file name that's useful on djgpp systems.
62 (ADDITIONAL_DEFAULT_SHELLS): Define.
63 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
64 Based mostly on a patch from Prashant TR.
66 2000-12-16 Jim Meyering <meyering@lucent.com>
68 This bug had a serious impact on chown: `chown N:M FILE' (for integer
69 N and M) would have treated it like `chown N:N FILE'.
71 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
73 2000-10-31 Bruno Haible <haible@clisp.cons.org>
75 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
76 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
77 to the list of canonical encodings. Rename EUC-CN to GB2312.
79 2000-12-08 Andreas Schwab <schwab@suse.de>
81 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
82 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
84 2000-12-07 Jim Meyering <meyering@lucent.com>
86 * stripslash.c (ISSLASH): Define.
87 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
90 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
91 (dir_name_r): Declare this function as static.
92 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
93 manifest itself on a name containing a mix of slashes and
95 Make this function work with names starting with a DOS-style
96 drive letter and colon prefix.
97 (dir_name): Append `.' if necessary.
98 Based mostly on patches from Prashant TR and Eli Zaretskii.
100 * dirname.h (dir_name_r): Remove prototype.
102 2000-12-05 Jim Meyering <meyering@lucent.com>
104 * dirname.c (dir_name_r): Add `const' in a few local declarations.
106 2000-12-04 Jim Meyering <meyering@lucent.com>
108 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
109 Also include memory.h, stdlib.h, unistd.h if appropriate.
110 Reported by Andreas Jaeger (conflicting declaration of malloc).
112 2000-12-02 Jim Meyering <meyering@lucent.com>
114 * closeout.h: Make idempotent, to avoid some obscure warnings.
116 2000-12-01 Paul Eggert <eggert@twinsun.com>
118 * lib/memrchr.c: Include <config.h> before any system include file.
120 2000-11-29 Paul Eggert <eggert@twinsun.com>
122 * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
124 2000-11-26 Jim Meyering <meyering@lucent.com>
126 * memcoll.c: Include sys/types.h. From Werner Almesberger.
128 2000-11-22 Paul Eggert <eggert@twinsun.com>
130 * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
131 size of (size_t) -1; it's not portable.
133 2000-11-17 Akim Demaille <akim@epita.fr>
135 * lib/obstack.h: Formatting changes.
136 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
137 prevent type checking.
138 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
139 cast the value to (void *): assigning a `foo *' to a `void *'
141 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
143 2000-11-17 Jim Meyering <meyering@lucent.com>
145 * strstr.c: Update from GNU libc.
147 2000-11-16 Jim Meyering <meyering@lucent.com>
149 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
151 2000-11-11 Jim Meyering <meyering@lucent.com>
153 * error.c: Add a couple #includes, merging from GNU libc version.
155 2000-11-10 Jim Meyering <meyering@lucent.com>
157 * obstack.h: Update from GNU libc.
158 * obstack.c: Likewise.
160 2000-11-06 Paul Eggert <eggert@twinsun.com>
162 * getusershell.c (setusershell): Use rewind rather than
163 fseek/fseeko, to avoid configuration hassles with fseeko.
164 Don't bother opening SHELLS_FILE if shellstream is NULL;
167 2000-11-05 Jim Meyering <meyering@lucent.com>
169 * makepath.h (make_dir): Declare.
170 * makepath.c (make_dir): Remove `static' attribute.
173 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
175 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
176 last one in a bucket, advance to the next bucket.
178 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
180 * fnmatch.c: Do not comment out all the code if we are using
181 the GNU C library, because in some cases we are replacing buggy
182 code in the GNU C library itself.
184 2000-10-30 Paul Eggert <eggert@twinsun.com>
186 * error.h, getline.h, modechange.h:
187 Remove "2000" from Copyright line, as the file hasn't been
188 changed this year other than in the copyright notice.
190 * xalloc.h: Add "2000" to Copyright line, as this file
191 was changed this year.
193 2000-10-30 Paul Eggert <eggert@twinsun.com>
195 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
196 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
197 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
199 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
201 * regex.h (__restrict_arr): Move definition out of #ifndef block.
202 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
203 doesn't define __restrict_arr.
205 2000-10-29 Jim Meyering <meyering@lucent.com>
207 * xstat.in: Fix grammar in comment.
209 2000-10-28 Jim Meyering <meyering@lucent.com>
211 * memchr.c: Update from libc.
212 Adjust for portability:
213 [HAVE_STDLIB_H]: Include stdlib.h.
214 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
216 [!weak_alias]: Define __memchr to memchr.
218 * regex.c: Update from libc.
220 * getopt1.c: Likewise.
221 * memcmp.c: Likewise.
223 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
224 Avoid using fseek, when possible -- it's broken by design.
225 Patch by Ulrich Drepper.
227 2000-10-26 Jim Meyering <meyering@lucent.com>
229 * strftime.c: Update from libc.
231 2000-10-25 Jim Meyering <meyering@lucent.com>
233 * obstack.c: Update from libc.
235 2000-10-23 Jim Meyering <meyering@lucent.com>
237 * hard-locale.c (hard_locale): Revert last change -- it was simply
238 wrong. That set_locale call must not have any side effects.
241 2000-10-22 Jim Meyering <meyering@lucent.com>
243 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
244 [CYCLIC]: Remove now-unused definition.
246 * save-cwd.c (O_DIRECTORY): Define, if needed.
247 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
248 Suggestion from Ulrich Drepper.
250 2000-10-21 Jim Meyering <meyering@lucent.com>
252 * dirname.c (dir_name_r): New function, factored out of dir_name.
253 (dir_name): Use dir_name_r.
254 * dirname.h (dir_name_r): Declare it.
256 2000-10-21 Jim Meyering <meyering@lucent.com>
258 * dirname.c (memrchr): Declare if necessary.
259 (dir_name): Remove the restriction that there be no
260 trailing slashes. Now, this code skips past them, effectively
262 [TEST_DIRNAME] (main): New unit tests.
264 * memrchr.c: New file from GNU libc.
265 Undef __memrchr, too.
266 [!weak_alias]: Define __memrchr to memrchr.
267 Guard weak_alias use with `#ifdef weak_alias'.
269 2000-10-17 Jim Meyering <meyering@lucent.com>
271 * quote.h (PARAMS): Define and use.
272 Reported by Akim Demaille.
274 * getopt.c: Update from libc.
276 2000-10-16 Jim Meyering <meyering@lucent.com>
278 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
281 2000-09-25 Jim Meyering <meyering@lucent.com>
283 * md5.h (rol): Define (from GnuPG).
285 * sha.c: Give credit (GnuPG) where due.
286 (M): Use rol rather than open-coding it.
289 2000-09-21 Jim Meyering <meyering@lucent.com>
291 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
292 Reported by Michael Stone.
294 2000-09-20 Jim Meyering <meyering@lucent.com>
296 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
297 (noinst_HEADERS): Add sha.h.
298 Based on code from Scott G. Miller and from GnuPG.
300 2000-09-15 Jim Meyering <meyering@lucent.com>
302 * regex.c: Update from libc.
304 2000-09-10 Jim Meyering <meyering@lucent.com>
306 * getopt.c (_getopt_internal): Update from glibc.
308 2000-09-09 Jim Meyering <meyering@lucent.com>
310 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
311 think it should be used as a general replacement for isascii.
312 * fnmatch.c: Likewise.
313 * mbswidth.c: Likewise
317 * userspec.c: Include sys/param.h and limits.h.
319 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
320 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
321 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
322 UID, GID. Check range.
324 2000-09-06 Jim Meyering <meyering@lucent.com>
326 * getopt.c (_getopt_internal): Update from glibc.
328 2000-08-30 Jim Meyering <meyering@lucent.com>
330 * strftime.c: Merge in changes from GNU libc.
332 2000-08-26 Jim Meyering <meyering@lucent.com>
334 * closeout.c: Include "__fpending.h".
335 (close_stdout_status): Return right away if there's nothing to flush.
337 * Makefile.am (noinst_HEADERS): Add __fpending.h.
338 * __fpending.c: New file.
339 * __fpending.h: New file.
341 2000-08-07 Paul Eggert <eggert@twinsun.com>
343 Standardize on "memory exhausted" instead of "Memory exhausted"
344 or "virtual memory exhausted".
345 * obstack.c (print_and_abort): Use "memory exhausted", not
346 "virtual memory exhausted".
347 * same.c (same_name): Invoke xalloc_die instead of printing
349 * userspec.c (parse_user_spec): Likewise.
350 * bumpalloc.h: comment fix
351 * same.c, userspec.c: Include xalloc.h.
353 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
354 not char *const and pointing to a constant array.
355 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
356 (xrealloc): Comment fix.
358 * userspec.c (parse_user_spec):
359 Don't translate a message until just before returning,
360 to avoid unnecessary translation.
362 2000-08-07 Jim Meyering <meyering@lucent.com>
364 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
365 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
366 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
367 getgroups.c, gethostname.c, getopt.h, group-member.c,
368 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
369 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
370 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
371 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
372 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
373 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
374 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
375 yesno.c: Back out Copyright date changes for each file with no change
376 this year. This eases coordination with other programs using the same
377 source code modules. From Paul Eggert.
379 2000-08-03 Greg McGary <greg@mcgary.org>
381 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
382 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
383 (EXTEND_BUFFER): Use them.
385 2000-08-01 Jim Meyering <meyering@lucent.com>
387 * dirname.c (ISSLASH): Define.
388 (BACKSLASH_IS_PATH_SEPARATOR): Define.
389 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
390 both `\' and `/' may be use as path separators.
391 Based on a patch from Prashant TR.
393 2000-07-31 Paul Eggert <eggert@twinsun.com>
395 * quotearg.c (quotearg_n_options): Don't make the initial
396 slot vector a constant, since it might get modified.
398 2000-07-31 Jim Meyering <meyering@lucent.com>
400 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
401 * obstack.c (print_and_abort): Likewise.
403 2000-07-30 Paul Eggert <eggert@twinsun.com>
405 * quotearg.c (quotearg_n_options): Preallocate a slot 0
406 buffer, so that the caller can always quote one small
407 component of a "memory exhausted" message in slot 0.
408 From a suggestion by Jim Meyering.
410 2000-07-30 Jim Meyering <meyering@lucent.com>
412 * makepath.c (make_path): Quote the other instance, too.
414 * quotearg.c (N_STATIC_SLOTVECS): Define.
415 (STATIC_BUF_SIZE): Define.
416 (quotearg_n_options): Use only statically allocated storage when
417 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
418 than STATIC_BUF_SIZE.
420 2000-07-29 Jim Meyering <meyering@lucent.com>
422 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
423 * dirname.c (dir_name): Likewise.
425 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
427 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
428 (dir_name): Assert that there are no trailing slashes.
430 2000-07-18 Bruno Haible <haible@clisp.cons.org>
432 * mbswidth.h (mbswidth): Add a flags argument.
433 (mbswidth): New declaration.
434 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
435 * mbswidth.c (mbswidth): Add a flags argument.
436 (mbsnwidth): New function.
438 2000-07-24 Jim Meyering <meyering@lucent.com>
440 * mbswidth.c: Remove useless #else. From Bruno Haible.
442 2000-07-23 Paul Eggert <eggert@twinsun.com>
444 * mbswidth.c (_XOPEN_SOURCE):
445 Don't define; this causes problems on Solaris 7.
446 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
448 2000-07-23 Paul Eggert <eggert@twinsun.com>
451 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
452 so that mbstate_t is always defined.
454 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
455 be 1 in at least one GCC installation, and this configuration
456 error is likely to be common. Ignoring MB_LEN_MAX hurts
457 performance on hosts that have mbrtowc but have only unibyte
458 locales, but I assume these hosts are rare.
460 2000-07-23 Paul Eggert <eggert@twinsun.com>
462 * quotearg.c: Streamline by invoking multibyte code only if needed.
463 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
464 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
465 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
466 invoke multibyte primitives.
468 2000-07-23 Jim Meyering <meyering@lucent.com>
470 * basename.c (base_name): Add an assertion.
472 2000-07-15 Bruno Haible <clisp.cons.org>
474 * quotearg.c: When the system forces us to redefine mbstate_t,
475 shadow its mbsinit function.
477 2000-07-16 Bruno Haible <haible@clisp.cons.org>
479 * mbswidth.h: New file.
480 * mbswidth.c: New file.
481 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
482 (noinst_HEADERS): Add mbswidth.h.
484 2000-07-17 Bruno Haible <haible@clisp.cons.org>
486 * config.charset: Add support for FreeBSD. Improve support for HP-UX
489 2000-07-15 Jim Meyering <meyering@lucent.com>
491 * makepath.c: Include quote.h.
492 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
493 corresponding argument in a `quote (...)' call.
494 Give better diagnostics.
496 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
497 (noinst_HEADERS): Add quote.h.
499 * quote.c (quote, quote_n): New file. Two functions taken verbatim
500 from tar's src/misc.c.
501 * quote.h: New file. Prototypes for same.
503 2000-07-10 Paul Eggert <eggert@twinsun.com>
505 From a suggestion by Bruno Haible.
506 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
507 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
508 to decide whether to define the BeOS workaround macro;
509 this adjusts to the change to AC_MBSTATE_T.
511 2000-07-13 Paul Eggert <eggert@twinsun.com>
513 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
515 * quotearg.c: (quoting_style_args, quoting_style_vals,
516 quotearg_buffer_restyled): Add support for
517 clocale_quoting_style. Undo previous change to
518 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
519 and "{RIGHT QUOTATION MARK}" msgids.
521 2000-07-05 Paul Eggert <eggert@twinsun.com>
523 The old behavior of quoting `like this' doesn't look good with
524 newer, ISO-style fonts. See:
525 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
527 Instead, quote "like this" by default. Let the translator
528 tailor the locale-specific quoting behavior by providing
529 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
531 * quotearg.c (N_): New macro.
532 (gettext_default): New function.
533 (quotearg_buffer_restyled): Use
534 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
535 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
537 2000-07-09 Jim Meyering <meyering@lucent.com>
539 * Most files: Update copyright dates to include 2000.
541 2000-07-08 Jim Meyering <meyering@lucent.com>
543 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
545 (xgethostname): Remove now-unnecessary #ifdef.
546 Move declaration of `err' into loop where it's used.
548 2000-07-05 Bruno Haible <haible@clisp.cons.org>
550 * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
551 by allocating a larger buffer. Test the gethostname return value for
552 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
553 returns an error and ENAMETOOLONG isn't defined.
555 2000-07-05 Paul Eggert <eggert@twinsun.com>
556 and Bruno Haible <haible@clisp.cons.org>
558 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
560 2000-07-05 Bruno Haible <haible@clisp.cons.org>
562 * quotearg.c (struct quoting_options): Simplify quote_these_too
565 2000-07-03 Jim Meyering <meyering@lucent.com>
567 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
568 Reported by Bruno Haible.
570 2000-07-04 Jim Meyering <meyering@lucent.com>
572 * quotearg.c: Make inclusion of <wchar.h> independent of whether
573 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
576 2000-07-03 Paul Eggert <eggert@twinsun.com>
577 and Bruno Haible <haible@clisp.cons.org>
579 * quotearg.c (mbrtowc):
580 Assign to *pwc, and return 1 only if result is nonzero.
581 (iswprint): Use ISPRINT when substituting our own mbrtowc.
583 2000-07-03 Jim Meyering <meyering@lucent.com>
585 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
586 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
589 2000-07-02 Jim Meyering <meyering@lucent.com>
591 * quotearg.c (mbstate_t): Don't define here.
593 2000-07-02 Jim Meyering <meyering@lucent.com>
595 * nanosleep.c (SIGCONT): Define if not already defined.
597 2000-06-17 Bruno Haible <haible@clisp.cons.org>
599 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
600 per change in ../m4/ls-mntd-fs.m4.
601 (read_filesystem_list): Ignore symbolic links.
603 2000-06-29 Jim Meyering <meyering@lucent.com>
605 * same.c: Include <string.h> or <strings.h>, as appropriate,
606 for declaration of strcmp.
608 * long-options.c: Include <stdlib.h>, for declaration of exit.
610 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
611 Avoid warning by casting result to `char *' to remove `const'.
613 2000-06-17 Bruno Haible <haible@clisp.cons.org>
615 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
617 2000-06-26 Paul Eggert <eggert@twinsun.com>
619 savedir now sets errno on failure and invokes xmalloc to get memory.
620 Fix a couple of other minor bugs while we're at it.
622 * savedir.c (<unistd.h>): Do not include; there's no need.
623 (NAMLEN): Remove macro.
624 (malloc, realloc): Remove decls.
626 ("xalloc.h"): Include.
627 (NAME_SIZE_DEFAULT): New macro.
628 (savedir): Use xmalloc / xrealloc to allocate memory.
629 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
630 Skip "" directory entries.
631 Use strlen to calculate directory entry length, since the old method
632 is rarely used these days and isn't worth supporting.
633 Don't use a pointer after freeing it.
634 Check for integer overflow when calculating allocation size.
635 Use memcpy to copy entries, instead of stpcpy.
636 Set errno properly when returning NULL.
637 Check for readdir error.
639 2000-06-26 Jim Meyering <meyering@lucent.com>
641 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
643 2000-06-17 Bruno Haible <haible@clisp.cons.org>
645 * getusershell.c (xmalloc, xrealloc): Remove functions.
647 Don't include <stdlib.h>. Don't declare malloc, realloc.
649 2000-06-23 Bruno Haible <haible@clisp.cons.org>
651 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
653 2000-06-24 Jim Meyering <meyering@lucent.com>
655 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
657 2000-06-21 Jim Meyering <meyering@lucent.com>
659 * getpass.c: New file, from Bruno Haible. Required for BeOS.
661 2000-06-19 Paul Eggert <eggert@twinsun.com>
663 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
664 (mbrtowc, mbstate_t): Define substitutes if
665 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
666 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
667 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
669 2000-06-17 Bruno Haible <haible@clisp.cons.org>
671 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
672 than 1024, return a memory chunk of least possible size, instead
673 of size PATH_MAX + 2. In the loop, increment the size proportionally.
674 Use free/xmalloc instead of xrealloc to avoid copying for very long
677 2000-06-17 Bruno Haible <haible@clisp.cons.org>
679 * canon-host.c (canon_host): Use malloc and memcpy to copy an
680 address, not strdup. Include <stdlib.h> and don't declare free().
682 2000-06-17 Bruno Haible <haible@clisp.cons.org>
684 * path-concat.c (path_concat): Don't access dir[-1] if dir is
687 2000-06-21 Jim Meyering <meyering@lucent.com>
689 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
690 (noinst_HEADERS): Add getstr.h.
692 * getline.c (getstr): Move into a separate file.
693 * getstr.c (getstr): New file, extracted from getline.c, with
694 the following changes: new parameter, delim2; both delim[12]
695 parameters have type `int', not `char'. The latter would lose
696 with 8-bit delimiters.
697 * getstr.h: New file.
699 2000-06-19 Jim Meyering <meyering@lucent.com>
701 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
703 2000-06-18 Jim Meyering <meyering@lucent.com>
705 * mkdir.c: Remove file, due mainly to copyright incompatibility.
706 Besides, these days every porting target provides a mkdir function.
708 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
709 (this snippet comes from src/system.h).
711 2000-06-15 Paul Eggert <eggert@twinsun.com>
713 * human.c (adjust_value): New function.
714 (human_readable_inexact): Apply rounding style even when
715 printing approximate values.
717 2000-06-14 Paul Eggert <eggert@twinsun.com>
719 * human.c (human_readable_inexact): Allow an input block
720 size that is not a multiple of the output block size, and vice versa.
721 Reported by Piergiorgio Sartor.
723 2000-06-14 Paul Eggert <eggert@twinsun.com>
725 * getdate.y (get_date): Apply relative times after time
726 zone indicator, not before. Reported by Todd A. Jacobs.
728 2000-06-13 Jim Meyering <meyering@lucent.com>
730 * Makefile.am (all-local): Depend on lstat.c and stat.c.
732 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
734 2000-06-12 Paul Eggert <eggert@twinsun.com>
736 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
738 2000-06-04 Paul Eggert <eggert@twinsun.com>
740 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
742 2000-06-04 Jim Meyering <meyering@lucent.com>
744 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
745 SunOS4.1.4 for which gid_t is an unsigned type.
747 2000-06-03 Jim Meyering <meyering@lucent.com>
749 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
751 2000-05-26 Bruno Haible <haible@clisp.cons.org>
753 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
754 newer, don't install charset.alias.
755 * config.charset: Change the Linux/glibc rules so they become empty
756 on glibc-2.1 or newer.
758 2000-06-02 Jim Meyering <meyering@lucent.com>
760 * mountlist.c: Back out last change. Instead, do this...
761 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
762 member using the same `ignore'-testing code.
763 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
767 2000-05-29 Jim Meyering <meyering@lucent.com>
769 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
770 with the `ignore' attribute. Based on a patch from Mark D. Roth.
772 2000-05-22 Jim Meyering <meyering@lucent.com>
774 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
776 2000-05-18 Jim Meyering <meyering@lucent.com>
778 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
779 back, too, since it may have been modified by allocate_entry.
780 (hash_delete): Rewrite to use neither the assignment operator
781 nor the comma operator in an if-expression.
783 2000-05-15 Paul Eggert <eggert@twinsun.com>
786 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
787 Remove; no longer needed.
788 "quotearg.h": Add include.
789 (file_name): Do not bother to explicitly initialize to NULL; it's less
790 efficient on some hosts.
791 (close_stdout_status): Remove test as to whether stdout was already
792 closed; it breaks for the case "echo x | sort >&-".
793 Quote file name colons.
794 Do not assume that _("write error") lacks format strings.
796 2000-05-15 Jim Meyering <meyering@lucent.com>
798 * version-etc.c (version_etc_copyright): Update the copyright string
799 used in all --version output.
801 2000-05-14 Jim Meyering <meyering@lucent.com>
803 * closeout.c (close_stdout_set_file_name): New function.
804 (close_stdout_status): Use new file-scoped global.
805 Return right away if fstat says the stdout file descriptor is invalid.
806 * closeout.h (close_stdout_set_file_name): Declare.
808 2000-05-10 Jim Meyering <meyering@lucent.com>
810 * closeout.c [default_exit_status]: New file-scoped variable.
811 (close_stdout_set_status): New function.
812 * closeout.h (close_stdout_set_status): Declare.
814 2000-05-08 Jim Meyering <meyering@lucent.com>
816 * long-options.c: Don't include closeout.h.
817 (parse_long_options): Don't call close_stdout for --version.
819 2000-05-06 Jim Meyering <meyering@lucent.com>
821 * strnlen.c: Undefine __strnlen and strnlen.
822 [!weak_alias]: Define __strnlen to strnlen.
824 * atexit.c: New file, from libiberty.
826 2000-05-06 Jim Meyering <meyering@lucent.com>
828 * closeout.c (close_stdout_status): Also check for errors on the
831 2000-05-05 Bruno Haible <haible@clisp.cons.org>
833 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
834 instead of xmalloc, xrealloc, path_concat.
835 (locale_charset): Treat empty environment variables as absent.
836 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
838 2000-05-04 Jim Meyering <meyering@lucent.com>
840 * getopt.c: Update from glibc.
841 * obstack.c: Likewise.
842 * obstack.h: Likewise.
843 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
846 * strndup.c: Likewise.
847 * strnlen.c: New file, from glibc.
849 2000-05-01 Jim Meyering <meyering@lucent.com>
851 * full-write.c (full_write): Remove `FIXME' part of comment.
853 2000-04-29 Jim Meyering <meyering@lucent.com>
855 * path-concat.c: Declare strdup only if it's not defined.
856 * canon-host.c: Likewise.
858 2000-04-28 Jim Meyering <meyering@lucent.com>
860 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
861 redefinition warning on some systems (HPUX). Otherwise, regex.h is
862 included first, then limits.h is included by locale.h by libintl.h.
863 From John David Anglin.
865 2000-04-25 Jim Meyering <meyering@lucent.com>
867 * makepath.c (S_IRWXUGO): Define.
868 (make_path): Always perform explicit chmod if MODE specifies any
869 of the `special' permission bits. Prompted by a bug report against
870 install from Mate Wierdl and Joost van Baal.
872 2000-04-18 Jim Meyering <meyering@lucent.com>
876 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
877 getpagesize. For BeOS. Based on a patch from Bruno Haible.
879 2000-04-17 Jim Meyering <meyering@lucent.com>
881 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
882 the definition of it to rpl_strftime also defined-away the system's
885 2000-04-15 Jim Meyering <meyering@lucent.com>
887 Use `C' to denote so-called `contiguous' files, the same way
889 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
890 (ftypelet): Use S_ISCTG.
891 From Michael Deutschmann.
893 2000-04-14 Jim Meyering <meyering@lucent.com>
895 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
897 2000-04-08 Jim Meyering <meyering@lucent.com>
899 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
900 names don't conflict. Reported by Eli Zaretskii.
902 2000-03-28 Bruno Haible <haible@clisp.cons.org>
904 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
905 bug. Deal with the different error behavior of Irix iconv.
907 2000-04-07 Jim Meyering <meyering@lucent.com>
909 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
910 to work around system header problems on AIX 3.2.5. From Bruno Haible.
912 2000-04-05 Jim Meyering <meyering@lucent.com>
914 Portability tweaks required for ultrix4.3.
915 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
916 * readutmp.c: Include sys/types.h before sys/stat.h.
917 * canon-host.c: Declare strdup.
918 * path-concat.c: Likewise.
919 From John David Anglin.
921 2000-04-04 Jim Meyering <meyering@lucent.com>
923 Be more DOS 8.3-friendly.
924 * ref-add.sin: Renamed from ref-add.sed.in.
925 * ref-del.sin: Renamed from ref-del.sed.in.
926 * Makefile.am: Reflect renaming.
927 Reported by Eli Zaretskii.
929 Use a temporary file name that won't clash with `charset.alias'
930 in the DOS 8.3 name space.
931 * Makefile.am (charset_tmp): Define.
932 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
933 (uninstall-local): Likewise.
934 Reported by Eli Zaretskii.
936 2000-03-29 Paul Eggert <eggert@twinsun.com>
938 * time/strftime.c (my_strftime): Make sure we call the system
939 strftime, not ourselves, when invoking the underlying strftime.
941 2000-03-24 Jim Meyering <meyering@lucent.com>
943 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
944 (charset_alias): Define.
945 (install-exec-local): Factor out common code.
946 (uninstall-local): Split lines longer than 80.
947 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
949 (.sed.in.sed): New rule. Don't redirect directly to $@.
950 (CLEANFILES): Add ref-add.sed and ref-del.sed.
952 2000-03-19 Bruno Haible <haible@clisp.cons.org>
954 * config.charset: Output a line containing "Packages using this file".
955 * ref-add.sed.in, ref-del.sed.in: New files.
956 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
957 ref-del.sed): New rules.
959 2000-03-17 Jim Meyering <meyering@lucent.com>
961 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
962 Otherwise, include <strings.h>
964 2000-03-17 Bruno Haible <haible@clisp.cons.org>
966 * unicodeio.c (utf8_wctomb): New function.
967 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
968 format instead of in UCS-4 with platform dependent endianness.
970 2000-03-07 Paul Eggert <eggert@twinsun.com>
972 * savedir.c (savedir): Work even if directory size is
973 negative; this can happen with some screwy NFS configurations.
975 2000-03-06 Jim Meyering <meyering@lucent.com>
977 * localcharset.c (get_charset_aliases): Don't try to free file_name
978 if it's NULL (because we ran out of memory). From Bruno Haible.
980 2000-03-05 Jim Meyering <meyering@lucent.com>
982 * localcharset.c ("path-concat.h"): Include.
983 (get_charset_aliases): Use path_concat instead of ANSI string
986 * unicodeio.h (PARAMS): Define.
987 Use it to guard prototype.
989 2000-03-04 Jim Meyering <meyering@lucent.com>
991 * Makefile.am (install-exec-local): Create $(libdir) before installing
993 (uninstall-local): Uncomment this rule so `make distcheck' works
996 * unicodeio.c (<errno.h>): Include it.
997 (errno): Declare if not defined.
999 * localcharset.c: Add Bruno's comment justifying use of volatile.
1001 * config.charset: New version, incorporating remarks from a linux
1002 i18n mailing list. From Bruno Haible.
1004 2000-03-02 Jim Meyering <meyering@lucent.com>
1006 * Makefile.am (EXTRA_DIST): Add config.charset.
1008 2000-03-01 Jim Meyering <meyering@lucent.com>
1010 * localcharset.c: Guard some #includes with `#if HAVE_...'.
1011 * unicodeio.c: Likewise.
1013 2000-02-02 Bruno Haible <haible@clisp.cons.org>
1015 * config.charset: New file.
1016 * localcharset.c: New file.
1017 * unicodeio.h, unicodeio.c: New files.
1018 * Makefile.am (DEFS): Add -DLIBDIR=...
1019 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
1020 (noinst_HEADERS): Add unicodeio.h.
1021 (all-local, install-exec-local, charset.alias): New targets.
1023 2000-02-28 Paul Eggert <eggert@twinsun.com>
1025 * quotearg.c (ALERT_CHAR): New macro.
1026 (quotearg_buffer_restyled): Use it.
1028 2000-02-27 Jim Meyering <meyering@lucent.com>
1030 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
1031 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
1033 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
1034 not `#if STDC_HEADERS'.
1035 Declare malloc if needed.
1037 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
1038 now that autoconf always defines the HAVE_DECL_ symbols.
1039 * human.c: Likewise.
1041 * strtoumax.c: Likewise.
1043 * backupfile.c: Arrange for cpp to fail if the configure-time
1044 declaration check was not run.
1046 * human.c: Likewise.
1048 * strtoumax.c: Likewise.
1050 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
1051 then first look up the entire `.'-containing string as a login name.
1053 2000-02-18 Paul Eggert <eggert@twinsun.com>
1055 * getdate.y: Handle two-digit years with leading zeros correctly.
1056 (textint): New typedef.
1057 (parser_control): Member year changed from int to textint.
1059 (YYSTYPE): Removed; replaced by %union with int and textint members.
1060 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
1061 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
1062 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
1063 (tSNUMBER, tUNUMBER): Now of type <textintval>.
1064 (date, number, to_year): Use width of number in digits, not its value,
1065 to determine whether it's a 2-digit year, or a 2-digit time.
1066 (yylex): Store number of digits of numeric tokens.
1067 Reported by John Kendall.
1069 (parser_control): Changed from struct parser_control to typedef (for
1070 consistency). All uses changed.
1072 (tID): Removed; not used.
1073 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
1075 2000-02-14 Paul Eggert <eggert@twinsun.com>
1077 * getpagesize.h (getpagesize): Port to VMS for Alpha;
1078 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
1080 2000-02-12 Jim Meyering <meyering@lucent.com>
1082 * userspec.c (ISDIGIT): Define it.
1083 (isdigit): Remove definition.
1084 (is_number): Use ISDIGIT, not isdigit.
1085 <libintl.h>: Include.
1087 (parse_user_spec): Mark translatable strings.
1089 2000-02-10 Jim Meyering <meyering@lucent.com>
1091 With these changes, nanosleep.[ch] are finally enough like the other
1092 lib/* replacement files to compile on a few more losing systems.
1094 * nanosleep.h: Don't include config.h.
1095 Remove prototype from declaration of nanosleep.
1096 (PARAMS): Remove now-unneeded definition.
1097 * nanosleep.c: #undef nanosleep.
1098 (rpl_nanosleep): Rename from nanosleep.
1100 2000-02-03 Jim Meyering <meyering@lucent.com>
1102 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
1103 rather than with `#if HAVE_UTMPNAME'.
1105 2000-02-01 Jim Meyering <meyering@lucent.com>
1107 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
1109 2000-01-31 Jim Meyering <meyering@lucent.com>
1111 * nanosleep.h (nanosleep): Guard declaration with
1112 `#if ! HAVE_DECL_NANOSLEEP'.
1113 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
1114 the declaration in that vendor's sys/timers.h.
1115 Reported by Christian Krackowizer.
1117 * quotearg.c (ISASCII): Add #undef and move definition to follow
1118 inclusion of wctype.h to work around solaris2.6 namespace pollution.
1119 (ISPRINT): Likewise.
1120 Reported by Tom Tromey.
1122 2000-01-30 Jim Meyering <meyering@lucent.com>
1124 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
1125 uses of ->ut_name. The latter doesn't work with new Linux header files
1126 where only utmpx.ut_user is declared.
1128 * readutmp.h (UT_USER): Define.
1130 2000-01-23 Jim Meyering <meyering@lucent.com>
1132 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
1135 2000-01-22 Jim Meyering <meyering@lucent.com>
1137 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
1138 [! HAVE_DECL_STRTOULL]: Declare strtoull.
1139 Required for some AIX systems. Reported by Christian Krackowizer.
1140 [TESTING] (main): New function.
1142 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
1143 * dirname.c (dir_name): Support for DOS-style file names with drive
1146 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
1148 * strverscmp.c (ISDIGIT): Define.
1149 (strverscmp): Use ISDIGIT, not isdigit.
1151 2000-01-17 Paul Eggert <eggert@twinsun.com>
1153 * nanosleep.c (nanosleep):
1154 Don't use SA_INTERRUPT to decide whether to call sigaction, as
1155 POSIX.1 doesn't require SA_INTERRUPT and some systems
1156 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
1157 it's been part of POSIX.1 since day 1 (in 1988).
1159 2000-01-17 Jim Meyering <meyering@lucent.com>
1161 * interlock: Remove unused file. Reported by François Pinard.
1163 2000-01-16 Paul Eggert <eggert@twinsun.com>
1165 * quotearg.c (quotearg_buffer_restyled): Do not quote
1166 alert, backslash, formfeed, and vertical tab unnecessarily in
1167 shell quoting style.
1170 version-control: never