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 Moolenaar 2003-03-05 04:28:08 +00:00
parent a402169a8e
commit d4f7f050a8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111896

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