Commit 1ce71ab7 authored by Alexandre Julliard's avatar Alexandre Julliard

odbc32: Fix some data types for 64-bit.

parent 92013d7b
...@@ -688,7 +688,7 @@ static BOOL ODBC_LoadDMFunctions(void) ...@@ -688,7 +688,7 @@ static BOOL ODBC_LoadDMFunctions(void)
SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionHandle) SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionHandle)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("Env=%lx\n",EnvironmentHandle); TRACE("Env=%p\n",EnvironmentHandle);
if (!pSQLAllocConnect) if (!pSQLAllocConnect)
{ {
...@@ -698,7 +698,7 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH ...@@ -698,7 +698,7 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH
} }
ret = pSQLAllocConnect(EnvironmentHandle, ConnectionHandle); ret = pSQLAllocConnect(EnvironmentHandle, ConnectionHandle);
TRACE("Returns ret=%d, Handle %lx\n",ret, *ConnectionHandle); TRACE("Returns ret=%d, Handle %p\n",ret, *ConnectionHandle);
return ret; return ret;
} }
...@@ -719,7 +719,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) ...@@ -719,7 +719,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
} }
ret = pSQLAllocEnv(EnvironmentHandle); ret = pSQLAllocEnv(EnvironmentHandle);
TRACE("Returns ret=%d, Env=%lx\n",ret, *EnvironmentHandle); TRACE("Returns ret=%d, Env=%p\n",ret, *EnvironmentHandle);
return ret; return ret;
} }
...@@ -730,7 +730,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) ...@@ -730,7 +730,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle) SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Type=%d, Handle=%lx)\n",HandleType,InputHandle); TRACE("(Type=%d, Handle=%p)\n",HandleType,InputHandle);
if (!pSQLAllocHandle) if (!pSQLAllocHandle)
{ {
...@@ -751,7 +751,7 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S ...@@ -751,7 +751,7 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S
} }
ret = pSQLAllocHandle(HandleType, InputHandle, OutputHandle); ret = pSQLAllocHandle(HandleType, InputHandle, OutputHandle);
TRACE("Returns ret=%d, Handle=%lx\n",ret, *OutputHandle); TRACE("Returns ret=%d, Handle=%p\n",ret, *OutputHandle);
return ret; return ret;
} }
...@@ -763,7 +763,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl ...@@ -763,7 +763,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Connection=%lx)\n",ConnectionHandle); TRACE("(Connection=%p)\n",ConnectionHandle);
if (!pSQLAllocStmt) if (!pSQLAllocStmt)
{ {
...@@ -773,7 +773,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl ...@@ -773,7 +773,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl
} }
ret = pSQLAllocStmt(ConnectionHandle, StatementHandle); ret = pSQLAllocStmt(ConnectionHandle, StatementHandle);
TRACE ("Returns ret=%d, Handle=%lx\n", ret, *StatementHandle); TRACE ("Returns ret=%d, Handle=%p\n", ret, *StatementHandle);
return ret; return ret;
} }
...@@ -864,7 +864,7 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) ...@@ -864,7 +864,7 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle)
SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle) SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Handle=%lx)\n",StatementHandle); TRACE("(Handle=%p)\n",StatementHandle);
if (!pSQLCloseCursor) return SQL_ERROR; if (!pSQLCloseCursor) return SQL_ERROR;
...@@ -951,7 +951,7 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle, ...@@ -951,7 +951,7 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("EnvironmentHandle = %p\n", (LPVOID)EnvironmentHandle); TRACE("EnvironmentHandle = %p\n", EnvironmentHandle);
if (!pSQLDataSources) return SQL_ERROR; if (!pSQLDataSources) return SQL_ERROR;
...@@ -979,7 +979,7 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle, ...@@ -979,7 +979,7 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle,
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("EnvironmentHandle = %p\n", (void*)EnvironmentHandle); TRACE("EnvironmentHandle = %p\n", EnvironmentHandle);
if (!pSQLDataSourcesA) return SQL_ERROR; if (!pSQLDataSourcesA) return SQL_ERROR;
...@@ -1021,7 +1021,7 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, ...@@ -1021,7 +1021,7 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Handle=%lx)\n", ConnectionHandle); TRACE("(Handle=%p)\n", ConnectionHandle);
if (!pSQLDisconnect) return SQL_ERROR; if (!pSQLDisconnect) return SQL_ERROR;
...@@ -1114,7 +1114,7 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien ...@@ -1114,7 +1114,7 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien
SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Handle=%lx)\n",ConnectionHandle); TRACE("(Handle=%p)\n",ConnectionHandle);
if (!pSQLFreeConnect) return SQL_ERROR; if (!pSQLFreeConnect) return SQL_ERROR;
...@@ -1130,7 +1130,7 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) ...@@ -1130,7 +1130,7 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle) SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Env=%lx)\n",EnvironmentHandle); TRACE("(Env=%p)\n",EnvironmentHandle);
if (!pSQLFreeEnv) return SQL_ERROR; if (!pSQLFreeEnv) return SQL_ERROR;
...@@ -1146,7 +1146,7 @@ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle) ...@@ -1146,7 +1146,7 @@ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle)
SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Type=%d, Handle=%lx)\n",HandleType,Handle); TRACE("(Type=%d, Handle=%p)\n",HandleType,Handle);
if (!pSQLFreeHandle) return SQL_ERROR; if (!pSQLFreeHandle) return SQL_ERROR;
...@@ -1162,7 +1162,7 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) ...@@ -1162,7 +1162,7 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option)
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("(Handle %lx, Option=%d)\n",StatementHandle, Option); TRACE("(Handle %p, Option=%d)\n",StatementHandle, Option);
if (!pSQLFreeStmt) return SQL_ERROR; if (!pSQLFreeStmt) return SQL_ERROR;
...@@ -2039,7 +2039,7 @@ SQLRETURN WINAPI SQLColAttributesW( ...@@ -2039,7 +2039,7 @@ SQLRETURN WINAPI SQLColAttributesW(
{ {
SQLRETURN iResult; SQLRETURN iResult;
TRACE("hstmt=0x%08lx icol=%d fDescType=%d rgbDesc=%p cbDescMax=%d pcbDesc=%p pfDesc=%p\n", TRACE("hstmt=%p icol=%d fDescType=%d rgbDesc=%p cbDescMax=%d pcbDesc=%p pfDesc=%p\n",
hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
if (!pSQLColAttributesW) return SQL_ERROR; if (!pSQLColAttributesW) return SQL_ERROR;
...@@ -2085,7 +2085,7 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, ...@@ -2085,7 +2085,7 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle,
SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, WCHAR *ColumnName, SQLUSMALLINT ColumnNumber, WCHAR *ColumnName,
SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize, SQLSMALLINT *DataType, SQLULEN *ColumnSize,
SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
{ {
SQLRETURN iResult; SQLRETURN iResult;
...@@ -2182,7 +2182,7 @@ SQLRETURN WINAPI SQLColAttributeW (SQLHSTMT StatementHandle, ...@@ -2182,7 +2182,7 @@ SQLRETURN WINAPI SQLColAttributeW (SQLHSTMT StatementHandle,
{ {
SQLRETURN iResult; SQLRETURN iResult;
TRACE("StatementHandle=0x%08lx ColumnNumber=%d FieldIdentifier=%d CharacterAttribute=%p BufferLength=%d StringLength=%p NumericAttribute=%p\n", TRACE("StatementHandle=%p ColumnNumber=%d FieldIdentifier=%d CharacterAttribute=%p BufferLength=%d StringLength=%p NumericAttribute=%p\n",
StatementHandle, ColumnNumber, FieldIdentifier, StatementHandle, ColumnNumber, FieldIdentifier,
CharacterAttribute, BufferLength, StringLength, NumericAttribute); CharacterAttribute, BufferLength, StringLength, NumericAttribute);
...@@ -2240,7 +2240,7 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, ...@@ -2240,7 +2240,7 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber, WCHAR *Name, SQLSMALLINT RecNumber, WCHAR *Name,
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
SQLSMALLINT *Type, SQLSMALLINT *SubType, SQLSMALLINT *Type, SQLSMALLINT *SubType,
SQLINTEGER *Length, SQLSMALLINT *Precision, SQLLEN *Length, SQLSMALLINT *Precision,
SQLSMALLINT *Scale, SQLSMALLINT *Nullable) SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
{ {
TRACE("\n"); TRACE("\n");
...@@ -2289,7 +2289,7 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, ...@@ -2289,7 +2289,7 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle,
{ {
SQLRETURN iResult; SQLRETURN iResult;
TRACE("Attribute = (%02ld) Value = %p BufferLength = (%ld) StringLength = %p\n", TRACE("Attribute = (%02d) Value = %p BufferLength = (%d) StringLength = %p\n",
Attribute, Value, BufferLength, StringLength); Attribute, Value, BufferLength, StringLength);
if (Value == NULL) { if (Value == NULL) {
...@@ -2507,7 +2507,7 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, ...@@ -2507,7 +2507,7 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle,
{ {
SQLRETURN ret; SQLRETURN ret;
TRACE("EnvironmentHandle = %p\n", (LPVOID)EnvironmentHandle); TRACE("EnvironmentHandle = %p\n", EnvironmentHandle);
if (!pSQLDataSourcesW) return SQL_ERROR; if (!pSQLDataSourcesW) return SQL_ERROR;
...@@ -2689,7 +2689,7 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, ...@@ -2689,7 +2689,7 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle,
SQLINTEGER StringLength) SQLINTEGER StringLength)
{ {
SQLRETURN iResult; SQLRETURN iResult;
TRACE("Attribute = (%02ld) Value = %p StringLength = (%ld)\n", TRACE("Attribute = (%02d) Value = %p StringLength = (%d)\n",
Attribute, Value, StringLength); Attribute, Value, StringLength);
if (!pSQLSetStmtAttrW) return SQL_ERROR; if (!pSQLSetStmtAttrW) return SQL_ERROR;
......
...@@ -46,7 +46,7 @@ typedef double SQLDOUBLE; ...@@ -46,7 +46,7 @@ typedef double SQLDOUBLE;
typedef double SQLFLOAT; typedef double SQLFLOAT;
#endif #endif
typedef long SQLINTEGER; typedef int SQLINTEGER;
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
typedef unsigned char SQLNUMERIC; typedef unsigned char SQLNUMERIC;
...@@ -69,27 +69,23 @@ typedef unsigned char SQLVARCHAR; ...@@ -69,27 +69,23 @@ typedef unsigned char SQLVARCHAR;
typedef SQLSMALLINT SQLRETURN; typedef SQLSMALLINT SQLRETURN;
/* typedef void * SQLHANDLE; */
typedef SQLINTEGER SQLHANDLE;
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
typedef void *SQLHANDLE;
typedef SQLHANDLE SQLHENV; typedef SQLHANDLE SQLHENV;
typedef SQLHANDLE SQLHDBC; typedef SQLHANDLE SQLHDBC;
typedef SQLHANDLE SQLHSTMT; typedef SQLHANDLE SQLHSTMT;
typedef SQLHANDLE SQLHDESC; typedef SQLHANDLE SQLHDESC;
#else #else
typedef SQLINTEGER SQLHENV; typedef void *SQLHENV;
typedef SQLINTEGER SQLHDBC; typedef void *SQLHDBC;
typedef SQLINTEGER SQLHSTMT; typedef void *SQLHSTMT;
#endif #endif
typedef signed char SCHAR; typedef signed char SCHAR;
typedef SCHAR SQLSCHAR; typedef SCHAR SQLSCHAR;
typedef long int SDWORD; typedef int SDWORD;
typedef signed short int SWORD; typedef signed short int SWORD;
typedef unsigned long int UDWORD; typedef unsigned int UDWORD;
typedef unsigned short int UWORD; typedef unsigned short int UWORD;
typedef UDWORD SQLUINTEGER; typedef UDWORD SQLUINTEGER;
typedef signed long SLONG; typedef signed long SLONG;
...@@ -207,7 +203,8 @@ typedef struct tagSQL_INTERVAL_STRUCT ...@@ -207,7 +203,8 @@ typedef struct tagSQL_INTERVAL_STRUCT
#endif #endif
#if (ODBCVER >= 0x0300) #if (ODBCVER >= 0x0300)
#define ODBCINT64 long #define ODBCINT64 __int64
#define UODBCINT64 unsigned __int64
#ifdef ODBCINT64 #ifdef ODBCINT64
typedef ODBCINT64 SQLBIGINT; typedef ODBCINT64 SQLBIGINT;
typedef unsigned ODBCINT64 SQLUBIGINT; typedef unsigned ODBCINT64 SQLUBIGINT;
...@@ -240,7 +237,7 @@ typedef struct tagSQLGUID ...@@ -240,7 +237,7 @@ typedef struct tagSQLGUID
#endif #endif
typedef unsigned long int BOOKMARK; typedef SQLULEN BOOKMARK;
#define SQL_WCHAR (-8) #define SQL_WCHAR (-8)
#define SQL_C_WCHAR SQL_WCHAR #define SQL_C_WCHAR SQL_WCHAR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment