From 34a6708f44552a6dc4a226abc7b8e9c77c8c2d2f Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Fri, 17 May 2002 01:42:41 +0000 Subject: [PATCH] Fixed assert() macro, fixed header svn path=/trunk/; revision=2957 --- posix/include/assert.h | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/posix/include/assert.h b/posix/include/assert.h index 8b0a2b34b92..6bc04bb5e54 100644 --- a/posix/include/assert.h +++ b/posix/include/assert.h @@ -1,4 +1,4 @@ -/* $Id: assert.h,v 1.2 2002/02/20 09:17:54 hyperion Exp $ +/* $Id: assert.h,v 1.3 2002/05/17 01:42:41 hyperion Exp $ */ /* * assert.h @@ -25,35 +25,28 @@ #ifndef __ASSERT_H_INCLUDED__ #define __ASSERT_H_INCLUDED__ -/* types */ +/* INCLUDES */ -/* constants */ +/* OBJECTS */ -/* prototypes */ +/* TYPES */ -/* macros */ +/* CONSTANTS */ + +/* PROTOTYPES */ + +/* MACROS */ #ifdef NDEBUG -#define assert(ignore) ((void) 0) +#define assert(IGNORE) ((void) 0) #else /* !NDEBUG */ -#define assert(expression) \ -#ifdef __PSXDLL__ - -/* headers for internal usage by psxdll.dll and ReactOS */ -#include -#include - -#else /* ! __PSXDLL__ */ - -/* standard POSIX headers */ #include #include -#endif - - if(!(expression)) \ +#define assert(EXPRESSION) \ + if(!(EXPRESSION)) \ { \ - fputs("__FILE__, line __LINE__: assertion \"expression\" failed\n", stderr); \ + fputs("__FILE__, line __LINE__: assertion \"EXPRESSION\" failed\n", stderr); \ abort(); \ }