X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Fsignal.c;h=6f7305ade0fe8867a3d715f905e9f17fef9d84a5;hb=feca28835d4e3cb2be67bdcbd4f54fee62c3797a;hp=763019fecbfac461f1580d12a8c1a475e03700e9;hpb=234225d112c4b018b8d1796f4c06a15812137500;p=mono.git diff --git a/support/signal.c b/support/signal.c index 763019fecbf..6f7305ade0f 100644 --- a/support/signal.c +++ b/support/signal.c @@ -1,39 +1,57 @@ /* * wrapper functions. + * + * Authors: + * Jonathan Pryor (jonpryor@vt.edu) + * + * Copyright (C) 2004-2005 Jonathan Pryor */ #include +#include "map.h" #include "mph.h" G_BEGIN_DECLS typedef void (*mph_sighandler_t)(int); -mph_sighandler_t +void* Mono_Posix_Stdlib_SIG_DFL (void) { return SIG_DFL; } -mph_sighandler_t +void* Mono_Posix_Stdlib_SIG_ERR (void) { return SIG_ERR; } -mph_sighandler_t +void* Mono_Posix_Stdlib_SIG_IGN (void) { return SIG_IGN; } void -Mono_Posix_Stdlib_InvokeSignalHandler (int signum, mph_sighandler_t handler) +Mono_Posix_Stdlib_InvokeSignalHandler (int signum, void *handler) { - handler (signum); + mph_sighandler_t _h = (mph_sighandler_t) handler; + _h (signum); } +#ifndef PLATFORM_WIN32 +int +Mono_Posix_Syscall_psignal (int sig, const char* s) +{ + errno = 0; + psignal (sig, s); + return errno == 0 ? 0 : -1; +} +#endif /* ndef PLATFORM_WIN32 */ + + G_END_DECLS /*