X-Git-Url: https://pd.if.org/git/?p=pdclib.old;a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2Fsignal%2Fsignal.c;h=aae95a95bc1558f1a923bcc4ae56d3eeecee2136;hp=e07877d248f49e579d491121d220c8860bd0ded7;hb=af55dc64b9118345203e7ba7bd262e6444573795;hpb=77e0f19332a2b4e64d48ecb48557ea7aefa2cc61 diff --git a/platform/example/functions/signal/signal.c b/platform/example/functions/signal/signal.c index e07877d..aae95a9 100644 --- a/platform/example/functions/signal/signal.c +++ b/platform/example/functions/signal/signal.c @@ -11,6 +11,7 @@ #ifndef REGTEST #include +#include void (*_PDCLIB_sigabrt)( int ) = SIG_DFL; void (*_PDCLIB_sigfpe)( int ) = SIG_DFL; @@ -53,10 +54,7 @@ void (*signal( int sig, void (*func)( int ) ) )( int ) _PDCLIB_sigterm = func; break; default: - /* The standard calls for an unspecified "positive value". You - will probably want to define a specific value for this. - */ - _PDCLIB_errno = 1; + errno = EINVAL; return SIG_ERR; } return oldhandler;