X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fposix%2Ffunctions%2Fsignal%2Fsignal.c;h=56aada5e6f8f9e71b1f03c5d9ee8c976306ccebb;hb=4d14d2133a2ec08b475531abbc2a15635c965a38;hp=e07877d248f49e579d491121d220c8860bd0ded7;hpb=a18343e497615802f47e0f6876b5bed73af674e0;p=pdclib diff --git a/platform/posix/functions/signal/signal.c b/platform/posix/functions/signal/signal.c index e07877d..56aada5 100644 --- a/platform/posix/functions/signal/signal.c +++ b/platform/posix/functions/signal/signal.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* signal( int sig, void (*func)( int ) ) This file is part of the Public Domain C Library (PDCLib). @@ -9,8 +7,8 @@ #include #ifndef REGTEST - #include +#include void (*_PDCLIB_sigabrt)( int ) = SIG_DFL; void (*_PDCLIB_sigfpe)( int ) = SIG_DFL; @@ -53,10 +51,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;