diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-01 13:20:55 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-01 13:20:55 +0000 |
commit | 423409561c4cb620eeddbc2c5a42154adbd1bb6f (patch) | |
tree | a8ddefd2968b6e6f50c32fc319a762771848fd39 /sal | |
parent | ad6387ed0a69b85fb6b49beb5c572c1bbf6ced74 (diff) |
CWS-TOOLING: integrate CWS cmcfixes56
2009-03-26 14:46:13 +0100 cmc r270080 : #i100517# merge changes of locales32 to match
2009-03-26 14:31:32 +0100 cmc r270079 : #i100517# add some brackets and remove stray ;
2009-03-25 13:30:36 +0100 cmc r270021 : #i100503# make tralay work again
2009-03-25 10:13:35 +0100 cmc r269999 : #i100536# remove last unused method
2009-03-24 15:13:50 +0100 cmc r269955 : #i100517# fix straight-forward warnings
2009-03-24 14:36:37 +0100 cmc r269947 : #i100469# keep ia64 and arm alignments after fork-exec to signal change, but hackaround for arm to keep userlevel qemu-arm working
2009-03-24 14:02:27 +0100 cmc r269943 : #i100223# make stl headers warning free for extra gcc 4.3 warnings
2009-03-24 13:58:15 +0100 cmc r269942 : #i100504# drawinglayer is warning free on ix86 linux
2009-03-24 13:56:15 +0100 cmc r269940 : #i100469# keep ia64 and arm alignments after fork-exec to signal change
Diffstat (limited to 'sal')
-rw-r--r-- | sal/typesconfig/typesconfig.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/sal/typesconfig/typesconfig.c b/sal/typesconfig/typesconfig.c index be02052378ae..932d80fd979a 100644 --- a/sal/typesconfig/typesconfig.c +++ b/sal/typesconfig/typesconfig.c @@ -163,20 +163,37 @@ int check( TestFunc func, Type eT, void* p ) |* Letzte Aenderung |* *************************************************************************/ -static int dummy(void* unused); +#if defined(IA64) || defined(ARM32) + +int forceerror() +{ +#if defined(ARM32) +// workaround for qemu-user + hit = 1; +#else + raise (SIGBUS); +#endif + return 1; +} int GetAtAddress( Type eT, void* p ) { -#if defined(IA64) || defined(ARM32) switch ( eT ) { case t_char: return *((char*)p); - case t_short: if ((long)p % sizeof(short)) abort(); else return *((short*)p); - case t_int: if ((long)p % sizeof(int)) abort(); else return *((int*)p); - case t_long: if ((long)p % sizeof(long)) abort(); else return *((long*)p); - case t_double: if ((long)p % sizeof(double)) abort(); else return *((double*)p); + case t_short: if ((long)p % sizeof(short)) return forceerror(); else return *((short*)p); + case t_int: if ((long)p % sizeof(int)) return forceerror(); else return *((int*)p); + case t_long: if ((long)p % sizeof(long)) return forceerror(); else return *((long*)p); + case t_double: if ((long)p % sizeof(double)) return forceerror(); else return *((double*)p); } + abort(); +} + #else +static int dummy(void* unused); + +int GetAtAddress( Type eT, void* p ) +{ switch ( eT ) { case t_char: { char x = *(char*)p; return dummy(&x); } @@ -185,7 +202,6 @@ int GetAtAddress( Type eT, void* p ) case t_long: { long x = *(long*)p; return dummy(&x); } case t_double: { double x = *(double*)p; return dummy(&x); } } -#endif abort(); } @@ -195,6 +211,7 @@ int dummy(void* unused) return 0; } +#endif /************************************************************************* |* |* SetAtAddress() |