summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamjan Jovanovic <damjan@apache.org>2018-03-05 17:31:41 +0000
committerDamjan Jovanovic <damjan@apache.org>2018-03-05 17:31:41 +0000
commit9ab0a116fec8762da6ff31f2e103d5a2a7dae8ae (patch)
treedc61ed9e6574e3300a40494980bb9ac1db8b597c
parentf57ea524e269128fbd6ff21e212e46f1248740b0 (diff)
Add some initial fixes for Win64 in main/sal.
Patch by: me
Notes
Notes: prefer: 7e86fc3fe72f67b0d9240b4afad28c66dc482c80
-rw-r--r--sal/inc/osl/endian.h2
-rw-r--r--sal/inc/sal/types.h15
2 files changed, 16 insertions, 1 deletions
diff --git a/sal/inc/osl/endian.h b/sal/inc/osl/endian.h
index b1a010922f58..3ea794f1a096 100644
--- a/sal/inc/osl/endian.h
+++ b/sal/inc/osl/endian.h
@@ -35,6 +35,8 @@ extern "C" {
#ifdef _WIN32
# if defined(_M_IX86)
# define _LITTLE_ENDIAN
+# elif defined(_M_AMD64)
+# define _LITTLE_ENDIAN
# elif defined(_M_MRX000)
# define _LITTLE_ENDIAN
# elif defined(_M_ALPHA)
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 1f4a0fedd077..7bf1685848ba 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -29,7 +29,7 @@
/* Grab __SIZEOFxxx constants from typesconfig tool on Unix */
#if defined UNX
#include <sal/typesizes.h>
-#elif defined(WNT) || defined(OS2)
+#elif defined(WNT)
/* FIXME: autogeneration of type sizes on Win32/Win64? */
#define SAL_TYPES_ALIGNMENT2 1
#define SAL_TYPES_ALIGNMENT4 1
@@ -38,6 +38,19 @@
#define SAL_TYPES_SIZEOFINT 4
#define SAL_TYPES_SIZEOFLONG 4
#define SAL_TYPES_SIZEOFLONGLONG 8
+ #if defined(_M_IX86)
+ #define SAL_TYPES_SIZEOFPOINTER 4
+ #elif defined(_M_AMD64)
+ #define SAL_TYPES_SIZEOFPOINTER 8
+ #endif
+#elif defined(OS2)
+ #define SAL_TYPES_ALIGNMENT2 1
+ #define SAL_TYPES_ALIGNMENT4 1
+ #define SAL_TYPES_ALIGNMENT8 1
+ #define SAL_TYPES_SIZEOFSHORT 2
+ #define SAL_TYPES_SIZEOFINT 4
+ #define SAL_TYPES_SIZEOFLONG 4
+ #define SAL_TYPES_SIZEOFLONGLONG 8
#define SAL_TYPES_SIZEOFPOINTER 4
#endif