CVS update: php31/main

From: Date: Mon, 07 Sep 1998 21:50:34 +0000
Subject: CVS update: php31/main
Groups: php.dev 
Request: Send a blank email to php-dev+get-870@lists.php.net to get a copy of this message
Date: Monday September 7, 1998 @ 17:50 Author: shane Update of /repository/php31/main In directory asf:/u2/tmp/cvs-serv20004/main Modified Files: dl.c main.c Log Message: ms sql module now works with persistent connections. small fix to dl loading on threaded compiles Index: php31/main/dl.c diff -c php31/main/dl.c:2.2 php31/main/dl.c:2.3 *** php31/main/dl.c:2.2 Thu Sep 3 03:11:19 1998 --- php31/main/dl.c Mon Sep 7 17:50:33 1998 *************** *** 64,69 **** --- 64,70 ---- we will come up with something more platform independant later */ void *dllist=NULL; + int php3_dllist_exists(char *name); #endif function_entry dl_functions[] = { *************** *** 100,106 **** /* FIXME HELPME we need to have some way to check if the dl is already loaded before going through all this stuff. */ #if THREAD_SAFE ! if(_php3_dl(file->value.str.val,MODULE_TEMPORARY,return_value,NULL _INLINE_TLS)==FAILURE) #else if(_php3_dl(file->value.str.val,MODULE_TEMPORARY,return_value)==FAILURE) #endif --- 101,107 ---- /* FIXME HELPME we need to have some way to check if the dl is already loaded before going through all this stuff. */ #if THREAD_SAFE ! if(php3_dllist_exists(file->value.str.val) || _php3_dl(file->value.str.val,MODULE_TEMPORARY,return_value,NULL _INLINE_TLS)==FAILURE) #else if(_php3_dl(file->value.str.val,MODULE_TEMPORARY,return_value)==FAILURE) #endif *************** *** 286,291 **** --- 287,306 ---- next=tmp; }while(next!=end); } + } + + /* checks to see if module already listed */ + int php3_dllist_exists(char *name){ + dl_plist *next, *end; + if(dllist){ + next=(dl_plist *)dllist; + end=next; + do{ + if(!stricmp(name,next->dlname)) return 1; + next=next->next; + }while(next!=end); + } + return 0; } #endif #else Index: php31/main/main.c diff -c php31/main/main.c:2.34 php31/main/main.c:2.35 *** php31/main/main.c:2.34 Sun Sep 6 17:34:36 1998 --- php31/main/main.c Mon Sep 7 17:50:33 1998 *************** *** 29,35 **** +----------------------------------------------------------------------+ */ ! /* $Id: main.c,v 2.34 1998/09/06 21:34:36 zeev Exp $ */ /* #define CRASH_DETECTION */ --- 29,35 ---- +----------------------------------------------------------------------+ */ ! /* $Id: main.c,v 2.35 1998/09/07 21:50:33 shane Exp $ */ /* #define CRASH_DETECTION */ *************** *** 690,696 **** void php3_request_shutdown(void *dummy INLINE_TLS) { #if defined(CRASH_DETECTION) ! debug_log("php3_request_shutdown()"); #endif if (GLOBAL(initialized) & INIT_SYMBOL_TABLE) { --- 690,696 ---- void php3_request_shutdown(void *dummy INLINE_TLS) { #if defined(CRASH_DETECTION) ! debug_log("php3_request_shutdown()\n"); #endif if (GLOBAL(initialized) & INIT_SYMBOL_TABLE) { *************** *** 699,733 **** } GLOBAL(initialized) &= ~INIT_ENVIRONMENT; /* does not require any special shutdown */ ! #if 0 debug_log("%d:INIT_SYMBOL_TABLE\n",GetCurrentThreadId()); #endif /* remove classes and user-functions */ if (GLOBAL(module_initialized) & INIT_FUNCTION_TABLE) { _php3_hash_apply(&GLOBAL(function_table), (int (*)(void *)) is_not_internal_function); } ! #if 0 debug_log("%d:INIT_FUNCTION_TABLE\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_TOKEN_CACHE) { tcm_destroy(&GLOBAL(token_cache_manager)); GLOBAL(initialized) &= ~INIT_TOKEN_CACHE; } ! #if 0 debug_log("%d:INIT_TOKEN_CACHE\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_CSS) { stack_destroy(&GLOBAL(css)); GLOBAL(initialized) &= ~INIT_CSS; } ! #if 0 debug_log("%d:INIT_CSS\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_FOR_STACK) { stack_destroy(&GLOBAL(for_stack)); GLOBAL(initialized) &= ~INIT_FOR_STACK; } ! #if 0 debug_log("%d:INIT_FOR_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_SWITCH_STACK) { --- 699,733 ---- } GLOBAL(initialized) &= ~INIT_ENVIRONMENT; /* does not require any special shutdown */ ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_SYMBOL_TABLE\n",GetCurrentThreadId()); #endif /* remove classes and user-functions */ if (GLOBAL(module_initialized) & INIT_FUNCTION_TABLE) { _php3_hash_apply(&GLOBAL(function_table), (int (*)(void *)) is_not_internal_function); } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_FUNCTION_TABLE\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_TOKEN_CACHE) { tcm_destroy(&GLOBAL(token_cache_manager)); GLOBAL(initialized) &= ~INIT_TOKEN_CACHE; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_TOKEN_CACHE\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_CSS) { stack_destroy(&GLOBAL(css)); GLOBAL(initialized) &= ~INIT_CSS; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_CSS\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_FOR_STACK) { stack_destroy(&GLOBAL(for_stack)); GLOBAL(initialized) &= ~INIT_FOR_STACK; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_FOR_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_SWITCH_STACK) { *************** *** 740,746 **** stack_destroy(&GLOBAL(switch_stack)); GLOBAL(initialized) &= ~INIT_SWITCH_STACK; } ! #if 0 debug_log("%d:INIT_SWITCH_STACK\n",GetCurrentThreadId()); #endif --- 740,746 ---- stack_destroy(&GLOBAL(switch_stack)); GLOBAL(initialized) &= ~INIT_SWITCH_STACK; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_SWITCH_STACK\n",GetCurrentThreadId()); #endif *************** *** 749,755 **** stack_destroy(&GLOBAL(phpchar_stack)); GLOBAL(initialized) &= ~INIT_PHPCHAR_STACK; } ! #if 0 debug_log("%d:INIT_PHPCHAR_STACK\n", GetCurrentThreadId()); #endif --- 749,755 ---- stack_destroy(&GLOBAL(phpchar_stack)); GLOBAL(initialized) &= ~INIT_PHPCHAR_STACK; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_PHPCHAR_STACK\n", GetCurrentThreadId()); #endif *************** *** 757,763 **** clean_input_source_stack(); GLOBAL(initialized) &= ~INIT_INCLUDE_STACK; } ! #if 0 debug_log("%d:INIT_INCLUDE_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_FUNCTION_STATE_STACK) { --- 757,763 ---- clean_input_source_stack(); GLOBAL(initialized) &= ~INIT_INCLUDE_STACK; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_INCLUDE_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_FUNCTION_STATE_STACK) { *************** *** 783,789 **** stack_destroy(&GLOBAL(function_state_stack)); GLOBAL(initialized) &= ~INIT_FUNCTION_STATE_STACK; } ! #if 0 debug_log("%d:INIT_FUNCTION_STATE_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_VARIABLE_UNASSIGN_STACK) { --- 783,789 ---- stack_destroy(&GLOBAL(function_state_stack)); GLOBAL(initialized) &= ~INIT_FUNCTION_STATE_STACK; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_FUNCTION_STATE_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_VARIABLE_UNASSIGN_STACK) { *************** *** 799,805 **** GLOBAL(initialized) &= ~INIT_VARIABLE_UNASSIGN_STACK; } ! #if 0 debug_log("%d:INIT_VARIABLE_UNASSIGN_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_LIST) { --- 799,805 ---- GLOBAL(initialized) &= ~INIT_VARIABLE_UNASSIGN_STACK; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_VARIABLE_UNASSIGN_STACK\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_LIST) { *************** *** 810,816 **** /* clean temporary dl's, run request shutdown's for modules */ _php3_hash_apply(&GLOBAL(module_registry), (int (*)(void *)) module_registry_cleanup); ! #if 0 debug_log("%d:INIT_LIST\n",GetCurrentThreadId()); #endif --- 810,816 ---- /* clean temporary dl's, run request shutdown's for modules */ _php3_hash_apply(&GLOBAL(module_registry), (int (*)(void *)) module_registry_cleanup); ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_LIST\n",GetCurrentThreadId()); #endif *************** *** 820,853 **** } ! #if 0 debug_log("%d:INIT_CONSTANTS\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_INCLUDE_NAMES_HASH) { _php3_hash_destroy(&GLOBAL(include_names)); GLOBAL(initialized) &= ~INIT_INCLUDE_NAMES_HASH; } ! #if 0 debug_log("%d:INIT_INCLUDE_NAMES_HASH\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_SCANNER) { reset_scanner(); GLOBAL(initialized) &= ~INIT_SCANNER; } ! #if 0 debug_log("%d:INIT_SCANNER\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_MEMORY_MANAGER) { shutdown_memory_manager(); } ! #if 0 debug_log("%d:INIT_MEMORY_MANAGER\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized)) { php3_error(E_WARNING, "Unknown resources in request shutdown function"); } php3_unset_timeout(_INLINE_TLS_VOID); ! #if 0 debug_log("%d:timer unset\n",GetCurrentThreadId()); #endif --- 820,853 ---- } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_CONSTANTS\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_INCLUDE_NAMES_HASH) { _php3_hash_destroy(&GLOBAL(include_names)); GLOBAL(initialized) &= ~INIT_INCLUDE_NAMES_HASH; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_INCLUDE_NAMES_HASH\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_SCANNER) { reset_scanner(); GLOBAL(initialized) &= ~INIT_SCANNER; } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_SCANNER\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized) & INIT_MEMORY_MANAGER) { shutdown_memory_manager(); } ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:INIT_MEMORY_MANAGER\n",GetCurrentThreadId()); #endif if (GLOBAL(initialized)) { php3_error(E_WARNING, "Unknown resources in request shutdown function"); } php3_unset_timeout(_INLINE_TLS_VOID); ! #if 0 && defined(CRASH_DETECTION) debug_log("%d:timer unset\n",GetCurrentThreadId()); #endif -- 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 (#870) next »