(emp_sig_t): Pre-ISO C compatibility cruft. Just use void.

This commit is contained in:
Markus Armbruster 2004-02-15 21:00:27 +00:00
parent b218799e15
commit 4fa84b5cb1
7 changed files with 10 additions and 19 deletions

View file

@ -123,7 +123,7 @@ void empth_sleep _PROTO((long until));
empth_sem_t *empth_sem_create _PROTO((char *name, int count)); empth_sem_t *empth_sem_create _PROTO((char *name, int count));
void empth_sem_signal _PROTO((empth_sem_t *)); void empth_sem_signal _PROTO((empth_sem_t *));
void empth_sem_wait _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 */ #include "prototypes.h" /* must come at end, after defines and typedefs */

View file

@ -91,12 +91,6 @@ typedef u_char natid; /* also change NSC_NATID in nsc.h */
#define POSIXSIGNALS #define POSIXSIGNALS
#endif #endif
#if defined(POSIXSIGNALS) || defined(__STDC__)
typedef void emp_sig_t;
#else
typedef int emp_sig_t;
#endif
#if !defined(aix) && !defined(sgi) #if !defined(aix) && !defined(sgi)
#ifndef ultrix /* already defined in ultrix */ #ifndef ultrix /* already defined in ultrix */

View file

@ -48,8 +48,8 @@
#include "commodity.h" #include "commodity.h"
/* src/server/main.c */ /* src/server/main.c */
extern emp_sig_t panic(int sig); extern void panic(int sig);
extern emp_sig_t shutdwn(int sig); extern void shutdwn(int sig);
/***************************************************************************** /*****************************************************************************
* src/lib/ * / *.c * 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 empth_sem_t *empth_sem_create(char *name, int cnt);
extern void empth_sem_signal(empth_sem_t *sm); extern void empth_sem_signal(empth_sem_t *sm);
extern void empth_sem_wait(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 */ #endif /* _EMPTH_LWP */
/* src/lib/empthread/pthread.c */ /* src/lib/empthread/pthread.c */
@ -87,7 +87,7 @@ extern void empth_exit(void);
extern void empth_yield(void); extern void empth_yield(void);
extern void empth_terminate(empth_t *a); extern void empth_terminate(empth_t *a);
extern void empth_select(int fd, int flags); 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_wakeup(empth_t *a);
extern void empth_sleep(long until); extern void empth_sleep(long until);
extern empth_sem_t *empth_sem_create(char *name, int cnt); extern empth_sem_t *empth_sem_create(char *name, int cnt);

View file

@ -137,7 +137,7 @@ empth_sem_wait(empth_sem_t *sm)
lwpWait(sm); lwpWait(sm);
} }
emp_sig_t void
empth_alarm(int sig) empth_alarm(int sig)
{ {
/* no way we can be here while using LWP threads */ /* no way we can be here while using LWP threads */

View file

@ -585,7 +585,7 @@ empth_select(int fd, int flags)
/************************ /************************
* empth_alarm * empth_alarm
*/ */
emp_sig_t void
empth_alarm(int sig) empth_alarm(int sig)
{ {
loc_Thread_t *pThread = loc_Thread_t *pThread =

View file

@ -65,9 +65,6 @@ static void *
empth_start(void *ctx) empth_start(void *ctx)
{ {
struct sigaction act; struct sigaction act;
extern emp_sig_t panic();
extern emp_sig_t shutdwn();
/* actually it should inherit all this from main but... */ /* actually it should inherit all this from main but... */
#ifdef SA_SIGINFO #ifdef SA_SIGINFO
@ -411,7 +408,7 @@ empth_select(int fd, int flags)
} }
emp_sig_t void
empth_alarm(int sig) empth_alarm(int sig)
{ {
struct sigaction act; struct sigaction act;

View file

@ -297,7 +297,7 @@ close_files(void)
} }
/* we're going down. try to close the files at least */ /* we're going down. try to close the files at least */
emp_sig_t void
panic(int sig) panic(int sig)
{ {
#if !defined(_WIN32) #if !defined(_WIN32)
@ -324,7 +324,7 @@ panic(int sig)
_exit(0); _exit(0);
} }
emp_sig_t void
shutdwn(int sig) shutdwn(int sig)
{ {
struct player *p; struct player *p;