summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-03-23 13:06:24 +0000
committercertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-03-23 13:06:24 +0000
commit660e2e9e8adabebb9a017ce113421a44f2c965fb (patch)
tree50ae49bd37138ab4948b1803d9dd9fe2fa6730b6 /src
parentc14bdc3d690a9d912239d6412fa7c269c4fe2c31 (diff)
# BUILD : 1.7.13 (1019) # BUGS 390 : # NOTES : fixed some obsolete defines. hopefully :P
git-svn-id: svn://svn.anope.org/anope/trunk@1019 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@744 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/init.c7
-rw-r--r--src/main.c6
-rw-r--r--src/memory.c16
3 files changed, 4 insertions, 25 deletions
diff --git a/src/init.c b/src/init.c
index 8cc49749f..14f8db1a0 100644
--- a/src/init.c
+++ b/src/init.c
@@ -522,14 +522,11 @@ int init_secondary(int ac, char **av)
* panic as necessary, and ignore all others.
*/
-#if defined(NSIG) && !defined(LINUX20) && !defined(LINUX22)
+#if defined(NSIG)
for (i = 1; i <= NSIG - 1; i++) {
#else
for (i = 1; i <= 31; i++) {
#endif
-#if defined(USE_THREADS) && defined(LINUX20)
- if (i != SIGUSR1)
-#endif
signal(i, SIG_IGN);
}
@@ -570,11 +567,9 @@ int init_secondary(int ac, char **av)
#endif
signal(SIGFPE, sighandler);
-#if !defined(USE_THREADS) || !defined(LINUX20)
#ifndef _WIN32
signal(SIGUSR1, sighandler); /* This is our "out-of-memory" panic switch */
#endif
-#endif
/* Initialize multi-language support */
lang_init();
diff --git a/src/main.c b/src/main.c
index 06c4bb550..104702f7f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -220,7 +220,7 @@ static void services_restart(void)
anope_cmd_squit(ServerName, quitmsg);
disconn(servsock);
close_log();
-#if defined(LINUX20) || defined(LINUX22)
+#ifndef _WIN32
pthread_kill_other_threads_np();
#endif
modules_unload_all(true);
@@ -424,7 +424,7 @@ void sighandler(int signum)
}
if (
-#if (!defined(USE_THREADS) || !defined(LINUX20)) && !defined(_WIN32)
+#ifndef _WIN32
signum == SIGUSR1 ||
#endif
!(quitmsg = calloc(BUFSIZE, 1))) {
@@ -606,7 +606,7 @@ int main(int ac, char **av, char **envp)
anope_cmd_squit(ServerName, quitmsg);
disconn(servsock);
close_log();
-#if defined(LINUX20) || defined(LINUX22)
+#ifndef _WIN32
pthread_kill_other_threads_np();
#endif
execve(SERVICES_BIN, av, envp);
diff --git a/src/memory.c b/src/memory.c
index 6c1d8dda7..c602a1827 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -37,15 +37,11 @@ void *smalloc(long size)
}
buf = malloc(size);
if (!buf)
-#if !defined(USE_THREADS) || !defined(LINUX20)
#ifndef _WIN32
raise(SIGUSR1);
#else
abort();
#endif
-#else
- abort();
-#endif
return buf;
}
@@ -66,15 +62,11 @@ void *scalloc(long elsize, long els)
}
buf = calloc(elsize, els);
if (!buf)
-#if !defined(USE_THREADS) || !defined(LINUX20)
#ifndef _WIN32
raise(SIGUSR1);
#else
abort();
#endif
-#else
- abort();
-#endif
return buf;
}
@@ -95,15 +87,11 @@ void *srealloc(void *oldptr, long newsize)
}
buf = realloc(oldptr, newsize);
if (!buf)
-#if !defined(USE_THREADS) || !defined(LINUX20)
#ifndef _WIN32
raise(SIGUSR1);
#else
abort();
#endif
-#else
- abort();
-#endif
return buf;
}
@@ -127,15 +115,11 @@ char *sstrdup(const char *src)
ret = strdup(src);
#endif
if (!ret)
-#if !defined(USE_THREADS) || !defined(LINUX20)
#ifndef _WIN32
raise(SIGUSR1);
#else
abort();
#endif
-#else
- abort();
-#endif
} else {
alog("sstrdup() called with NULL-arg");
if (debug)