Fixed compatibility issues in the ODBC extension for the Velocis Database server. Specifically, config.m4 was changed to use the client libraries instead of the serer libraries, and to look for the libs in the $RDSHOME/lin directory ass opposed to the $RDSHOME/bin directory. Makefile.in was changed to use the php_odbc.c file as the source for Velocis support. Other misc changes include a few #defines for some undefined data types and some #ifdefs for unsupported functions.

This commit is contained in:
Kevin 2001-04-10 16:26:28 +00:00
parent 86c2eaf741
commit 3cd2c989d3
4 changed files with 29 additions and 18 deletions

View File

@ -1,6 +1,6 @@
LTLIBRARY_NAME = libodbc.la
LTLIBRARY_SOURCES = php_odbc.c velocis.c
LTLIBRARY_SOURCES = php_odbc.c
LTLIBRARY_SHARED_NAME = odbc.la
LTLIBRARY_SHARED_LIBADD = $(ODBC_LFLAGS) $(ODBC_LIBS)

View File

@ -213,6 +213,7 @@ AC_ARG_WITH(empress,
ODBC_LIBDIR=$withval/lib
fi
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_TYPE=empress
AC_DEFINE(HAVE_EMPRESS,1,[ ])
AC_MSG_RESULT(yes)
@ -232,24 +233,21 @@ AC_ARG_WITH(velocis,
install directory, defaults to /usr/local/velocis.],
[
PHP_WITH_SHARED
if test "$withval" != "no"; then
if test "$withval" = "yes"; then
ODBC_INCDIR=/usr/local/velocis/include
ODBC_LIBDIR=/usr/local/velocis
ODBC_INCDIR=/usr/local/velocis/include
ODBC_LIBDIR=/usr/local/velocis/lib
else
ODBC_INCDIR=$withval/include
ODBC_LIBDIR=$withval
ODBC_INCDIR=$withval/include
ODBC_LIBDIR=$withval/lib
fi
ODBC_INCLUDE=-I$ODBC_INCDIR
ODBC_LIBDIR="$ODBC_LIBDIR/bin"
case `uname` in
FreeBSD|BSD/OS)
ODBC_LIBS="$ODBC_LIBDIR/../lib/rdscli.a -lcompat";;
*)
ODBC_LIBS="-l_rdbc -l_sql";;
esac
ODBC_TYPE=velocis
ODBC_LFLAGS=-L$ODBC_LIBDIR
ODBC_LIBS="-lCadm -lCdict -lCenc -lCrdm -lCrpc -lCrdbc -lCrm -lCuapi -lutil"
AC_DEFINE(HAVE_VELOCIS,1,[ ])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)

View File

@ -15,6 +15,7 @@
| Authors: Stig Sæther Bakken <ssb@fast.no> |
| Andreas Karajannis <Andreas.Karajannis@gmd.de> |
| Frank M. Kromann <frank@frontbase.com> Support for DB/2 CLI |
| Kevin N. Shallow <kshallow@tampabay.rr.com> Velocis Support |
+----------------------------------------------------------------------+
*/
@ -103,14 +104,16 @@ function_entry odbc_functions[] = {
PHP_FE(odbc_columns, NULL)
PHP_FE(odbc_gettypeinfo, NULL)
PHP_FE(odbc_primarykeys, NULL)
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) /* not supported now */
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35) && !defined(HAVE_VELOCIS) /* not supported now */
PHP_FE(odbc_columnprivileges, NULL)
PHP_FE(odbc_tableprivileges, NULL)
#endif
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) /* not supported */
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) /* not supported */
PHP_FE(odbc_foreignkeys, NULL)
PHP_FE(odbc_procedures, NULL)
#if !defined(HAVE_VELOCIS)
PHP_FE(odbc_procedurecolumns, NULL)
#endif
#endif
PHP_FE(odbc_specialcolumns, NULL)
PHP_FE(odbc_statistics, NULL)
@ -2752,7 +2755,7 @@ PHP_FUNCTION(odbc_columns)
}
/* }}} */
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) && !defined(HAVE_VELOCIS)
/* {{{ proto int odbc_columnprivileges(int connection_id, string catalog, string schema, string table, string column)
Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table */
PHP_FUNCTION(odbc_columnprivileges)
@ -3079,7 +3082,7 @@ PHP_FUNCTION(odbc_primarykeys)
}
/* }}} */
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) && !defined(HAVE_VELOCIS)
/* {{{ proto int odbc_procedurecolumns(int connection_id [, string qualifier, string owner, string proc, string column])
Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures */
PHP_FUNCTION(odbc_procedurecolumns)
@ -3416,7 +3419,7 @@ PHP_FUNCTION(odbc_statistics)
}
/* }}} */
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35) && !defined(HAVE_VELOCIS)
/* {{{ proto int odbc_tableprivileges(int connection_id, string qualifier, string owner, string name)
Returns a result identifier containing a list of tables and the privileges associated with each table */
PHP_FUNCTION(odbc_tableprivileges)

View File

@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
| Authors: Stig Sæther Bakken <ssb@guardian.no> |
| Andreas Karajannis <Andreas.Karajannis@gmd.de> |
| Kevin N. Shallow <kshallow@tampabay.rr.com> Velocis Support |
+----------------------------------------------------------------------+
*/
@ -134,9 +135,18 @@ PHP_FUNCTION(solid_fetch_prev);
#define ODBC_TYPE "Velocis"
#define UNIX
#define HAVE_SQL_EXTENDED_FETCH 1
/*
* Extended Fetch in the Velocis ODBC API is incapable of returning long varchar (memo) fields.
* So the following line has been commented-out to accomadate. - KNS
*
* #define HAVE_SQL_EXTENDED_FETCH 1
*/
#include <sql.h>
#include <sqlext.h>
#define SQLINTEGER SDWORD
#define SQLSMALLINT SWORD
#define SQLUSMALLINT UWORD
#elif defined(HAVE_DBMAKER) /* DBMaker */