diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-21 10:04:10 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-21 10:04:10 +0000 |
commit | 6537ed663f6a57188697bf9ab6fa49dd47562ed1 (patch) | |
tree | 5a814500ffe9b45f31a9a56f4b17de0c10ba0bf7 /src/plugins | |
parent | 9c0ac993e7a447b3121af0f2bf7a16f933952643 (diff) | |
download | hercules-6537ed663f6a57188697bf9ab6fa49dd47562ed1.tar.gz hercules-6537ed663f6a57188697bf9ab6fa49dd47562ed1.tar.bz2 hercules-6537ed663f6a57188697bf9ab6fa49dd47562ed1.tar.xz hercules-6537ed663f6a57188697bf9ab6fa49dd47562ed1.zip |
* Removed 'strsignal' forward-declaration from 'sig' plugin to prevent random gcc distributions from failing to compile due to mismatched declaration already present in <string.h> (bugreport:4644, topic:262284, follow up to r14591).
- Removed WIN32 conditions in non-WIN32 code in 'sig' plugin (follow up to r4380).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14610 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sig.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/plugins/sig.c b/src/plugins/sig.c index a9489b019..9db0638ca 100644 --- a/src/plugins/sig.c +++ b/src/plugins/sig.c @@ -3,6 +3,7 @@ #include <stdio.h> #include <stdlib.h> #include <signal.h> +#define __USE_GNU // required to enable strsignal on some platforms #include <string.h> #include <time.h> #include "../common/plugin.h" @@ -52,11 +53,6 @@ unsigned long (*getuptime)(); char *server_name; int crash_flag = 0; -#ifndef __APPLE__ -extern const char *strsignal(int); -#else -extern char *strsignal(int); -#endif int sig_final (); // by Gabuzomeu @@ -64,9 +60,6 @@ int sig_final (); // (sigaction() is POSIX; signal() is not.) Taken from Stevens' _Advanced // Programming in the UNIX Environment_. // -#ifdef WIN32 // windows don't have SIGPIPE -#define SIGPIPE SIGINT -#endif #ifndef POSIX #define compat_signal(signo, func) signal(signo, func) @@ -207,9 +200,7 @@ int sig_init () compat_signal(SIGSEGV, func); compat_signal(SIGFPE, func); compat_signal(SIGILL, func); - #ifndef __WIN32 - compat_signal(SIGBUS, func); - #endif + compat_signal(SIGBUS, func); return 1; } |