]> granicus.if.org Git - php/commitdiff
Fixed compatibility issues in the ODBC extension for the Velocis Database server...
authorKevin <kevin@php.net>
Tue, 10 Apr 2001 16:26:28 +0000 (16:26 +0000)
committerKevin <kevin@php.net>
Tue, 10 Apr 2001 16:26:28 +0000 (16:26 +0000)
ext/odbc/Makefile.in
ext/odbc/config.m4
ext/odbc/php_odbc.c
ext/odbc/php_odbc.h

index 16822de011f335c5fa2b0927b3b7b90190e5c086..c50b30b099d2b2ca49ede58b24e3ab492390faaf 100644 (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)
 
index 43ca2810555bb6e81643c0699322c2c37ef4b100..57166d710e9634e0383fbeb1db35348379a5dad2 100644 (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)
index cb7a1cfe0ee02963cba1d58f27c7395cb561fd6d..ffa4d4101381562fad19aa6d57d0e640a5cddca2 100644 (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)
index b9052685ffd475d7f3a632191a1dbfd25c98ad85..b6cba7b4fb1fa2bd817ee2219ecc32fdb93db3af 100644 (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 */