Alexandre Julliard : include: Get rid of ALLOW_UNALIGNED_ACCESS.

Alexandre Julliard julliard at winehq.org
Thu Apr 30 15:24:08 CDT 2020


Module: wine
Branch: master
Commit: 0995117b503305b249f569dbd768f79b77b5fb03
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0995117b503305b249f569dbd768f79b77b5fb03

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 30 11:18:53 2020 +0200

include: Get rid of ALLOW_UNALIGNED_ACCESS.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/krnl386.exe16/local.c |  9 +--------
 include/basetsd.h          | 10 ----------
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/dlls/krnl386.exe16/local.c b/dlls/krnl386.exe16/local.c
index bb8fcdb44f..672f1c22a1 100644
--- a/dlls/krnl386.exe16/local.c
+++ b/dlls/krnl386.exe16/local.c
@@ -78,8 +78,6 @@ typedef struct
 /*
  * We make addr = 4n + 2 and set *((WORD *)addr - 1) = &addr like Windows does
  * in case something actually relies on this.
- * Note that if the architecture does not allow unaligned accesses, we make
- * addr = 4n + 4 to avoid returning unaligned pointers from LocalAlloc etc.
  *
  * An unused handle has lock = flags = 0xff. In windows addr is that of next
  * free handle, at the moment in wine we set it to 0.
@@ -88,12 +86,7 @@ typedef struct
  * (LMEM_DISCARDED >> 8)
  */
 
-#ifdef ALLOW_UNALIGNED_ACCESS
-# define MOVEABLE_PREFIX sizeof(HLOCAL16)
-#else
-# define MOVEABLE_PREFIX sizeof(int)
-#endif
-
+#define MOVEABLE_PREFIX sizeof(HLOCAL16)
 
 #include "pshpack1.h"
 
diff --git a/include/basetsd.h b/include/basetsd.h
index c4b9e18f28..c9f5c90e86 100644
--- a/include/basetsd.h
+++ b/include/basetsd.h
@@ -271,34 +271,24 @@ typedef ULONG_PTR KAFFINITY, *PKAFFINITY;
 /* These are hardcoded to avoid dependencies on config.h in Winelib apps. */
 #if defined(__i386__)
 # undef  WORDS_BIGENDIAN
-# define ALLOW_UNALIGNED_ACCESS
 #elif defined(__x86_64__)
 # undef  WORDS_BIGENDIAN
-# define ALLOW_UNALIGNED_ACCESS
 #elif defined(__powerpc__)
 # define WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__ALPHA__)
 # undef  WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__ARMEB__)
 # define WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__ARMEL__) || defined(__arm__)
 # undef  WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__AARCH64EB__)
 # define WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__AARCH64EL__) || defined(__aarch64__)
 # undef  WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__MIPSEB__)
 # define WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif defined(__MIPSEL__)
 # undef  WORDS_BIGENDIAN
-# undef  ALLOW_UNALIGNED_ACCESS
 #elif !defined(RC_INVOKED) && !defined(__WIDL__) && !defined(__midl)
 # error Unknown CPU architecture!
 #endif




More information about the wine-cvs mailing list