diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-04 10:54:04 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-04 10:54:04 +0000 |
commit | 431efc92464c39d36085387a25314a9c845fb376 (patch) | |
tree | 49192b7d0f22a930ddc7a1570b10d4ca9850ae25 /unixODBC/inc | |
parent | 37b9d9b3d30fae28108bbc8df093b2542f3840d2 (diff) |
INTEGRATION: CWS ooo20031216 (1.1.44); FILE MERGED
2003/12/30 08:07:47 pjanik 1.1.44.1: #i11149#: Make ODBC/SQL types 64-bit clean
Diffstat (limited to 'unixODBC/inc')
-rw-r--r-- | unixODBC/inc/sqltypes.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/unixODBC/inc/sqltypes.h b/unixODBC/inc/sqltypes.h index 09ca4a35072c..2a033873ce06 100644 --- a/unixODBC/inc/sqltypes.h +++ b/unixODBC/inc/sqltypes.h @@ -30,6 +30,14 @@ extern "C" { #endif +#ifndef SIZEOF_LONG +# if defined(__alpha__) || defined(__x86_64__) || defined(__ia64__) +# define SIZEOF_LONG 8 +#else +# define SIZEOF_LONG 4 +#endif +#endif + /**************************** * These make up for having no windows.h ***************************/ @@ -47,7 +55,11 @@ typedef char CHAR; typedef void VOID; #endif typedef unsigned short WORD; -typedef unsigned long DWORD; +#if SIZEOF_LONG == 4 + typedef unsigned long DWORD; +#else + typedef unsigned int DWORD; +#endif typedef unsigned char BYTE; typedef unsigned short WCHAR; typedef WCHAR* LPWSTR; @@ -68,7 +80,11 @@ typedef double SQLDOUBLE; typedef double SQLFLOAT; #endif -typedef long SQLINTEGER; +#if SIZEOF_LONG == 4 + typedef long SQLINTEGER; +#else + typedef int SQLINTEGER; +#endif #if (ODBCVER >= 0x0300) typedef unsigned char SQLNUMERIC; @@ -114,9 +130,14 @@ typedef SQLINTEGER SQLHSTMT; typedef unsigned char UCHAR; typedef signed char SCHAR; typedef SCHAR SQLSCHAR; -typedef long int SDWORD; +#if SIZEOF_LONG == 4 + typedef long int SDWORD; + typedef unsigned long int UDWORD; +#else + typedef signed int SDWORD; + typedef unsigned int UDWORD; +#endif typedef signed short int SWORD; -typedef unsigned long int UDWORD; typedef unsigned short int UWORD; typedef UDWORD SQLUINTEGER; typedef signed long SLONG; |