1 2000-06-29 Jim Meyering <meyering@lucent.com>
3 * same.c: Include <string.h> or <strings.h>, as appropriate,
4 for declaration of strcmp.
6 * long-options.c: Include <stdlib.h>, for declaration of exit.
8 * mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
9 Avoid warning by casting result to `char *' to remove `const'.
11 2000-06-17 Bruno Haible <haible@clisp.cons.org>
13 * Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
15 2000-06-26 Paul Eggert <eggert@twinsun.com>
17 savedir now sets errno on failure and invokes xmalloc to get memory.
18 Fix a couple of other minor bugs while we're at it.
20 * savedir.c (<unistd.h>): Do not include; there's no need.
21 (NAMLEN): Remove macro.
22 (malloc, realloc): Remove decls.
24 ("xalloc.h"): Include.
25 (NAME_SIZE_DEFAULT): New macro.
26 (savedir): Use xmalloc / xrealloc to allocate memory.
27 Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
28 Skip "" directory entries.
29 Use strlen to calculate directory entry length, since the old method
30 is rarely used these days and isn't worth supporting.
31 Don't use a pointer after freeing it.
32 Check for integer overflow when calculating allocation size.
33 Use memcpy to copy entries, instead of stpcpy.
34 Set errno properly when returning NULL.
35 Check for readdir error.
37 2000-06-26 Jim Meyering <meyering@lucent.com>
39 * posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
41 2000-06-17 Bruno Haible <haible@clisp.cons.org>
43 * getusershell.c (xmalloc, xrealloc): Remove functions.
45 Don't include <stdlib.h>. Don't declare malloc, realloc.
47 2000-06-23 Bruno Haible <haible@clisp.cons.org>
49 * unicodeio.c (print_unicode_char): Work around ansi2knr deficiency.
51 2000-06-24 Jim Meyering <meyering@lucent.com>
53 * error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
55 2000-06-21 Jim Meyering <meyering@lucent.com>
57 * getpass.c: New file, from Bruno Haible. Required for BeOS.
59 2000-06-19 Paul Eggert <eggert@twinsun.com>
61 * quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
62 (mbrtowc, mbstate_t): Define substitutes if
63 HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
64 (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
65 not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
67 2000-06-17 Bruno Haible <haible@clisp.cons.org>
69 * xgetcwd.c (xgetcwd): If the required pathname length is smaller
70 than 1024, return a memory chunk of least possible size, instead
71 of size PATH_MAX + 2. In the loop, increment the size proportionally.
72 Use free/xmalloc instead of xrealloc to avoid copying for very long
75 2000-06-17 Bruno Haible <haible@clisp.cons.org>
77 * canon-host.c (canon_host): Use malloc and memcpy to copy an
78 address, not strdup. Include <stdlib.h> and don't declare free().
80 2000-06-17 Bruno Haible <haible@clisp.cons.org>
82 * path-concat.c (path_concat): Don't access dir[-1] if dir is
85 2000-06-21 Jim Meyering <meyering@lucent.com>
87 * Makefile.am (libfetish_a_SOURCES): Add getstr.c.
88 (noinst_HEADERS): Add getstr.h.
90 * getline.c (getstr): Move into a separate file.
91 * getstr.c (getstr): New file, extracted from getline.c, with
92 the following changes: new parameter, delim2; both delim[12]
93 parameters have type `int', not `char'. The latter would lose
94 with 8-bit delimiters.
97 2000-06-19 Jim Meyering <meyering@lucent.com>
99 * getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
101 2000-06-18 Jim Meyering <meyering@lucent.com>
103 * mkdir.c: Remove file, due mainly to copyright incompatibility.
104 Besides, these days every porting target provides a mkdir function.
106 * strnlen.c: Include memory.h, string.h, and/or strings.h as needed.
107 (this snippet comes from src/system.h).
109 2000-06-15 Paul Eggert <eggert@twinsun.com>
111 * human.c (adjust_value): New function.
112 (human_readable_inexact): Apply rounding style even when
113 printing approximate values.
115 2000-06-14 Paul Eggert <eggert@twinsun.com>
117 * human.c (human_readable_inexact): Allow an input block
118 size that is not a multiple of the output block size, and vice versa.
119 Reported by Piergiorgio Sartor.
121 2000-06-14 Paul Eggert <eggert@twinsun.com>
123 * getdate.y (get_date): Apply relative times after time
124 zone indicator, not before. Reported by Todd A. Jacobs.
126 2000-06-13 Jim Meyering <meyering@lucent.com>
128 * Makefile.am (all-local): Depend on lstat.c and stat.c.
130 * xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
132 2000-06-12 Paul Eggert <eggert@twinsun.com>
134 * xstat.in: Include <stdlib.h> in lstat, to declare "free".
136 2000-06-04 Paul Eggert <eggert@twinsun.com>
138 * strnlen.c: Include <config.h> if HAVE_CONFIG_H.
140 2000-06-04 Jim Meyering <meyering@lucent.com>
142 * getugroups.c (getugroups): Cast -1 to gid_t, for systems like
143 SunOS4.1.4 for which gid_t is an unsigned type.
145 2000-06-03 Jim Meyering <meyering@lucent.com>
147 * strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
149 2000-05-26 Bruno Haible <haible@clisp.cons.org>
151 * Makefile.am (install-exec-local): On systems with glibc-2.1 or
152 newer, don't install charset.alias.
153 * config.charset: Change the Linux/glibc rules so they become empty
154 on glibc-2.1 or newer.
156 2000-06-02 Jim Meyering <meyering@lucent.com>
158 * mountlist.c: Back out last change. Instead, do this...
159 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the me_dummy
160 member using the same `ignore'-testing code.
161 * mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
165 2000-05-29 Jim Meyering <meyering@lucent.com>
167 * mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
168 with the `ignore' attribute. Based on a patch from Mark D. Roth.
170 2000-05-22 Jim Meyering <meyering@lucent.com>
172 * makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
174 2000-05-18 Jim Meyering <meyering@lucent.com>
176 * hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
177 back, too, since it may have been modified by allocate_entry.
178 (hash_delete): Rewrite to use neither the assignment operator
179 nor the comma operator in an if-expression.
181 2000-05-15 Paul Eggert <eggert@twinsun.com>
184 <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
185 Remove; no longer needed.
186 "quotearg.h": Add include.
187 (file_name): Do not bother to explicitly initialize to NULL; it's less
188 efficient on some hosts.
189 (close_stdout_status): Remove test as to whether stdout was already
190 closed; it breaks for the case "echo x | sort >&-".
191 Quote file name colons.
192 Do not assume that _("write error") lacks format strings.
194 2000-05-15 Jim Meyering <meyering@lucent.com>
196 * version-etc.c (version_etc_copyright): Update the copyright string
197 used in all --version output.
199 2000-05-14 Jim Meyering <meyering@lucent.com>
201 * closeout.c (close_stdout_set_file_name): New function.
202 (close_stdout_status): Use new file-scoped global.
203 Return right away if fstat says the stdout file descriptor is invalid.
204 * closeout.h (close_stdout_set_file_name): Declare.
206 2000-05-10 Jim Meyering <meyering@lucent.com>
208 * closeout.c [default_exit_status]: New file-scoped variable.
209 (close_stdout_set_status): New function.
210 * closeout.h (close_stdout_set_status): Declare.
212 2000-05-08 Jim Meyering <meyering@lucent.com>
214 * long-options.c: Don't include closeout.h.
215 (parse_long_options): Don't call close_stdout for --version.
217 2000-05-06 Jim Meyering <meyering@lucent.com>
219 * strnlen.c: Undefine __strnlen and strnlen.
220 [!weak_alias]: Define __strnlen to strnlen.
222 * atexit.c: New file, from libiberty.
224 2000-05-06 Jim Meyering <meyering@lucent.com>
226 * closeout.c (close_stdout_status): Also check for errors on the
229 2000-05-05 Bruno Haible <haible@clisp.cons.org>
231 * localcharset.c (get_charset_aliases): Use malloc, realloc and memcpy
232 instead of xmalloc, xrealloc, path_concat.
233 (locale_charset): Treat empty environment variables as absent.
234 (DIRECTORY_SEPARATOR, ISSLASH): New macros.
236 2000-05-04 Jim Meyering <meyering@lucent.com>
238 * getopt.c: Update from glibc.
239 * obstack.c: Likewise.
240 * obstack.h: Likewise.
241 * regex.c: Likewise. NB: K&R compiler support is dropped for this file
244 * strndup.c: Likewise.
245 * strnlen.c: New file, from glibc.
247 2000-05-01 Jim Meyering <meyering@lucent.com>
249 * full-write.c (full_write): Remove `FIXME' part of comment.
251 2000-04-29 Jim Meyering <meyering@lucent.com>
253 * path-concat.c: Declare strdup only if it's not defined.
254 * canon-host.c: Likewise.
256 2000-04-28 Jim Meyering <meyering@lucent.com>
258 * rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to avoid
259 redefinition warning on some systems (HPUX). Otherwise, regex.h is
260 included first, then limits.h is included by locale.h by libintl.h.
261 From John David Anglin.
263 2000-04-25 Jim Meyering <meyering@lucent.com>
265 * makepath.c (S_IRWXUGO): Define.
266 (make_path): Always perform explicit chmod if MODE specifies any
267 of the `special' permission bits. Prompted by a bug report against
268 install from Mate Wierdl and Joost van Baal.
270 2000-04-18 Jim Meyering <meyering@lucent.com>
274 * getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
275 getpagesize. For BeOS. Based on a patch from Bruno Haible.
277 2000-04-17 Jim Meyering <meyering@lucent.com>
279 * strftime.c (my_strftime) [strftime]: Declare strftime here, since
280 the definition of it to rpl_strftime also defined-away the system's
283 2000-04-15 Jim Meyering <meyering@lucent.com>
285 Use `C' to denote so-called `contiguous' files, the same way
287 * filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
288 (ftypelet): Use S_ISCTG.
289 From Michael Deutschmann.
291 2000-04-14 Jim Meyering <meyering@lucent.com>
293 * strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
295 2000-04-08 Jim Meyering <meyering@lucent.com>
297 * Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
298 names don't conflict. Reported by Eli Zaretskii.
300 2000-03-28 Bruno Haible <haible@clisp.cons.org>
302 * unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
303 bug. Deal with the different error behavior of Irix iconv.
305 2000-04-07 Jim Meyering <meyering@lucent.com>
307 * putenv.c: Move inclusion of errno.h so it follows that of sys/types.h,
308 to work around system header problems on AIX 3.2.5. From Bruno Haible.
310 2000-04-05 Jim Meyering <meyering@lucent.com>
312 Portability tweaks required for ultrix4.3.
313 * readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare getutent.
314 * readutmp.c: Include sys/types.h before sys/stat.h.
315 * canon-host.c: Declare strdup.
316 * path-concat.c: Likewise.
317 From John David Anglin.
319 2000-04-04 Jim Meyering <meyering@lucent.com>
321 Be more DOS 8.3-friendly.
322 * ref-add.sin: Renamed from ref-add.sed.in.
323 * ref-del.sin: Renamed from ref-del.sed.in.
324 * Makefile.am: Reflect renaming.
325 Reported by Eli Zaretskii.
327 Use a temporary file name that won't clash with `charset.alias'
328 in the DOS 8.3 name space.
329 * Makefile.am (charset_tmp): Define.
330 (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
331 (uninstall-local): Likewise.
332 Reported by Eli Zaretskii.
334 2000-03-29 Paul Eggert <eggert@twinsun.com>
336 * time/strftime.c (my_strftime): Make sure we call the system
337 strftime, not ourselves, when invoking the underlying strftime.
339 2000-03-24 Jim Meyering <meyering@lucent.com>
341 * Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
342 (charset_alias): Define.
343 (install-exec-local): Factor out common code.
344 (uninstall-local): Split lines longer than 80.
345 (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
347 (.sed.in.sed): New rule. Don't redirect directly to $@.
348 (CLEANFILES): Add ref-add.sed and ref-del.sed.
350 2000-03-19 Bruno Haible <haible@clisp.cons.org>
352 * config.charset: Output a line containing "Packages using this file".
353 * ref-add.sed.in, ref-del.sed.in: New files.
354 * Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
355 ref-del.sed): New rules.
357 2000-03-17 Jim Meyering <meyering@lucent.com>
359 * unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
360 Otherwise, include <strings.h>
362 2000-03-17 Bruno Haible <haible@clisp.cons.org>
364 * unicodeio.c (utf8_wctomb): New function.
365 (print_unicode_char): Pass the Unicode character to iconv in UTF-8
366 format instead of in UCS-4 with platform dependent endianness.
368 2000-03-07 Paul Eggert <eggert@twinsun.com>
370 * savedir.c (savedir): Work even if directory size is
371 negative; this can happen with some screwy NFS configurations.
373 2000-03-06 Jim Meyering <meyering@lucent.com>
375 * localcharset.c (get_charset_aliases): Don't try to free file_name
376 if it's NULL (because we ran out of memory). From Bruno Haible.
378 2000-03-05 Jim Meyering <meyering@lucent.com>
380 * localcharset.c ("path-concat.h"): Include.
381 (get_charset_aliases): Use path_concat instead of ANSI string
384 * unicodeio.h (PARAMS): Define.
385 Use it to guard prototype.
387 2000-03-04 Jim Meyering <meyering@lucent.com>
389 * Makefile.am (install-exec-local): Create $(libdir) before installing
391 (uninstall-local): Uncomment this rule so `make distcheck' works
394 * unicodeio.c (<errno.h>): Include it.
395 (errno): Declare if not defined.
397 * localcharset.c: Add Bruno's comment justifying use of volatile.
399 * config.charset: New version, incorporating remarks from a linux
400 i18n mailing list. From Bruno Haible.
402 2000-03-02 Jim Meyering <meyering@lucent.com>
404 * Makefile.am (EXTRA_DIST): Add config.charset.
406 2000-03-01 Jim Meyering <meyering@lucent.com>
408 * localcharset.c: Guard some #includes with `#if HAVE_...'.
409 * unicodeio.c: Likewise.
411 2000-02-02 Bruno Haible <haible@clisp.cons.org>
413 * config.charset: New file.
414 * localcharset.c: New file.
415 * unicodeio.h, unicodeio.c: New files.
416 * Makefile.am (DEFS): Add -DLIBDIR=...
417 (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
418 (noinst_HEADERS): Add unicodeio.h.
419 (all-local, install-exec-local, charset.alias): New targets.
421 2000-02-28 Paul Eggert <eggert@twinsun.com>
423 * quotearg.c (ALERT_CHAR): New macro.
424 (quotearg_buffer_restyled): Use it.
426 2000-02-27 Jim Meyering <meyering@lucent.com>
428 * strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
429 Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
431 * backupfile.c: Guard inclusion of stdlib.h with `#if HAVE_STDLIB_H',
432 not `#if STDC_HEADERS'.
433 Declare malloc if needed.
435 * backupfile.c: Use `#if !HAVE_DECL...' instead of `#ifndef HAVE_DECL..'
436 now that autoconf always defines the HAVE_DECL_ symbols.
439 * strtoumax.c: Likewise.
441 * backupfile.c: Arrange for cpp to fail if the configure-time
442 declaration check was not run.
446 * strtoumax.c: Likewise.
448 * userspec.c (parse_user_spec): If there is no `:' but there is a `.',
449 then first look up the entire `.'-containing string as a login name.
451 2000-02-18 Paul Eggert <eggert@twinsun.com>
453 * getdate.y: Handle two-digit years with leading zeros correctly.
454 (textint): New typedef.
455 (parser_control): Member year changed from int to textint.
457 (YYSTYPE): Removed; replaced by %union with int and textint members.
458 (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
459 tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
460 tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
461 (tSNUMBER, tUNUMBER): Now of type <textintval>.
462 (date, number, to_year): Use width of number in digits, not its value,
463 to determine whether it's a 2-digit year, or a 2-digit time.
464 (yylex): Store number of digits of numeric tokens.
465 Reported by John Kendall.
467 (parser_control): Changed from struct parser_control to typedef (for
468 consistency). All uses changed.
470 (tID): Removed; not used.
471 (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
473 2000-02-14 Paul Eggert <eggert@twinsun.com>
475 * getpagesize.h (getpagesize): Port to VMS for Alpha;
476 adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
478 2000-02-12 Jim Meyering <meyering@lucent.com>
480 * userspec.c (ISDIGIT): Define it.
481 (isdigit): Remove definition.
482 (is_number): Use ISDIGIT, not isdigit.
483 <libintl.h>: Include.
485 (parse_user_spec): Mark translatable strings.
487 2000-02-10 Jim Meyering <meyering@lucent.com>
489 With these changes, nanosleep.[ch] are finally enough like the other
490 lib/* replacement files to compile on a few more losing systems.
492 * nanosleep.h: Don't include config.h.
493 Remove prototype from declaration of nanosleep.
494 (PARAMS): Remove now-unneeded definition.
495 * nanosleep.c: #undef nanosleep.
496 (rpl_nanosleep): Rename from nanosleep.
498 2000-02-03 Jim Meyering <meyering@lucent.com>
500 * readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
501 rather than with `#if HAVE_UTMPNAME'.
503 2000-02-01 Jim Meyering <meyering@lucent.com>
505 * readutmp.h (UT_USER): Add parens. From Andreas Schwab.
507 2000-01-31 Jim Meyering <meyering@lucent.com>
509 * nanosleep.h (nanosleep): Guard declaration with
510 `#if ! HAVE_DECL_NANOSLEEP'.
511 Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
512 the declaration in that vendor's sys/timers.h.
513 Reported by Christian Krackowizer.
515 * quotearg.c (ISASCII): Add #undef and move definition to follow
516 inclusion of wctype.h to work around solaris2.6 namespace pollution.
518 Reported by Tom Tromey.
520 2000-01-30 Jim Meyering <meyering@lucent.com>
522 * readutmp.c (extract_trimmed_name): Use UT_USER instead of hard-coding
523 uses of ->ut_name. The latter doesn't work with new Linux header files
524 where only utmpx.ut_user is declared.
526 * readutmp.h (UT_USER): Define.
528 2000-01-23 Jim Meyering <meyering@lucent.com>
530 * Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
533 2000-01-22 Jim Meyering <meyering@lucent.com>
535 * strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
536 [! HAVE_DECL_STRTOULL]: Declare strtoull.
537 Required for some AIX systems. Reported by Christian Krackowizer.
538 [TESTING] (main): New function.
540 1997-10-17 Eli Zaretskii <eliz@is.elta.co.il>
541 * dirname.c (dir_name): Support for DOS-style file names with drive
544 * quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of iswprint.
546 * strverscmp.c (ISDIGIT): Define.
547 (strverscmp): Use ISDIGIT, not isdigit.
549 2000-01-17 Paul Eggert <eggert@twinsun.com>
551 * nanosleep.c (nanosleep):
552 Don't use SA_INTERRUPT to decide whether to call sigaction, as
553 POSIX.1 doesn't require SA_INTERRUPT and some systems
554 (e.g. Solaris 7) don't define it. Use SA_NOCLDSTOP instead;
555 it's been part of POSIX.1 since day 1 (in 1988).
557 2000-01-17 Jim Meyering <meyering@lucent.com>
559 * interlock: Remove unused file. Reported by François Pinard.
561 2000-01-16 Paul Eggert <eggert@twinsun.com>
563 * quotearg.c (quotearg_buffer_restyled): Do not quote
564 alert, backslash, formfeed, and vertical tab unnecessarily in
568 version-control: never