# HG changeset patch # User jlarmour # Date 1046668532 0 # Node ID 51ca07f4ffe33d6fb7614f6de6c846731fbf2319 # Parent 57c645adccd891c2aa8acac6a8dbc88bd1c64761 * tests/signal2.c (cause_illegal_access): PowerPC only generates alignment exceptions in little-endian mode, so make that a special case. * tests/mutex3.c: Include POSIX headers before feature tests to prevent spurious CYG_TEST_NA. diff --git a/packages/compat/posix/current/ChangeLog b/packages/compat/posix/current/ChangeLog --- a/packages/compat/posix/current/ChangeLog +++ b/packages/compat/posix/current/ChangeLog @@ -1,3 +1,12 @@ +2003-03-03 Jonathan Larmour + + * tests/signal2.c (cause_illegal_access): PowerPC only generates + alignment exceptions in little-endian mode, so make that a special + case. + + * tests/mutex3.c: Include POSIX headers before feature tests to + prevent spurious CYG_TEST_NA. + 2003-02-24 Jonathan Larmour * doc/posix.sgml: Expunge EL/IX. Dead standard. diff --git a/packages/compat/posix/current/tests/mutex3.c b/packages/compat/posix/current/tests/mutex3.c --- a/packages/compat/posix/current/tests/mutex3.c +++ b/packages/compat/posix/current/tests/mutex3.c @@ -56,6 +56,13 @@ #include #endif +#ifdef CYGPKG_ISOINFRA +# include +# include +# include +# include +#endif + #if !defined(CYGPKG_POSIX_PTHREAD) #define NA_MSG "POSIX threads not enabled" @@ -86,11 +93,6 @@ cyg_start(void) } #else -#include -#include -#include -#include - #include #include #include // diag_printf diff --git a/packages/compat/posix/current/tests/signal2.c b/packages/compat/posix/current/tests/signal2.c --- a/packages/compat/posix/current/tests/signal2.c +++ b/packages/compat/posix/current/tests/signal2.c @@ -82,7 +82,9 @@ static jmp_buf jbuf; //-------------------------------------------------------------------------- -#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS +// PowerPC is a special case as it has the alignment exception, but it +// doesn't trigger unless in little-endian mode. +#if defined(CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS) && !(defined(CYGPKG_HAL_POWERPC) && (CYG_BYTEORDER==CYG_MSBFIRST)) static void cause_unaligned_access(void) @@ -243,7 +245,9 @@ int main(int argc, char **argv) #endif #endif -#ifdef CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS + // PowerPC is a special case as it has the alignment exception, but it + // doesn't trigger unless in little-endian mode. +#if defined(CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS) && !(defined(CYGPKG_HAL_POWERPC) && (CYG_BYTEORDER==CYG_MSBFIRST)) CYG_TEST_INFO("Test 1 - provoke unaligned access");