New definition of C_ASSERT and _STATIC_ASSERT using a function prototype. This way we avoid duplicate definition errors like with a typedef and unused function warning like with the extern.

svn path=/branches/ros-amd64-bringup/; revision=44623
This commit is contained in:
Timo Kreuzer
2009-12-16 20:45:02 +00:00
parent e87ff42eea
commit f73d776d30
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ extern "C" {
} _CrtMemState;
#ifndef _STATIC_ASSERT
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1]
#define _STATIC_ASSERT(expr) char __static_assert_p(char static_assert[(expr)?1:-1])
#endif
#ifndef _ASSERT
+1 -1
View File
@@ -25,7 +25,7 @@ extern "C" {
#endif
#ifndef _STATIC_ASSERT
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1]
#define _STATIC_ASSERT(expr) char __static_assert_p(char static_assert[(expr)?1:-1])
#endif
/* Return codes for _heapwalk() */
+1 -1
View File
@@ -694,7 +694,7 @@ typedef struct _SINGLE_LIST_ENTRY {
// C_ASSERT Definition
//
#define C_ASSERT(exp) \
extern char __c_assert__[exp ? 1 : -1];
char __c_assert_p(char c_assert[(exp)?1:-1])
+1 -1
View File
@@ -230,7 +230,7 @@ typedef WORD FSHORT;
typedef DWORD FLONG;
#define C_ASSERT(exp) \
extern char __c_assert__[exp ? 1 : -1];
char __c_assert_p(char c_assert[(exp)?1:-1])
#include "intrin.h"