Commit Graph

4157 Commits

Author SHA1 Message Date
Paul Eggert 6a0400397d Add bulletproofing for cases where stdin, stdout, or stderr are closed. 2005-04-11 20:04:29 +00:00
Paul Eggert 5af96ecaf5 (libfetish_a_SOURCES): Remove dup-safer.c,
fcntl-safer.h, fopen-safer.c, open-safer.c, stdio-safer.h,
unistd-safer.h.
2005-04-11 20:03:40 +00:00
Paul Eggert 6d2aaeaa97 (fd_safer): New decl. 2005-04-11 20:03:22 +00:00
Paul Eggert 24560041a8 Include unistd-safer.h.
(save_cwd): Use fd_safer.
2005-04-11 20:03:04 +00:00
Paul Eggert f4efb825d2 Include stdio-safer.h.
(getusershell): Use fopen_safer.
2005-04-11 20:02:43 +00:00
Paul Eggert 8bd8ca4bf3 Include unistd-safer.h.
(getloadavg): Use fd_safer.
2005-04-11 20:02:28 +00:00
Paul Eggert 01dbbdf612 Include unistd-safer.h.
(fts_safe_changedir): Use fd_safer.
2005-04-11 20:02:06 +00:00
Paul Eggert 74fdf19ae7 Include unistd-safer.h first, to test interface.
(dup_safer) [!deefined F_DUPD]: Use new fd_safer function instead of
rolling our own code.
2005-04-11 20:01:46 +00:00
Paul Eggert 10bcc8d795 Initial revision 2005-04-11 20:01:20 +00:00
Jim Meyering 31d1fd1eef . 2005-04-09 17:29:20 +00:00
Jim Meyering c06188c05c (__attribute__, ATTRIBUTE_UNUSED): Define.
Mark parameter `sp' with ATTRIBUTE_UNUSED.
2005-04-09 14:19:49 +00:00
Jim Meyering 58415b5d5d *** empty log message *** 2005-04-09 14:09:00 +00:00
Jim Meyering c522a489df (__attribute__, ATTRIBUTE_UNUSED): Define.
(exit_failure_callback, fallback_failure_callback): Mark unused
parameters with ATTRIBUTE_UNUSED.
2005-04-09 14:08:57 +00:00
Jim Meyering 22210b83b4 (canon_host) [HAVE_GETADDRINFO]: Use memset
rather than `= { 0 };' to initialize local `hint'.
2005-04-09 14:08:30 +00:00
Jim Meyering 517ac833b0 *** empty log message *** 2005-04-09 13:29:01 +00:00
Jim Meyering 5fb6300448 (posixtime) [lint]: Avoid spurious warning from gcc-4's
-Wuninitialized: initialize tm0.tm_year.
2005-04-09 13:28:25 +00:00
Jim Meyering 71984394f3 *** empty log message *** 2005-04-09 12:35:44 +00:00
Jim Meyering 89e0ab6c9e (humblock): Set *options even when returning due to
xstrtoumax conversion failure.  Thanks to a used-uninitialized
warning from gcc-4.
2005-04-09 12:35:41 +00:00
Paul Eggert 4c8c049f7a Signal-handling cleanup motivated by core dumps in dd. 2005-04-09 05:00:40 +00:00
Paul Eggert e4abcff12f (rpl_nanosleep): Include "timespec.h" before macros
that might redefine system include files.
(siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
(my_usleep): Use NULL rather than (void *) 0.
(rpl_nanosleep) [!defined SA_NOCLDSTOP]:
Use siginterrupt to specify that system calls should be interrupted.
(rpl_nanosleep): Move initialization of suspended closer to call of
my_usleep.
2005-04-09 04:52:25 +00:00
Paul Eggert cf6866dd8b getdate patch for empty string near dst changes. 2005-04-04 19:52:07 +00:00
Paul Eggert 6be7cfe6d3 (parser_control): rels_seen is now a boolean, not a
count, since there's no maximum.  All uses changed.
Add member dsts_seen.
(local_zone): Accumulate dsts_seen rather than relying on tm_isdst
not being INT_MAX.
(get_date): Initialize dsts_seen, and check that it doesn't go over 1.
Use pc_rels_seen to decide whther a date is absolute.

(number): Don't overwrite year.
(get_date): Initialize pc.year.digits to 0, not 4, to enable above check.
2005-04-04 19:51:49 +00:00
Paul Eggert da54271e95 * readutmp.c (read_utmp) [!defined UTMP_NAME_FUNCTION]: Don't assume
utmp file is a regular file.
2005-03-30 07:40:17 +00:00
Paul Eggert c315ff58b3 (read_utmp) [!defied UTMP_NAME_FUNCTION]: Add support for options.
Don't assume the file is a regular file.
2005-03-30 07:39:33 +00:00
Paul Eggert 3e5310af44 readutmp changes to allow checking for live pids 2005-03-30 05:19:48 +00:00
Paul Eggert ec764b0a95 (read_utmp): New arg OPTIONS. All uses changed.
(UT_PID): Moved here from ../src/who.c.
(READ_UTMP_CHECK_PIDS): New constant.
2005-03-30 05:19:11 +00:00
Paul Eggert 196fb1bc5c (read_utmp): New arg OPTIONS. All uses changed.
Include signal.h, stdbool.h.
(desirable_utmp_entry): New function.
(read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
using x2nrealloc, to simplify logic.
(read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
size calculation.
2005-03-30 05:18:37 +00:00
Jim Meyering 31927b4957 *** empty log message *** 2005-03-29 12:06:20 +00:00
Jim Meyering 363dc86fce (long_options): Use NULL, not `0'. 2005-03-29 11:56:10 +00:00
Jim Meyering db632b64c4 *** empty log message *** 2005-03-27 16:40:43 +00:00
Jim Meyering 3cb5dca5ce (argmatch): Clarify comment: null-terminated -> NULL-terminated. 2005-03-27 16:40:02 +00:00
Paul Eggert 5bb064a261 Propagate intprops.h comment fixes to mktime.c and strftime.c. 2005-03-26 18:08:24 +00:00
Paul Eggert 759ae5e688 one's complement -> ones' complement 2005-03-26 17:55:33 +00:00
Paul Eggert 608c26a8fc one's complement -> ones' complement 2005-03-26 17:55:05 +00:00
Paul Eggert e049d578cd Fix comment nits in intprops.h. 2005-03-26 17:49:37 +00:00
Paul Eggert 37a35280a4 Fix comment nits. 2005-03-26 17:49:22 +00:00
Jim Meyering 65118a9226 *** empty log message *** 2005-03-23 12:47:54 +00:00
Jim Meyering 94155d37e8 Remove duplicate `#include "stat-macros.h"'. 2005-03-23 12:47:46 +00:00
Jim Meyering 0c7d9eda5c . 2005-03-22 16:17:25 +00:00
Paul Eggert 4986d56f23 Regenerate. 2005-03-21 22:32:29 +00:00
Paul Eggert 3db2fe2c9f * Makefile.am (libfetish_a_SOURCES): Remove stat-macros.h, xstrtoul.c,
as they are now done by Autoconf macros.
2005-03-21 22:31:18 +00:00
Paul Eggert e829931bd6 (libfetish_a_SOURCES): Remove stat-macros.h, xstrtoul.c,
as they are now done by Autoconf macros.
2005-03-21 22:31:05 +00:00
Paul Eggert 78fa4b674d Regenerate. 2005-03-21 20:37:19 +00:00
Paul Eggert e0f53f4ecc Sync from gnulib. 2005-03-21 07:42:07 +00:00
Jim Meyering 33f2ed5c4d . 2005-03-19 14:20:47 +00:00
Paul Eggert bd73d9d8b6 * strftime.c (my_strftime): If the underlying strftime returns 0
(which shouldn't happen), generate nothing instead of returning 0
immediately, so that nstrftime (NULL, ...) doesn't return 0.
2005-03-19 05:33:16 +00:00
Paul Eggert 18445fac86 (my_strftime): If the underlying strftime returns 0
(which shouldn't happen), generate nothing instead of returning 0
immediately, so that nstrftime (NULL, ...) doesn't return 0.
2005-03-19 05:33:01 +00:00
Paul Eggert 581b437d32 * strftime.c (my_strftime): Prepend space to format. 2005-03-16 01:01:36 +00:00
Paul Eggert 23f7577282 (my_strftime): Prepend space to format so that we can
reliably distinguish strftime failure from empty output on POSIX
hosts.
2005-03-16 01:01:23 +00:00
Paul Eggert f7e5bc2908 Fix comments and indenting. 2005-03-15 00:44:29 +00:00