rogue3: replace alarm() calls with a portable function.
Calls to alarm() in main.c are replaced with md_start_checkout_timer(), so the #ifdefs around nonportable code can be confined to mdport.c.
This commit is contained in:
parent
11f7731a3d
commit
b731962f3b
3 changed files with 6 additions and 16 deletions
|
|
@ -1510,11 +1510,10 @@ md_tstpsignal(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(CHECKTIME)
|
||||
void
|
||||
md_start_checkout_timer(int time)
|
||||
{
|
||||
int checkout();
|
||||
void checkout();
|
||||
|
||||
#if defined(HAVE_ALARM) && defined(SIGALRM)
|
||||
signal(SIGALRM, checkout);
|
||||
|
|
@ -1529,7 +1528,6 @@ md_stop_checkout_timer(void)
|
|||
signal(SIGALRM, SIG_IGN);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
long
|
||||
md_memused()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue