]> pd.if.org Git - pdclib.old/blobdiff - platform/posix/functions/signal/signal.c
Add an up to date POSIX port (works on Mac OS X). This is fully functional except...
[pdclib.old] / platform / posix / functions / signal / signal.c
index e07877d248f49e579d491121d220c8860bd0ded7..d666b2400e7cbdb8bc4d9694c4f0246693a278ca 100644 (file)
@@ -9,8 +9,8 @@
 #include <signal.h>
 
 #ifndef REGTEST
-
 #include <stdlib.h>
+#include <errno.h>
 
 void (*_PDCLIB_sigabrt)( int ) = SIG_DFL;
 void (*_PDCLIB_sigfpe)( int )  = SIG_DFL;
@@ -53,10 +53,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;