From 1c964da618494158ec6e77aefce44502204652a6 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 16 Dec 2009 23:37:18 +0000 Subject: [PATCH] Fix C_ASSERT yet another time. svn path=/branches/ros-amd64-bringup/; revision=44631 --- reactos/include/crt/crtdbg.h | 2 +- reactos/include/crt/malloc.h | 2 +- reactos/include/ddk/ntdef.h | 3 +-- reactos/include/psdk/winnt.h | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/reactos/include/crt/crtdbg.h b/reactos/include/crt/crtdbg.h index 8430446e198..142de498270 100644 --- a/reactos/include/crt/crtdbg.h +++ b/reactos/include/crt/crtdbg.h @@ -90,7 +90,7 @@ extern "C" { } _CrtMemState; #ifndef _STATIC_ASSERT -#define _STATIC_ASSERT(expr) char __static_assert_p(char static_assert[(expr)?1:-1]) +#define _STATIC_ASSERT(expr) extern char (*static_assert(void)) [(expr) ? 1 : -1] #endif #ifndef _ASSERT diff --git a/reactos/include/crt/malloc.h b/reactos/include/crt/malloc.h index 9b503889bb5..b90bfc5e97c 100644 --- a/reactos/include/crt/malloc.h +++ b/reactos/include/crt/malloc.h @@ -25,7 +25,7 @@ extern "C" { #endif #ifndef _STATIC_ASSERT -#define _STATIC_ASSERT(expr) char __static_assert_p(char static_assert[(expr)?1:-1]) +#define _STATIC_ASSERT(expr) extern char (*static_assert(void)) [(expr) ? 1 : -1] #endif /* Return codes for _heapwalk() */ diff --git a/reactos/include/ddk/ntdef.h b/reactos/include/ddk/ntdef.h index 27ccba6f202..49772bfe001 100644 --- a/reactos/include/ddk/ntdef.h +++ b/reactos/include/ddk/ntdef.h @@ -693,8 +693,7 @@ typedef struct _SINGLE_LIST_ENTRY { // // C_ASSERT Definition // -#define C_ASSERT(exp) \ - char __c_assert_p(char c_assert[(exp)?1:-1]) +#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1] diff --git a/reactos/include/psdk/winnt.h b/reactos/include/psdk/winnt.h index 1c67263aeb0..b041d9f0637 100644 --- a/reactos/include/psdk/winnt.h +++ b/reactos/include/psdk/winnt.h @@ -229,8 +229,7 @@ typedef BYTE FCHAR; typedef WORD FSHORT; typedef DWORD FLONG; -#define C_ASSERT(exp) \ - char __c_assert_p(char c_assert[(exp)?1:-1]) +#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1] #include "intrin.h"