-/* ----------------------------------------------------------------------------
- * $Id$
- * ----------------------------------------------------------------------------
- * Public Domain C Library - http://pdclib.sourceforge.net
- * This code is Public Domain. Use, modify, and redistribute at will.
- * ----------------------------------------------------------------------------
- * Signal handling
- * --------------------------------------------------------------------------*/
-
-#ifndef _SIGNAL_H
-#define _SIGNAL_H _SIGNAL_H
-
-#ifndef _NULL
-#include "__intern.h"
-#endif
+/* $Id$ */
+
+/* Signal handling <string.h>
-/* TODO: Documentation */
+ This file is part of the Public Domain C Library (PDCLib).
+ Permission is granted to use, modify, and / or redistribute at will.
+*/
-/* ----------------------------------------------------------------------------
- * MACROS
- * --------------------------------------------------------------------------*/
+#ifndef _PDCLIB_SIGNAL_H
+#define _PDCLIB_SIGNAL_H _PDCLIB_SIGNAL_H
-#define SIGABRT _SIGABRT
-#define SIGFPE _SIGFPE
-#define SIGILL _SIGILL
-#define SIGINT _SIGINT
-#define SIGSEGV _SIGSEGV
-#define SIGTERM _SIGTERM
-#define SIG_DFL _SIG_DFL
-#define SIG_ERR _SIG_ERR
-#define SIG_IGN _SIG_IGN
+#ifndef _PDCLIB_CONFIG_H
+#define _PDCLIB_CONFIG_H _PDCLIB_CONFIG_H
+#include <_PDCLIB_config.h>
+#endif
-/* ----------------------------------------------------------------------------
- * TYPEDEFS
- * --------------------------------------------------------------------------*/
+typedef _PDCLIB_sig_atomic sig_atomic_t;
-#ifndef _SIG_ATOMIC_T
-#define _SIG_ATOMIC_T _SIG_ATOMIC_T
-typedef __sig_atomic_t sig_atomic_t;
-#endif /* _SIG_ATOMIC_T
+#define SIG_DFL _PDCLIB_SIG_DFL
+#define SIG_ERR _PDCLIB_SIG_ERR
+#define SIG_IGN _PDCLIB_SIG_IGN
-/* ----------------------------------------------------------------------------
- * FUNCTIONS
- * --------------------------------------------------------------------------*/
+#define SIGABRT _PDCLIB_SIGABRT
+#define SIGFPE _PDCLIB_SIGFPE
+#define SIGILL _PDCLIB_SIGILL
+#define SIGINT _PDCLIB_SIGINT
+#define SIGSEGV _PDCLIB_SIGSEGV
+#define SIGTERM _PDCLIB_SIGTERM
-int raise( int sig ); /* TODO */
-void ( * signal( int sig, void ( *func )( int ) ) ) ( int ); /* TODO */
+/* Returns the value of func for the most recent successful call to signal()
+ for the signal sig. Returns SIG_ERR and sets errno to a positive value
+ otherwise.
+*/
+void (*signal( int sig, void (*func)( int ) ) )( int );
-#endif /* _SIGNAL_H */
+/* Returns zero if successful, nonzero otherwise. */
+int raise( int sig );
+
+#endif