Author: hyperion Date: Fri Nov 28 08:47:19 2008 New Revision: 37706
URL: http://svn.reactos.org/svn/reactos?rev=37706&view=rev Log: GCC 4.3 correctly aligns stack-allocated objects Patch by "hto", from bugzilla See issue #3608 for more details.
Modified: trunk/reactos/lib/rtl/srw.c trunk/reactos/ntoskrnl/include/internal/ex.h
Modified: trunk/reactos/lib/rtl/srw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/srw.c?rev=37706&... ============================================================================== --- trunk/reactos/lib/rtl/srw.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/srw.c [iso-8859-1] Fri Nov 28 08:47:19 2008 @@ -44,7 +44,7 @@ RTL_SRWLOCK_SHARED | RTL_SRWLOCK_CONTENTION_LOCK) #define RTL_SRWLOCK_BITS 4
-#if defined(__GNUC__) && !defined(_M_AMD64) +#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 40300) && !defined(_M_AMD64) /* This macro will cause the code to assert if compiled with a buggy version of GCC that doesn't align the wait blocks properly on the stack! */ #define ASSERT_SRW_WAITBLOCK(ptr) \
Modified: trunk/reactos/ntoskrnl/include/internal/ex.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/e... ============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ex.h [iso-8859-1] Fri Nov 28 08:47:19 2008 @@ -92,9 +92,9 @@ #define MAX_HIGH_INDEX (MID_LEVEL_ENTRIES * MID_LEVEL_ENTRIES * LOW_LEVEL_ENTRIES)
// -// Detect GCC +// Detect old GCC // -#ifdef __GNUC__ +#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 40300)
#define DEFINE_WAIT_BLOCK(x) \ struct _AlignHack \