diff --git a/include/empthread.h b/include/empthread.h index 116a3611..d0eed391 100644 --- a/include/empthread.h +++ b/include/empthread.h @@ -123,7 +123,7 @@ void empth_sleep _PROTO((long until)); empth_sem_t *empth_sem_create _PROTO((char *name, int count)); void empth_sem_signal _PROTO((empth_sem_t *)); void empth_sem_wait _PROTO((empth_sem_t *)); -emp_sig_t empth_alarm _PROTO((int)); +void empth_alarm _PROTO((int)); #include "prototypes.h" /* must come at end, after defines and typedefs */ diff --git a/include/misc.h b/include/misc.h index 65e698f0..92a49e5f 100644 --- a/include/misc.h +++ b/include/misc.h @@ -91,12 +91,6 @@ typedef u_char natid; /* also change NSC_NATID in nsc.h */ #define POSIXSIGNALS #endif -#if defined(POSIXSIGNALS) || defined(__STDC__) -typedef void emp_sig_t; -#else -typedef int emp_sig_t; -#endif - #if !defined(aix) && !defined(sgi) #ifndef ultrix /* already defined in ultrix */ diff --git a/include/prototypes.h b/include/prototypes.h index fb523a2f..4ca6c779 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -48,8 +48,8 @@ #include "commodity.h" /* src/server/main.c */ -extern emp_sig_t panic(int sig); -extern emp_sig_t shutdwn(int sig); +extern void panic(int sig); +extern void shutdwn(int sig); /***************************************************************************** * src/lib/ * / *.c @@ -73,7 +73,7 @@ extern void empth_sleep(long int until); extern empth_sem_t *empth_sem_create(char *name, int cnt); extern void empth_sem_signal(empth_sem_t *sm); extern void empth_sem_wait(empth_sem_t *sm); -extern emp_sig_t empth_alarm(int sig); +extern void empth_alarm(int sig); #endif /* _EMPTH_LWP */ /* src/lib/empthread/pthread.c */ @@ -87,7 +87,7 @@ extern void empth_exit(void); extern void empth_yield(void); extern void empth_terminate(empth_t *a); extern void empth_select(int fd, int flags); -extern emp_sig_t empth_alarm(int sig); +extern void empth_alarm(int sig); extern void empth_wakeup(empth_t *a); extern void empth_sleep(long until); extern empth_sem_t *empth_sem_create(char *name, int cnt); diff --git a/src/lib/empthread/lwp.c b/src/lib/empthread/lwp.c index ce5832fa..70a76531 100644 --- a/src/lib/empthread/lwp.c +++ b/src/lib/empthread/lwp.c @@ -137,7 +137,7 @@ empth_sem_wait(empth_sem_t *sm) lwpWait(sm); } -emp_sig_t +void empth_alarm(int sig) { /* no way we can be here while using LWP threads */ diff --git a/src/lib/empthread/ntthread.c b/src/lib/empthread/ntthread.c index 4b4631e9..2accf92a 100644 --- a/src/lib/empthread/ntthread.c +++ b/src/lib/empthread/ntthread.c @@ -585,7 +585,7 @@ empth_select(int fd, int flags) /************************ * empth_alarm */ -emp_sig_t +void empth_alarm(int sig) { loc_Thread_t *pThread = diff --git a/src/lib/empthread/pthread.c b/src/lib/empthread/pthread.c index 8f190cbf..92f283ec 100644 --- a/src/lib/empthread/pthread.c +++ b/src/lib/empthread/pthread.c @@ -65,9 +65,6 @@ static void * empth_start(void *ctx) { struct sigaction act; - extern emp_sig_t panic(); - extern emp_sig_t shutdwn(); - /* actually it should inherit all this from main but... */ #ifdef SA_SIGINFO @@ -411,7 +408,7 @@ empth_select(int fd, int flags) } -emp_sig_t +void empth_alarm(int sig) { struct sigaction act; diff --git a/src/server/main.c b/src/server/main.c index 2667a202..1de51efd 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -297,7 +297,7 @@ close_files(void) } /* we're going down. try to close the files at least */ -emp_sig_t +void panic(int sig) { #if !defined(_WIN32) @@ -324,7 +324,7 @@ panic(int sig) _exit(0); } -emp_sig_t +void shutdwn(int sig) { struct player *p;