1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* scmsigs.c (scm_sigaction): Cast SIG_DFL and SIG_IGN to SCM, not

int.  That way, if we get a warning on this line, it's more likely
that we're really missing bits we care about.
This commit is contained in:
Jim Blandy 1999-07-19 07:53:21 +00:00
parent 435220a73c
commit 8638b0979a

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -212,8 +212,10 @@ scm_sigaction (SCM signum, SCM handler, SCM flags)
query_only = 1;
else if (SCM_INUMP (handler))
{
if (SCM_INUM (handler) == (int) SIG_DFL
|| SCM_INUM (handler) == (int) SIG_IGN)
/* It's really ugly to assume that SIG_DFL can be nicely cast to
a fixnum. This has got to go. */
if (SCM_INUM (handler) == (SCM) SIG_DFL
|| SCM_INUM (handler) == (SCM) SIG_IGN)
{
#ifdef HAVE_SIGACTION
action.sa_handler = (SIGRETTYPE (*) (int)) SCM_INUM (handler);
@ -276,7 +278,7 @@ scm_sigaction (SCM signum, SCM handler, SCM flags)
orig_handlers[csig] = old_action;
}
if (old_action.sa_handler == SIG_DFL || old_action.sa_handler == SIG_IGN)
old_handler = SCM_MAKINUM ((int) old_action.sa_handler);
old_handler = SCM_MAKINUM ((SCM) old_action.sa_handler);
SCM_ALLOW_INTS;
return scm_cons (old_handler, SCM_MAKINUM (old_action.sa_flags));
#else