From 20d88e4c349ab11638329a2f57d904edd6bf6227 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 2 May 2003 00:40:20 +0000 Subject: [PATCH] - Fixed bug #22580 (ext/odbc compile failure with dbmaker) --- ext/odbc/config.m4 | 1 + ext/odbc/php_odbc.c | 4 ++++ ext/odbc/php_odbc.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index 98934a59dc..20c998dec5 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -539,6 +539,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 bd08a13daa..ead26659c2 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) @@ -1169,6 +1171,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) @@ -1229,6 +1232,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 75e7f82a5c..2ffc3459a1 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); -- 2.40.0