CVS update: php3/functions

From: Date: Tue, 23 Feb 1999 09:11:45 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-4259@lists.php.net to get a copy of this message
Date: Tuesday February 23, 1999 @ 4:11 Author: thies Update of /repository/php3/functions In directory asf:/u/temp/cvs-serv17225 Modified Files: oci8.c Log Message: works as a Win32 .dll now Index: php3/functions/oci8.c diff -c php3/functions/oci8.c:1.61 php3/functions/oci8.c:1.62 *** php3/functions/oci8.c:1.61 Mon Feb 22 07:35:07 1999 --- php3/functions/oci8.c Tue Feb 23 04:11:45 1999 *************** *** 32,39 **** +----------------------------------------------------------------------+ */ ! /* $Id: oci8.c,v 1.61 1999/02/22 12:35:07 thies Exp $ */ #include "php.h" #include "internal_functions.h" #include "php3_oci8.h" --- 32,46 ---- +----------------------------------------------------------------------+ */ ! /* $Id: oci8.c,v 1.62 1999/02/23 09:11:45 thies Exp $ */ + #if defined(COMPILE_DL) + # ifdef THREAD_SAFE + # undef THREAD_SAFE /* XXX no need in 3.0 */ + # endif + # include "dl/phpdl.h" + # endif + #include "php.h" #include "internal_functions.h" #include "php3_oci8.h" *************** *** 41,47 **** #if HAVE_OCI8 # include "php3_list.h" ! # include "build-defs.h" # include "snprintf.h" # include "head.h" --- 48,56 ---- #if HAVE_OCI8 # include "php3_list.h" ! #if !(WIN32|WINNT) ! # include "build-defs.h" ! # endif # include "snprintf.h" # include "head.h" *************** *** 98,104 **** # if COMPILE_DL ! php3_module_entry *get_module() { return &oci8_module_entry; }; # if (WIN32|WINNT) && defined(THREAD_SAFE) --- 107,113 ---- # if COMPILE_DL ! DLEXPORT php3_module_entry *get_module() { return &oci8_module_entry; }; # if (WIN32|WINNT) && defined(THREAD_SAFE) *************** *** 199,216 **** #define OCI_RETURN_NULLS 1<<2 #define OCI_RETURN_LOBS 1<<3 ! static unsigned char third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; function_entry oci8_functions[] = { ! {"ocidefinebyname", php3_oci8_definebyname, third_arg_force_ref}, ! {"ocibindbyname", php3_oci8_bindbyname, third_arg_force_ref}, {"ocicolumnisnull", php3_oci8_columnisnull, NULL}, {"ocicolumnname", php3_oci8_columnname, NULL}, {"ocicolumnsize", php3_oci8_columnsize, NULL}, {"ocicolumntype", php3_oci8_columntype, NULL}, {"ociexecute", php3_oci8_execute, NULL}, {"ocifetch", php3_oci8_fetch, NULL}, ! {"ocifetchinto", php3_oci8_fetchinto, second_arg_force_ref}, {"ocifreestatement", php3_oci8_freestatement, NULL}, {"ociinternaldebug", php3_oci8_internaldebug, NULL}, {"ocinumcols", php3_oci8_numcols, NULL}, --- 208,226 ---- #define OCI_RETURN_NULLS 1<<2 #define OCI_RETURN_LOBS 1<<3 ! static unsigned char a3_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; ! static unsigned char a2_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; function_entry oci8_functions[] = { ! {"ocidefinebyname", php3_oci8_definebyname, a3_arg_force_ref}, ! {"ocibindbyname", php3_oci8_bindbyname, a3_arg_force_ref}, {"ocicolumnisnull", php3_oci8_columnisnull, NULL}, {"ocicolumnname", php3_oci8_columnname, NULL}, {"ocicolumnsize", php3_oci8_columnsize, NULL}, {"ocicolumntype", php3_oci8_columntype, NULL}, {"ociexecute", php3_oci8_execute, NULL}, {"ocifetch", php3_oci8_fetch, NULL}, ! {"ocifetchinto", php3_oci8_fetchinto, a2_arg_force_ref}, {"ocifreestatement", php3_oci8_freestatement, NULL}, {"ociinternaldebug", php3_oci8_internaldebug, NULL}, {"ocinumcols", php3_oci8_numcols, NULL}, *************** *** 381,390 **** --- 391,402 ---- void php3_info_oci8() { + #if !(WIN32|WINNT) php3_printf("Oracle version: %s<br>\n" "Compile-time ORACLE_HOME: %s<br>\n" "Libraries used: %s", PHP_ORACLE_VERSION, PHP_ORACLE_HOME, PHP_ORACLE_LIBS); + #endif } /* }}} */ *************** *** 671,677 **** outcol = oci8_get_col(statement, i + 1, 0, func); if (outcol == NULL || outcol->indicator == -1) { continue; ! } else if ((outcol->name_len == pval->value.str.len) && (! strncmp(outcol->name,pval->value.str.val,pval->value.str.len))) { return outcol; } --- 683,689 ---- outcol = oci8_get_col(statement, i + 1, 0, func); if (outcol == NULL || outcol->indicator == -1) { continue; ! } else if (((int) outcol->name_len == pval->value.str.len) && (! strncmp(outcol->name,pval->value.str.val,pval->value.str.len))) { return outcol; } *************** *** 813,819 **** oci8_out_column *outcol; oci8_out_column column; OCIParam *param = 0; ! int counter; sword error; ub2 define_type; ub2 stmttype; --- 825,831 ---- oci8_out_column *outcol; oci8_out_column column; OCIParam *param = 0; ! ub4 counter; sword error; ub2 define_type; ub2 stmttype; *************** *** 1402,1408 **** if (getParameters(ht, 4, &stmt, &name, &var, &type) == SUCCESS) { convert_to_long(type); ! ocitype = type->value.lval; } else if (getParameters(ht, 3, &stmt, &name, &var) == FAILURE) { WRONG_PARAM_COUNT; } --- 1414,1420 ---- if (getParameters(ht, 4, &stmt, &name, &var, &type) == SUCCESS) { convert_to_long(type); ! ocitype = (ub2) type->value.lval; } else if (getParameters(ht, 3, &stmt, &name, &var) == FAILURE) { WRONG_PARAM_COUNT; } *************** *** 1469,1475 **** if (getParameters(ht, 5, &stmt, &name, &var, &maxlen,&type) == SUCCESS) { convert_to_long(type); ! ocitype = type->value.lval; convert_to_long(maxlen); ocimaxlen = maxlen->value.lval; } else if (getParameters(ht, 4, &stmt, &name, &var, &maxlen) == SUCCESS) { --- 1481,1487 ---- if (getParameters(ht, 5, &stmt, &name, &var, &maxlen,&type) == SUCCESS) { convert_to_long(type); ! ocitype = (ub2) type->value.lval; convert_to_long(maxlen); ocimaxlen = maxlen->value.lval; } else if (getParameters(ht, 4, &stmt, &name, &var, &maxlen) == SUCCESS) { -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4259) next »