Commit Graph
24019 Commits
Author SHA1 Message Date
Jim Meyering ae641fdacf (_jm_DECL_HEADERS): Check for utmp.h as well. 2000-06-27 10:01:30 +00:00
Jim Meyering 0a43597bb8 *** empty log message *** 2000-06-27 07:08:52 +00:00
Jim Meyering 211b5731d7 savedir now sets errno on failure and invokes xmalloc to get memory.
Fix a couple of other minor bugs while we're at it.

(<unistd.h>): Do not include; there's no need.
(NAMLEN): Remove macro.
(malloc, realloc): Remove decls.
(stpcpy): Likewise.
("xalloc.h"): Include.
(NAME_SIZE_DEFAULT): New macro.
(savedir): Use xmalloc / xrealloc to allocate memory.
Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
Skip "" directory entries.
Use strlen to calculate directory entry length, since the old method
is rarely used these days and isn't worth supporting.
Don't use a pointer after freeing it.
Check for integer overflow when calculating allocation size.
Use memcpy to copy entries, instead of stpcpy.
Set errno properly when returning NULL.
Check for readdir error.
2000-06-27 07:08:48 +00:00
Jim Meyering ae34e4466d *** empty log message *** 2000-06-27 06:33:35 +00:00
Jim Meyering 99c1d22a99 (show_dev): Round disk usage percentage up, not to nearest value.
Use integer arithmetic if it's easy.
Fix bug when converting twos-complement negative values to floating point.
2000-06-27 06:33:31 +00:00
Jim Meyering b07eb28c60 *** empty log message *** 2000-06-26 13:48:40 +00:00
Jim Meyering b4fd5c459e *** empty log message *** 2000-06-26 13:30:59 +00:00
Jim Meyering dfaf03f037 *** empty log message *** 2000-06-26 10:55:57 +00:00
Jim Meyering 204a9ee115 [HAVE_STDLIB_H]: Include stdlib.h. 2000-06-26 10:55:18 +00:00
Jim Meyering 43c77218e4 *** empty log message *** 2000-06-26 06:33:22 +00:00
Jim Meyering 9abfcc500a `id -Gn' (invoked by groups) would fail without giving a diagnostic
on malconfigured systems.
(print_user): Give a diagnostic if number->name lookup fails.
(print_group): Likewise.
2000-06-26 06:32:58 +00:00
Jim Meyering ac4e995ed3 *** empty log message *** 2000-06-25 21:19:41 +00:00
Jim Meyering d705cb724b (xmalloc, xrealloc): Remove functions.
Include xalloc.h.
Don't include <stdlib.h>.  Don't declare malloc, realloc.
2000-06-25 21:17:32 +00:00
Jim Meyering e195cd0425 *** empty log message *** 2000-06-25 21:03:05 +00:00
Jim Meyering 0adbb52608 *** empty log message *** 2000-06-25 20:20:28 +00:00
Jim Meyering c72f18b2c3 (TESTS): Add fail-perm. 2000-06-25 20:20:23 +00:00
Jim Meyering 0a0e82382c *** empty log message *** 2000-06-25 20:19:52 +00:00
Jim Meyering 34591391d1 *** empty log message *** 2000-06-25 20:15:22 +00:00
Jim Meyering ab50b6880f *** empty log message *** 2000-06-25 15:58:47 +00:00
Jim Meyering 92ead9886c (copy_internal): Don't return return immediately after a
failed copy_dir call -- otherwise, the failure to read a single file
in a source directory would cause the containing destination directory
not to have owner/perms set properly.  Reported by Piotr Kwapulinski.
2000-06-25 15:50:51 +00:00
Jim Meyering 8a900584f1 *** empty log message *** 2000-06-25 15:50:38 +00:00
Jim Meyering 18252dc7fc *** empty log message *** 2000-06-25 15:50:29 +00:00
Jim Meyering 046110aa3f *** empty log message *** 2000-06-25 15:49:21 +00:00
Jim Meyering a7109e215e *** empty log message *** FILEUTILS-4_0v 2000-06-25 14:15:22 +00:00
Jim Meyering 125499c09f *** empty log message *** 2000-06-25 08:49:02 +00:00
Jim Meyering ca8a119779 Include stdio.h before wchar.h to work around
Linux header bug when _XOPEN_SOURCE is defined to 500.
2000-06-25 08:48:58 +00:00
Jim Meyering 484752fa80 *** empty log message *** 2000-06-25 06:54:36 +00:00
Jim Meyering a9fad38c18 (print_unicode_char): Work around ansi2knr deficiency. 2000-06-25 06:54:32 +00:00
Jim Meyering 0d67b070d4 *** empty log message *** 2000-06-24 21:05:11 +00:00
Jim Meyering 402a8fdd9b If the compile-test says
strerror_r doesn't work, then resort to a `run'-test that works on
BeOS and segfaults on DEC Unix.
2000-06-24 21:04:44 +00:00
Jim Meyering d488baf54a check for decl unconditionally 2000-06-24 14:03:10 +00:00
Jim Meyering 806c3e7fb8 . 2000-06-24 12:25:39 +00:00
Jim Meyering 102a04f2aa . 2000-06-24 12:21:52 +00:00
Jim Meyering c66b857850 *** empty log message *** 2000-06-24 12:05:18 +00:00
Jim Meyering f89094c7de Revive this file -- to try out an experimental
version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
for which strerror does return char*, but which lacks a conveniently
accessible declaration of the function.
2000-06-24 12:05:08 +00:00
Jim Meyering 790705a7c1 *** empty log message *** 2000-06-24 12:01:29 +00:00
Jim Meyering 5061035e88 [!HAVE_DECL_STRERROR_R]: Declare strerror_r. 2000-06-24 12:01:03 +00:00
Jim Meyering a2d975a44d Lots of minor rewording and grammar correction.
From Brian Youmans.
2000-06-24 11:53:51 +00:00
Jim Meyering 4604a7892b *** empty log message *** 2000-06-24 11:52:38 +00:00
Jim Meyering 4434e513bc *** empty log message *** 2000-06-24 07:38:05 +00:00
Jim Meyering 39f35a55d3 tweak copyright 2000-06-24 07:37:55 +00:00
Jim Meyering a6e6a1e05b (sysv_sum_file): Avoid overflowing 32-bit accumulator
on files larger than 256 MB.
2000-06-24 07:37:44 +00:00
Jim Meyering 1cc0f0d268 . 2000-06-24 07:36:54 +00:00
Jim Meyering a674a3c010 *** empty log message *** 2000-06-24 07:36:14 +00:00
Jim Meyering fad24ae80d *** empty log message *** 2000-06-24 07:18:29 +00:00
Jim Meyering d7ad628832 *** empty log message *** 2000-06-24 07:13:07 +00:00
Jim Meyering dc53d8e807 *** empty log message *** 2000-06-24 07:12:56 +00:00
Jim Meyering fff7bfc374 . 2000-06-23 21:09:12 +00:00
Jim Meyering 957ec50ac0 *** empty log message *** 2000-06-23 21:06:45 +00:00
Jim Meyering fef29da8fb Include <wctype.h> after <wchar.h>,
for Solaris 2.5.
(mbrtowc, mbstate_t): Define substitutes if
HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
(iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
2000-06-23 21:05:50 +00:00