kevin           Tue Apr 10 09:26:29 2001 EDT

  Modified files:              
    /php4/ext/odbc      Makefile.in config.m4 php_odbc.c php_odbc.h 
  Log:
  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. 
  
  
Index: php4/ext/odbc/Makefile.in
diff -u php4/ext/odbc/Makefile.in:1.7 php4/ext/odbc/Makefile.in:1.8
--- php4/ext/odbc/Makefile.in:1.7       Thu Jul  6 01:38:12 2000
+++ php4/ext/odbc/Makefile.in   Tue Apr 10 09:26:27 2001
@@ -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: php4/ext/odbc/config.m4
diff -u php4/ext/odbc/config.m4:1.38 php4/ext/odbc/config.m4:1.39
--- php4/ext/odbc/config.m4:1.38        Tue Apr  3 16:30:44 2001
+++ php4/ext/odbc/config.m4     Tue Apr 10 09:26:27 2001
@@ -213,6 +213,7 @@
       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 @@
                           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: php4/ext/odbc/php_odbc.c
diff -u php4/ext/odbc/php_odbc.c:1.76 php4/ext/odbc/php_odbc.c:1.77
--- php4/ext/odbc/php_odbc.c:1.76       Mon Apr  2 08:18:47 2001
+++ php4/ext/odbc/php_odbc.c    Tue Apr 10 09:26:27 2001
@@ -15,10 +15,11 @@
    | Authors: Stig Sæther Bakken <[EMAIL PROTECTED]>                            |
    |          Andreas Karajannis <[EMAIL PROTECTED]>              |
    |          Frank M. Kromann <[EMAIL PROTECTED]> Support for DB/2 CLI |
+   |         Kevin N. Shallow <[EMAIL PROTECTED]> Velocis Support |
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_odbc.c,v 1.76 2001/04/02 15:18:47 lurcher Exp $ */
+/* $Id: php_odbc.c,v 1.77 2001/04/10 16:26:27 kevin Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -103,15 +104,17 @@
        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 @@
 }
 /* }}} */
 
-#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 @@
 }
 /* }}} */
 
-#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 @@
 }
 /* }}} */
 
-#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: php4/ext/odbc/php_odbc.h
diff -u php4/ext/odbc/php_odbc.h:1.34 php4/ext/odbc/php_odbc.h:1.35
--- php4/ext/odbc/php_odbc.h:1.34       Fri Mar  9 15:44:55 2001
+++ php4/ext/odbc/php_odbc.h    Tue Apr 10 09:26:28 2001
@@ -14,10 +14,11 @@
    +----------------------------------------------------------------------+
    | Authors: Stig Sæther Bakken <[EMAIL PROTECTED]>                        |
    |          Andreas Karajannis <[EMAIL PROTECTED]>              |
+   |         Kevin N. Shallow <[EMAIL PROTECTED]> Velocis Support |
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_odbc.h,v 1.34 2001/03/09 23:44:55 fmk Exp $ */
+/* $Id: php_odbc.h,v 1.35 2001/04/10 16:26:28 kevin Exp $ */
 
 #ifndef PHP_ODBC_H
 #define PHP_ODBC_H
@@ -134,9 +135,18 @@
 
 #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 */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to