projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[sgen] Remove obsolete check in #ifdef.
[mono.git]
/
mono
/
metadata
/
console-unix.c
diff --git
a/mono/metadata/console-unix.c
b/mono/metadata/console-unix.c
index 4df34eb4132cbb80c08133ad515cb79d59d4b1be..6a70b350085b9d7183412a63aaf9f9860fc28cf0 100644
(file)
--- a/
mono/metadata/console-unix.c
+++ b/
mono/metadata/console-unix.c
@@
-17,6
+17,9
@@
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@
-31,6
+34,7
@@
#include <mono/metadata/gc-internal.h>
#include <mono/metadata/metadata.h>
#include <mono/metadata/threadpool.h>
#include <mono/metadata/gc-internal.h>
#include <mono/metadata/metadata.h>
#include <mono/metadata/threadpool.h>
+#include <mono/utils/mono-signal-handler.h>
/* On solaris, curses.h must come before both termios.h and term.h */
#ifdef HAVE_CURSES_H
/* On solaris, curses.h must come before both termios.h and term.h */
#ifdef HAVE_CURSES_H
@@
-272,8
+276,8
@@
mono_console_handle_async_ops (void)
}
static gboolean in_sigint;
}
static gboolean in_sigint;
-static void
-
sigint_handler (int signo
)
+
+
MONO_SIGNAL_HANDLER_FUNC (static, sigint_handler, (int signo)
)
{
int save_errno;
MONO_ARCH_SAVE_REGS;
{
int save_errno;
MONO_ARCH_SAVE_REGS;
@@
-291,8
+295,7
@@
sigint_handler (int signo)
static struct sigaction save_sigcont, save_sigint, save_sigwinch;
static struct sigaction save_sigcont, save_sigint, save_sigwinch;
-static void
-sigcont_handler (int signo, void *the_siginfo, void *data)
+MONO_SIGNAL_HANDLER_FUNC (static, sigcont_handler, (int signo, void *the_siginfo, void *data))
{
int unused;
// Ignore error, there is not much we can do in the sigcont handler.
{
int unused;
// Ignore error, there is not much we can do in the sigcont handler.
@@
-308,8
+311,7
@@
sigcont_handler (int signo, void *the_siginfo, void *data)
(*save_sigcont.sa_sigaction) (signo, the_siginfo, data);
}
(*save_sigcont.sa_sigaction) (signo, the_siginfo, data);
}
-static void
-sigwinch_handler (int signo, void *the_siginfo, void *data)
+MONO_SIGNAL_HANDLER_FUNC (static, sigwinch_handler, (int signo, void *the_siginfo, void *data))
{
int dims = terminal_get_dimensions ();
if (dims != -1)
{
int dims = terminal_get_dimensions ();
if (dims != -1)
@@
-358,7
+360,7
@@
console_set_signal_handlers ()
sigaction (SIGCONT, &sigcont, &save_sigcont);
// Interrupt handler
sigaction (SIGCONT, &sigcont, &save_sigcont);
// Interrupt handler
- sigint.sa_handler = sigint_handler;
+ sigint.sa_handler =
(void *)
sigint_handler;
sigint.sa_flags = 0;
sigemptyset (&sigint.sa_mask);
sigaction (SIGINT, &sigint, &save_sigint);
sigint.sa_flags = 0;
sigemptyset (&sigint.sa_mask);
sigaction (SIGINT, &sigint, &save_sigint);