[klibc] [PATCH] signal.h
H. Peter Anvin
hpa at zytor.com
Wed Mar 2 16:52:16 PST 2005
Erik van Konijnenburg wrote:
> This patch does two things.
>
> This test program results (on i386) in an error about _NSIG:
>
> #include <signal.h>
> #if defined (SIGRTMAX)
> int rtmax = SIGRTMAX;
> #endif
>
> The cause is that the kernel signal.h defines SIGRTMAX as _NSIG,
> then makes _NSIG invisibelby hiding it inside ifdef __KERNEL__.
> Perhaps it's more elegant to solve this in the kernel,
> but the ramifications of that scare me.
>
Okay, that one is nasty; I'll have to think carefully about how to deal
with that.
>
> The other issue is that signal() is not provided by klibc.
> Here it's defined to be equal to bsd_signal, consistent with glibc
> behaviour. I'm none too sure about the need for this one.
>
This one I will not apply. signal() is ambiguous -- in fact depending
on which libc version in Linux you'll get either sysv_signal() or
bsd_signal. Use -Dsignal=bsd_signal or -Dsignal=sysv_signal if you have
to deal with legacy code.
-hpa
More information about the klibc
mailing list