CVS update: php31/ext/odbc

From: Date: Thu, 27 Aug 1998 05:01:10 +0000
Subject: CVS update: php31/ext/odbc
Groups: php.dev 
Request: Send a blank email to php-dev+get-601@lists.php.net to get a copy of this message
Date: Thursday August 27, 1998 @ 1:01 Author: shane Update of /repository/php31/ext/odbc In directory asf:/u2/tmp/cvs-serv25351/ext/odbc Modified Files: unified_odbc.c Log Message: compile fixes Index: php31/ext/odbc/unified_odbc.c diff -c php31/ext/odbc/unified_odbc.c:2.3 php31/ext/odbc/unified_odbc.c:2.4 *** php31/ext/odbc/unified_odbc.c:2.3 Tue Aug 25 23:14:19 1998 --- php31/ext/odbc/unified_odbc.c Thu Aug 27 01:01:10 1998 *************** *** 47,52 **** --- 47,56 ---- #include "head.h" #include "snprintf.h" + #if COMPILE_DL + #include "../phpdl.h" + #endif + #if HAVE_UODBC #ifdef THREAD_SAFE *************** *** 119,125 **** #if COMPILE_DL ! php3_module_entry *get_module() { return &UODBC_MODULE_ENTRY; }; #if (WIN32|WINNT) && defined(THREAD_SAFE) /*NOTE: You should have an odbc.def file where you --- 123,129 ---- #if COMPILE_DL ! DLEXPORT php3_module_entry *get_module() { return &UODBC_MODULE_ENTRY; }; #if (WIN32|WINNT) && defined(THREAD_SAFE) /*NOTE: You should have an odbc.def file where you *************** *** 214,234 **** #endif #ifdef THREAD_SAFE UODBC_GLOBAL_STRUCT *UODBC_GLOBALS; - #if !COMPILE_DL - #if WIN32|WINNT - CREATE_MUTEX(UODBC_MUTEX,"UODBC_TLS"); - #endif - #endif - #if !COMPILE_DL - SET_MUTEX(UODBC_MUTEX); numthreads++; if (numthreads==1){ if ((UODBC_TLS=TlsAlloc())==0xFFFFFFFF){ - FREE_MUTEX(UODBC_MUTEX); return 0; }} - FREE_MUTEX(UODBC_MUTEX); - #endif UODBC_GLOBALS = (UODBC_GLOBAL_STRUCT *) LocalAlloc(LPTR, sizeof(UODBC_GLOBAL_STRUCT)); TlsSetValue(UODBC_TLS, (void *) UODBC_GLOBALS); --- 218,228 ---- *************** *** 311,332 **** UODBC_GLOBAL_STRUCT *UODBC_GLOBALS; UODBC_GLOBALS = TlsGetValue(UODBC_TLS); #endif ! SQLFreeEnv(UODBC_GLOBAL(PHP3_UODBC_MODULE).henv); #ifdef THREAD_SAFE if (UODBC_GLOBALS != 0) { LocalFree((HLOCAL) UODBC_GLOBALS); } - #if !COMPILE_DL - SET_MUTEX(UODBC_MUTEX); numthreads--; if (!numthreads) { if (!TlsFree(UODBC_TLS)) { ! FREE_MUTEX(UODBC_MUTEX); ! return 0; } } - FREE_MUTEX(UODBC_MUTEX); - #endif #endif return SUCCESS; } --- 305,321 ---- UODBC_GLOBAL_STRUCT *UODBC_GLOBALS; UODBC_GLOBALS = TlsGetValue(UODBC_TLS); #endif ! SQLFreeEnv(&UODBC_GLOBAL(PHP3_UODBC_MODULE).henv); #ifdef THREAD_SAFE if (UODBC_GLOBALS != 0) { LocalFree((HLOCAL) UODBC_GLOBALS); } numthreads--; if (!numthreads) { if (!TlsFree(UODBC_TLS)) { ! return FAILURE; } } #endif return 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 (#601) next »