]> granicus.if.org Git - php/commitdiff
make configure smarter.
authorWez Furlong <wez@php.net>
Sun, 6 Feb 2005 22:25:33 +0000 (22:25 +0000)
committerWez Furlong <wez@php.net>
Sun, 6 Feb 2005 22:25:33 +0000 (22:25 +0000)
Update for new get_col() signature

ext/pdo_odbc/config.m4
ext/pdo_odbc/odbc_stmt.c

index 15aed2878763c9e7575967a7ee58ab2191ca8232..a785c73c3b8b07b419a542694a07ebca1e0aeaaa 100755 (executable)
@@ -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
 
index d62ad3df34226f341647e766807ad5ea6cad39b5..b726dd2ed4d8f61a5016b8755b8fb99c0c607b21 100755 (executable)
@@ -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];