Module: wine Branch: master Commit: 70015ab5b47dcc28c92d74d5120631156b38a79d URL: http://source.winehq.org/git/wine.git/?a=commit;h=70015ab5b47dcc28c92d74d512...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Wed Jun 6 20:12:57 2007 +0900
include/msvcrt: Make sure that __int64 is properly defined on a 64-bit platform.
---
include/msvcrt/direct.h | 12 ++++++++---- include/msvcrt/io.h | 12 +++++++++--- include/msvcrt/malloc.h | 12 ++++++++---- include/msvcrt/mbstring.h | 12 ++++++++---- include/msvcrt/search.h | 12 ++++++++---- include/msvcrt/stddef.h | 8 ++++++++ include/msvcrt/stdio.h | 12 ++++++++---- include/msvcrt/stdlib.h | 10 +++++++++- include/msvcrt/string.h | 12 ++++++++---- include/msvcrt/sys/stat.h | 6 ------ include/msvcrt/sys/types.h | 12 ++++++++---- include/msvcrt/time.h | 12 ++++++++---- include/msvcrt/wchar.h | 12 ++++++++---- 13 files changed, 98 insertions(+), 46 deletions(-)
diff --git a/include/msvcrt/direct.h b/include/msvcrt/direct.h index f0fce97..b0c4af8 100644 --- a/include/msvcrt/direct.h +++ b/include/msvcrt/direct.h @@ -24,14 +24,18 @@ typedef unsigned short wchar_t; #endif #endif
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/io.h b/include/msvcrt/io.h index 55444f0..6009fe9 100644 --- a/include/msvcrt/io.h +++ b/include/msvcrt/io.h @@ -20,9 +20,15 @@ typedef unsigned short wchar_t; #endif #endif
-#ifndef _MSC_VER -# ifndef __int64 -# define __int64 long long +#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + +#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long # endif #endif
diff --git a/include/msvcrt/malloc.h b/include/msvcrt/malloc.h index 8f904b3..25ae615 100644 --- a/include/msvcrt/malloc.h +++ b/include/msvcrt/malloc.h @@ -34,14 +34,18 @@ #define _FREEENTRY 0 #define _USEDENTRY 1
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/mbstring.h b/include/msvcrt/mbstring.h index 7e82ce8..124d215 100644 --- a/include/msvcrt/mbstring.h +++ b/include/msvcrt/mbstring.h @@ -25,14 +25,18 @@
#include <pshpack8.h>
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/search.h b/include/msvcrt/search.h index 413b697..af648d5 100644 --- a/include/msvcrt/search.h +++ b/include/msvcrt/search.h @@ -23,14 +23,18 @@ #define __WINE_USE_MSVCRT #endif
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/stddef.h b/include/msvcrt/stddef.h index 62bb850..eb45c87 100644 --- a/include/msvcrt/stddef.h +++ b/include/msvcrt/stddef.h @@ -27,6 +27,14 @@ #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _WCHAR_T_DEFINED #define _WCHAR_T_DEFINED #ifndef __cplusplus diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 01ae243..b177664 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -17,14 +17,18 @@ #include <stdarg.h> #endif
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + /* file._flag flags */ #define _IOREAD 0x0001 #define _IOWRT 0x0002 diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 27e8dbe..269f279 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -28,8 +28,16 @@ typedef unsigned short wchar_t; #endif #endif
+#if defined(__x86_64__) && !defined(_WIN64) +#define _WIN64 +#endif + #if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif #endif
#define EXIT_SUCCESS 0 diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index bf3994f..327945e 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h @@ -18,14 +18,18 @@ typedef unsigned short wchar_t; #endif #endif
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/sys/stat.h b/include/msvcrt/sys/stat.h index 9ab0edc..03b1a16 100644 --- a/include/msvcrt/sys/stat.h +++ b/include/msvcrt/sys/stat.h @@ -22,12 +22,6 @@ typedef unsigned short wchar_t; #endif #endif
-#ifndef _MSC_VER -# ifndef __int64 -# define __int64 long long -# endif -#endif - #ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; #define _DEV_T_DEFINED diff --git a/include/msvcrt/sys/types.h b/include/msvcrt/sys/types.h index 05a5ef1..663ad62 100644 --- a/include/msvcrt/sys/types.h +++ b/include/msvcrt/sys/types.h @@ -23,14 +23,18 @@ #define __WINE_USE_MSVCRT #endif
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _DEV_T_DEFINED typedef unsigned int _dev_t; #define _DEV_T_DEFINED diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index 60ec444..deb17e1 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -32,14 +32,18 @@ typedef unsigned short wchar_t; #endif #endif
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef _SIZE_T_DEFINED #ifdef _WIN64 typedef unsigned __int64 size_t; diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index e298a70..611b738 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -37,14 +37,18 @@ typedef unsigned short wchar_t; #define WCHAR_MIN 0 #define WCHAR_MAX ((wchar_t)-1)
-#if !defined(_MSC_VER) && !defined(__int64) -#define __int64 long long -#endif - #if defined(__x86_64__) && !defined(_WIN64) #define _WIN64 #endif
+#if !defined(_MSC_VER) && !defined(__int64) +# ifdef _WIN64 +# define __int64 long +# else +# define __int64 long long +# endif +#endif + #ifndef DECLSPEC_ALIGN # if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS) # define DECLSPEC_ALIGN(x) __declspec(align(x))