summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xext/pdo_odbc/config.m435
-rwxr-xr-xext/pdo_odbc/odbc_stmt.c2
2 files changed, 16 insertions, 21 deletions
diff --git a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4
index 15aed28787..a785c73c3b 100755
--- a/ext/pdo_odbc/config.m4
+++ b/ext/pdo_odbc/config.m4
@@ -7,7 +7,7 @@ AC_DEFUN(PDO_ODBC_HELP_TEXT, [[
looking for include and lib dirs under "dir"
flavour can be one of:
- ibm-db2, unixODBC, ODBCRouter, generic
+ ibm-db2, unixODBC, generic
You may omit the ,dir part to use a reasonable default for
the flavour you have selected. e.g.:
@@ -30,20 +30,8 @@ AC_DEFUN([PDO_ODBC_CHECK_HEADER],[
fi
])
-AC_MSG_CHECKING(which ODBC flavour you want)
-if test "$PHP_PDO_ODBC" != "no" && test "$PHP_PDO_ODBC" != "yes" ; then
-
- AC_MSG_CHECKING([for PDO includes])
- if test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$prefix/include/php/ext
- elif test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$abs_srcdir/ext
- elif test -f ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=ext
- else
- AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
- fi
- AC_MSG_RESULT($pdo_inc_path)
+if test "$PHP_PDO_ODBC" != "no"; then
+ AC_MSG_CHECKING(which ODBC flavour you want)
pdo_odbc_flavour=`echo $withval | cut -d, -f1`
pdo_odbc_dir=`echo $withval | cut -d, -f2`
@@ -143,12 +131,19 @@ functions required for PDO support.
PHP_EVAL_LIBLINE($PDO_ODBC_LIBS $PDO_ODBC_LFLAGS, [PDO_ODBC_SHARED_LIBADD])
PHP_SUBST(PDO_ODBC_SHARED_LIBADD)
+ AC_MSG_CHECKING([for PDO includes])
+ if test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$prefix/include/php/ext
+ elif test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$abs_srcdir/ext
+ elif test -f ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=ext
+ else
+ AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
+ fi
+ AC_MSG_RESULT($pdo_inc_path)
+
PHP_NEW_EXTENSION(pdo_odbc, pdo_odbc.c odbc_driver.c odbc_stmt.c, $ext_shared,,-I$pdo_inc_path $PDO_ODBC_INCLUDE)
PHP_ADD_EXTENSION_DEP(pdo_odbc, pdo)
-else
- AC_MSG_ERROR(
-Unknown ODBC flavour $PHP_PDO_ODBC
-PDO_ODBC_HELP_TEXT
-)
fi
diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index d62ad3df34..b726dd2ed4 100755
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -217,7 +217,7 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
return 1;
}
-static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len TSRMLS_DC)
+static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len, int *caller_frees TSRMLS_DC)
{
pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
pdo_odbc_column *C = &S->cols[colno];