summaryrefslogtreecommitdiff
path: root/ext/odbc/php_odbc_includes.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/odbc/php_odbc_includes.h')
-rw-r--r--ext/odbc/php_odbc_includes.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h
index 9ccbd7b76..a5f8244e9 100644
--- a/ext/odbc/php_odbc_includes.h
+++ b/ext/odbc/php_odbc_includes.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2008 The PHP Group |
+ | Copyright (c) 1997-2009 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc_includes.h,v 1.12.2.1.2.5 2007/12/31 07:20:09 sebastian Exp $ */
+/* $Id: php_odbc_includes.h,v 1.12.2.1.2.8 2008/12/31 11:17:40 sebastian Exp $ */
#ifndef PHP_ODBC_INCLUDES_H
#define 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
@@ -261,6 +265,7 @@ ZEND_BEGIN_MODULE_GLOBALS(odbc)
int defConn;
long defaultlrl;
long defaultbinmode;
+ long default_cursortype;
char laststate[6];
char lasterrormsg[SQL_MAX_MESSAGE_LENGTH];
HashTable *resource_list;