revert between 56095 -> 55830 in arch
[AROS.git] / compiler / posixc / __posixc_assert.c
blobd4246d7f3d32f978bbf1052a17873a756e7bc4b3
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 assert()
6 */
7 #include <assert.h>
8 #include <stdio.h>
9 #include <stdlib.h>
11 /*****************************************************************************
13 NAME */
14 #include <assert.h>
16 void __posixc_assert (
18 /* SYNOPSIS */
19 const char * expr,
20 const char * file,
21 unsigned int line)
23 /* FUNCTION
24 This is a function that is used for implementation of the C99 assert()
25 function.
27 INPUTS
28 expr - The expression to evaluate. The type of the expression does
29 not matter, only if its zero/NULL or not.
30 file - Name of the source file.
31 line - Line number of assert() call.
33 RESULT
34 The function doesn't return.
36 NOTES
37 Different versions of this function are available. This function
38 is used when a program is using posixc.library.
40 EXAMPLE
42 BUGS
44 SEE ALSO
45 stdc.library/assert(), stdc.library/__stdc_assert(),
46 stdc.library/__stdcio_assert()
48 INTERNALS
50 ******************************************************************************/
52 fprintf (stderr, "Assertion (%s) failed in %s:%u\n", expr, file, line);
53 exit (10);
54 } /* assert */