X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2Fsignal%2Fsignal.c;h=9d22275f14aa1253e17629fe79831e67986bb138;hb=0bfd3aa28ccec8c35481fe04d1dc82a0f1f522e6;hp=e07877d248f49e579d491121d220c8860bd0ded7;hpb=5ccf82b7feaec1c1fdb5e4cbf1db8a537d8c4419;p=pdclib diff --git a/platform/example/functions/signal/signal.c b/platform/example/functions/signal/signal.c index e07877d..9d22275 100644 --- a/platform/example/functions/signal/signal.c +++ b/platform/example/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). @@ -11,6 +9,7 @@ #ifndef REGTEST #include +#include void (*_PDCLIB_sigabrt)( int ) = SIG_DFL; void (*_PDCLIB_sigfpe)( int ) = SIG_DFL; @@ -53,10 +52,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;