1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 02:36:16 +02:00
Commit Graph

20613 Commits

Author SHA1 Message Date
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
faac042790 (chopt_free): Mark parameter as unused. 2005-04-10 13:44:45 +00:00
Jim Meyering
084e64d1b7 . 2005-04-10 13:41:44 +00:00
Jim Meyering
31d1fd1eef . 2005-04-09 17:29:20 +00:00
Jim Meyering
493aba2ae5 (close_stdout_wrapper): Likewise.
Don't close STDOUT_FILENO explicitly; close_stdout does it.
2005-04-09 16:29:29 +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
e115c60a2a (quit): Define with ATTRIBUTE_NORETURN.
Now that close_stdout closes standard output unconditionally,
these workarounds for dd and cat are no longer necessary.
(close_stdout_wrapper): Remove function.
(main): Call atexit with close_stdout, instead.
2005-04-09 14:15:22 +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
32e72c50cc *** empty log message *** 2005-04-09 13:57:56 +00:00
Jim Meyering
0eb83b6534 Readability nit:
Change this:
  #  define __attribute__(x)
  to this:
  #  define __attribute__(x) /* empty */
2005-04-09 13:57:51 +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
Jim Meyering
56e6bb413f *** empty log message *** 2005-04-09 12:00:36 +00:00
Jim Meyering
3a270c871e *** empty log message *** 2005-04-09 11:57:02 +00:00
Jim Meyering
00e2488d87 (rm invocation): Say that --recursive removes
listed directories too, not just their contents.
2005-04-09 11:56:55 +00:00
Jim Meyering
113bb1ac7b (usage): Mention that --recursive removes listed
directories too, not just their contents.
Say that by default, rm does not remove directories.
2005-04-09 10:39:17 +00:00
Jim Meyering
80607d62d1 *** empty log message *** 2005-04-09 07:25:06 +00:00
Jim Meyering
29cb226323 (sc_system_h_headers): Propagate exit status through trap. 2005-04-09 07:24:49 +00:00
Jim Meyering
6cd4eed0ba Don't include "timespec.h". system.h does that. 2005-04-09 07:23:50 +00:00
Paul Eggert
8ae46b55b4 (iread, iwrite): Use char * buffer, not void *, so we can do pointer
arithmetic on it.
2005-04-09 06:16:14 +00:00
Paul Eggert
c69ead6596 Regenerate. 2005-04-09 05:03:01 +00:00
Paul Eggert
4c8c049f7a Signal-handling cleanup motivated by core dumps in dd. 2005-04-09 05:00:40 +00:00
Paul Eggert
ed74cc7c26 (SA_NOCLDSTOP): Define to 0 if not defined.
All uses changed.
(siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
(main) [! SA_NOCLDSTOP]: Use it.
2005-04-09 04:57:37 +00:00
Paul Eggert
9fd2c631bf Remove all uses of signals; modern hosts have
/dev/random and don't need this gorp.
Do not include signal.h.
(env, sigill_handler, isaac_seed_machdep): Remove.  All uses removed.
2005-04-09 04:57:15 +00:00
Paul Eggert
bc7c9f0ebc (SA_NOCLDSTOP): Define to 0 if not defined.
All uses changed.
(siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
(main) [! SA_NOCLDSTOP]: Use it.
2005-04-09 04:56:10 +00:00
Paul Eggert
4f0b9dbd17 Do not include safe-read.h or full-write; no longer needed.
(process_signals): Add forward decl.
(SA_NOCLDSTOP, sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]:
New macros.
(siginterrupt) [! HAVE_SIGINTERRUPT]: New macro.
(SA_NODEFER) [!defined SA_NODEFER]: New macro.
(SA_RESETHAND) [!defined SA_RESETHAND]: New macro.
(caught_signals, interrupt_signal, info_signal_count, catch_siginfo):
New vars.
(usage): Mention -USR1 versus -INFO.
(cleanup): Don't invoke print_stats; the caller must do it now.
All callers changed.
(quit): Process signals just before exiting.
(interrupt_handler): Simply record the signal and return.
(siginfo_handler): Simply increment the signal counter and return.
(install_handler): Remove, replacing with:
(install_signal_handlers, process_signals, iread, iwrite):
New functions.  All callers to safe_read and full_write replaced
by iread and iwrite.  All callers to install_handler replaced by
install_handlers.

Do not include inttostr.h, no longer needed.
(print_stats, main): Rewrite and simplify formats to use PRIuMAX
instead of umaxtostr.
(print_stats): Work even in languages that have special
forms for two of things, for r_truncate and w_bytes.  We can't
fix delta_s in this way, since ngettext doesn't support floating-point.
(main): Rewrite to avoid casts.
2005-04-09 04:55:40 +00:00
Paul Eggert
f33b6dab82 (SA_NOCLDSTOP): Define to 0 if not defined.
All uses changed.
(siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
(delete_all_files): New arg IN_SIGNAL_HANDLER, to avoid undefined
behavior when called from a signal handler.  All uses changed.
(main) [!defined SA_NOCLDSTOP]:
Use siginterrupt to specify that system calls should be interrupted.
2005-04-09 04:55:05 +00:00
Paul Eggert
65d8e81ce7 (RETSIGTYPE): Remove; no longer needed. All uses replaced with void. 2005-04-09 04:54:23 +00:00
Paul Eggert
33a5790031 (gl_PREREQ_NANOSLEEP): Check for siginterrupt. 2005-04-09 04:53:53 +00:00
Paul Eggert
b1cbacc40c (gl_MACROS): Check for siginterrupt.
(gl_CHECK_ALL_TYPES): Do not require AC_TYPE_SIGNAL.
2005-04-09 04:52:54 +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
a3d3cf669c (dd invocation): Document the distinction between
INFO and USR1 for dd, and the effect of POSIXLY_CORRECT here.
2005-04-09 04:51:52 +00:00
Paul Eggert
c7eda8c16f Document that dd no longer treats QUIT or PIPE specially,
and when conforming to POSIX no longer treats USR1 specially.
Document that dd no longer dumps core when handling signals.
2005-04-09 04:51:11 +00:00
Jim Meyering
b57df8650a *** empty log message *** 2005-04-07 20:10:54 +00:00
Jim Meyering
3dcd2f2dc6 *** empty log message *** 2005-04-07 20:10:17 +00:00
Jim Meyering
66374c61ee (binary_operator) [LINT]: Initialize lt and rt to 0. 2005-04-07 20:10:03 +00:00
Jim Meyering
3bad149c95 (digest_check) [LINT]: Initialize hex_digest to NULL. 2005-04-07 20:09:46 +00:00
Jim Meyering
ed3d178804 *** empty log message *** 2005-04-07 17:14:45 +00:00
Jim Meyering
d736105221 (binop): Move function definition to precede first use so we can...
(binop): ...remove prototype.
2005-04-07 17:14:14 +00:00
Jim Meyering
6d2f006d8d *** empty log message *** 2005-04-07 17:12:32 +00:00
Jim Meyering
d55d4b6c81 (is_int, age_of, binop): Declare char *' parameters to be const'. 2005-04-07 17:12:27 +00:00