diff -Nrua psybnc/src/p_server.c psybnc-futex/src/p_server.c
--- psybnc/src/p_server.c 2005-06-04 20:22:45.000000000 +0200
+++ psybnc-futex/src/p_server.c 2007-03-09 20:48:49.000000000 +0100
@@ -28,7 +28,7 @@
#include <p_global.h>
-jmp_buf serveralarmret;
+sigjmp_buf serveralarmret;
#ifndef BLOCKDNS
int userproxyconnectresolved(struct resolve *rp);
@@ -1126,7 +1126,7 @@
void gotalrm(int sig)
{
- longjmp(serveralarmret,0x0);
+ siglongjmp(serveralarmret, 1);
}
int userproxyconnected(int nuser)
@@ -1138,7 +1138,7 @@
char gip[5];
pcontext;
signal(SIGALRM,gotalrm);
- if(setjmp(serveralarmret)==0x0)
+ if(!sigsetjmp(serveralarmret, 1))
{
alarm(10);
he=gethostbyname(user(nuser)->server);
diff -Nrua psybnc/src/p_socket.c psybnc-futex/src/p_socket.c
--- psybnc/src/p_socket.c 2005-06-04 20:22:45.000000000 +0200
+++ psybnc-futex/src/p_socket.c 2007-03-09 20:49:21.000000000 +0100
@@ -29,8 +29,7 @@
#include <p_global.h>
#define MAX_SENDQ 1000
-
-jmp_buf alarmret;
+sigjmp_buf alarmret;
#ifndef BLOCKDNS
int acceptresolved(struct resolve *rp);
int connecthostresolved(struct resolve *rp);
@@ -212,7 +211,7 @@
void gotalarm(int sig)
{
- longjmp(alarmret,0x0);
+ siglongjmp(alarmret, 1);
}
/* create a single listener
@@ -577,7 +576,7 @@
{
#ifdef BLOCKDNS
signal(SIGALRM,gotalarm);
- if(setjmp(alarmret)==0x0)
+ if(!sigsetjmp(alarmret, 1))
{
alarm(10);
#ifdef SUNOS
@@ -613,7 +612,7 @@
#endif
#ifdef BLOCKDNS
signal(SIGALRM,gotalarm);
- if(setjmp(alarmret)==0x0)
+ if(!sigsetjmp(alarmret, 1))
{
alarm(10);
he=gethostbyname(vhost);
@@ -649,7 +648,7 @@
sin6.sin6_port = htons(port);
#ifdef BLOCKDNS
signal(SIGALRM,gotalarm);
- if(setjmp(alarmret)==0x0)
+ if(!sigsetjmp(alarmret, 1))
{
alarm(10);
#ifdef SUNOS
@@ -685,7 +684,7 @@
sin.sin_port = htons(port);
#ifdef BLOCKDNS
signal(SIGALRM,gotalarm);
- if(setjmp(alarmret)==0x0)
+ if(!sigsetjmp(alarmret, 1))
{
alarm(10);
he=gethostbyname(host);
@@ -1037,7 +1036,7 @@
struct sockaddr_in6 sin6;
struct hostent *he;
signal(SIGALRM,gotalarm);
- if(setjmp(alarmret)==0x0)
+ if(!sigsetjmp(alarmret, 1))
{
alarm(10);
#ifdef SUNOS
@@ -1355,7 +1354,7 @@
memcpy(&acip6[0],addr6.sin6_addr.s6_addr,16);
#ifdef BLOCKDNS
signal(SIGALRM,gotalarm);
- if(setjmp(alarmret)==0x0)
+ if(!sigsetjmp(alarmret, 1))
{
alarm(10);
hostinfo = gethostbyaddr( (char * )&addr6.sin6_addr.s6_addr, 16, AF_INET6);
@@ -1386,7 +1385,7 @@
acip=addr.sin_addr.s_addr;
#ifdef BLOCKDNS
signal(SIGALRM,gotalarm);
- if(setjmp(alarmret)==0x0)
+ if(!sigsetjmp(alarmret, 1))
{
alarm(10);
hostinfo = gethostbyaddr( ( char * )&addr.sin_addr.s_addr, sizeof( struct in_addr), AF_INET);