summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-05-02 00:40:35 +0000
committerfoobar <sniper@php.net>2003-05-02 00:40:35 +0000
commitc0b58291d25042177b1d3fc21a7699c1150c8679 (patch)
tree8f3f022ab854c576a4b8c3311403ac46680dc965
parent6d9c0036b7d8cdde6f0117b0c160aff89ed57ab3 (diff)
downloadphp-git-c0b58291d25042177b1d3fc21a7699c1150c8679.tar.gz
MFH: - Fixed bug #22580 (ext/odbc compile failure with dbmaker)
-rw-r--r--ext/odbc/config.m41
-rw-r--r--ext/odbc/php_odbc.c4
-rw-r--r--ext/odbc/php_odbc.h2
3 files changed, 7 insertions, 0 deletions
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index fd1ee8c574..01a2da4568 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -538,6 +538,7 @@ if test -n "$ODBC_TYPE"; then
if test "$ODBC_TYPE" != "dbmaker"; then
ext_shared=$shared
PHP_EVAL_LIBLINE([$ODBC_LFLAGS $ODBC_LIBS], ODBC_SHARED_LIBADD)
+ AC_DEFINE(HAVE_SQLDATASOURCES,1,[ ])
fi
AC_DEFINE(HAVE_UODBC,1,[ ])
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 7415e853bd..7431014fff 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -79,7 +79,9 @@ function_entry odbc_functions[] = {
PHP_FE(odbc_commit, NULL)
PHP_FE(odbc_connect, NULL)
PHP_FE(odbc_cursor, NULL)
+#ifdef HAVE_SQLDATASOURCES
PHP_FE(odbc_data_source, NULL)
+#endif
PHP_FE(odbc_execute, NULL)
PHP_FE(odbc_error, NULL)
PHP_FE(odbc_errormsg, NULL)
@@ -1183,6 +1185,7 @@ PHP_FUNCTION(odbc_cursor)
}
/* }}} */
+#ifdef HAVE_SQLDATASOURCES
/* {{{ proto array odbc_data_source(int connection_id, int fetch_type)
Return information about the currently connected data source */
PHP_FUNCTION(odbc_data_source)
@@ -1243,6 +1246,7 @@ PHP_FUNCTION(odbc_data_source)
}
/* }}} */
+#endif /* HAVE_SQLDATASOURCES *
/* {{{ proto int odbc_exec(int connection_id, string query [, int flags])
Prepare and execute an SQL statement */
diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h
index 24b5a0db81..d7d2002fd2 100644
--- a/ext/odbc/php_odbc.h
+++ b/ext/odbc/php_odbc.h
@@ -54,7 +54,9 @@ PHP_FUNCTION(odbc_commit);
PHP_FUNCTION(odbc_connect);
PHP_FUNCTION(odbc_pconnect);
PHP_FUNCTION(odbc_cursor);
+#ifdef HAVE_SQLDATASOURCES
PHP_FUNCTION(odbc_data_source);
+#endif
PHP_FUNCTION(odbc_do);
PHP_FUNCTION(odbc_exec);
PHP_FUNCTION(odbc_execute);