diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-08-18 02:28:30 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-08-18 02:28:30 +0400 |
commit | 9f6109002b158e4285d7c88ffc573f2cd4ac62ce (patch) | |
tree | 7f7d7d4ca070fded30a92f95f305059923c9f269 /intern | |
parent | 904b97eee91a8e07e56dc6c58e69843cd9ec2369 (diff) |
Fix compile problem in MSVC after Win64 patch
Diffstat (limited to 'intern')
-rw-r--r-- | intern/guardedalloc/BLO_sys_types.h | 16 | ||||
-rw-r--r-- | intern/opennl/superlu/BLO_sys_types.h | 16 |
2 files changed, 30 insertions, 2 deletions
diff --git a/intern/guardedalloc/BLO_sys_types.h b/intern/guardedalloc/BLO_sys_types.h index 17fa99308e0..4d3ffbe023d 100644 --- a/intern/guardedalloc/BLO_sys_types.h +++ b/intern/guardedalloc/BLO_sys_types.h @@ -69,13 +69,23 @@ typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; +#ifndef _INTPTR_T_DEFINED #ifdef _WIN64 typedef __int64 intptr_t; -typedef unsigned __int64 uintptr_t; #else typedef long intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else typedef unsigned long uintptr_t; #endif +#define _UINTPTR_T_DEFINED +#endif #elif defined(__linux__) @@ -94,8 +104,12 @@ typedef unsigned long uintptr_t; #endif /* ifdef platform for types */ #ifdef _WIN32 +#ifndef htonl #define htonl(x) correctByteOrder(x) +#endif +#ifndef ntohl #define ntohl(x) correctByteOrder(x) +#endif #elif defined (__FreeBSD__) || defined (__OpenBSD__) #include <sys/param.h> #elif defined (__APPLE__) diff --git a/intern/opennl/superlu/BLO_sys_types.h b/intern/opennl/superlu/BLO_sys_types.h index 17fa99308e0..4d3ffbe023d 100644 --- a/intern/opennl/superlu/BLO_sys_types.h +++ b/intern/opennl/superlu/BLO_sys_types.h @@ -69,13 +69,23 @@ typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; +#ifndef _INTPTR_T_DEFINED #ifdef _WIN64 typedef __int64 intptr_t; -typedef unsigned __int64 uintptr_t; #else typedef long intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else typedef unsigned long uintptr_t; #endif +#define _UINTPTR_T_DEFINED +#endif #elif defined(__linux__) @@ -94,8 +104,12 @@ typedef unsigned long uintptr_t; #endif /* ifdef platform for types */ #ifdef _WIN32 +#ifndef htonl #define htonl(x) correctByteOrder(x) +#endif +#ifndef ntohl #define ntohl(x) correctByteOrder(x) +#endif #elif defined (__FreeBSD__) || defined (__OpenBSD__) #include <sys/param.h> #elif defined (__APPLE__) |