summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/odbc/Makefile.in2
-rw-r--r--ext/odbc/config.m420
-rw-r--r--ext/odbc/php_odbc.c13
-rw-r--r--ext/odbc/php_odbc.h12
4 files changed, 29 insertions, 18 deletions
diff --git a/ext/odbc/Makefile.in b/ext/odbc/Makefile.in
index 16822de011..c50b30b099 100644
--- a/ext/odbc/Makefile.in
+++ b/ext/odbc/Makefile.in
@@ -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)
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index 43ca281055..57166d710e 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -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)
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index cb7a1cfe0e..ffa4d41013 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -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,15 +104,17 @@ 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)
PHP_FALIAS(odbc_do, odbc_exec, 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)
diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h
index b9052685ff..b6cba7b4fb 100644
--- a/ext/odbc/php_odbc.h
+++ b/ext/odbc/php_odbc.h
@@ -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 */