diff options
author | Patrick van Kleef <iodbc@php.net> | 2008-08-29 16:44:29 +0000 |
---|---|---|
committer | Patrick van Kleef <iodbc@php.net> | 2008-08-29 16:44:29 +0000 |
commit | 1401532e972172b539874f67d951130a25e41a33 (patch) | |
tree | 4cb18e619ae4ce3004d7b95a92dee55b12816fc3 /ext/odbc/php_odbc_includes.h | |
parent | 9566ebabcbb16c044ef246d7283c466cfff4531e (diff) | |
download | php-git-1401532e972172b539874f67d951130a25e41a33.tar.gz |
- MFH: Fixed code to use ODBC 3.52 datatypes for 64bit systems (bug #43666)
Diffstat (limited to 'ext/odbc/php_odbc_includes.h')
-rw-r--r-- | ext/odbc/php_odbc_includes.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index 60bd8c48fb..9add418cf1 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -90,19 +90,19 @@ PHP_FUNCTION(solid_fetch_prev); #elif defined(HAVE_IODBC) /* iODBC library */ +#ifdef CHAR +#undef CHAR +#endif + +#ifdef SQLCHAR +#undef SQLCHAR +#endif + #define ODBC_TYPE "iODBC" -#include <isql.h> -#include <isqlext.h> +#include <sql.h> +#include <sqlext.h> +#include <iodbcext.h> #define HAVE_SQL_EXTENDED_FETCH 1 -#define SQL_FD_FETCH_ABSOLUTE 0x00000010L -#define SQL_CURSOR_DYNAMIC 2UL -#define SQL_NO_TOTAL (-4) -#define SQL_SO_DYNAMIC 0x00000004L -#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100) -#define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET) -#ifndef SQL_SUCCEEDED -#define SQL_SUCCEEDED(rc) (((rc)&(~1))==0) -#endif #elif defined(HAVE_UNIXODBC) /* unixODBC library */ @@ -148,8 +148,12 @@ PHP_FUNCTION(solid_fetch_prev); #include <isqlext.h> #include <udbcext.h> #define HAVE_SQL_EXTENDED_FETCH 1 +#ifndef SQLSMALLINT #define SQLSMALLINT SWORD +#endif +#ifndef SQLUSMALLINT #define SQLUSMALLINT UWORD +#endif #elif defined(HAVE_BIRDSTEP) /* Raima Birdstep */ @@ -204,7 +208,7 @@ PHP_FUNCTION(solid_fetch_prev); /* Common defines */ -#if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC ) +#if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC ) || defined (HAVE_IODBC) #define ODBC_SQL_ENV_T SQLHANDLE #define ODBC_SQL_CONN_T SQLHANDLE #define ODBC_SQL_STMT_T SQLHANDLE @@ -230,15 +234,15 @@ typedef struct odbc_connection { typedef struct odbc_result_value { char name[32]; char *value; - SDWORD vallen; - SDWORD coltype; + SQLLEN vallen; + SQLLEN coltype; } odbc_result_value; typedef struct odbc_result { ODBC_SQL_STMT_T stmt; odbc_result_value *values; - SWORD numcols; - SWORD numparams; + SQLSMALLINT numcols; + SQLSMALLINT numparams; # if HAVE_SQL_EXTENDED_FETCH int fetch_abs; # endif |