Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6359
2b7e53f0-3cfb-0310-b3e9-
8179ed1497e1
// assert's existence depends on NDEBUG state on _last_ inclusion of assert.h,
// so don't guard this against double-includes.
// assert's existence depends on NDEBUG state on _last_ inclusion of assert.h,
// so don't guard this against double-includes.
// Heisenbugs appear if statement has side-effects. This could be worked around but does the standard allow for that?
#define assert(statement)
#else
// Heisenbugs appear if statement has side-effects. This could be worked around but does the standard allow for that?
#define assert(statement)
#else
-#define assert(statement) if ((statement) == 0) { printf("assertion failed in file %s, function %s(), line %s\n", __FILE__, __FUNCTION__, __LINE__); abort(); }
+#define assert(statement) if ((statement) == 0) { fprintf(stderr, "assertion failed in file %s, function %s(), line %s\n", __FILE__, __FUNCTION__, __LINE__); abort(); }
*/
void fatal(const char *msg)
{
*/
void fatal(const char *msg)
{
+ fprintf(stderr, "%s",msg);