cvs: php4 /ext/odbc config.m4 php_odbc.h

From: Date: Tue, 22 Aug 2000 21:27:49 +0000
Subject: cvs: php4 /ext/odbc config.m4 php_odbc.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1332@lists.php.net to get a copy of this message
kalowsky Tue Aug 22 14:27:49 2000 EDT Modified files: /php4/ext/odbc config.m4 php_odbc.h Log: cleaned up the PHP/SOLID integration code, and corrected some minor assumptions on my part for the 3.5 EE systems. also removed a series of warnings on builds within the ODBC functions, and corrected header order. include of the SS_LINUX and SS_FBX defines, needed to make solid headers completely happy with the wchar.h situation. THIS DOES NOT FIX BUG ID #4615 Index: php4/ext/odbc/config.m4 diff -u php4/ext/odbc/config.m4:1.22 php4/ext/odbc/config.m4:1.23 --- php4/ext/odbc/config.m4:1.22 Mon Jul 24 11:01:42 2000 +++ php4/ext/odbc/config.m4 Tue Aug 22 14:27:49 2000 @@ -10,15 +10,19 @@ HP-UX) ac_solid_os=h9x;; # h1x for hpux11, h0x for hpux10 IRIX) ac_solid_os=irx;; Linux) if ldd -v /bin/sh | grep GLIBC > /dev/null; then + AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) ac_solid_os=l2x else + AC_DEFINE(SS_LINUX,1,[Needed in sqlunix.h ]) ac_solid_os=lux fi;; SunOS) ac_solid_os=ssx;; # should we deal with SunOS 4? - FreeBSD) if [$ac_solid_uname_r < "3."]; then - ac_solid_os=fbx + FreeBSD) if test "$ac_solid_uname_r" \> "3"; then + AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) + ac_solid_os=fex else - ac_solid_os=fex + AC_DEFINE(SS_FBX,1,[Needed in sqlunix.h for wchar defs ]) + ac_solid_os=fbx fi;; # "uname -s" on SCO makes no sense. esac @@ -34,37 +38,21 @@ ac_solid_prefix=soc fi - ODBC_LIBS=echo $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}*.so | cut -d' ' -f1 + ODBC_LIBS=echo $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so | cut -d' ' -f1 if test ! -f $ODBC_LIBS; then ODBC_LIBS=echo $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a | cut -d' ' -f1 fi if test ! -f $ODBC_LIBS; then - if test $ac_solid_version == 35; then - ODBC_LIBS=echo $1/libsolodbc.so | cut -d' ' -f1 - else ODBC_LIBS=echo $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so| cut -d' ' -f1 - fi fi if test ! -f $ODBC_LIBS; then - if test $ac_solid_version == 35; then - ODBC_LIBS=echo $1/libsolodbc.a | cut -d' ' -f1 - else ODBC_LIBS=echo $1/${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.a | cut -d' ' -f1 - fi fi if test ! -f $ODBC_LIBS; then - if test $ac_solid_version == 35; then - ODBC_LIBS=echo $1/bcl${ac_solid_prefix}*.so | cut -d' ' -f1 - else ODBC_LIBS=echo $1/bcl${ac_solid_os}*.so | cut -d' ' -f1 - fi fi if test ! -f $ODBC_LIBS; then - if $ac_solid_version == 35; then - ODBC_LIBS=echo $1/bcl${ac_solid_prefix}*.a | cut -d' ' -f1 - else ODBC_LIBS=echo $1/bcl${ac_solid_os}*.a | cut -d' ' -f1 - fi fi AC_MSG_RESULT(echo $ODBC_LIBS | sed -e 's!.*/!!') ]) Index: php4/ext/odbc/php_odbc.h diff -u php4/ext/odbc/php_odbc.h:1.25 php4/ext/odbc/php_odbc.h:1.26 --- php4/ext/odbc/php_odbc.h:1.25 Sun Jul 23 18:39:48 2000 +++ php4/ext/odbc/php_odbc.h Tue Aug 22 14:27:49 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.h,v 1.25 2000/07/24 01:39:48 david Exp $ */ +/* $Id: php_odbc.h,v 1.26 2000/08/22 21:27:49 kalowsky Exp $ */ #ifndef PHP_ODBC_H #define PHP_ODBC_H @@ -47,10 +47,10 @@ #if !defined(PHP_WIN32) #include <sqlunix.h> #endif - #include <sql.h> #include <sqltypes.h> #include <sqlucode.h> #include <sqlext.h> + #include <sql.h> #endif #undef HAVE_SQL_EXTENDED_FETCH PHP_FUNCTION(solid_fetch_prev); @@ -220,6 +220,9 @@ #if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC ) SQLHANDLE henv; SQLHANDLE hdbc; +#elif defined( HAVE_SOLID_35 ) + SQLHENV henv; + SQLHDBC hdbc; #else HENV henv; HDBC hdbc; @@ -238,6 +241,8 @@ typedef struct odbc_result { #if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC ) SQLHANDLE stmt; +#elif defined( HAVE_SOLID_35 ) + SQLHSTMT stmt; #else HSTMT stmt; #endif @@ -281,6 +286,8 @@ #if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC ) #define ODBC_SQL_ERROR_PARAMS SQLHANDLE henv, SQLHANDLE conn, SQLHANDLE stmt, char *func +#elif defined( HAVE_SOLID_35 ) +#define ODBC_SQL_ERROR_PARAMS SQLHENV henv, SQLHDBC conn, SQLHSTMT stmt, char *func #else #define ODBC_SQL_ERROR_PARAMS HENV henv, HDBC conn, HSTMT stmt, char *func #endif

« previous php.cvs (#1332) next »