summaryrefslogtreecommitdiff
path: root/ext/odbc/php_odbc_includes.h
diff options
context:
space:
mode:
authorStanley Sufficool <ssufficool@php.net>2014-10-20 21:33:32 -0700
committerStanley Sufficool <ssufficool@php.net>2014-10-20 21:33:32 -0700
commit8defcb855ab01d9c8ab4759cb793d80149b55a8c (patch)
treeed51eb30a2cbc92b102557498fb3e4113da1bb07 /ext/odbc/php_odbc_includes.h
parent9c7dbb0487f5991fde03873ea8f5e66d6688415f (diff)
parentbaddb1c73a170ef1d2c31bd54cddbc6e1ab596b9 (diff)
downloadphp-git-8defcb855ab01d9c8ab4759cb793d80149b55a8c.tar.gz
Merge branch 'master' of https://git.php.net/push/php-src
* 'master' of https://git.php.net/push/php-src: (6215 commits) Extra comma Moved proxy object support in ASSIGN_ADD (and family) from VM to slow paths of corresponding operators Simplification zend_get_property_info_quick() cleanup and optimization initialize lineno before calling compile file file in phar Use ADDREF instead of DUP, it must be enough. Removed old irrelevant comment fixed compilation error Fix bug #68262: Broken reference across cloned objects export functions needed for phpdbg Fixed compilation Optimized property access handlers. Removed EG(std_property_info). Fixed bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads) Don't make difference between undefined and unaccessible properies when call __get() and family Don't make useless CSE array_pop/array_shift optimization check for zlib headers as well as lib for mysqlnd a realpath cache key can be int or float, catching this News entry for new curl constants News entry for new curl constants ...
Diffstat (limited to 'ext/odbc/php_odbc_includes.h')
-rw-r--r--ext/odbc/php_odbc_includes.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h
index ca237c0537..6a7e5c3756 100644
--- a/ext/odbc/php_odbc_includes.h
+++ b/ext/odbc/php_odbc_includes.h
@@ -1,8 +1,8 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 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 |
@@ -115,6 +115,7 @@ PHP_FUNCTION(solid_fetch_prev);
#endif
#define ODBC_TYPE "unixODBC"
+#undef ODBCVER
#include <sql.h>
#include <sqlext.h>
#define HAVE_SQL_EXTENDED_FETCH 1
@@ -160,7 +161,7 @@ PHP_FUNCTION(solid_fetch_prev);
#define ODBC_TYPE "Birdstep"
#define UNIX
/*
- * Extended Fetch in the Birdstep ODBC API is incapable of returning long varchar (memo) fields.
+ * Extended Fetch in the Birdstep ODBC API is incapable of returning zend_long varchar (memo) fields.
* So the following line has been commented-out to accommodate. - KNS
*
* #define HAVE_SQL_EXTENDED_FETCH 1
@@ -227,12 +228,12 @@ typedef struct odbc_connection {
ODBC_SQL_CONN_T hdbc;
char laststate[6];
char lasterrormsg[SQL_MAX_MESSAGE_LENGTH];
- int id;
+ zend_resource *res;
int persistent;
} odbc_connection;
typedef struct odbc_result_value {
- char name[32];
+ char name[256];
char *value;
SQLLEN vallen;
SQLLEN coltype;
@@ -246,7 +247,7 @@ typedef struct odbc_result {
# if HAVE_SQL_EXTENDED_FETCH
int fetch_abs;
# endif
- long longreadlen;
+ zend_long longreadlen;
int binmode;
int fetched;
odbc_connection *conn_ptr;
@@ -256,16 +257,16 @@ ZEND_BEGIN_MODULE_GLOBALS(odbc)
char *defDB;
char *defUser;
char *defPW;
- long allow_persistent;
- long check_persistent;
- long max_persistent;
- long max_links;
- long num_persistent;
- long num_links;
+ zend_long allow_persistent;
+ zend_long check_persistent;
+ zend_long max_persistent;
+ zend_long max_links;
+ zend_long num_persistent;
+ zend_long num_links;
int defConn;
- long defaultlrl;
- long defaultbinmode;
- long default_cursortype;
+ zend_long defaultlrl;
+ zend_long defaultbinmode;
+ zend_long default_cursortype;
char laststate[6];
char lasterrormsg[SQL_MAX_MESSAGE_LENGTH];
HashTable *resource_list;
@@ -284,7 +285,11 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC);
void odbc_sql_error(ODBC_SQL_ERROR_PARAMS);
+#if defined(ODBCVER) && (ODBCVER >= 0x0300)
+#define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR || x == SQL_WLONGVARCHAR)
+#else
#define IS_SQL_LONG(x) (x == SQL_LONGVARBINARY || x == SQL_LONGVARCHAR)
+#endif
#define IS_SQL_BINARY(x) (x == SQL_BINARY || x == SQL_VARBINARY || x == SQL_LONGVARBINARY)
#ifdef ZTS