From ab76cdb236fe35df9e3b0ce8e35bf1b16982715c Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 29 Jan 2013 19:15:22 +0400 Subject: Compilation failed on Debian 32-bit. Fixing DWORD definition once again as "unsigned long", which is the way how MS defines it. modified: @ storage/connect/os.h Changing DWORD defitition @ storage/connect/tabodbc.cpp Moving "#define NODW" to proper place. --- storage/connect/os.h | 8 +++++++- storage/connect/tabodbc.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'storage') diff --git a/storage/connect/os.h b/storage/connect/os.h index 90e8eea1141..52eed14df0f 100644 --- a/storage/connect/os.h +++ b/storage/connect/os.h @@ -28,7 +28,13 @@ typedef char *LPTSTR; typedef char *PSZ; typedef int INT; #if !defined(NODW) -typedef unsigned int DWORD; +/* + sqltypes.h from unixODBC incorrectly defines + DWORD as "unsigned int" instead of "unsigned long" on 64-bit platforms. + Add "#define NODW" into all files including this file that include + sqltypes.h (through sql.h or sqlext.h). +*/ +typedef unsigned long DWORD; #endif /* !NODW */ #undef HANDLE typedef int HANDLE; diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp index caec386d683..0b45691bcc3 100644 --- a/storage/connect/tabodbc.cpp +++ b/storage/connect/tabodbc.cpp @@ -46,12 +46,12 @@ #else #if defined(UNIX) #include +#define NODW #include "osutil.h" #else #include #endif #include -#define NODW #endif /***********************************************************************/ -- cgit v1.2.1