[ros-diffs] [tkreuzer] 44218: Create a better definition of C_ASSERT to avoid multiple definition errors caused by included files.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Tue Nov 17 20:09:39 CET 2009


Author: tkreuzer
Date: Tue Nov 17 20:09:38 2009
New Revision: 44218

URL: http://svn.reactos.org/svn/reactos?rev=44218&view=rev
Log:
Create a better definition of C_ASSERT to avoid multiple definition errors caused by included files.

Modified:
    branches/ros-amd64-bringup/reactos/include/ddk/ntdef.h

Modified: branches/ros-amd64-bringup/reactos/include/ddk/ntdef.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/include/ddk/ntdef.h?rev=44218&r1=44217&r2=44218&view=diff
==============================================================================
--- 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] Tue Nov 17 20:09:38 2009
@@ -679,10 +679,8 @@
 //
 // C_ASSERT Definition
 //
-#define __C_ASSERT_JOIN(X, Y) __C_ASSERT_DO_JOIN(X, Y)
-#define __C_ASSERT_DO_JOIN(X, Y) __C_ASSERT_DO_JOIN2(X, Y)
-#define __C_ASSERT_DO_JOIN2(X, Y) X##Y
-#define C_ASSERT(e) typedef char __C_ASSERT_JOIN(__C_ASSERT__, __LINE__)[(e) ? 1 : -1]
+#define C_ASSERT(exp) \
+    extern char __c_assert__[exp ? 1 : -1];
 
 
 




More information about the Ros-diffs mailing list