summaryrefslogtreecommitdiff
path: root/ext/odbc/php_odbc.h
diff options
context:
space:
mode:
authorAndreas Karajannis <kara@php.net>1999-10-08 19:35:50 +0000
committerAndreas Karajannis <kara@php.net>1999-10-08 19:35:50 +0000
commit2051682665d55b96d8b6063853c0f8720d91305b (patch)
tree9502a83beffc9eaf9bf5d4081aaa9c598d1b02b2 /ext/odbc/php_odbc.h
parent405934a4834a95982c976b97960651f5a6d403e5 (diff)
downloadphp-git-2051682665d55b96d8b6063853c0f8720d91305b.tar.gz
Moved Environment handle to connection struct for thread safety
Diffstat (limited to 'ext/odbc/php_odbc.h')
-rw-r--r--ext/odbc/php_odbc.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h
index 5aa7628396..f82fb8ee28 100644
--- a/ext/odbc/php_odbc.h
+++ b/ext/odbc/php_odbc.h
@@ -190,8 +190,10 @@ PHP_FUNCTION(odbc_tableprivileges);
typedef struct odbc_connection {
#if defined( HAVE_DB2 ) || defined( HAVE_UNIXODBC )
+ SQLHANDLE henv;
SQLHANDLE hdbc;
#else
+ HENV henv;
HDBC hdbc;
#endif
int open;
@@ -245,10 +247,12 @@ void odbc_del_result(HashTable *list, int count);
int odbc_add_conn(HashTable *list, HDBC conn);
odbc_connection *odbc_get_conn(HashTable *list, int count);
void odbc_del_conn(HashTable *list, int ind);
+
+#define ODBC_SQL_ERROR odbc_sql_error
#if defined( HAVE_DB2 ) || defined( HAVE_UNIXODBC )
-void odbc_sql_error(SQLHANDLE conn, SQLHANDLE stmt, char *func);
+void odbc_sql_error(SQLHANDLE henv, SQLHANDLE conn, SQLHANDLE stmt, char *func);
#else
-void odbc_sql_error(HDBC conn, HSTMT stmt, char *func);
+void odbc_sql_error(HENV henv, HDBC conn, HSTMT stmt, char *func);
#endif
int odbc_bindcols(odbc_result *result);