X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fabort.c;h=1847771262a72e8e6a26e2580bc21b9c646d48c7;hb=b1fc26afebd4d557ff89a44bc21767a8704c3809;hp=b7f09777cd3923a82ace7f8a8135239efbb5dca4;hpb=e25ac2ecee6251afcec84e08165e454fb6bc256c;p=pdclib diff --git a/functions/stdlib/abort.c b/functions/stdlib/abort.c index b7f0977..1847771 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,7 +12,7 @@ void abort( void ) { raise( SIGABRT ); - exit( 1 ); + exit( EXIT_FAILURE ); } #endif @@ -26,15 +22,14 @@ void abort( void ) #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 );