Author: tkreuzer
Date: Wed Dec 16 21:45:02 2009
New Revision: 44623
URL:
http://svn.reactos.org/svn/reactos?rev=44623&view=rev
Log:
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.
Modified:
branches/ros-amd64-bringup/reactos/include/crt/crtdbg.h
branches/ros-amd64-bringup/reactos/include/crt/malloc.h
branches/ros-amd64-bringup/reactos/include/ddk/ntdef.h
branches/ros-amd64-bringup/reactos/include/psdk/winnt.h
Modified: branches/ros-amd64-bringup/reactos/include/crt/crtdbg.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/crt/crtdbg.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/crt/crtdbg.h [iso-8859-1] Wed Dec 16
21:45:02 2009
@@ -90,7 +90,7 @@
} _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
Modified: branches/ros-amd64-bringup/reactos/include/crt/malloc.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/crt/malloc.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/crt/malloc.h [iso-8859-1] Wed Dec 16
21:45:02 2009
@@ -25,7 +25,7 @@
#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() */
Modified: branches/ros-amd64-bringup/reactos/include/ddk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/ddk/ntdef.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/ddk/ntdef.h [iso-8859-1] Wed Dec 16
21:45:02 2009
@@ -694,7 +694,7 @@
// C_ASSERT Definition
//
#define C_ASSERT(exp) \
- extern char __c_assert__[exp ? 1 : -1];
+ char __c_assert_p(char c_assert[(exp)?1:-1])
Modified: branches/ros-amd64-bringup/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/psdk/winnt.h [iso-8859-1] Wed Dec 16
21:45:02 2009
@@ -230,7 +230,7 @@
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"