X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdlib%2Fabort.c;h=0c3428340c2ecde0a105180ab7adde89f849f1a5;hp=b7f09777cd3923a82ace7f8a8135239efbb5dca4;hb=da0f3f353d417fed71f358a48d5d5394145e460d;hpb=e25ac2ecee6251afcec84e08165e454fb6bc256c diff --git a/functions/stdlib/abort.c b/functions/stdlib/abort.c index b7f0977..0c34283 100644 --- a/functions/stdlib/abort.c +++ b/functions/stdlib/abort.c @@ -1,7 +1,3 @@ -/* $Id$ */ - -/* Release $Name$ */ - /* abort( void ) This file is part of the Public Domain C Library (PDCLib). @@ -16,25 +12,24 @@ void abort( void ) { raise( SIGABRT ); - exit( 1 ); + exit( EXIT_FAILURE ); } #endif #ifdef TEST -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" #include -static void aborthandler( int signal ) +static void aborthandler( int sig ) { exit( 0 ); } -int main() +int main( void ) { int UNEXPECTED_RETURN_FROM_ABORT = 0; - BEGIN_TESTS; TESTCASE( signal( SIGABRT, &aborthandler ) != SIG_ERR ); abort(); TESTCASE( UNEXPECTED_RETURN_FROM_ABORT );