diff options
author | Jim Blandy <jimb@red-bean.com> | 1999-07-19 07:53:21 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1999-07-19 07:53:21 +0000 |
commit | 8638b0979a07571be56423cdf37d2087be0ae9ee (patch) | |
tree | 394d7fdba7c1510a4ee06ef910ca63792a8a91d0 /libguile/scmsigs.c | |
parent | 435220a73c36ca122256a424289c61d24b7bc16f (diff) | |
download | guile-8638b0979a07571be56423cdf37d2087be0ae9ee.tar.gz |
* 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.
Diffstat (limited to 'libguile/scmsigs.c')
-rw-r--r-- | libguile/scmsigs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 072613492..f8daff4ef 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -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 |