odbc32: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-16 08:11:52 +01:00 committed by Alexandre Julliard
parent 06111f34d8
commit 773bdcf7de
2 changed files with 17 additions and 18 deletions

View file

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = odbc32.dll MODULE = odbc32.dll
UNIXLIB = odbc32.so UNIXLIB = odbc32.so
IMPORTLIB = odbc32 IMPORTLIB = odbc32

View file

@ -107,14 +107,14 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
if ((reg_ret = RegSetValueExA (hDrivers, desc, 0, if ((reg_ret = RegSetValueExA (hDrivers, desc, 0,
REG_SZ, (const BYTE *)"Installed", 10)) != ERROR_SUCCESS) REG_SZ, (const BYTE *)"Installed", 10)) != ERROR_SUCCESS)
{ {
TRACE ("Error %d replicating driver %s\n", TRACE ("Error %ld replicating driver %s\n",
reg_ret, desc); reg_ret, desc);
success = FALSE; success = FALSE;
} }
} }
else if (reg_ret != ERROR_SUCCESS) else if (reg_ret != ERROR_SUCCESS)
{ {
TRACE ("Error %d checking for %s in drivers\n", TRACE ("Error %ld checking for %s in drivers\n",
reg_ret, desc); reg_ret, desc);
success = FALSE; success = FALSE;
} }
@ -131,12 +131,12 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
*/ */
if ((reg_ret = RegCloseKey (hThis)) != if ((reg_ret = RegCloseKey (hThis)) !=
ERROR_SUCCESS) ERROR_SUCCESS)
TRACE ("Error %d closing %s key\n", reg_ret, TRACE ("Error %ld closing %s key\n", reg_ret,
desc); desc);
} }
else else
{ {
TRACE ("Error %d ensuring driver key %s\n", TRACE ("Error %ld ensuring driver key %s\n",
reg_ret, desc); reg_ret, desc);
success = FALSE; success = FALSE;
} }
@ -155,21 +155,21 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
} }
if ((reg_ret = RegCloseKey (hDrivers)) != ERROR_SUCCESS) if ((reg_ret = RegCloseKey (hDrivers)) != ERROR_SUCCESS)
{ {
TRACE ("Error %d closing hDrivers\n", reg_ret); TRACE ("Error %ld closing hDrivers\n", reg_ret);
} }
} }
else else
{ {
TRACE ("Error %d opening HKLM\\S\\O\\OI\\Drivers\n", reg_ret); TRACE ("Error %ld opening HKLM\\S\\O\\OI\\Drivers\n", reg_ret);
} }
if ((reg_ret = RegCloseKey (hODBCInst)) != ERROR_SUCCESS) if ((reg_ret = RegCloseKey (hODBCInst)) != ERROR_SUCCESS)
{ {
TRACE ("Error %d closing HKLM\\S\\O\\ODBCINST.INI\n", reg_ret); TRACE ("Error %ld closing HKLM\\S\\O\\ODBCINST.INI\n", reg_ret);
} }
} }
else else
{ {
TRACE ("Error %d opening HKLM\\S\\O\\ODBCINST.INI\n", reg_ret); TRACE ("Error %ld opening HKLM\\S\\O\\ODBCINST.INI\n", reg_ret);
} }
if (!success) if (!success)
{ {
@ -242,26 +242,26 @@ static void ODBC_ReplicateODBCToRegistry (BOOL is_user, SQLHENV hEnv)
if ((reg_ret = RegSetValueExA (hDSN, DRIVERKEY, 0, if ((reg_ret = RegSetValueExA (hDSN, DRIVERKEY, 0,
REG_SZ, (LPBYTE)desc, sizedesc)) != ERROR_SUCCESS) REG_SZ, (LPBYTE)desc, sizedesc)) != ERROR_SUCCESS)
{ {
TRACE ("Error %d replicating description of " TRACE ("Error %ld replicating description of "
"%s(%s)\n", reg_ret, dsn, desc); "%s(%s)\n", reg_ret, dsn, desc);
success = FALSE; success = FALSE;
} }
} }
else if (reg_ret != ERROR_SUCCESS) else if (reg_ret != ERROR_SUCCESS)
{ {
TRACE ("Error %d checking for description of %s\n", TRACE ("Error %ld checking for description of %s\n",
reg_ret, dsn); reg_ret, dsn);
success = FALSE; success = FALSE;
} }
if ((reg_ret = RegCloseKey (hDSN)) != ERROR_SUCCESS) if ((reg_ret = RegCloseKey (hDSN)) != ERROR_SUCCESS)
{ {
TRACE ("Error %d closing %s DSN key %s\n", TRACE ("Error %ld closing %s DSN key %s\n",
reg_ret, which, dsn); reg_ret, which, dsn);
} }
} }
else else
{ {
TRACE ("Error %d opening %s DSN key %s\n", TRACE ("Error %ld opening %s DSN key %s\n",
reg_ret, which, dsn); reg_ret, which, dsn);
success = FALSE; success = FALSE;
} }
@ -281,13 +281,13 @@ static void ODBC_ReplicateODBCToRegistry (BOOL is_user, SQLHENV hEnv)
} }
if ((reg_ret = RegCloseKey (hODBC)) != ERROR_SUCCESS) if ((reg_ret = RegCloseKey (hODBC)) != ERROR_SUCCESS)
{ {
TRACE ("Error %d closing %s ODBC.INI registry key\n", reg_ret, TRACE ("Error %ld closing %s ODBC.INI registry key\n", reg_ret,
which); which);
} }
} }
else else
{ {
TRACE ("Error %d creating/opening %s ODBC.INI registry key\n", TRACE ("Error %ld creating/opening %s ODBC.INI registry key\n",
reg_ret, which); reg_ret, which);
} }
if (!success) if (!success)
@ -421,7 +421,7 @@ SQLRETURN WINAPI SQLAllocHandleStd(SQLSMALLINT HandleType, SQLHANDLE InputHandle
static const char *debugstr_sqllen( SQLLEN len ) static const char *debugstr_sqllen( SQLLEN len )
{ {
#ifdef _WIN64 #ifdef _WIN64
return wine_dbg_sprintf( "%ld", len ); return wine_dbg_sprintf( "%Id", len );
#else #else
return wine_dbg_sprintf( "%d", len ); return wine_dbg_sprintf( "%d", len );
#endif #endif
@ -448,7 +448,7 @@ SQLRETURN WINAPI SQLBindCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber,
static const char *debugstr_sqlulen( SQLULEN len ) static const char *debugstr_sqlulen( SQLULEN len )
{ {
#ifdef _WIN64 #ifdef _WIN64
return wine_dbg_sprintf( "%lu", len ); return wine_dbg_sprintf( "%Iu", len );
#else #else
return wine_dbg_sprintf( "%u", len ); return wine_dbg_sprintf( "%u", len );
#endif #endif
@ -2648,7 +2648,7 @@ SQLRETURN WINAPI SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA
*/ */
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
{ {
TRACE("proxy ODBC: %p,%x,%p\n", hinstDLL, reason, reserved); TRACE("proxy ODBC: %p,%lx,%p\n", hinstDLL, reason, reserved);
switch (reason) switch (reason)
{ {