1 2001-01-21 Paul Eggert <eggert@twinsun.com>
3 * xmemcoll.h, xmemcoll.c: New files.
4 * Makefile.am (libfetish_a_SOURCES): Add them.
5 * memcoll.c: Include errno.h, and declare errno if not defined.
6 (memcoll): Set errno to zero if there is no error.
8 * quotearg.c (quotearg_buffer_restyled):
9 Fix bug with quoting buffers containing NUL when backslashing escapes.
10 This bug was exposed by the other changes in this patch.
11 (quotearg_n_options): New arg ARGSIZE.
13 (quoting_options_from_style): New function.
14 (quotearg_n_style): Use it.
15 (quotearg_n_style_mem): New function.
17 * quotearg.h (quotearg_n_style_mem): New function.
19 2002-01-16 Jim Meyering <meyering@lucent.com>
21 * getdate.y: Add three semicolons, each just before a closing brace.
22 Bison (as of version 1.31) no longer papers over that mistake.
24 2002-02-14 Paul Eggert <eggert@twinsun.com>
26 * backupfile.c (ISDIGIT): Comment fix.
27 * getdate.y (ISDIGIT): Likewise.
28 * posixtm.c (ISDIGIT, year): Likewise.
29 * strverscmp.c (ISDIGIT): Likewise.
30 * userspec.c (ISDIGIT): Likewise.
32 2002-01-05 Jim Meyering <meyering@lucent.com>
34 * version-etc.c (version_etc_copyright): Update copyright year.
36 2001-01-19 Paul Eggert <eggert@twinsun.com>
38 * closeout.c (close_stdout_status): If ferror (stdout), do
39 not silently exit merely because the output buffer happens to
42 2001-12-18 Paul Eggert <eggert@twinsun.com>
44 See the big note in ../ChangeLog.
45 * human.c (suffixes): Prefer K to k for 1024.
46 (generate_suffix_backwards): New function.
47 (human_readable_inexact): Use it.
48 * xstrtol.c (__xstrtol): If there is no number but there
49 is a valid suffix, assume 1. "MB" now means decimal, "MiB" binary.
50 Accept 'K' as well as 'k'.
52 2001-12-15 Jim Meyering <meyering@lucent.com>
54 * regex.h (__restrict_arr): Update from libc.
56 * mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
57 as `remote' if the name starts with `//'. Suggested by Michael Stone.
60 2001-12-10 Jim Meyering <meyering@lucent.com>
62 * linebuffer.c: Remove explicit declarations of xmalloc and xrealloc,
63 Instead, include "xalloc.h".
64 (initbuffer): Don't cast xmalloc return value to char*.
65 (readline): Reword comment.
66 Don't cast xrealloc return value to char*
69 2001-12-09 Jim Meyering <meyering@lucent.com>
71 * modechange.c (mode_compile): Add cast to avoid pedantic warning about
72 `signed and unsigned type in conditional expression'.
73 * posixtm.c (posix_time_parse): Likewise.
75 * xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
77 * readtokens.c (readtoken): Declare an index to be of type unsigned
78 to avoid a pedantic warning.
80 * getstr.c: Don't include assert.h.
81 (getstr): Remove warning-evoking assertions.
82 Return -1 if offset parameter is out of bounds.
83 Change the type of a local from int to size_t.
85 * strftime.c (my_strftime_localtime_r): Include this function
86 definition in the `#if ! HAVE_TM_GMTOFF' block.
88 * xgethostname.c: Remove declarations of xmalloc and xrealloc.
89 Include xalloc.h instead.
91 2001-12-02 Jim Meyering <meyering@lucent.com>
93 * tempname.c: Don't declare getenv, thus reverting the change of
94 2001-11-18. It's no longer necessary, now that stdlib.h is always
97 * regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
98 __unbounded, and __ptrvalue. Reported by Uwe H. Steinfeld.
100 2001-11-30 Akim Demaille <akim@epita.fr>
102 * xstrdup.c: Include xalloc.h, so that xstrdup is declared
103 before being defined.
105 2001-11-27 Paul Eggert <eggert@twinsun.com>
107 * quotearg.h (quotearg_n, quotearg_n_style):
108 First arg is int, not unsigned.
109 * quotearg.c (quotearg_n, quotearg_n_style): Likewise.
110 (SIZE_MAX, UINT_MAX): New macros.
111 (quotearg_n_options): Abort if N is negative.
112 Avoid overflow check on hosts where size_t is 64 bits and int
113 is 32 bits, as overflow is impossible there.
114 Fix off-by-one typo that caused unnecessary reallocation.
116 2001-11-27 Jim Meyering <meyering@lucent.com>
118 * tempname.c: Merge with version from libc.
121 * tempname.c: Include stdlib.h unconditionally. On some old systems
122 for which STDC_HEADERS is 0, it was not included, resulting in a
123 warning about an integer-to-pointer conversion problem with getenv.
124 Reported by Volker Borchert.
126 2001-11-26 Jim Meyering <meyering@lucent.com>
128 * gtod.h: Remove file.
129 * Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
130 * gettimeofday.c: Don't include gtod.h.
131 (GTOD_init): Remove function.
132 (rpl_gettimeofday): Do its job here instead, rather than aborting.
133 Suggestion from Volker Borchert.
135 2001-11-23 Jim Meyering <meyering@lucent.com>
137 * hash.h (struct hash_table): Don't define here. Merely declare it.
138 * hash.c (struct hash_table): Define it here instead.
140 2001-11-22 Jim Meyering <meyering@lucent.com>
142 * hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
144 2001-11-18 Paul Eggert <eggert@twinsun.com>
146 * tempname.c (TMP_MAX): Remove; no longer needed.
147 (TEMPORARIES): New macro.
148 (__gen_tempname): Use TEMPORARIES rather than TMP_MAX. This
149 removes an artificial limitation (e.g. HP-UX 10.20, where
152 2001-11-18 Jim Meyering <meyering@lucent.com>
154 * tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
157 * Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
158 files will be created before anything else.
160 2001-11-17 Jim Meyering <meyering@lucent.com>
162 * modechange.c (mode_adjust): Fix error introduced on 1999-04-26
163 that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
164 rather than group writable. Patch by Juan F. Codagnone.
166 * readtokens.c: Remove explicit declarations of xmalloc and xrealloc,
167 Instead, include "xalloc.h".
169 * mountlist.c: Include unlocked-io.h after all system headers.
170 Remove explicit declarations of xmalloc, xrealloc,
171 and xstrdup. Instead, include "xalloc.h".
173 * argmatch.c, closeout.c, error.c, exclude.c: Include unlocked-io.h.
174 * fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c: Likewise.
175 * mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
177 * regex.c, sha.c, version-etc.c, yesno.c: Likewise.
178 Reported by Padraig Brady.
180 * mkstemp.c: #undef mkstemp.
182 (rpl_mkstemp): Rename from mkstemp.
185 2001-11-16 Jim Meyering <meyering@lucent.com>
187 * physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
188 (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
189 determine the amount of total physical memory, use pstat_getstatic.
190 HPUX-11 doesn't define _SC_PHYS_PAGES.
191 (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
192 If sysconf couldn't be used to determine the amount of available
193 physical memory, use both pstat_getstatic and pstat_getdynamic.
194 Based on a patch from Bob Proulx.
196 2001-11-05 Jim Meyering <meyering@lucent.com>
198 * xstat.in (slash_aware_lstat): Correct a misleading comment.
200 2001-11-03 Jim Meyering <meyering@lucent.com>
202 * argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
203 in argmatch_to_argument call.
205 * dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
208 * hash.c (hash_clear): Fix a bug that could lead to an infloop or
209 e.g., a fault due to an attempt to free a NULL pointer.
211 2001-11-01 Jim Meyering <meyering@lucent.com>
213 * dirfd.c, dirfd.h: New files.
214 * Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
216 * hash.c (hash_print) [TESTING]: Clean up.
218 2001-10-22 Paul Eggert <eggert@twinsun.com>
220 * hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
221 to avoid a warning if -Wall.
223 2001-10-21 Paul Eggert <eggert@twinsun.com>
225 * regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
227 2001-10-21 Jim Meyering <meyering@lucent.com>
229 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
230 this code would end up calling gettext even in packages built
232 * getopt.c (_): Likewise.
233 * regex.c (_): Likewise.
235 2001-10-20 Paul Eggert <eggert@twinsun.com>
237 * error.c (strerror_r): Do not declare unless !_LIBC.
238 Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
239 Use strerror_r that is only a macro, even if it is not a function.
240 (strerror): Check for HAVE_DECL_STRERROR before declaring.
241 (private_strerror): Use prototypes, not old-style function definition.
242 (print_errno_message): New function.
243 Support the POSIX 'int'-flavored strerror_r, as well as the traditional
245 (error_tail, error, error_at_line): Use it.
247 2001-10-11 Jim Meyering <meyering@lucent.com>
249 * argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
250 and quote_n (1, ... to avoid clobbering a buffer.
252 2001-10-05 Jim Meyering <meyering@lucent.com>
254 * Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and hash-pjw.h.
255 * hash-pjw.c: New file (factored out of fileutils' remove.c).
256 * hash-pjw.h: New file.
258 2001-09-30 Jim Meyering <meyering@lucent.com>
260 * mountlist.c [MOUNTED_GETFSSTAT]:
261 Include <sys/ucred.h>, for Apple Darwin.
262 Include sys/mount.h and sys/fs_types.h only if available.
264 (read_filesystem_list): Use FS_TYPE.
266 2001-09-29 Paul Eggert <eggert@twinsun.com>
268 * exclude.c (excluded_filename): 0 -> false, since it's
271 2001-09-28 Paul Eggert <eggert@twinsun.com>
273 Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
274 #defines strtoimax. Also treat the other strto* functions
277 * xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
278 (strtoul): Do not declare if HAVE_DECL_STRTOUL.
279 (strtoimax, strtoumax): Do not declare if already defined as a macro.
281 2001-09-26 Jim Meyering <meyering@lucent.com>
283 Most macros in unlocked-io.h had the wrong number of arguments.
284 * gen-uio: New script.
285 (USE_UNLOCKED_IO): Define to 1 if not already defined.
286 * unlocked-io.hin: Remove file.
287 * Makefile.am (unlocked-io.h): Rewrite to use a separate script,
288 rather than trying to embed it here.
289 (EXTRA_DIST): Add gen-uio. Remove unlocked-io.hin
290 Reported by Padraig Brady.
292 2001-09-25 Volker Borchert <bt@teknon.de>
294 * gettimeofday.c (rpl_gettimeofday): Declare local variable `result'.
296 2001-09-23 Jim Meyering <meyering@lucent.com>
298 * mountlist.c: Remove useless parentheses in #if directives.
299 (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
300 the deprecated MOUNTED symbol is no longer defined in mntent.h.
302 2001-09-22 Jim Meyering <meyering@lucent.com>
304 * localcharset.c: Update from latest gettext.
305 * config.charset: Likewise.
307 2001-09-20 Jim Meyering <meyering@lucent.com>
309 * xstrtol.c (strtoimax): Guard declaration with
310 `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
311 The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
312 have their own, conflicting declaration of strtoimax in sys/inttypes.h.
313 (strtoumax): Likewise, for completeness (it wasn't necessary).
315 2001-09-06 Paul Eggert <eggert@twinsun.com>
317 * strtoimax.c (HAVE_LONG_LONG):
318 Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
319 (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
320 to work around bug in IBM C compiler.
322 2001-09-16 Jim Meyering <meyering@lucent.com>
326 2001-09-04 Paul Eggert <eggert@twinsun.com>
328 * xgetcwd.c: Revert some of the previous change; intead,
329 fix the HAVE_GETCWD_NULL code to behave more like the
330 !HAVE_GETCWD_NULL code used to.
333 (xgetcwd): Do not return NULL when memory is exhausted; instead,
336 2001-09-04 Paul Eggert <eggert@twinsun.com>
338 * xreadlink.c (xreadlink): Omit size_t* arg. All uses changed.
339 Use ssize_t, not int, to store result of readlink.
340 Check for ssize_t overflow as well as size_t overflow,
341 as POSIX says the result of readlink is implementation-defined
342 when ssize_t overflows.
343 Remove unnecessary cast to char*.
344 Use free+malloc instead of realloc, as the storage doesn't need
345 to be preserved and it's clearer and can be more efficient that way.
346 (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
347 * xreadlink.h (xreadlink): Update prototype.
349 2001-09-03 Paul Eggert <eggert@twinsun.com>
351 * exclude.c (fnmatch_no_wildcards): Fix confusion between
352 usage of FNM_CASEFOLD and FNM_LEADING_DIR. The bug was
353 spotted by Jim Meyering.
355 2001-09-03 Jim Meyering <meyering@lucent.com>
357 * xreadlink.c (xreadlink): Preserve errno around `free' during failure.
359 2001-09-03 Paul Eggert <eggert@twinsun.com>
361 * xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
362 like the HAVE_GETCWD_NULL code.
363 Include pathmax.h if not HAVE_GETCWD.
364 Do not include xalloc.h.
365 (INITIAL_BUFFER_SIZE): New symbol.
366 Do not use xmalloc / xrealloc, since the caller is responsible for
367 handling errors. Preserve errno around `free' during failure.
368 Do not overrun buffer when using getwd.
370 2001-09-03 Paul Eggert <eggert@twinsun.com>
372 * xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
373 __GLIBC__ && __GLIBC__ >= 2), to decide whether to use getcwd (NULL, 0).
375 2001-09-02 Jim Meyering <meyering@lucent.com>
377 * error.c: Update from GNU libc.
379 2001-09-01 Jim Meyering <meyering@lucent.com>
381 * xreadlink.c: New file.
382 * xreadlink.h: New file.
383 * Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and xreadlink.h.
385 * regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
386 doesn't conflict with sparc-sun-solaris2.7's definition in
387 /usr/include/sys/int_types.h.
389 * exclude.c: Use `""', not `<>' to #include non-system header files.
390 (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
391 and strncasecmp as r-values. Unixware didn't have declarations.
393 2001-08-31 Jim Meyering <meyering@lucent.com>
395 * xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
396 Use an initial, malloc'd, buffer of length 128 rather than
397 a statically allocated one of length 1024.
399 2001-08-30 Paul Eggert <eggert@twinsun.com>
401 * xgetcwd.c: Don't include pathmax.h.
402 Include stdlib.h and unistd.h if available.
404 (xmalloc, xstrdup, free): Remove decls.
405 (xgetcwd): Don't assume sizes fit in unsigned.
406 Check for overflow when computing sizes.
407 Simplify reallocation code.
409 2001-08-28 Paul Eggert <eggert@twinsun.com>
411 * Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
413 * strtoimax.c: Renamed from strtoxmax.c, removing the
416 Also, make the following further changes to make this file's
417 configuration more similar to that of strtol.c:
418 (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
419 (strtoumax, uintmax_t, strtoull, strtol): Remove.
420 (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
421 (strtoimax): Renamed from strtoumax. All uses of unsigned values
422 changed to signed values.
424 And make the following changes as well:
425 Fix copyright notice, as 1999 was missing.
427 (strtoimax): Check sizes at compile-time, not run-time.
428 Prefer strtol to strtoll if both work.
429 (main): Remove; it was not that useful and was a pain to maintain.
431 * strtoumax.c: Include strtoimax.c, not strtouxmax.c.
433 2001-08-30 Paul Eggert <eggert@twinsun.com>
435 * savedir.c (savedir): Remove size parameter, as POSIX says that
436 a directory's st_size can have an arbitrary value, so the old
437 usage could waste an arbitrary amount of memory. All uses
439 * savedir.h: Update prototype.
441 2001-08-30 Paul Eggert <eggert@twinsun.com>
443 * xstrtol.c (strtoimax): New decl.
445 2001-08-28 Paul Eggert <eggert@twinsun.com>
447 * xstrtol.h: Add copyright notice.
448 (_DECLARE_XSTRTOL): Improve quality of diagnostic for
449 LONGINT_INVALID_SUFFIX_CHAR.
451 2001-08-30 Paul Eggert <eggert@twinsun.com>
453 * quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
456 2001-08-30 Paul Eggert <eggert@twinsun.com>
458 * hash.c: Remove '2001' from copyright notice.
460 2001-08-30 Paul Eggert <eggert@twinsun.com>
462 * full-write.h: New file.
463 * Makefile.am (libfetish_a_SOURCES): Add full-write.h.
464 * full-write.c: Correct credits, as cccp.c no longer
465 exists and anyway it was so heavily changed from the old cccp
466 code as to be unrecognizable. Include full-write.h.
467 (full_write) Return size_t, with short writes meaning failure.
468 All callers changed. This fixes a bug with large buffers
470 * utime.c: Include full-write.h.
472 2001-08-30 Paul Eggert <eggert@twinsun.com>
474 Merge 'exclude' changes from tar 1.13.22.
475 This fixes one or two unlikely storage allocation overflow bugs,
476 but doesn't change user-visible behavior otherwise.
478 2001-08-30 Paul Eggert <eggert@twinsun.com>
480 * exclude.c (bool): Declare, perhaps by including stdbool.h.
481 (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
482 (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
483 Include if available.
484 (<xalloc.h>): Include
485 (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
486 (verify): New macro. Use it to verify that EXCLUDE macros do not
487 collide with FNM macros.
488 (struct patopts): New struct.
489 (struct exclude): Use it, as exclude patterns now come with options.
490 (new_exclude): Support above changes.
491 (new_exclude, add_exclude_file):
492 Initial size must now be a power of two to simplify overflow checking.
493 (free_exclude, fnmatch_no_wildcards): New function.
494 (excluded_filename): No longer requires options arg, as the options
495 are determined by add_exclude. Now returns bool, not int.
496 (excluded_filename, add_exclude):
497 Add support for the fancy new exclusion options.
498 (add_exclude, add_exclude_file): Now takes int options arg.
499 Check for arithmetic overflow when computing sizes.
500 (add_exclude_file): xrealloc might modify errno, so don't
501 realloc until after errno might be used.
503 * exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
505 (free_exclude): New decl.
506 (add_exclude, add_exclude_file): Now takes int options arg.
507 (excluded_filename): No longer requires options arg, as the options
508 are determined by add_exclude. Now returns bool, not int.
510 2001-08-30 Paul Eggert <eggert@twinsun.com>
512 * alloca.c (alloca): Arg is of type size_t, not unsigned.
514 2001-08-27 Jim Meyering <meyering@lucent.com>
516 * Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
518 * version-etc.c (N_): Remove definition.
519 Revert most of last change.
520 Instead, simply don't mark the `Copyright...' string for translation.
521 Based on advice from Paul Eggert.
523 * strtoxmax.c: Tweak comment.
525 2001-08-26 Jim Meyering <meyering@lucent.com>
527 * version-etc.c (version_etc_copyright_fmt): Replace literal year
528 of copyright with `%s' so translators don't get an untranslated
530 (COPYRIGHT_YEAR): Define.
531 (version_etc): Use fprintf rather than fputs.
532 Suggestion from Ulrich Drepper.
534 * Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
536 * strtoll.c: New file, from GNU libc.
537 * xstrtoimax.c: New file.
539 * xstrtol.h: Add xstrtoimax.
540 * strtoumax.c: New file. Simply include "strtoumax.c".
541 * strtoimax.c: New file. Likewise, but first define STRTOUXMAX_SIGNED.
543 * strtoumax.c: Factor to work both for unsigned and signed types, ...
544 * strtoxmax.c: ... then renamed to this.
546 2001-08-13 Paul Eggert <eggert@twinsun.com>
548 * Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
549 Port to Solaris 8, where 'sed' requires a space after the 'r'
550 command, and where sh dislikes "$/". Clean up the spacing a bit.
551 Redirect output to $tmp just once.
553 2001-08-12 Paul Eggert <eggert@sic.twinsun.com>
555 * addext.c (<errno.h>): Include.
556 (errno): Declare if not defined.
557 (addext): Work correctly when pathconf returns -1 and leaves
558 errno alone because there is no limit. Also, work even if
559 pathconf returns a value greater than SIZE_MAX.
561 2001-08-12 Jim Meyering <meyering@lucent.com>
563 * xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
564 Simply `return getcwd (NULL, 0);'.
565 [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
566 Use 1300 as initial value for length, not PATH_MAX.
568 * pathmax.h: Clean up cpp syntax.
570 2001-08-12 Jim Meyering <meyering@lucent.com>
572 * gettimeofday.c: New file.
574 * Makefile.am (libfetish_a_SOURCES): Add gtod.h.
576 2001-08-04 Jim Meyering <meyering@lucent.com>
578 * error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if stmt,
579 to get in sync with glibc.
581 2001-08-03 Paul Eggert <eggert@twinsun.com>
583 The following changes are from gettext 0.10.39 as maintained by
586 * mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
587 Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
588 with inverted sense. All uses changed.
590 * mbswidth.c: Don't include <limits.h>.
591 Include <stdlib.h> and <string.h> unconditionally.
592 (iswcntrl, mbsinit, ISCNTRL): New macros.
593 (mbsnwidth): Use K&R style function declarations.
594 Don't bother checking for MB_LEN_MAX == 1, since the compiler
595 can optimize it when MB_CUR_MAX == 1.
596 The width of control characters is zero, not 1.
598 2001-07-15 Jim Meyering <meyering@lucent.com>
600 * Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
601 (BUILT_SOURCES): Add unlocked-io.h.
602 (io_functions): Define.
603 (unlocked-io.h): New rule.
604 (DISTCLEANFILES): Add unlocked-io.h.
605 (all-local): Depend on unlocked-io.h, to ensure it is created.
607 * unlocked-io.hin: New file
609 * regex.c: Update from glibc.
611 2001-07-05 Jim Meyering <meyering@lucent.com>
613 * Makefile.am (noinst_HEADERS): Remove definition, per new automake
615 (libfetish_a_SOURCES): Put all .h files here instead.
616 Remove a thus-exposed (better checks in automake) duplicate and
617 two unnecessary .h files.
619 2001-06-11 Jim Meyering <meyering@lucent.com>
621 * regex.c: Update from GNU libc.
623 2001-05-27 Jim Meyering <meyering@lucent.com>
625 * readutmp.h (UT_TYPE): Define.
627 2001-05-24 Jim Meyering <meyering@lucent.com>
629 * argmatch.c: Include "quote.h".
630 (argmatch_invalid): Remove explicit `' quotes. Instead, use the
631 quote function. Reported by Göran Uddeborg.
633 2001-05-20 Alexandre Duret-Lutz <duret_g@epita.fr>
635 * dirname.c (dir_name): Compute append_dot using path, not newpath
636 which is not yet declared.
638 2001-05-11 Paul Eggert <eggert@twinsun.com>
640 * Makefile.am (libfetish_a_SOURCES):
641 Add strftime.c, since we now compile it on all hosts.
643 * strftime.c (my_strftime):
644 Define to nstrftime if emacs, but only if my_strftime is not defined.
645 (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
646 ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
647 Add one more extra argument: a nanoseconds value.
650 (my_strftime function): Add %N format.
651 (emacs_strftimeu): Renamed from emacs_strftime,
652 with extra ut argument.
654 2001-05-11 Paul Eggert <eggert@twinsun.com>
656 dirname code cleanup. base_name now behaves more compatibly
657 with POSIX basename when given file names that have trailing
658 slashes, and similarly for dir_name. Add new primitives
659 base_len and dir_len. Put the directory-name-related decls
662 * addext.c (ISSLASH, base_name): Remove; now in dirname.h.
663 * backupfile.c (base_name): Likewise.
664 * basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
665 * dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
666 * makepath.c (strip_trailing_slashes): Likewise.
667 * path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN, ISSLASH):
669 * rename.c (strip_trailing_slashes): Likewise.
670 * same.c (base_name): Likewise.
671 * stripslash.c (ISSLASH): Likewise.
673 * addext.c: Include <dirname.h> after size_t is defined.
674 * backupfile.c: Likewise.
676 * addext.c (addext): Use base_len to trim redundant
677 trailing slashes instead of doing it ourselves.
678 But do not trim the last slash if it is not redundant.
680 * backupfile.c (find_backup_file_name,
681 max_backup_version): Use base_len instead of rolling it ourselves.
682 Handle the case of "" and (on DOS) "C:" correctly.
684 * basename.c: Do not include <stdio.h>, <assert.h>; no longer needed.
685 Include <string.h>, <dirname.h>.
686 (base_name): Allow file names ending in slashes, other than names
687 that are all slashes. In this case, return the basename followed
688 by the slashes. This is more general, and can be used in places
689 where the original base_name purposely had an assertion failure.
690 (base_len): New function.
692 * dirname.c: Include <string.h> instead of <stdlib.h>.
693 Do not include <assert.h>; no longer needed.
695 (memrchr): Remove decl.
696 (dir_name_r): Remove.
697 (dir_len): Renamed from dirlen. All callers changed.
698 Rewrite in terms of base_name, for simplicity and consistency.
699 (dir_name): Never return NULL. All callers changed.
700 Do not include <stdlib.h> in test program; no longer needed.
701 return 0; is fine for test program.
703 * dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
705 (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
707 * path-concat.c (path_concat): Use base_len to compute
708 base length, not strlen; this means we cannot rely on memcpy
711 * same.c (STREQ): Remove.
712 (same_name): Handle the case where the basename ends in trailing '/'.
714 * stripslash.c (strip_trailing_slashes): Return nonzero if
715 a slash was stripped. Do not strip the last slash after a
718 2001-04-08 Jim Meyering <meyering@lucent.com>
720 * getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
721 recomputed; that's necessary when the offset spans a DST transition.
722 Patch by David J. MacKenzie. Reported by Hon-Yin Kok.
724 2001-04-02 Jim Meyering <meyering@lucent.com>
726 * regex.h, regex.c: Update from GNU libc.
728 2001-03-19 Paul Eggert <eggert@twinsun.com>
730 * version-etc.c (version_etc_copyright): Update to 2001.
732 2001-03-16 Paul Eggert <eggert@twinsun.com>
734 * tempname.c (uint64_t): Define to uintmax_t if
735 not defined, and if UINT64_MAX is not defined.
736 Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
737 Reported by John David Anglin.
739 2001-03-10 Bruno Haible <haible@clisp.cons.org>
741 * localcharset.c (locale_charset): Allow wildcard syntax. Also resolve
742 alias if codeset is empty.
743 * config.charset (BeOS): Use wildcard syntax.
745 2001-03-13 Jim Meyering <meyering@lucent.com>
747 * path-concat.c (path_concat) [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]:
748 Don't insert a backslash when concatenating e.g., `C:' and `foo'.
751 2001-03-06 Bruno Haible <haible@clisp.cons.org>
753 * localcharset.c (locale_charset): Don't use setlocale(LC_CTYPE,NULL).
755 * unicodeio.c (print_unicode_char): Simplify accordingly.
757 2001-03-06 Bruno Haible <haible@clisp.cons.org>
759 * config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
760 support for DOS/DJGPP.
762 2001-02-28 Paul Eggert <eggert@twinsun.com>
764 * Makefile.am (libfetish_a_SOURCES):
765 Add dup-safer.c, fopen-safer.c.
766 (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
768 * dup-safer.c, fopen-safer.c, stdio-safer.h, unistd-safer.h: New files.
770 2001-02-25 Paul Eggert <eggert@twinsun.com>
772 The mkstemp replacement is taken from glibc 2.2.2, with some
773 portability fixes for use outside glibc, as follows:
775 * tempname.c (struct_stat64): New macro.
776 (direxists, __gen_tempname): Use it.
777 This avoids a portability problem with Solaris 8.
779 * tempname.c (<config.h>): Include if HAVE_CONFIG_H.
780 (<stddef.h>, <stdint.h>, <string.h>):
781 Include only if STDC_HEADERS || _LIBC.
782 (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
783 (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
784 (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
785 (__set_errno): Define this macro if <errno.h> doesn't.
786 (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
787 Define these macros if <stdio.h> doesn't.
788 (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
789 Define these macros if <sys/stat.h>
790 doesn't. Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
791 (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
792 __xstat64): Define if not _LIBC.
793 (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
794 (__gen_tempname): Invoke gettimeofday only if
795 HAVE_GETTIMEOFDAY || _LIBC;
796 otherwise, fall back on plain "time".
797 Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
799 * mkstemp.c (__GT_FILE): Define to zero if not defined.
801 * mkstemp.c, tempname.c: New files, taken from glibc 2.2.2.
803 2001-02-17 Jim Meyering <meyering@lucent.com>
805 * strtoul.c: Sync from GNU libc. Use double quotes, not <...>
806 around included file name.
808 * strnlen.c (__strnlen): Merge in a change from GNU libc.
810 * strftime.c: Update from GNU libc (the only changes were to comments).
812 2001-02-13 Bruno Haible <haible@clisp.cons.org>
814 * mbswidth.h (mbswidth): Also define as macro, to avoid prototype clash.
816 2001-02-17 Paul Eggert <eggert@twinsun.com>
818 * mbswidth.c, quotearg.c (mbrtowc, mbsinit):
819 Remove workaround macros for hosts that have mbrtowc but not
820 mbstate_t, as we now insist on proper declarations for both
821 before using mbrtowc.
823 2001-02-17 Jim Meyering <meyering@lucent.com>
825 * regex.c: Update from libc.
827 2001-02-16 Paul Eggert <eggert@twinsun.com>
829 * alloca.c (malloc): Undef before defining, since stdlib.h
830 may have defined it. Needed for Encore Umax-3.0.9.16b systems.
831 Reported by Mark Hounschell via Paul Eggert.
833 2001-01-30 Bruno Haible <haible@clisp.cons.org>
835 * config.charset: Update for FreeBSD 4.2.
837 2001-01-26 Jim Meyering <meyering@lucent.com>
839 * quotearg.c: Include stddef.h.
840 * quote.c: Include stddef.h.
841 Reported by Axel Kittenberger.
843 * xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
844 line in double quotes so that it evokes a better diagnostic.
845 [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
846 Reported by Axel Kittenberger.
848 2001-01-15 Bruno Haible <haible@clisp.cons.org>
850 * unicodeio.c (print_unicode_char): Cast the second iconv() arg,
851 to avoid a warning. Add back 'const' to inptr.
853 2001-01-16 Jim Meyering <meyering@lucent.com>
855 * basename.c: Include <stdio.h>, needed by assert on SunOS4.
858 2001-01-14 Jim Meyering <meyering@lucent.com>
860 * rename.c: New file. From Volker Borchert.
861 Include stdlib.h, string.h or strings.h, and xalloc.h.
862 Use strip_trailing_slashes rather than open-coding it.
864 2001-01-03 Paul Eggert <eggert@twinsun.com>
866 * strftime.c: Sync with glibc time/strftime.c 1.81.
868 2001-01-03 Jim Meyering <meyering@lucent.com>
870 * unicodeio.c (print_unicode_char): Remove `const' from declaration of
871 local `inptr' to avoid warning with some system declarations of iconv.
873 2000-12-29 Paul Eggert <eggert@twinsun.com>
875 * modechange.c: Do not assume that mode_t uses the
876 traditional octal encoding. E.g. "chmod 1 FOO" should set
877 the other-execute bit of FOO even if S_IXOTH != 1.
879 (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
880 WOTH, XOTH, ALLM): New macros.
881 (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
882 S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
884 (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
885 (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
887 No need to use uintmax_t; unsigned long is long enough.
888 Don't bother to get suffix since we don't use it.
890 2000-12-24 Jim Meyering <meyering@lucent.com>
892 * hash.c (is_prime): Return explicit boolean values.
893 (hash_get_first): Return NULL to appease Irix5.6's 89.
894 Reported by Nelson Beebe.
896 2000-10-31 Bruno Haible <haible@clisp.cons.org>
898 * localcharset.c (locale_charset): Add support for Win32.
900 2000-12-18 Paul Eggert <eggert@twinsun.com>
902 * physmem.h, physmem.c: New files.
904 * Makefile.am (libfetish_a_SOURCES): Add physmem.c.
905 (noinst_HEADERS): Add physmem.h.
907 * xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
908 't' for compatibility with Solaris 8 sort.
910 2000-12-18 Bruno Haible <haible@clisp.cons.org>
912 * config.charset: Add support for BeOS.
914 2000-12-16 Jim Meyering <meyering@lucent.com>
916 * getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
917 SHELLS_FILE to a file name that's useful on djgpp systems.
919 (ADDITIONAL_DEFAULT_SHELLS): Define.
920 (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
921 Based mostly on a patch from Prashant TR.
923 2000-12-16 Jim Meyering <meyering@lucent.com>
925 This bug had a serious impact on chown: `chown N:M FILE' (for integer
926 N and M) would have treated it like `chown N:N FILE'.
928 * userspec.c (parse_user_spec): Fix typo: s/u/g/.
930 2000-10-31 Bruno Haible <haible@clisp.cons.org>
932 * config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB, VISCII,
933 CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256, CP1257
934 to the list of canonical encodings. Rename EUC-CN to GB2312.
936 2000-12-08 Andreas Schwab <schwab@suse.de>
938 * mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
939 invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
941 2000-12-07 Jim Meyering <meyering@lucent.com>
943 * stripslash.c (ISSLASH): Define.
944 (strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
947 * dirname.c (FILESYSTEM_PREFIX_LEN): Define.
948 (dir_name_r): Declare this function as static.
949 [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
950 manifest itself on a name containing a mix of slashes and
952 Make this function work with names starting with a DOS-style
953 drive letter and colon prefix.
954 (dir_name): Append `.' if necessary.
955 Based mostly on patches from Prashant TR and Eli Zaretskii.
957 * dirname.h (dir_name_r): Remove prototype.
959 2000-12-05 Jim Meyering <meyering@lucent.com>
961 * dirname.c (dir_name_r): Add `const' in a few local declarations.
963 2000-12-04 Jim Meyering <meyering@lucent.com>
965 * path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
966 Also include memory.h, stdlib.h, unistd.h if appropriate.
967 Reported by Andreas Jaeger (conflicting declaration of malloc).
969 2000-12-02 Jim Meyering <meyering@lucent.com>
971 * closeout.h: Make idempotent, to avoid some obscure warnings.
973 2000-12-01 Paul Eggert <eggert@twinsun.com>
975 * memrchr.c: Include <config.h> before any system include file.
977 2000-11-29 Paul Eggert <eggert@twinsun.com>
979 * dirname.c (dir_name_r): Fix typo: int -> size_t.
981 2000-11-26 Jim Meyering <meyering@lucent.com>
983 * memcoll.c: Include sys/types.h. From Werner Almesberger.
985 2000-11-22 Paul Eggert <eggert@twinsun.com>
987 * strftime.c (my_strftime): Do not invoke mbrlen with a
988 size of (size_t) -1; it's not portable.
990 2000-11-17 Akim Demaille <akim@epita.fr>
992 * obstack.h: Formatting changes.
993 (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
994 prevent type checking.
995 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
996 cast the value to (void *): assigning a `foo *' to a `void *'
998 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
1000 2000-11-17 Jim Meyering <meyering@lucent.com>
1002 * strstr.c: Update from GNU libc.
1004 2000-11-16 Jim Meyering <meyering@lucent.com>
1006 * strverscmp.c: Incorporate weak-alias-related changes from glibc.
1008 2000-11-11 Jim Meyering <meyering@lucent.com>
1010 * error.c: Add a couple #includes, merging from GNU libc version.
1012 2000-11-10 Jim Meyering <meyering@lucent.com>
1014 * obstack.h: Update from GNU libc.
1015 * obstack.c: Likewise.
1017 2000-11-06 Paul Eggert <eggert@twinsun.com>
1019 * getusershell.c (setusershell): Use rewind rather than
1020 fseek/fseeko, to avoid configuration hassles with fseeko.
1021 Don't bother opening SHELLS_FILE if shellstream is NULL;
1024 2000-11-05 Jim Meyering <meyering@lucent.com>
1026 * makepath.h (make_dir): Declare.
1027 * makepath.c (make_dir): Remove `static' attribute.
1030 2000-11-04 Alexandre Duret-Lutz <duret_g@epita.fr>
1032 * hash.c (hash_get_next): Fix a thinko: when ENTRY is the
1033 last one in a bucket, advance to the next bucket.
1035 2000-11-02 Vesselin Atanasov <vesselin@bgnet.bg>
1037 * fnmatch.c: Do not comment out all the code if we are using
1038 the GNU C library, because in some cases we are replacing buggy
1039 code in the GNU C library itself.
1041 2000-10-30 Paul Eggert <eggert@twinsun.com>
1043 * error.h, getline.h, modechange.h:
1044 Remove "2000" from Copyright line, as the file hasn't been
1045 changed this year other than in the copyright notice.
1047 * xalloc.h: Add "2000" to Copyright line, as this file
1048 was changed this year.
1050 2000-10-30 Paul Eggert <eggert@twinsun.com>
1052 * fnmatch.c (FOLD): Do not assume that characters are unsigned.
1053 (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
1054 e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
1056 2000-10-29 Greg Louis <glouis@dynamicro.on.ca>
1058 * regex.h (__restrict_arr): Move definition out of #ifndef block.
1059 Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
1060 doesn't define __restrict_arr.
1062 2000-10-29 Jim Meyering <meyering@lucent.com>
1064 * xstat.in: Fix grammar in comment.
1066 2000-10-28 Jim Meyering <meyering@lucent.com>
1068 * memchr.c: Update from libc.
1069 Adjust for portability:
1070 [HAVE_STDLIB_H]: Include stdlib.h.
1071 [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
1072 Undef __memchr, too.
1073 [!weak_alias]: Define __memchr to memchr.
1075 * regex.c: Update from libc.
1076 * regex.h: Likewise.
1077 * getopt1.c: Likewise.
1078 * memcmp.c: Likewise.
1080 * getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
1081 Avoid using fseek, when possible -- it's broken by design.
1082 Patch by Ulrich Drepper.
1084 2000-10-26 Jim Meyering <meyering@lucent.com>
1086 * strftime.c: Update from libc.
1088 2000-10-25 Jim Meyering <meyering@lucent.com>
1090 * obstack.c: Update from libc.
1092 2000-10-23 Jim Meyering <meyering@lucent.com>
1094 * hard-locale.c (hard_locale): Revert last change -- it was simply
1095 wrong. That set_locale call must not have any side effects.
1098 2000-10-22 Jim Meyering <meyering@lucent.com>
1100 * md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
1101 [CYCLIC]: Remove now-unused definition.
1103 * save-cwd.c (O_DIRECTORY): Define, if needed.
1104 (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
1105 Suggestion from Ulrich Drepper.
1107 2000-10-21 Jim Meyering <meyering@lucent.com>
1109 * dirname.c (dir_name_r): New function, factored out of dir_name.
1110 (dir_name): Use dir_name_r.
1111 * dirname.h (dir_name_r): Declare it.
1113 2000-10-21 Jim Meyering <meyering@lucent.com>
1115 * dirname.c (memrchr): Declare if necessary.
1116 (dir_name): Remove the restriction that there be no
1117 trailing slashes. Now, this code skips past them, effectively
1119 [TEST_DIRNAME] (main): New unit tests.
1121 * memrchr.c: New file from GNU libc.
1122 Undef __memrchr, too.
1123 [!weak_alias]: Define __memrchr to memrchr.
1124 Guard weak_alias use with `#ifdef weak_alias'.
1126 2000-10-17 Jim Meyering <meyering@lucent.com>
1128 * quote.h (PARAMS): Define and use.
1129 Reported by Akim Demaille.
1131 * getopt.c: Update from libc.
1133 2000-10-16 Jim Meyering <meyering@lucent.com>
1135 * hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to setlocale.
1138 2000-09-25 Jim Meyering <meyering@lucent.com>
1140 * md5.h (rol): Define (from GnuPG).
1142 * sha.c: Give credit (GnuPG) where due.
1143 (M): Use rol rather than open-coding it.
1144 Add a FIXME comment.
1146 2000-09-21 Jim Meyering <meyering@lucent.com>
1148 * userspec.c (parse_user_spec): Remove debugging printf I'd added.
1149 Reported by Michael Stone.
1151 2000-09-20 Jim Meyering <meyering@lucent.com>
1153 * Makefile.am (libfetish_a_SOURCES): Add sha.c.
1154 (noinst_HEADERS): Add sha.h.
1155 Based on code from Scott G. Miller and from GnuPG.
1157 2000-09-15 Jim Meyering <meyering@lucent.com>
1159 * regex.c: Update from libc.
1161 2000-09-10 Jim Meyering <meyering@lucent.com>
1163 * getopt.c (_getopt_internal): Update from glibc.
1165 2000-09-09 Jim Meyering <meyering@lucent.com>
1167 * quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
1168 think it should be used as a general replacement for isascii.
1169 * fnmatch.c: Likewise.
1170 * mbswidth.c: Likewise
1171 * regex.c: Likewise.
1174 * userspec.c: Include sys/param.h and limits.h.
1176 (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
1177 (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
1178 (parse_user_spec): Use xstrtoul, not atoi when converting numeric
1179 UID, GID. Check range.
1181 2000-09-06 Jim Meyering <meyering@lucent.com>
1183 * getopt.c (_getopt_internal): Update from glibc.
1185 2000-08-30 Jim Meyering <meyering@lucent.com>
1187 * strftime.c: Merge in changes from GNU libc.
1189 2000-08-26 Jim Meyering <meyering@lucent.com>
1191 * closeout.c: Include "__fpending.h".
1192 (close_stdout_status): Return right away if there's nothing to flush.
1194 * Makefile.am (noinst_HEADERS): Add __fpending.h.
1195 * __fpending.c: New file.
1196 * __fpending.h: New file.
1198 2000-08-07 Paul Eggert <eggert@twinsun.com>
1200 Standardize on "memory exhausted" instead of "Memory exhausted"
1201 or "virtual memory exhausted".
1202 * obstack.c (print_and_abort): Use "memory exhausted", not
1203 "virtual memory exhausted".
1204 * same.c (same_name): Invoke xalloc_die instead of printing
1206 * userspec.c (parse_user_spec): Likewise.
1207 * bumpalloc.h: comment fix
1208 * same.c, userspec.c: Include xalloc.h.
1210 * xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
1211 not char *const and pointing to a constant array.
1212 * xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
1213 (xrealloc): Comment fix.
1215 * userspec.c (parse_user_spec):
1216 Don't translate a message until just before returning,
1217 to avoid unnecessary translation.
1219 2000-08-07 Jim Meyering <meyering@lucent.com>
1221 * addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
1222 chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
1223 fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
1224 getgroups.c, gethostname.c, getopt.h, group-member.c,
1225 hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
1226 linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
1227 memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
1228 pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
1229 stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
1230 strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
1231 utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
1232 yesno.c: Back out Copyright date changes for each file with no change
1233 this year. This eases coordination with other programs using the same
1234 source code modules. From Paul Eggert.
1236 2000-08-03 Greg McGary <greg@mcgary.org>
1238 * regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
1239 ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
1240 (EXTEND_BUFFER): Use them.
1242 2000-08-01 Jim Meyering <meyering@lucent.com>
1244 * dirname.c (ISSLASH): Define.
1245 (BACKSLASH_IS_PATH_SEPARATOR): Define.
1246 (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
1247 both `\' and `/' may be use as path separators.
1248 Based on a patch from Prashant TR.
1250 2000-07-31 Paul Eggert <eggert@twinsun.com>
1252 * quotearg.c (quotearg_n_options): Don't make the initial
1253 slot vector a constant, since it might get modified.
1255 2000-07-31 Jim Meyering <meyering@lucent.com>
1257 * xmalloc.c: Use `virtual memory exhausted', not `Memory exhausted'.
1258 * obstack.c (print_and_abort): Likewise.
1260 2000-07-30 Paul Eggert <eggert@twinsun.com>
1262 * quotearg.c (quotearg_n_options): Preallocate a slot 0
1263 buffer, so that the caller can always quote one small
1264 component of a "memory exhausted" message in slot 0.
1265 From a suggestion by Jim Meyering.
1267 2000-07-30 Jim Meyering <meyering@lucent.com>
1269 * makepath.c (make_path): Quote the other instance, too.
1271 * quotearg.c (N_STATIC_SLOTVECS): Define.
1272 (STATIC_BUF_SIZE): Define.
1273 (quotearg_n_options): Use only statically allocated storage when
1274 N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
1275 than STATIC_BUF_SIZE.
1277 2000-07-29 Jim Meyering <meyering@lucent.com>
1279 * diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
1280 * dirname.c (dir_name): Likewise.
1282 * basename.c (base_name): Use ISSLASH rather than comparing against `/'.
1284 * dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
1285 (dir_name): Assert that there are no trailing slashes.
1287 2000-07-18 Bruno Haible <haible@clisp.cons.org>
1289 * mbswidth.h (mbswidth): Add a flags argument.
1290 (mbswidth): New declaration.
1291 (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
1292 * mbswidth.c (mbswidth): Add a flags argument.
1293 (mbsnwidth): New function.
1295 2000-07-24 Jim Meyering <meyering@lucent.com>
1297 * mbswidth.c: Remove useless #else. From Bruno Haible.
1299 2000-07-23 Paul Eggert <eggert@twinsun.com>
1301 * mbswidth.c (_XOPEN_SOURCE):
1302 Don't define; this causes problems on Solaris 7.
1303 (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
1305 2000-07-23 Paul Eggert <eggert@twinsun.com>
1308 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
1309 so that mbstate_t is always defined.
1311 Do not inspect MB_LEN_MAX, since it's incorrectly defined to
1312 be 1 in at least one GCC installation, and this configuration
1313 error is likely to be common. Ignoring MB_LEN_MAX hurts
1314 performance on hosts that have mbrtowc but have only unibyte
1315 locales, but I assume these hosts are rare.
1317 2000-07-23 Paul Eggert <eggert@twinsun.com>
1319 * quotearg.c: Streamline by invoking multibyte code only if needed.
1320 <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
1321 (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
1322 (quotearg_buffer_restyled): If a unibyte locale, don't bother to
1323 invoke multibyte primitives.
1325 2000-07-23 Jim Meyering <meyering@lucent.com>
1327 * basename.c (base_name): Add an assertion.
1329 2000-07-15 Bruno Haible <clisp.cons.org>
1331 * quotearg.c: When the system forces us to redefine mbstate_t,
1332 shadow its mbsinit function.
1334 2000-07-16 Bruno Haible <haible@clisp.cons.org>
1336 * mbswidth.h: New file.
1337 * mbswidth.c: New file.
1338 * Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
1339 (noinst_HEADERS): Add mbswidth.h.
1341 2000-07-17 Bruno Haible <haible@clisp.cons.org>
1343 * config.charset: Add support for FreeBSD. Improve support for HP-UX
1346 2000-07-15 Jim Meyering <meyering@lucent.com>
1348 * makepath.c: Include quote.h.
1349 (make_path): Convert "`%s'" in format strings to "%s", and wrap each
1350 corresponding argument in a `quote (...)' call.
1351 Give better diagnostics.
1353 * Makefile.am (libfetish_a_SOURCES): Add quote.c.
1354 (noinst_HEADERS): Add quote.h.
1356 * quote.c (quote, quote_n): New file. Two functions taken verbatim
1357 from tar's src/misc.c.
1358 * quote.h: New file. Prototypes for same.
1360 2000-07-10 Paul Eggert <eggert@twinsun.com>
1362 From a suggestion by Bruno Haible.
1363 * quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
1364 Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
1365 to decide whether to define the BeOS workaround macro;
1366 this adjusts to the change to AC_MBSTATE_T.
1368 2000-07-13 Paul Eggert <eggert@twinsun.com>
1370 * quotearg.h (enum quoting style): New enum clocale_quoting_style.
1372 * quotearg.c (quoting_style_args, quoting_style_vals,
1373 quotearg_buffer_restyled): Add support for
1374 clocale_quoting_style. Undo previous change to
1375 locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
1376 and "{RIGHT QUOTATION MARK}" msgids.
1378 2000-07-05 Paul Eggert <eggert@twinsun.com>
1380 The old behavior of quoting `like this' doesn't look good with
1381 newer, ISO-style fonts. See:
1382 http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
1384 Instead, quote "like this" by default. Let the translator
1385 tailor the locale-specific quoting behavior by providing
1386 translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
1388 * quotearg.c (N_): New macro.
1389 (gettext_default): New function.
1390 (quotearg_buffer_restyled): Use
1391 gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
1392 gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
1394 2000-07-09 Jim Meyering <meyering@lucent.com>
1396 * Most files: Update copyright dates to include 2000.
1398 2000-07-08 Jim Meyering <meyering@lucent.com>
1400 * xgethostname.c (ENAMETOOLONG): Define to an unlikely value
1402 (xgethostname): Remove now-unnecessary #ifdef.
1403 Move declaration of `err' into loop where it's used.
1405 2000-07-05 Bruno Haible <haible@clisp.cons.org>
1407 * xgethostname.c (xgethostname): Protect against the SunOS5.5 bug
1408 by allocating a larger buffer. Test the gethostname return value for
1409 being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
1410 returns an error and ENAMETOOLONG isn't defined.
1412 2000-07-05 Paul Eggert <eggert@twinsun.com>
1413 and Bruno Haible <haible@clisp.cons.org>
1415 * quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
1417 2000-07-05 Bruno Haible <haible@clisp.cons.org>
1419 * quotearg.c (struct quoting_options): Simplify quote_these_too
1422 2000-07-03 Jim Meyering <meyering@lucent.com>
1424 * strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
1425 Reported by Bruno Haible.
1427 2000-07-04 Jim Meyering <meyering@lucent.com>
1429 * quotearg.c: Make inclusion of <wchar.h> independent of whether
1430 HAVE_MBRTOWC is set. Required at least for irix-5.6, which
1433 2000-07-03 Paul Eggert <eggert@twinsun.com>
1434 and Bruno Haible <haible@clisp.cons.org>
1436 * quotearg.c (mbrtowc):
1437 Assign to *pwc, and return 1 only if result is nonzero.
1438 (iswprint): Use ISPRINT when substituting our own mbrtowc.
1440 2000-07-03 Jim Meyering <meyering@lucent.com>
1442 * readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
1443 This is necessary to get a definition of e.g., UTMP_FILE on HP-UX 10.20.
1446 2000-07-02 Jim Meyering <meyering@lucent.com>
1448 * quotearg.c (mbstate_t): Don't define here.
1450 2000-07-02 Jim Meyering <meyering@lucent.com>
1452 * nanosleep.c (SIGCONT): Define if not already defined.
1454 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1456 * mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
1457 per change in ../m4/ls-mntd-fs.m4.
1458 (read_filesystem_list): Ignore symbolic links.
1460 2000-06-29 Jim Meyering <meyering@lucent.com>
1462 * same.c: Include <string.h> or <strings.h>, as appropriate,
1463 for declaration of strcmp.
1465 * long-options.c: Include <stdlib.h>, for declaration of exit.
1467 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
1468 Avoid warning by casting result to `char *' to remove `const'.
1470 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1472 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
1474 2000-06-26 Paul Eggert <eggert@twinsun.com>
1476 savedir now sets errno on failure and invokes xmalloc to get memory.
1477 Fix a couple of other minor bugs while we're at it.
1479 * savedir.c (<unistd.h>): Do not include; there's no need.
1480 (NAMLEN): Remove macro.
1481 (malloc, realloc): Remove decls.
1483 ("xalloc.h"): Include.
1484 (NAME_SIZE_DEFAULT): New macro.
1485 (savedir): Use xmalloc / xrealloc to allocate memory.
1486 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
1487 Skip "" directory entries.
1488 Use strlen to calculate directory entry length, since the old method
1489 is rarely used these days and isn't worth supporting.
1490 Don't use a pointer after freeing it.
1491 Check for integer overflow when calculating allocation size.
1492 Use memcpy to copy entries, instead of stpcpy.
1493 Set errno properly when returning NULL.
1494 Check for readdir error.
1496 2000-06-26 Jim Meyering <meyering@lucent.com>
1498 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
1500 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1502 * getusershell.c (xmalloc, xrealloc): Remove functions.
1504 Don't include <stdlib.h>. Don't declare malloc, realloc.
1506 2000-06-23 Bruno Haible <haible@clisp.cons.org>
1508 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
1510 2000-06-24 Jim Meyering <meyering@lucent.com>
1512 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
1514 2000-06-21 Jim Meyering <meyering@lucent.com>
1516 * getpass.c: New file, from Bruno Haible. Required for BeOS.
1518 2000-06-19 Paul Eggert <eggert@twinsun.com>
1520 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
1521 (mbrtowc, mbstate_t): Define substitutes if
1522 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
1523 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
1524 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
1526 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1528 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
1529 than 1024, return a memory chunk of least possible size, instead
1530 of size PATH_MAX + 2. In the loop, increment the size proportionally.
1531 Use free/xmalloc instead of xrealloc to avoid copying for very long
1534 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1536 * canon-host.c (canon_host): Use malloc and memcpy to copy an
1537 address, not strdup. Include <stdlib.h> and don't declare free().
1539 2000-06-17 Bruno Haible <haible@clisp.cons.org>
1541 * path-concat.c (path_concat): Don't access dir[-1] if dir is
1544 2000-06-21 Jim Meyering <meyering@lucent.com>
1546 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
1547 (noinst_HEADERS): Add getstr.h.
1549 * getline.c (getstr): Move into a separate file.
1550 * getstr.c (getstr): New file, extracted from getline.c, with
1551 the following changes: new parameter, delim2; both delim[12]
1552 parameters have type `int', not `char'. The latter would lose
1553 with 8-bit delimiters.
1554 * getstr.h: New file.
1556 2000-06-19 Jim Meyering <meyering@lucent.com>
1558 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
1560 2000-06-18 Jim Meyering <meyering@lucent.com>
1562 * mkdir.c: Remove file, due mainly to copyright incompatibility.
1563 Besides, these days every porting target provides a mkdir function.
1565 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
1566 (this snippet comes from src/system.h).
1568 2000-06-15 Paul Eggert <eggert@twinsun.com>
1570 * human.c (adjust_value): New function.
1571 (human_readable_inexact): Apply rounding style even when
1572 printing approximate values.
1574 2000-06-14 Paul Eggert <eggert@twinsun.com>
1576 * human.c (human_readable_inexact): Allow an input block
1577 size that is not a multiple of the output block size, and vice versa.
1578 Reported by Piergiorgio Sartor.
1580 2000-06-14 Paul Eggert <eggert@twinsun.com>
1582 * getdate.y (get_date): Apply relative times after time
1583 zone indicator, not before. Reported by Todd A. Jacobs.
1585 2000-06-13 Jim Meyering <meyering@lucent.com>
1587 * Makefile.am (all-local): Depend on lstat.c and stat.c.
1589 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
1591 2000-06-12 Paul Eggert <eggert@twinsun.com>
1593 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
1595 2000-06-04 Paul Eggert <eggert@twinsun.com>
1597 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
1599 2000-06-04 Jim Meyering <meyering@lucent.com>
1601 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
1602 SunOS4.1.4 for which gid_t is an unsigned type.
1604 2000-06-03 Jim Meyering <meyering@lucent.com>
1606 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
1608 2000-05-26 Bruno Haible <haible@clisp.cons.org>
1610 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
1611 newer, don't install charset.alias.
1612 * config.charset: Change the Linux/glibc rules so they become empty
1613 on glibc-2.1 or newer.
1615 2000-06-02 Jim Meyering <meyering@lucent.com>
1617 * mountlist.c: Back out last change. Instead, do this...
1618 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
1619 member using the same `ignore'-testing code.
1620 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
1624 2000-05-29 Jim Meyering <meyering@lucent.com>
1626 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
1627 with the `ignore' attribute. Based on a patch from Mark D. Roth.
1629 2000-05-22 Jim Meyering <meyering@lucent.com>
1631 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
1633 2000-05-18 Jim Meyering <meyering@lucent.com>
1635 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
1636 back, too, since it may have been modified by allocate_entry.
1637 (hash_delete): Rewrite to use neither the assignment operator
1638 nor the comma operator in an if-expression.
1640 2000-05-15 Paul Eggert <eggert@twinsun.com>
1643 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
1644 Remove; no longer needed.
1645 "quotearg.h": Add include.
1646 (file_name): Do not bother to explicitly initialize to NULL; it's less
1647 efficient on some hosts.
1648 (close_stdout_status): Remove test as to whether stdout was already
1649 closed; it breaks for the case "echo x | sort >&-".
1650 Quote file name colons.
1651 Do not assume that _("write error") lacks format strings.
1653 2000-05-15 Jim Meyering <meyering@lucent.com>
1655 * version-etc.c (version_etc_copyright): Update the copyright string
1656 used in all --version output.
1658 2000-05-14 Jim Meyering <meyering@lucent.com>
1660 * closeout.c (close_stdout_set_file_name): New function.
1661 (close_stdout_status): Use new file-scoped global.
1662 Return right away if fstat says the stdout file descriptor is invalid.
1663 * closeout.h (close_stdout_set_file_name): Declare.
1665 2000-05-10 Jim Meyering <meyering@lucent.com>
1667 * closeout.c [default_exit_status]: New file-scoped variable.
1668 (close_stdout_set_status): New function.
1669 * closeout.h (close_stdout_set_status): Declare.
1671 2000-05-08 Jim Meyering <meyering@lucent.com>
1673 * long-options.c: Don't include closeout.h.
1674 (parse_long_options): Don't call close_stdout for --version.
1676 2000-05-06 Jim Meyering <meyering@lucent.com>
1678 * strnlen.c: Undefine __strnlen and strnlen.
1679 [!weak_alias]: Define __strnlen to strnlen.
1681 * atexit.c: New file, from libiberty.
1683 2000-05-06 Jim Meyering <meyering@lucent.com>
1685 * closeout.c (close_stdout_status): Also check for errors on the
1688 2000-05-05 Bruno Haible <haible@clisp.cons.org>
1690 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
1691 instead of xmalloc, xrealloc, path_concat.
1692 (locale_charset): Treat empty environment variables as absent.
1693 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
1695 2000-05-04 Jim Meyering <meyering@lucent.com>
1697 * getopt.c: Update from glibc.
1698 * obstack.c: Likewise.
1699 * obstack.h: Likewise.
1700 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
1702 * regex.h: Likewise.
1703 * strndup.c: Likewise.
1704 * strnlen.c: New file, from glibc.
1706 2000-05-01 Jim Meyering <meyering@lucent.com>
1708 * full-write.c (full_write): Remove `FIXME' part of comment.
1710 2000-04-29 Jim Meyering <meyering@lucent.com>
1712 * path-concat.c: Declare strdup only if it's not defined.
1713 * canon-host.c: Likewise.
1715 2000-04-28 Jim Meyering <meyering@lucent.com>
1717 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
1718 redefinition warning on some systems (HPUX). Otherwise, regex.h is
1719 included first, then limits.h is included by locale.h by libintl.h.
1720 From John David Anglin.
1722 2000-04-25 Jim Meyering <meyering@lucent.com>
1724 * makepath.c (S_IRWXUGO): Define.
1725 (make_path): Always perform explicit chmod if MODE specifies any
1726 of the `special' permission bits. Prompted by a bug report against
1727 install from Mate Wierdl and Joost van Baal.
1729 2000-04-18 Jim Meyering <meyering@lucent.com>
1733 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
1734 getpagesize. For BeOS. Based on a patch from Bruno Haible.
1736 2000-04-17 Jim Meyering <meyering@lucent.com>
1738 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
1739 the definition of it to rpl_strftime also defined-away the system's
1742 2000-04-15 Jim Meyering <meyering@lucent.com>
1744 Use `C' to denote so-called `contiguous' files, the same way
1746 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
1747 (ftypelet): Use S_ISCTG.
1748 From Michael Deutschmann.
1750 2000-04-14 Jim Meyering <meyering@lucent.com>
1752 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
1754 2000-04-08 Jim Meyering <meyering@lucent.com>
1756 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
1757 names don't conflict. Reported by Eli Zaretskii.
1759 2000-03-28 Bruno Haible <haible@clisp.cons.org>
1761 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
1762 bug. Deal with the different error behavior of Irix iconv.
1764 2000-04-07 Jim Meyering <meyering@lucent.com>
1766 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
1767 to work around system header problems on AIX 3.2.5. From Bruno Haible.
1769 2000-04-05 Jim Meyering <meyering@lucent.com>
1771 Portability tweaks required for ultrix4.3.
1772 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
1773 * readutmp.c: Include sys/types.h before sys/stat.h.
1774 * canon-host.c: Declare strdup.
1775 * path-concat.c: Likewise.
1776 From John David Anglin.
1778 2000-04-04 Jim Meyering <meyering@lucent.com>
1780 Be more DOS 8.3-friendly.
1781 * ref-add.sin: Renamed from ref-add.sed.in.
1782 * ref-del.sin: Renamed from ref-del.sed.in.
1783 * Makefile.am: Reflect renaming.
1784 Reported by Eli Zaretskii.
1786 Use a temporary file name that won't clash with `charset.alias'
1787 in the DOS 8.3 name space.
1788 * Makefile.am (charset_tmp): Define.
1789 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
1790 (uninstall-local): Likewise.
1791 Reported by Eli Zaretskii.
1793 2000-03-29 Paul Eggert <eggert@twinsun.com>
1795 * time/strftime.c (my_strftime): Make sure we call the system
1796 strftime, not ourselves, when invoking the underlying strftime.
1798 2000-03-24 Jim Meyering <meyering@lucent.com>
1800 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
1801 (charset_alias): Define.
1802 (install-exec-local): Factor out common code.
1803 (uninstall-local): Split lines longer than 80.
1804 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
1806 (.sed.in.sed): New rule. Don't redirect directly to $@.
1807 (CLEANFILES): Add ref-add.sed and ref-del.sed.
1809 2000-03-19 Bruno Haible <haible@clisp.cons.org>
1811 * config.charset: Output a line containing "Packages using this file".
1812 * ref-add.sed.in, ref-del.sed.in: New files.
1813 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
1814 ref-del.sed): New rules.
1816 2000-03-17 Jim Meyering <meyering@lucent.com>
1818 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
1819 Otherwise, include <strings.h>
1821 2000-03-17 Bruno Haible <haible@clisp.cons.org>
1823 * unicodeio.c (utf8_wctomb): New function.
1824 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
1825 format instead of in UCS-4 with platform dependent endianness.
1827 2000-03-07 Paul Eggert <eggert@twinsun.com>
1829 * savedir.c (savedir): Work even if directory size is
1830 negative; this can happen with some screwy NFS configurations.
1832 2000-03-06 Jim Meyering <meyering@lucent.com>
1834 * localcharset.c (get_charset_aliases): Don't try to free file_name
1835 if it's NULL (because we ran out of memory). From Bruno Haible.
1837 2000-03-05 Jim Meyering <meyering@lucent.com>
1839 * localcharset.c ("path-concat.h"): Include.
1840 (get_charset_aliases): Use path_concat instead of ANSI string
1843 * unicodeio.h (PARAMS): Define.
1844 Use it to guard prototype.
1846 2000-03-04 Jim Meyering <meyering@lucent.com>
1848 * Makefile.am (install-exec-local): Create $(libdir) before installing
1850 (uninstall-local): Uncomment this rule so `make distcheck' works
1853 * unicodeio.c (<errno.h>): Include it.
1854 (errno): Declare if not defined.
1856 * localcharset.c: Add Bruno's comment justifying use of volatile.
1858 * config.charset: New version, incorporating remarks from a linux
1859 i18n mailing list. From Bruno Haible.
1861 2000-03-02 Jim Meyering <meyering@lucent.com>
1863 * Makefile.am (EXTRA_DIST): Add config.charset.
1865 2000-03-01 Jim Meyering <meyering@lucent.com>
1867 * localcharset.c: Guard some #includes with `#if HAVE_...'.
1868 * unicodeio.c: Likewise.
1870 2000-02-02 Bruno Haible <haible@clisp.cons.org>
1872 * config.charset: New file.
1873 * localcharset.c: New file.
1874 * unicodeio.h, unicodeio.c: New files.
1875 * Makefile.am (DEFS): Add -DLIBDIR=...
1876 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
1877 (noinst_HEADERS): Add unicodeio.h.
1878 (all-local, install-exec-local, charset.alias): New targets.
1880 2000-02-28 Paul Eggert <eggert@twinsun.com>
1882 * quotearg.c (ALERT_CHAR): New macro.
1883 (quotearg_buffer_restyled): Use it.
1885 2000-02-27 Jim Meyering <meyering@lucent.com>
1887 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
1888 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
1890 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
1891 not `#if STDC_HEADERS'.
1892 Declare malloc if needed.
1894 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
1895 now that autoconf always defines the HAVE_DECL_ symbols.
1896 * human.c: Likewise.
1898 * strtoumax.c: Likewise.
1900 * backupfile.c: Arrange for cpp to fail if the configure-time
1901 declaration check was not run.
1903 * human.c: Likewise.
1905 * strtoumax.c: Likewise.
1907 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
1908 then first look up the entire `.'-containing string as a login name.
1910 2000-02-18 Paul Eggert <eggert@twinsun.com>
1912 * getdate.y: Handle two-digit years with leading zeros correctly.
1913 (textint): New typedef.
1914 (parser_control): Member year changed from int to textint.
1916 (YYSTYPE): Removed; replaced by %union with int and textint members.
1917 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
1918 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
1919 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
1920 (tSNUMBER, tUNUMBER): Now of type <textintval>.
1921 (date, number, to_year): Use width of number in digits, not its value,
1922 to determine whether it's a 2-digit year, or a 2-digit time.
1923 (yylex): Store number of digits of numeric tokens.
1924 Reported by John Kendall.
1926 (parser_control): Changed from struct parser_control to typedef (for
1927 consistency). All uses changed.
1929 (tID): Removed; not used.
1930 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
1932 2000-02-14 Paul Eggert <eggert@twinsun.com>
1934 * getpagesize.h (getpagesize): Port to VMS for Alpha;
1935 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
1937 2000-02-12 Jim Meyering <meyering@lucent.com>
1939 * userspec.c (ISDIGIT): Define it.
1940 (isdigit): Remove definition.
1941 (is_number): Use ISDIGIT, not isdigit.
1942 <libintl.h>: Include.
1944 (parse_user_spec): Mark translatable strings.
1946 2000-02-10 Jim Meyering <meyering@lucent.com>
1948 With these changes, nanosleep.[ch] are finally enough like the other
1949 lib/* replacement files to compile on a few more losing systems.
1951 * nanosleep.h: Don't include config.h.
1952 Remove prototype from declaration of nanosleep.
1953 (PARAMS): Remove now-unneeded definition.
1954 * nanosleep.c: #undef nanosleep.
1955 (rpl_nanosleep): Rename from nanosleep.
1957 2000-02-03 Jim Meyering <meyering@lucent.com>
1959 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
1960 rather than with `#if HAVE_UTMPNAME'.
1962 2000-02-01 Jim Meyering <meyering@lucent.com>
1964 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
1966 2000-01-31 Jim Meyering <meyering@lucent.com>
1968 * nanosleep.h (nanosleep): Guard declaration with
1969 `#if ! HAVE_DECL_NANOSLEEP'.
1970 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
1971 the declaration in that vendor's sys/timers.h.
1972 Reported by Christian Krackowizer.
1974 * quotearg.c (ISASCII): Add #undef and move definition to follow
1975 inclusion of wctype.h to work around solaris2.6 namespace pollution.
1976 (ISPRINT): Likewise.
1977 Reported by Tom Tromey.
1979 2000-01-30 Jim Meyering <meyering@lucent.com>
1981 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
1982 uses of ->ut_name. The latter doesn't work with new Linux header files
1983 where only utmpx.ut_user is declared.
1985 * readutmp.h (UT_USER): Define.
1987 2000-01-23 Jim Meyering <meyering@lucent.com>
1989 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
1992 2000-01-22 Jim Meyering <meyering@lucent.com>
1994 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
1995 [! HAVE_DECL_STRTOULL]: Declare strtoull.
1996 Required for some AIX systems. Reported by Christian Krackowizer.
1997 [TESTING] (main): New function.
1999 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
2000 * dirname.c (dir_name): Support for DOS-style file names with drive
2003 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
2005 * strverscmp.c (ISDIGIT): Define.
2006 (strverscmp): Use ISDIGIT, not isdigit.
2008 2000-01-17 Paul Eggert <eggert@twinsun.com>
2010 * nanosleep.c (nanosleep):
2011 Don't use SA_INTERRUPT to decide whether to call sigaction, as
2012 POSIX.1 doesn't require SA_INTERRUPT and some systems
2013 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
2014 it's been part of POSIX.1 since day 1 (in 1988).
2016 2000-01-17 Jim Meyering <meyering@lucent.com>
2018 * interlock: Remove unused file. Reported by François Pinard.
2020 2000-01-16 Paul Eggert <eggert@twinsun.com>
2022 * quotearg.c (quotearg_buffer_restyled): Do not quote
2023 alert, backslash, formfeed, and vertical tab unnecessarily in
2024 shell quoting style.
2027 version-control: never