Don't cast an int to a pointer type without (possibly) widening the

integral type to the size of a pointer type when it's known that the
cast is valid. On ia64 such casts are generally bad news and has led
us (=peter :-) to make such casts fatal. By casting to intptr_t
before casting to a pointer type, this now compiles cleanly in LP64
architectures. Note that the final cast has been changed to void*
(instead of siginfo_t*) to make it explicit that we're not trying to
pass a siginfo_t pointer but rather trying to pass an int when the
prototype says it should be a pointer.
This commit is contained in:
marcel 2003-03-05 04:28:08 +00:00
parent 55f069454e
commit cf2b37334b

View File

@ -282,7 +282,7 @@ thread_sig_invoke_handler(int sig, siginfo_t *info, ucontext_t *ucp)
(info == NULL))
(*(sigfunc))(sig, info, ucp);
else
(*(sigfunc))(sig, (siginfo_t *)info->si_code, ucp);
(*(sigfunc))(sig, (void*)(intptr_t)info->si_code, ucp);
}
/*
* Only restore the signal mask if it hasn't been changed by the